Reputation: 370
I need all locations of type cafe, gas_station, and restaurant using Google Places Api. Here is my query via the API:
https://maps.googleapis.com/maps/api/place/search/json?location=41.104805,29.024291&radius=50000&sensor=true&key=AIzaSyAVH0qHD6BPxRlnck3rIqcxC5TTwOTyfds&types=gas_station||shopping_mall
This returns mosque location types only. I'm not getting shopping_mall, gas_station, or restaurant types. here i am checking type in google place api
How can i get all these types?
Upvotes: 2
Views: 15969
Reputation: 582
It was suggested in other SO thread, that you use 'keyword' instead of 'types' in your query to Google. Related SO thread: How can I search places with specific types using Google Places API?
Upvotes: 0
Reputation: 124
Since the answer above was posted, Google has added support for additional location types.
https://developers.google.com/places/documentation/supported_types
Upvotes: 2
Reputation: 70085
Unfortunately, Google Places API does not appear to have anything under those categories in that area.
Use types=establishment
to get a more complete list of businesses etc. in that area.
Unfortunately, you will have to find some other way to determine what is a gas station, etc. Google Places API does not appear to have that data, at least at this time.
It may be possible to contribute that data yourself.
Upvotes: 2