Atma
Atma

Reputation: 29795

API for searching for specific places by proximity

I would like to return specific places (stores like Target, Macy's, etc.) by location (latitude, longitude).

I have been using the google places api and entering the different stores in the name parameter. The results are inconsistent at best.

Is this the api I should be using to return specific stores by name and proximity? The google places api near by search has only a single name parameter. I would ideally like to search for several specific stores in a single request to the endpoint for performance reasons.

In conclusion What api should I be using to return specific stores by name and proximity?

Upvotes: 0

Views: 1295

Answers (2)

Atma
Atma

Reputation: 29795

It seems as if the foursquare api does let you search for multiple specific places.

Here is an example url that does the trick:

https://api.foursquare.com/v2/venues/search?ll=34.017717,-118.159335&query=Target Victoria's Secret Macy's &intent=browse&radius=16094&oauth_token=mytoken g

So I'm abandoning Google Places and going with FourSquare.

Upvotes: 0

Chris Green
Chris Green

Reputation: 4425

The Google Places API is the correct Google API to use; however, as you mentioned it does not support multiple name or keyword parameters. There is an active Places API - Feature Request for this here, please star it if you wish to see it resolved and to be notified of future changes.

Instead of using the name parameter, try using the keyword parameter. The keyword parameter is matched against all available fields, including but not limited to name, type, and address, as well as customer reviews and other third-party content. This can often yield more or better results.

Upvotes: 2

Related Questions