Question

I have recently started using google places api and am a big noob on it, I have looked around the main docs on how to run a query on the API but seems that It does not support what I want or im looking at the wrong place.

I need to search on a specific place for a specific term for example:

  • Restaurants and USA

Is this possible or how would I have to go in order to produce it using the API ?

Was it helpful?

Solution

When you do a Places Search: https://developers.google.com/maps/documentation/places/#PlaceSearches You can specify a types parameter which limits the types of things you are searching for.

Or you can specify a keyword parameter which selects for a certain term across the whole Place record.

For location, your only option is to select a latitude/longitude pair and specify a radius. This won't work for "USA" as the maximum radius is 50000 meters. You could add that as a keyword however. For locations such as cities, you could geocode first to get the lat/long pair: https://developers.google.com/maps/documentation/geocoding/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top