Target Destination result which dint came in CategorySearch

Hello Tomtom Api,

I have a case where I near to find a particular nearby school near a particular source address, for the source address i am using GeoCode Search API to get the lang, long and tried CategorySearch (api.tomtom.com/search/2/categorySearch/schools.json) to get the school data which i need nearby , but dint got that particular school in some cases , and i have the school name in my database , now i need to pick this particular school with the name and get the distance from that source address, so i can get data similar the CategorySearch result (i.e distance from source, rating , full address etc) , how can I do that , one option I think is as follows:

1- use the target school name and pass it with GeoCode api , to get the lang and long and full address of the school
2- Now how can I get the properties of this school along with the distance from the source address (for which I already have GeoCode and CategorySearch executed) ??

Or any other simpler way to do it ?


Another question, is there a way to exclude some "wildcards words " from CategorySearch , like i know some naming pattern like ‘%Saint%’ and dont want CategorySearch result to give me results having this wildcard or if reverse of it can also work to give “Wildcard” of result that i want , i am using categorySearch like this

https://api.tomtom.com/search/2/categorySearch/schools.json?key=&categorySet=7372005&classifications=SCHOOL&lat=XXX&lon=-XXX

Thank you in advance !!

First part was answered also via email. Please, keep the discussion in one place.
I’d suggest to use POI Search instead of Geocoding when searching for POIs.
For calculating distance you can use Routing API.

For the second part: usually we provide parameters that can narrow the results. I don’t recall any that would allow to exclude particular group of results.

1 Like