Getting list of POI from Google Places API

2020-06-03 08:42发布

问题:

Can anyone guide how to get list of POI from a particular city for e.g. ahmedabad.

Got the query https://maps.googleapis.com/maps/api/place/nearbysearch/xml?location=23.006000,72.601100&types=point_of_interest&radius=50000&sensor=false&key=YouAPIKey

"point_of_interest" its already mentioned that they provide but not sure how

https://developers.google.com/places/documentation/supported_types

Help will be appreciated

回答1:

You need to pass any one of the supported type to your query against types.

Restricts the results to Places matching at least one of the specified types. Types should be separated with a pipe symbol (type1|type2|etc). See the list of supported types.

https://developers.google.com/places/documentation/supported_types



回答2:

https://maps.googleapis.com/maps/api/place/textsearch/json?query=places+in+'city'&key='APIKEY'

Replace with your city and API KEY.



回答3:

I have came across same issue i have tried all the answers on how to find points of interest using places api as type : point_of interest is now allowed now

following worked for me query todo+in+city or country

https://maps.googleapis.com/maps/api/place/textsearch/json?query=todo+in+India&key=yourkey