Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get more than 60 results from the Google Places API?

I was able to obtain the post office result by the Google Places API call below.

https://maps.googleapis.com/maps/api/place/search/xml?location=35.610418,139.182358&radius=1000000&types=post_office&language=ja&sensor=false&key="MyKey"

But, The third page does not have "next_page_token" tags, you can not retrieve the results following.

How can I get the more than 60 results after the fourth pages?.

like image 693
user1774357 Avatar asked Oct 25 '12 14:10

user1774357


People also ask

Is it possible to get more than 20 results from Google Places?

It is going to help a little, but the way it is currently, Google Places API is useless. Now it is possible to have more than 20 results (but up to 60), a parameter page_token was added to the API. Returns the next 20 results from a previously run search.

How does the Google Places API work?

Search for a coffee shop near downtown Raleigh, NC and an example of an output; Image by Author The Google Places API effectively executes this search for you within the specified parameters and returns the results for each location that appears from the search.

How many results can I get from the Places API?

ORIGINAL ANSWER: The documentation says that the Places API returns up to 20 results. It does not indicate that there is any way to change that limit. So, the short answer seems to be: You can't.

How does the Places API sort results by prominence?

By default, the Places API sorts results by prominence within the supplied radius. A Nearby Search request can return up to 60 results, split across three pages. If a place ranks 22nd in prominence, it will appear on the second page of results which you can access through paging.


2 Answers

Contact Google sales to get a business license with higher usage limits.... or are you trying to scrape results?

like image 192
Marcelo Avatar answered Oct 26 '22 13:10

Marcelo


Old question, but thought I'd point out Radar Search to get up to 200 places. The response just returns the place id, which you can then use to get the details.

Radar Search is deprecated as of June 30, 2017. This feature is turned down as of June 30, 2018.

like image 44
Evan Avatar answered Oct 26 '22 14:10

Evan