Brandon Buster
Brandon Buster

Reputation: 77

Google Places API: Specify State in URL Params

I'm having trouble finding a way to filter Google Places results by city and state. My example below searches Dominos Pizza in "Springfield." The results contain many different states. How could I specify "Springfield, CT"?

https://maps.googleapis.com/maps/api/place/textsearch/xml?query=dominos+pizza+in+springfield&key=123

Upvotes: 0

Views: 518

Answers (1)

bribeiro
bribeiro

Reputation: 727

You can append the location to your request:

https://maps.googleapis.com/maps/api/place/textsearch/json?query=dominos&sensor=false&location=40.67,-73.94&radius=100

See the full documentation here: https://developers.google.com/places/documentation/search#TextSearchRequests

Upvotes: 0

Related Questions