google-mapsgoogle-maps-api-3autocompletegoogle-places-api

How to find only school results in google autocomplete api?


I want to search only schools in google autocomplete api. I have tried but it does not filter the search specific to schools only. I have read from below url

https://developers.google.com/places/web-service/autocomplete

But it has only types parameters for filtering results.

I am able to search only schools in google nearby places search but it requires me to send lat, long but I want to search all schools despite of any location.


Solution

  • At present time Places API autocomplete doesn't support filtering by types like school, restaurant, etc.

    There is a feature request in Google issue tracker to make it possible filter autocomplete by types that are supported in Places API searches:

    https://issuetracker.google.com/issues/35820774

    As you can see the feature request was filed in 2011. Unfortunately, it looks like Google didn't set a high priority on this task. I would suggest starring the feature request to add your vote. Hopefully Google will implement it one day.