I am developing an 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 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 locations. 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 is the problem that every time it returns only 20 result. If anyhow this problem is resolved then it will be great to use the Places API..
Please kindly help me.....
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. Of course, you might be able to sort of fake it by doing queries for several locations, and then merging/de-duplicating the results.
In order to have access to more than 5 reviews with the Google API you have to purchase Premium data Access from Google. That premium plan will grant you access to all sorts of additional data points you have to shell out a pretty penny.
Go to APIs & Services → Dashboard → Enable APIs & Services at the top and Choose Maps Javascript API from the API Library. This will open up the Map JavaScript API page, and Enable it.
Currently, there is no way to get phone number from the Places API search response. In order to get a phone number you have to execute a Places details request for each individual place ID.
As per the documentation:
https://developers.google.com/places/web-service/search#PlaceSearchResponses
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:
https://cloud.google.com/maps-platform/terms/?_ga=#3-license
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:
https://developers.google.com/places/web-service/search#PlaceSearchRequests
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With