使用 google 个地点 api 检索 place/country 的兴趣点(attractions/tourist 个地点)

retrieve points of interests (attractions/tourist places) of a place/country using google places api

我想通过 google 个地方 api 检索 place/country 的兴趣点,比如 'points of interests in london'。我希望结果与我 google 像 [这里][1.我用过这样的东西

'https://maps.googleapis.com/maps/api/place/radarsearch/json?location='+str(lat)+','+str(long)+'&radius=500&type=tourist&rankby=prominence&key=API_KEY')

其中lat,long分别是place/country的纬度和经度。

但是生成的 json 文件不会检索该地点的兴趣点,而只是输出附近的地点。

我也试过这个

'https://maps.googleapis.com/maps/api/place/nearbysearch/json?location='+str(lat)+','+str(long)+'&radius=500&type=tourist&&rankby=prominence&key=API_KEY'

结果相同

有没有不使用半径参数的选项

请帮帮我

您可能正在寻找 API 显示 Google 搜索结果,并且有一个:Google 自定义搜索 https://developers.google.com/custom-search/docs/overview

如果您要寻找更具体、受支持的类型,您可以使用“附近”或“雷达”搜索:https://developers.google.com/places/supported_types#table1

试试这个 google 地方 API url。您将获得 interest/Attraction/Tourists 个地点的积分(例如:)纽约市。您必须使用 CITY NAME 和关键字 Point Of Interest

https://maps.googleapis.com/maps/api/place/textsearch/json?query=new+york+city+point+of+interest&language=en&key=API_KEY

这些 API 结果与以下 google 搜索结果相同。

https://www.google.com/search?sclient=psy-ab&site=&source=hp&btnG=Search&q=New+York+point+of+interest

试试这个 google 地方 API url。 https://maps.googleapis.com/maps/api/place/textsearch/json?query=point+of+interest+in+cityName&key=API_KEY

请绑定使用googleAPI

  1. 第 1 步: 创建GoogleAPI键Get API Key
  2. 第 2 步:添加地点 API
  3. 第 3 步:实施

$url= "https://maps.googleapis.com/maps/api/place/textsearch/json?query=dubai+point+of+interest&language=en&radius=2000&key=API_KEY";

$json=file_get_contents($url);

$obj = json_decode($json);

print_r($obj);

我参与了一个广泛使用此功能的项目。最后,获取城市景点的最佳方式是使用如下查询:

https://maps.googleapis.com/maps/api/place/autocomplete/json?input=your-query-here&types=establishment&location=37.76999,-122.44696&radius=500&key=YOUR_API_KEY

如果您想要非商家的兴趣点,请删除 types=establishment 参数。