Why do some results show up in Google Maps but not

2019-07-01 20:51发布

Ok, so when I search for "Dobry" on Google Maps I get this result: http://maps.google.de/maps/place?q=dobry&hl=de&cid=15804306880695571087

But when I try to retrieve that same restaurant from the Places API, https://maps.googleapis.com/maps/api/place/search/json?location=48.1321091,11.366&radius=500&types=establishment&sensor=false&name=Dobry&key=ABCDEF1234, I get ZERO_RESULTS.

How can I retrieve the id (not cid) Tag of that establishment? And why do the results differ? The lat/long location should be right. What am I doing wrong?

2条回答
相关推荐>>
2楼-- · 2019-07-01 21:28

I have the exact same issue:

Restaurant "Da Bruno" shows up in Google maps:

http://maps.google.com/maps/place?cid=6903340902649387066

But cannot be found in Places API:

https://maps.googleapis.com/maps/api/place/search/json?location=20.550509,-91.40625&radius=500&types=establishment&sensor=false&name=Da+Bruno&key=YOUR_ID_HERE

My theory here is that Places API does not query the same database as Google Maps, but if certain conditions are satisfied, POIs from the Google Maps database are also copied to the Places API database, which is why the original poster's POI is now in both.

Will update if I find more.

查看更多
聊天终结者
3楼-- · 2019-07-01 21:40

The search box uses the Query Autocomplete endpoint, it will give the same result, use the location parameter to bias the results

查看更多
登录 后发表回答