Google places API returning only 5 results

2019-03-18 00:27发布

问题:

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

e.g. URL

i searched for keyword "new"

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

回答1:

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