Google places API returning only 5 results

淺唱寂寞╮ 提交于 2019-12-03 10:54:46

问题


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




回答2:


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



来源:https://stackoverflow.com/questions/20785537/google-places-api-returning-only-5-results

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!