Scorpion Scorpion - 4 months ago 145x
Android Question

How to get 20+ result from Google Places API?

I am developing a app in which i am getting the list of ATM's near by the user. For that i am using Google Places API, but every time it returns 20 result only. I want to get more results. In the API doc it is mention that it will return 20 result but i would like to know that is there any way i can get more data or I have to create my own database for that?
Also what i found in the API is that it does not have all the ATM's for India. The information is also not accurate for some of the location. So Please suggest me some idea for that i should use my own database or not? I know that i can register places in the Google Places but there the problem is that every time it returns only 20 result; if anyhow this problem is resolve then it will be great to use the Places API..

Please kindly help me.....


As per the documentation:

EDIT: Place API now supports pagination of up to 60 results. See below for details.

The Places API will return up to 20 establishments per query; however, each search can return as many as 60 results, split across three pages. If your search will return more than 20, then the search response will include an additional parameter — next_page_token. Pass the value of next_page_token to the page_token parameter of a new place search to see the next set of 20 results.

There is also strict terms of service that specify you cant Pre-Fetch, Cache, or Store Content unless it is the content identifier or key you are permitted to store i.e. reference token from a places search:

In regards to not being able to find ATM's in India. All places are categorized under the type establishment until Google has enough metadata about a place to categorize it under more specific place types like ATM, cafe, bar etc. A work around that may find more results is to use the keyword parameter in your request with something like 'ATM', 'bank' or 'finance' as the value. As per the documentation: 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.