Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Search all places in given city name

Right now i am using Google Places API for fetching Restaurant list in particular city, query like

https://maps.googleapis.com/maps/api/place/textsearch/xml?query=restaurants+in+Sydney&sensor=true&key=AddYourOwnKeyHere

But the problem here is that we can only have 20 result and with help of next_page_token in the response we can again fetch 20 more, by this we can only have 60 result.

Mention on Google Places API page

The maximum number of results that can be returned is 60

So is there any other authentic way to fetch all the Restaurant details.

Just for information : I am implementing this in android application.

like image 345
rajpara Avatar asked Nov 14 '22 00:11

rajpara


1 Answers

Searches are performed by looking within a radius of a given set of coordinates (you can't search just by city name). The maximum search radius is 50km. If there's more than 60 results in that area, you could reduce your search radius, then split up the query into multiple calls. I'm not sure if it would be appropriate to have the user fetch that much data on a mobile device all at once, though.

like image 191
banderkat Avatar answered Jan 17 '23 03:01

banderkat