How to find only school results in google autocomplete api?

一个人想着一个人 提交于 2019-12-02 09:58:38

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.

This is what I found working for me. It is not ideal, but better than nothing

https://maps.googleapis.com/maps/api/place/textsearch/json?key=MY-APP-KEY&query=shaheen%20public&types=school

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!