Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to obtain more than 5 results from google.maps.places.Autocomplete?

In my application, I am displaying google.maps.places.Autocomplete view integrated in an html page in a webview. While typing on it, I am getting only 5 dropdown results. How can I increase the search results? Anyone please help..

like image 723
Salu V S Avatar asked Aug 01 '15 11:08

Salu V S


People also ask

How do I get more than 5 reviews on Google places API?

Save this answer. Show activity on this post. 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.

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

If a place ranks greater than 60th in prominence it will not be included in the search result, even if it is closer to the center of your search. You can sort your results by distance instead of prominence by setting the rankby parameter in your query to distance and omitting the radius parameter.

How can I get more than 20 results on Google places API?

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. Setting a page_token parameter will execute a search with the same parameters used previously — all parameters other than page_token will be ignored.


1 Answers

From the documentation:

A JSON response contains two root elements:

"status" contains metadata on the request. See Status Codes below.

"predictions" contains an array of places, with information about the place. The Places API returns up to 5 results.

Source: https://developers.google.com/maps/documentation/places/web-service/autocomplete#place_autocomplete_responses

like image 84
Ravi Avatar answered Oct 21 '22 00:10

Ravi