0

I would like to allow users to search for a keyword + city to return results for that keyword in a city.

For example "starbucks Seattle" should return all starbucks in Seattle.

However, it doesn't seem that keyword search includes cities - and so "starbucks seattle" just returns nothing.

I think the autocomplete api has such functionality, but the places api does not.

Any suggestions?

1 Answers1

5

Try using the Places API Textsearch endpoint:

https://maps.googleapis.com/maps/api/place/textsearch/json?query=starbucks+seattle&sensor=false&key=YOUR_API_KEY

Chris Green
  • 4,397
  • 1
  • 23
  • 21
  • 1
    https://maps.googleapis.com/maps/api/place/textsearch/json?query=cafe+New+York+food&sensor=false&key=... returns "formatted_address" : "316 Victoria Avenue, Chatswood NSW, Australia" – Oleg Sh Sep 05 '13 at 19:46