Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google places API returning only 5 results

I am using Google places API, It returns only top 5 search results. Is there any way to increase the count.

e.g. URL

I have searched for keyword "new"

https://maps.googleapis.com/maps/api/place/autocomplete/json?input=new&types=%28regions%29&sensor=false&key=API_KEY

like image 256
Jitender Dev Avatar asked Dec 26 '13 13:12

Jitender Dev


People also ask

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

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 20 results on Google Places API?

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.

How do I get data from Google Maps places API?

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.


2 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/places/web-service/autocomplete#place_autocomplete_responses

like image 50
Joel Fernandes Avatar answered Oct 29 '22 23:10

Joel Fernandes


Google specifies that they only give up to 5 results for place API. You can check below image where google accepts this. Google Place API Doc Image

like image 32
P A Gosai Avatar answered Oct 29 '22 23:10

P A Gosai