Google Places API: More specific types?

旧城冷巷雨未停 提交于 2019-12-08 11:15:26

问题


When I Google "Justine's" I can see that it's listed as a "French Restaurant". (See screenshot)

When I use the Google Places API to get details about the same spot I only see a list of "types" that includes high-level terms like "restaurant" and "bar", but I see no specific types like "French Restaurant".

Does anyone know if it's possible to get this data?

Thanks!


回答1:


I think you would probably have to check with the text search method on the api.. https://developers.google.com/places/documentation/search#TextSearchRequests

So your request would end up looking something like the below, restricted down to a specific area

https://maps.googleapis.com/maps/api/place/textsearch/json?query=French +Restaurant&sensor=true&location=yourLocationHere&radius=20&key=yourKeyHere

However this will return all other French restaurants in the area, so if you just want to return the one result I would use the Place Details request instead



来源:https://stackoverflow.com/questions/36127996/google-places-api-more-specific-types

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