通过“附近搜索”(旧版),您可以搜索指定区域内的地点。您可以通过提供关键字或指定要搜索的地点类型来优化搜索请求。
“附近搜索”(旧版)请求
附近搜索(旧版)请求是以下形式的 HTTP 网址:
https://maps.googleapis.com/maps/api/place/nearbysearch/output?parameters
其中,output 可以是以下任一值:
json(推荐)表示以 JavaScript 对象表示法 (JSON) 格式输出xml表示以 XML 格式输出
需要提供某些参数才能发起附近搜索(旧版)请求。依照网址的标准,所有参数都使用“与”符号 (&) 分隔。
必需参数
-
地理位置
要检索地点信息所围绕的点。必须指定为
latitude,longitude。 -
半径
定义返回地点结果的距离范围(以米为单位)。您可以传递
location和radius参数,使结果偏向指定圆形区域。这样做会指示地点服务优先显示该圆形区域内的结果;指定区域以外的结果可能仍会显示。系统会自动将半径限制为最大值,具体取决于搜索类型和其他参数。
- 自动补全:50,000 米
-
附近搜索:
- 使用
keyword或name:50,000 米 -
不含
keyword或name-
最多 50,000 米,根据区域密度动态调整,与
rankby参数无关。 -
使用
rankby=distance时,系统不会接受半径参数,并会返回INVALID_REQUEST。
-
最多 50,000 米,根据区域密度动态调整,与
- 使用
- 查询自动补全:50,000 米
- 文本搜索:5 万米
可选参数
-
关键字
要用作搜索条件的文本字符串,例如“餐馆”或“长安街 123 号”。该参数必须是地点名称、地址或场所类别。任何其他类型的输入都可能产生错误,并且不能保证返回有效结果。Google Places 服务将根据此字符串返回候选匹配结果,并按照其判断的相关性对结果进行排序。
使用此参数明确包含位置信息可能会与 location、radius 和 rankby 参数冲突,从而导致意外结果。
如果省略此参数,则不会返回 business_status 为 CLOSED_TEMPORARILY 或 CLOSED_PERMANENTLY 的地点。
-
language
返回结果所用的语言。
- 请参阅支持的语言列表。Google 会经常更新支持的语言,因此该列表可能并非详尽无遗。
-
如果未提供
language,API 会尝试使用Accept-Language标头中指定的首选语言。 - 该 API 会尽力提供用户和当地人都能看懂的街道地址。为了实现这一目标,它会返回本地语言的街道地址,并在必要时根据首选语言将地址音译为用户可读的文字。所有其他地址均以首选语言返回。地址组成部分全部以同一种语言返回,该语言是从第一个组成部分中选择的。
- 如果首选语言中没有相应名称,API 会使用最接近的匹配项。
- 首选语言对 API 选择返回的结果集以及返回顺序有较小的影响。地理编码器会根据语言以不同的方式解读缩写,例如街道类型的缩写,或者在一种语言中有效但在另一种语言中无效的同义词。例如,utca 和 tér 是匈牙利语中“街道”的同义词。
-
maxprice
将结果限制为仅包含指定范围内的地点。有效值的范围介于 0(最实惠)和 4(最昂贵)之间,包括 0 和 4。特定值所表示的确切金额会因地区而异。
-
minprice
将结果限制为仅包含指定范围内的地点。有效值的范围介于 0(最实惠)和 4(最昂贵)之间,包括 0 和 4。特定值所表示的确切金额会因地区而异。
-
name
等同于
keyword。此字段中的值会与keyword字段中的值合并,作为同一搜索字符串的一部分进行传递。 -
opennow
仅返回在发送查询时开门营业的地点。如果您在查询中包含此参数,系统不会返回那些未在 Google 地点数据库中指定营业时间的地点。
-
pagetoken
返回之前运行的搜索中的最多 20 个结果。设置
pagetoken参数将执行与之前使用的参数相同的搜索,除了 pagetoken 之外的所有参数都将被忽略。 -
rankby
指定结果的列出顺序。可能的值包括:
-
prominence(默认)。此选项可根据重要性对结果排序。系统会优先列出指定半径范围内的知名地点,而不是虽然匹配但不那么知名的附近地点。 知名度受 Google 索引中的地点排名、全球知名度和其他因素的影响。指定突出程度时,必须提供radius参数。 -
distance。此选项会根据搜索结果与指定位置之间的距离按升序对搜索结果进行排序。指定distance时,必须提供一个或多个keyword、name或type,并且不允许提供radius。
-
-
类型
将结果限制为与指定类型相匹配的地点。只能指定一种类型。如果提供多个类型,系统会忽略第一个条目之后的所有类型。
-
type=hospital|pharmacy|doctor变为type=hospital - 完全忽略
type=hospital,pharmacy,doctor
请参阅支持的类型列表。
注意:同时添加keyword和type并使用相同的值(keyword=cafe&type=cafe或keyword=parking&type=parking)可能会产生ZERO_RESULTS。 -
附近搜索(旧版)示例
curl
curl -L -X GET 'https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=-33.8670522%2C151.1957362&radius=1500&type=restaurant&keyword=cruise&key=YOUR_API_KEY'HTTP
https://maps.googleapis.com/maps/api/place/nearbysearch/json ?keyword=cruise &location=-33.8670522%2C151.1957362 &radius=1500 &type=restaurant &key=YOUR_API_KEY
注意:在此示例中,您需要将 key 替换为自己的 API 密钥,以便请求在您的应用中正常运行。
“附近搜索”(旧版)响应
以下示例展示了附近搜索(旧版)响应。
JSON
{ "html_attributions": [], "results": [ { "business_status": "OPERATIONAL", "geometry": { "location": { "lat": -33.8587323, "lng": 151.2100055 }, "viewport": { "northeast": { "lat": -33.85739847010727, "lng": 151.2112436298927 }, "southwest": { "lat": -33.86009812989271, "lng": 151.2085439701072 }, }, }, "icon": "https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/bar-71.png", "icon_background_color": "#FF9E67", "icon_mask_base_uri": "https://maps.gstatic.com/mapfiles/place_api/icons/v2/bar_pinlet", "name": "Cruise Bar", "opening_hours": { "open_now": false }, "photos": [ { "height": 608, "html_attributions": [ 'A Google User', ], "photo_reference": "Aap_uECvJIZuXT-uLDYm4DPbrV7gXVPeplbTWUgcOJ6rnfc4bUYCEAwPU_AmXGIaj0PDhWPbmrjQC8hhuXRJQjnA1-iREGEn7I0ZneHg5OP1mDT7lYVpa1hUPoz7cn8iCGBN9MynjOPSUe-UooRrFw2XEXOLgRJ-uKr6tGQUp77CWVocpcoG", "width": 1080, }, ], "place_id": "ChIJi6C1MxquEmsR9-c-3O48ykI", "plus_code": { "compound_code": "46R6+G2 The Rocks, New South Wales", "global_code": "4RRH46R6+G2", }, "price_level": 2, "rating": 4, "reference": "ChIJi6C1MxquEmsR9-c-3O48ykI", "scope": "GOOGLE", "types": ["bar", "restaurant", "food", "point_of_interest", "establishment"], "user_ratings_total": 1269, "vicinity": "Level 1, 2 and 3, Overseas Passenger Terminal, Circular Quay W, The Rocks", }, { "business_status": "OPERATIONAL", "geometry": { "location": { "lat": -33.8675219, "lng": 151.2016502 }, "viewport": { "northeast": { "lat": -33.86614532010728, "lng": 151.2031259298927 }, "southwest": { "lat": -33.86884497989272, "lng": 151.2004262701072 }, }, }, "icon": "https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/generic_business-71.png", "icon_background_color": "#7B9EB0", "icon_mask_base_uri": "https://maps.gstatic.com/mapfiles/place_api/icons/v2/generic_pinlet", "name": "Sydney Harbour Dinner Cruises", "opening_hours": { "open_now": true }, "photos": [ { "height": 835, "html_attributions": [ 'A Google User', ], "photo_reference": "Aap_uEBVsYnNcrpRixtrlHBztigZh70CwYkNWZzQnqJ39SjeBo_wvgKf-kXc6tgaMLBdQrRKmxmSKjOezoZrv-sHKVbTX0OI48HBqYYVnQiZQ-WGeuQDsLEPwX7LaVPa68nUAxX114Zpqt7bryoO9wL4qXdgEnopbOp5WWLALhKEHoIEH7f7", "width": 1200, }, ], "place_id": "ChIJM1mOVTS6EmsRKaDzrTsgids", "plus_code": { "compound_code": "46J2+XM Sydney, New South Wales", "global_code": "4RRH46J2+XM", }, "rating": 4.8, "reference": "ChIJM1mOVTS6EmsRKaDzrTsgids", "scope": "GOOGLE", "types": [ "tourist_attraction", "travel_agency", "restaurant", "food", "point_of_interest", "establishment", ], "user_ratings_total": 9, "vicinity": "32 The Promenade, Sydney", }, { "business_status": "OPERATIONAL", "geometry": { "location": { "lat": -33.8676569, "lng": 151.2017213 }, "viewport": { "northeast": { "lat": -33.86629922010728, "lng": 151.2031712798927 }, "southwest": { "lat": -33.86899887989272, "lng": 151.2004716201073 }, }, }, "icon": "https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/generic_business-71.png", "icon_background_color": "#7B9EB0", "icon_mask_base_uri": "https://maps.gstatic.com/mapfiles/place_api/icons/v2/generic_pinlet", "name": "Clearview Sydney Harbour Cruises", "opening_hours": { "open_now": false }, "photos": [ { "height": 685, "html_attributions": [ 'Clearview Glass Boat Cruises', ], "photo_reference": "Aap_uEAlExjnXA0VWyb_oYwCJ8utWG_Ennhwmn_xadpgenMNUgTuxrvgf1Xdw4bsbL6kFSWH7bhbpVHK1esdNY37ancJvbL_Gnsc7EZ5KEBNPvYZ_ZEyLco4a5v34LFkodxfFZbJ-ejO3zN4W_0C37P5jAmTnLWMNFYUPvoU3UMi70qHRNF5", "width": 1024, }, ], "place_id": "ChIJNQfwZTiuEmsR1m1x9w0E2V0", "plus_code": { "compound_code": "46J2+WM Sydney, New South Wales", "global_code": "4RRH46J2+WM", }, "rating": 3.8, "reference": "ChIJNQfwZTiuEmsR1m1x9w0E2V0", "scope": "GOOGLE", "types": [ "travel_agency", "restaurant", "food", "point_of_interest", "establishment", ], "user_ratings_total": 49, "vicinity": "32 The Promenade King Street Wharf 5, Sydney", }, { "business_status": "OPERATIONAL", "geometry": { "location": { "lat": -33.8677035, "lng": 151.2017297 }, "viewport": { "northeast": { "lat": -33.86634597010728, "lng": 151.2031781298927 }, "southwest": { "lat": -33.86904562989272, "lng": 151.2004784701072 }, }, }, "icon": "https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/generic_business-71.png", "icon_background_color": "#7B9EB0", "icon_mask_base_uri": "https://maps.gstatic.com/mapfiles/place_api/icons/v2/generic_pinlet", "name": "Sydney Harbour Lunch Cruise", "opening_hours": { "open_now": false }, "photos": [ { "height": 545, "html_attributions": [ 'Sydney Harbour Lunch Cruise', ], "photo_reference": "Aap_uEBFyQ2xDzHk7dGF_FTvNeJ01NQD6GROq89rufdGQl5Gi0zVfpnETBjPK2v7UEDl_6F-m8aR5FcEWJMqPaH4Oh_CQh2jaUAUAesUInucpCe7OFdleSYJ_8kgunhsIvGf1D1s_pes6Rk2JMVEs8rEs6ZHSTmUQXX2Yh-Gt9MuPQdYNuNv", "width": 969, }, ], "place_id": "ChIJUbf3iDiuEmsROJxXbhYO7cM", "plus_code": { "compound_code": "46J2+WM Sydney, New South Wales", "global_code": "4RRH46J2+WM", }, "rating": 3.9, "reference": "ChIJUbf3iDiuEmsROJxXbhYO7cM", "scope": "GOOGLE", "types": [ "travel_agency", "restaurant", "food", "point_of_interest", "establishment", ], "user_ratings_total": 23, "vicinity": "5/32 The Promenade, Sydney", }, { "business_status": "OPERATIONAL", "geometry": { "location": { "lat": -33.8675883, "lng": 151.2016452 }, "viewport": { "northeast": { "lat": -33.86623847010728, "lng": 151.2029950298927 }, "southwest": { "lat": -33.86893812989273, "lng": 151.2002953701073 }, }, }, "icon": "https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/generic_business-71.png", "icon_background_color": "#7B9EB0", "icon_mask_base_uri": "https://maps.gstatic.com/mapfiles/place_api/icons/v2/generic_pinlet", "name": "Sydney Showboats - Dinner Cruise With Show", "opening_hours": { "open_now": false }, "photos": [ { "height": 4912, "html_attributions": [ 'A Google User', ], "photo_reference": "Aap_uED1aGaMs8xYfiuzeBqVcFsk3yguUujdE4S3rNThMpLtoU0RukF40KCt0CAxgHP1HoY8Z7NYcWvax6qmMMVPBbmzGhoaiwiAAyv2GGA9vhcgsJ5w0LweT0y1lgRGZxU3nZIdNLiYAp9JHM171UkN04H6UqYSxKVZ8N_f2aslkqOaBF_e", "width": 7360, }, ], "place_id": "ChIJjRuIiTiuEmsRCHhYnrWiSok", "plus_code": { "compound_code": "46J2+XM Sydney, New South Wales", "global_code": "4RRH46J2+XM", }, "rating": 4.1, "reference": "ChIJjRuIiTiuEmsRCHhYnrWiSok", "scope": "GOOGLE", "types": [ "travel_agency", "restaurant", "food", "point_of_interest", "establishment", ], "user_ratings_total": 119, "vicinity": "32 The Promenade, King Street Wharf, 5, Sydney", }, { "business_status": "OPERATIONAL", "geometry": { "location": { "lat": -33.8677035, "lng": 151.2017297 }, "viewport": { "northeast": { "lat": -33.86634597010728, "lng": 151.2031781298927 }, "southwest": { "lat": -33.86904562989272, "lng": 151.2004784701072 }, }, }, "icon": "https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/generic_business-71.png", "icon_background_color": "#7B9EB0", "icon_mask_base_uri": "https://maps.gstatic.com/mapfiles/place_api/icons/v2/generic_pinlet", "name": "Magistic Cruises", "opening_hours": { "open_now": true }, "photos": [ { "height": 1536, "html_attributions": [ 'A Google User', ], "photo_reference": "Aap_uEC8bq-YphfIDcdxANBfgGMBIX2B0ggNep9ddVoePj6sfdcdusIn07x8biaxevZ_6BpzDDRsUL8No5P3ftI4on_pqbAbIEUL5gFGgezpVZ3M9GWvKdJm3njO_aJaghWl4_aQb75c0WGYDRFPhn6fWsLkD7KxodviJeCX4OCGt1eRJnlK", "width": 2048, }, ], "place_id": "ChIJxRjqYTiuEmsRGebAA_chDLE", "plus_code": { "compound_code": "46J2+WM Sydney, New South Wales", "global_code": "4RRH46J2+WM", }, "rating": 3.9, "reference": "ChIJxRjqYTiuEmsRGebAA_chDLE", "scope": "GOOGLE", "types": [ "tourist_attraction", "travel_agency", "restaurant", "food", "point_of_interest", "establishment", ], "user_ratings_total": 99, "vicinity": "King Street Wharf, 32 The Promenade, Sydney", }, { "business_status": "OPERATIONAL", "geometry": { "location": { "lat": -33.8609391, "lng": 151.2098735 }, "viewport": { "northeast": { "lat": -33.85958927010727, "lng": 151.2112233298927 }, "southwest": { "lat": -33.86228892989272, "lng": 151.2085236701072 }, }, }, "icon": "https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/generic_business-71.png", "icon_background_color": "#7B9EB0", "icon_mask_base_uri": "https://maps.gstatic.com/mapfiles/place_api/icons/v2/generic_pinlet", "name": "Australian Cruise Group", "opening_hours": { "open_now": false }, "photos": [ { "height": 1536, "html_attributions": [ 'Keith Bauman', ], "photo_reference": "Aap_uED7aBwIbN6iuoZi8e9xCrt6F_EhppGCBfzYCgypetw8cGn4Ui0Y3JZe3QJ0buf0zc54BtPz-SWXxecPd6kDvNNZD5Eu_ZzTP13rXMzSDJa6UcwFiXU4y3qYrWAyJ6mtYrd2PJgw0KzvYaZoPze7Ka6zG6k3IOjeSICDYH6YOzkXhelj", "width": 2048, }, ], "place_id": "ChIJpU8KgUKuEmsRKErVGEaa11w", "plus_code": { "compound_code": "46Q5+JW Sydney, New South Wales", "global_code": "4RRH46Q5+JW", }, "rating": 4.4, "reference": "ChIJpU8KgUKuEmsRKErVGEaa11w", "scope": "GOOGLE", "types": [ "travel_agency", "restaurant", "food", "point_of_interest", "establishment", ], "user_ratings_total": 5, "vicinity": "6 Cirular Quay, Sydney", }, { "business_status": "OPERATIONAL", "geometry": { "location": { "lat": -33.8686058, "lng": 151.2018206 }, "viewport": { "northeast": { "lat": -33.86730002010728, "lng": 151.2032717798927 }, "southwest": { "lat": -33.86999967989272, "lng": 151.2005721201073 }, }, }, "icon": "https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/generic_business-71.png", "icon_background_color": "#7B9EB0", "icon_mask_base_uri": "https://maps.gstatic.com/mapfiles/place_api/icons/v2/generic_pinlet", "name": "Rhythmboat Cruises", "opening_hours": { "open_now": false }, "photos": [ { "height": 2269, "html_attributions": [ 'Rhythmboat Sydney Harbour Cruises', ], "photo_reference": "Aap_uEAT8eop-IsfSAQ3KP6YXRNRsFkESXDecsaPnaVhq5bZzny5guvhS4smciianRGbZgDtFtAcU-ZXTaBfuh80CFw8vpJyKaB4grgW_CW64rU1JF9FDy_M8HtEk3rOrMhPDiF8ns-mc16E4rWSuAQIc76Du_eCd63ofoErESOtSWAQVcew", "width": 4032, }, ], "place_id": "ChIJyWEHuEmuEmsRm9hTkapTCrk", "plus_code": { "compound_code": "46J2+HP Sydney, New South Wales", "global_code": "4RRH46J2+HP", }, "rating": 3.9, "reference": "ChIJyWEHuEmuEmsRm9hTkapTCrk", "scope": "GOOGLE", "types": [ "travel_agency", "restaurant", "food", "point_of_interest", "establishment", ], "user_ratings_total": 30, "vicinity": "King Street Wharf, King St, Sydney", }, { "business_status": "OPERATIONAL", "geometry": { "location": { "lat": -33.8712692, "lng": 151.1898651 }, "viewport": { "northeast": { "lat": -33.86952792010727, "lng": 151.1914560298927 }, "southwest": { "lat": -33.87222757989272, "lng": 151.1887563701073 }, }, }, "icon": "https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/generic_business-71.png", "icon_background_color": "#7B9EB0", "icon_mask_base_uri": "https://maps.gstatic.com/mapfiles/place_api/icons/v2/generic_pinlet", "name": "Glass Island", "opening_hours": { "open_now": false }, "photos": [ { "height": 4480, "html_attributions": [ 'A Google User', ], "photo_reference": "Aap_uEAaToCBaHP7Gfdjc740gwIkQcjeUD97NO0TKXJ5IXB0CLGQA6slEpHn4k9LwyhoAzzbSTXJduYyFIkHVmQWGp34NggRxrtOWp7sJf5N6j0ASYlJPmAtWUaaCWnbx_pxdndsopeJ7PYn9kTiMgFcSs-GeipI8hDZgAJswMBnfsO0xWQ-", "width": 6720, }, ], "place_id": "ChIJnScuboavEmsRyh-FGxhc3pw", "plus_code": { "compound_code": "45HQ+FW Pyrmont, New South Wales", "global_code": "4RRH45HQ+FW", }, "rating": 4.1, "reference": "ChIJnScuboavEmsRyh-FGxhc3pw", "scope": "GOOGLE", "types": ["bar", "restaurant", "food", "point_of_interest", "establishment"], "user_ratings_total": 90, "vicinity": "37 Bank St, Pyrmont", }, { "business_status": "OPERATIONAL", "geometry": { "location": { "lat": -33.85876140000001, "lng": 151.2100004 }, "viewport": { "northeast": { "lat": -33.85737742010728, "lng": 151.2111319298927 }, "southwest": { "lat": -33.86007707989272, "lng": 151.2084322701072 }, }, }, "icon": "https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/restaurant-71.png", "icon_background_color": "#FF9E67", "icon_mask_base_uri": "https://maps.gstatic.com/mapfiles/place_api/icons/v2/restaurant_pinlet", "name": "Junk Lounge", "opening_hours": { "open_now": false }, "photos": [ { "height": 608, "html_attributions": [ 'A Google User', ], "photo_reference": "Aap_uEDaHF9VZFV88tQqFyIgmPlcbCsK-ScCGuUVGh0mTAP4OzWh_0q0T5rPbeC7bas7vD5vC9oS95jtdr4oOnQmhGDAIbHkv4E6UHrQIl0f3XZ-3-RRDjn293w4qQb_BfhbPPO3nokU7npfMfVvCcelWf9WHiWNHT4EEHrFtvuhAWKobTnC", "width": 1080, }, ], "place_id": "ChIJq9W3HZOvEmsRYtKNTRmq34M", "plus_code": { "compound_code": "46R6+F2 The Rocks, New South Wales", "global_code": "4RRH46R6+F2", }, "price_level": 2, "rating": 4.1, "reference": "ChIJq9W3HZOvEmsRYtKNTRmq34M", "scope": "GOOGLE", "types": ["restaurant", "food", "point_of_interest", "establishment"], "user_ratings_total": 63, "vicinity": "Level 2, Overseas Passenger Terminal, Circular Quay W, The Rocks", }, { "business_status": "OPERATIONAL", "geometry": { "location": { "lat": -33.8677035, "lng": 151.2017297 }, "viewport": { "northeast": { "lat": -33.86634597010728, "lng": 151.2031781298927 }, "southwest": { "lat": -33.86904562989272, "lng": 151.2004784701072 }, }, }, "icon": "https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/generic_business-71.png", "icon_background_color": "#7B9EB0", "icon_mask_base_uri": "https://maps.gstatic.com/mapfiles/place_api/icons/v2/generic_pinlet", "name": "Sydney New Year's Eve Cruises", "opening_hours": { "open_now": true }, "photos": [ { "height": 1600, "html_attributions": [ 'A Google User', ], "photo_reference": "Aap_uEDceKHtQ9Hf2eHwnQYXLqrwZ1X2LYVhsfXbqrpIm3_lXZ9apURjAXtVgRVTGxJPD7BtaqR8C7bwaSTakmi0Pazn7g3suj8ZaQRBqheT3KVJDhZ9_GwVInLkWbxqnhivEXs1a-MC_J8XF1SL_5AQ3mAETgiLRQ04116IAEV5vHyIGRsa", "width": 2400, }, ], "place_id": "ChIJ__8_hziuEmsR27ucFXECfOg", "plus_code": { "compound_code": "46J2+WM Sydney, New South Wales", "global_code": "4RRH46J2+WM", }, "rating": 5, "reference": "ChIJ__8_hziuEmsR27ucFXECfOg", "scope": "GOOGLE", "types": [ "travel_agency", "restaurant", "food", "point_of_interest", "establishment", ], "user_ratings_total": 5, "vicinity": "King Street Wharf 5, 32 The Promenade, Sydney", }, { "business_status": "OPERATIONAL", "geometry": { "location": { "lat": -33.8669866, "lng": 151.2017231 }, "viewport": { "northeast": { "lat": -33.86563197010727, "lng": 151.2031347298927 }, "southwest": { "lat": -33.86833162989272, "lng": 151.2004350701073 }, }, }, "icon": "https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/generic_business-71.png", "icon_background_color": "#13B5C7", "icon_mask_base_uri": "https://maps.gstatic.com/mapfiles/place_api/icons/v2/generic_pinlet", "name": "King Street Wharf Darling Harbour", "opening_hours": { "open_now": true }, "photos": [ { "height": 3024, "html_attributions": [ '朱品貞', ], "photo_reference": "Aap_uEDwKXVOjIaCj3LptOdd86B5umsdG7Z3jcvqcpUVLwHS6w8VGEkphgC8-shAx95CrsuXpnKz-XVIixVmgagQHKPH3vSLLqJ6LOAR7Q-_jiyx3ELXD0pm7AARiAtQAMBN9A-oqbtvGbE27yDpvBS1lKe9PCm-dMfrHIIcsS91Qeq2E4b6", "width": 4032, }, ], "place_id": "ChIJkfDzJ72vEmsR8xtYbk5f0p0", "plus_code": { "compound_code": "46M2+6M Sydney, New South Wales", "global_code": "4RRH46M2+6M", }, "rating": 4.4, "reference": "ChIJkfDzJ72vEmsR8xtYbk5f0p0", "scope": "GOOGLE", "types": [ "tourist_attraction", "convenience_store", "bowling_alley", "travel_agency", "bar", "restaurant", "food", "point_of_interest", "store", "establishment", ], "user_ratings_total": 3213, "vicinity": "The Promenade, Lime St, Sydney", }, { "business_status": "OPERATIONAL", "geometry": { "location": { "lat": -33.870383, "lng": 151.1979245 }, "viewport": { "northeast": { "lat": -33.86901092010727, "lng": 151.1991702798927 }, "southwest": { "lat": -33.87171057989271, "lng": 151.1964706201073 }, }, }, "icon": "https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/restaurant-71.png", "icon_background_color": "#FF9E67", "icon_mask_base_uri": "https://maps.gstatic.com/mapfiles/place_api/icons/v2/restaurant_pinlet", "name": "The Little Snail Restaurant", "opening_hours": { "open_now": false }, "photos": [ { "height": 900, "html_attributions": [ 'The Little Snail', ], "photo_reference": "Aap_uEA9aHKkB_6VoFx4VHRSp19PCwnTOuGfpmDYw1NdYNbzncfdjjfEmiiFz-E4tIJ6iGVZjR_bejX6wNr5thJjqlcdQ2PvPyTTo1jGtxk31JG9b6Vd0vu_v4Ep7yutzf3KTzBjYFBIGsYPf3Pj0DptMWPLP7fn33SBT7YmRqDEoGcUsBzw", "width": 1350, }, ], "place_id": "ChIJtwapWjeuEmsRcxV5JARHpSk", "plus_code": { "compound_code": "45HX+R5 Pyrmont, New South Wales", "global_code": "4RRH45HX+R5", }, "price_level": 2, "rating": 4.5, "reference": "ChIJtwapWjeuEmsRcxV5JARHpSk", "scope": "GOOGLE", "types": ["restaurant", "food", "point_of_interest", "establishment"], "user_ratings_total": 1916, "vicinity": "3/50 Murray St, Pyrmont", }, ], "status": "OK", }
XML
<?xml version="1.0" encoding="UTF-8"?> <PlaceSearchResponse> <status>OK</status> <result> <name>Cruise Bar</name> <vicinity>Level 1, 2 and 3, Overseas Passenger Terminal, Circular Quay W, The Rocks</vicinity> <type>bar</type> <type>restaurant</type> <type>food</type> <type>point_of_interest</type> <type>establishment</type> <geometry> <location> <lat>-33.8587323</lat> <lng>151.2100055</lng> </location> <viewport> <southwest> <lat>-33.8600981</lat> <lng>151.2085440</lng> </southwest> <northeast> <lat>-33.8573985</lat> <lng>151.2112436</lng> </northeast> </viewport> </geometry> <rating>4.0</rating> <icon>https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/bar-71.png</icon> <reference>ChIJi6C1MxquEmsR9-c-3O48ykI</reference> <opening_hours> <open_now>false</open_now> </opening_hours> <photo> <photo_reference>Aap_uEALIq4sgBHhIYWWapOH2NV1T2I7YdOiLzEH7z-483I764cId1sZkbzSq-hVYTk1PQeaHuZzlRfA7-ilwJ3QWon4b37ePd-PBwZbOwFZHxhYs0Cs7jRSgMHWfOzGivp6ZFG4iupyz50qS5pBZT1WbA2ufacTq_U21TtgffQD31wKRPQk</photo_reference> <width>1080</width> <height>608</height> <html_attribution><a href="https://maps.google.com/maps/contrib/112582655193348962755">A Google User</a></html_attribution> </photo> <price_level>2</price_level> <user_ratings_total>1269</user_ratings_total> <place_id>ChIJi6C1MxquEmsR9-c-3O48ykI</place_id> <scope>GOOGLE</scope> <plus_code> <global_code>4RRH46R6+G2</global_code> <compound_code>46R6+G2 The Rocks, New South Wales</compound_code> </plus_code> <icon_background_color>#FF9E67</icon_background_color> <business_status>OPERATIONAL</business_status> <icon_mask_base_uri>https://maps.gstatic.com/mapfiles/place_api/icons/v2/bar_pinlet</icon_mask_base_uri> </result> <result> <name>Sydney Harbour Dinner Cruises</name> <vicinity>32 The Promenade, Sydney</vicinity> <type>tourist_attraction</type> <type>restaurant</type> <type>food</type> <type>travel_agency</type> <type>point_of_interest</type> <type>establishment</type> <geometry> <location> <lat>-33.8675219</lat> <lng>151.2016502</lng> </location> <viewport> <southwest> <lat>-33.8688450</lat> <lng>151.2004263</lng> </southwest> <northeast> <lat>-33.8661453</lat> <lng>151.2031259</lng> </northeast> </viewport> </geometry> <rating>4.8</rating> <icon>https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/generic_business-71.png</icon> <reference>ChIJM1mOVTS6EmsRKaDzrTsgids</reference> <opening_hours> <open_now>true</open_now> </opening_hours> <photo> <photo_reference>Aap_uEB5jH7GXdcozv1Y5HX18syo4f128S58NVUnqBbLJMpWbC39K49wp-wzsLOsUT8QKDaag6ISFL8hl1vVuig4jkc5fMMkWKiqw5PY-ebcWZ5tI3gEXEYGGoG_mDAulaMLudUpSwgBx2_RLnA0SSiugqqQUTYlkGyCZSe8HSyngVczy6XN</photo_reference> <width>1200</width> <height>835</height> <html_attribution><a href="https://maps.google.com/maps/contrib/109764923610545394994">A Google User</a></html_attribution> </photo> <user_ratings_total>9</user_ratings_total> <place_id>ChIJM1mOVTS6EmsRKaDzrTsgids</place_id> <scope>GOOGLE</scope> <plus_code> <global_code>4RRH46J2+XM</global_code> <compound_code>46J2+XM Sydney, New South Wales</compound_code> </plus_code> <icon_background_color>#7B9EB0</icon_background_color> <business_status>OPERATIONAL</business_status> <icon_mask_base_uri>https://maps.gstatic.com/mapfiles/place_api/icons/v2/generic_pinlet</icon_mask_base_uri> </result> <result> <name>Clearview Sydney Harbour Cruises</name> <vicinity>32 The Promenade King Street Wharf 5, Sydney</vicinity> <type>restaurant</type> <type>food</type> <type>travel_agency</type> <type>point_of_interest</type> <type>establishment</type> <geometry> <location> <lat>-33.8676569</lat> <lng>151.2017213</lng> </location> <viewport> <southwest> <lat>-33.8689989</lat> <lng>151.2004716</lng> </southwest> <northeast> <lat>-33.8662992</lat> <lng>151.2031713</lng> </northeast> </viewport> </geometry> <rating>3.8</rating> <icon>https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/generic_business-71.png</icon> <reference>ChIJNQfwZTiuEmsR1m1x9w0E2V0</reference> <opening_hours> <open_now>false</open_now> </opening_hours> <photo> <photo_reference>Aap_uED7hBZqIUaBgFu5q8_xoLMrkWIXUau5D7J2T2fS3HAk4j3aoOp5MQKiujaS8ByzfU9zshp37EMMW6tZe67qLYku2AW-QOVeTbJlyxQ7bqgtSZ_YTo_ES1Xw1bBx8wv8BJYTJZFRzh8enBdH0kLy-oICBpm2fDexARp4CG8Dsxz5bqGA</photo_reference> <width>1024</width> <height>685</height> <html_attribution><a href="https://maps.google.com/maps/contrib/114394575270272775071">Clearview Glass Boat Cruises</a></html_attribution> </photo> <user_ratings_total>49</user_ratings_total> <place_id>ChIJNQfwZTiuEmsR1m1x9w0E2V0</place_id> <scope>GOOGLE</scope> <plus_code> <global_code>4RRH46J2+WM</global_code> <compound_code>46J2+WM Sydney, New South Wales</compound_code> </plus_code> <icon_background_color>#7B9EB0</icon_background_color> <business_status>OPERATIONAL</business_status> <icon_mask_base_uri>https://maps.gstatic.com/mapfiles/place_api/icons/v2/generic_pinlet</icon_mask_base_uri> </result> <result> <name>Sydney Harbour Lunch Cruise</name> <vicinity>5/32 The Promenade, Sydney</vicinity> <type>restaurant</type> <type>food</type> <type>travel_agency</type> <type>point_of_interest</type> <type>establishment</type> <geometry> <location> <lat>-33.8677035</lat> <lng>151.2017297</lng> </location> <viewport> <southwest> <lat>-33.8690456</lat> <lng>151.2004785</lng> </southwest> <northeast> <lat>-33.8663460</lat> <lng>151.2031781</lng> </northeast> </viewport> </geometry> <rating>3.9</rating> <icon>https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/generic_business-71.png</icon> <reference>ChIJUbf3iDiuEmsROJxXbhYO7cM</reference> <opening_hours> <open_now>false</open_now> </opening_hours> <photo> <photo_reference>Aap_uED1kwFA2W4XWHpSNZBxiE10JfyZEJrOz8aAPXpR2GbOg0Pc-yPHJYjt6m007fRdSG2PzvsWdZIFE-lny_NRBGUrSzpk9eNVzDp3GLUeV9G0HXcQv7IhEK6vtm_Updlv66bi8S07h3e_lFiHIzFw0TLVfWXjc63Pm94NN1kug7RPJa-6</photo_reference> <width>969</width> <height>545</height> <html_attribution><a href="https://maps.google.com/maps/contrib/102428257696490257922">Sydney Harbour Lunch Cruise</a></html_attribution> </photo> <user_ratings_total>23</user_ratings_total> <place_id>ChIJUbf3iDiuEmsROJxXbhYO7cM</place_id> <scope>GOOGLE</scope> <plus_code> <global_code>4RRH46J2+WM</global_code> <compound_code>46J2+WM Sydney, New South Wales</compound_code> </plus_code> <icon_background_color>#7B9EB0</icon_background_color> <business_status>OPERATIONAL</business_status> <icon_mask_base_uri>https://maps.gstatic.com/mapfiles/place_api/icons/v2/generic_pinlet</icon_mask_base_uri> </result> <result> <name>Sydney Showboats - Dinner Cruise With Show</name> <vicinity>32 The Promenade, King Street Wharf, 5, Sydney</vicinity> <type>restaurant</type> <type>food</type> <type>travel_agency</type> <type>point_of_interest</type> <type>establishment</type> <geometry> <location> <lat>-33.8675883</lat> <lng>151.2016452</lng> </location> <viewport> <southwest> <lat>-33.8689381</lat> <lng>151.2002954</lng> </southwest> <northeast> <lat>-33.8662385</lat> <lng>151.2029950</lng> </northeast> </viewport> </geometry> <rating>4.1</rating> <icon>https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/generic_business-71.png</icon> <reference>ChIJjRuIiTiuEmsRCHhYnrWiSok</reference> <opening_hours> <open_now>false</open_now> </opening_hours> <photo> <photo_reference>Aap_uEAGYIvNdkpJvsbVLPNaMlKukR9jvX48rKMo_TPqbSBRYqvYGExwQM8YvHrz83U7UOJosNI0kay5wV9vZdr9fR12ElFlK5fY3xdoS9N9T08ejq2gLABJJK-Bwl4W2IPw9imoWef1BYMVP07WhXhVOs05a-2A3Qm5fKCRILgUis5pMeCg</photo_reference> <width>7360</width> <height>4912</height> <html_attribution><a href="https://maps.google.com/maps/contrib/105311284660389698992">A Google User</a></html_attribution> </photo> <user_ratings_total>119</user_ratings_total> <place_id>ChIJjRuIiTiuEmsRCHhYnrWiSok</place_id> <scope>GOOGLE</scope> <plus_code> <global_code>4RRH46J2+XM</global_code> <compound_code>46J2+XM Sydney, New South Wales</compound_code> </plus_code> <icon_background_color>#7B9EB0</icon_background_color> <business_status>OPERATIONAL</business_status> <icon_mask_base_uri>https://maps.gstatic.com/mapfiles/place_api/icons/v2/generic_pinlet</icon_mask_base_uri> </result> <result> <name>Magistic Cruises</name> <vicinity>King Street Wharf, 32 The Promenade, Sydney</vicinity> <type>tourist_attraction</type> <type>restaurant</type> <type>food</type> <type>travel_agency</type> <type>point_of_interest</type> <type>establishment</type> <geometry> <location> <lat>-33.8677035</lat> <lng>151.2017297</lng> </location> <viewport> <southwest> <lat>-33.8690456</lat> <lng>151.2004785</lng> </southwest> <northeast> <lat>-33.8663460</lat> <lng>151.2031781</lng> </northeast> </viewport> </geometry> <rating>3.9</rating> <icon>https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/generic_business-71.png</icon> <reference>ChIJxRjqYTiuEmsRGebAA_chDLE</reference> <opening_hours> <open_now>true</open_now> </opening_hours> <photo> <photo_reference>Aap_uEDbALKhgsD-bIG6fWxrermkmKtpIKDHthAySc9EjPEpWDQQtYsSgB4AqLVMArTFCWd04Vb9U51st96ONjtDmWf8KsjKwYtkWxYDFzaY9ZmO2UQpV3rnqjmNHXtIsCdjjwADQbumAkjn5WzBJ-DqlVZs9NmlpLvAY6Jg4DGhduWdewv4</photo_reference> <width>2048</width> <height>1536</height> <html_attribution><a href="https://maps.google.com/maps/contrib/103073818292552522030">A Google User</a></html_attribution> </photo> <user_ratings_total>99</user_ratings_total> <place_id>ChIJxRjqYTiuEmsRGebAA_chDLE</place_id> <scope>GOOGLE</scope> <plus_code> <global_code>4RRH46J2+WM</global_code> <compound_code>46J2+WM Sydney, New South Wales</compound_code> </plus_code> <icon_background_color>#7B9EB0</icon_background_color> <business_status>OPERATIONAL</business_status> <icon_mask_base_uri>https://maps.gstatic.com/mapfiles/place_api/icons/v2/generic_pinlet</icon_mask_base_uri> </result> <result> <name>Australian Cruise Group</name> <vicinity>6 Cirular Quay, Sydney</vicinity> <type>restaurant</type> <type>food</type> <type>travel_agency</type> <type>point_of_interest</type> <type>establishment</type> <geometry> <location> <lat>-33.8609391</lat> <lng>151.2098735</lng> </location> <viewport> <southwest> <lat>-33.8622889</lat> <lng>151.2085237</lng> </southwest> <northeast> <lat>-33.8595893</lat> <lng>151.2112233</lng> </northeast> </viewport> </geometry> <rating>4.4</rating> <icon>https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/generic_business-71.png</icon> <reference>ChIJpU8KgUKuEmsRKErVGEaa11w</reference> <opening_hours> <open_now>false</open_now> </opening_hours> <photo> <photo_reference>Aap_uECGcpPB2lEO6gIB3QzHeviDhXcG-RV3TXuJPiBHGWbDxnflOhymebF45afUMBIW9r3xC2_gHfiqicV4VnooMJ2-Kwy0YocFXk1_0kkmR1HPV2D9kN9h-yPVK5d6oSPMdmY4MjCut3n8Tv9vt6iu44DDnafb2j78R34EcLQ4iFl0sots</photo_reference> <width>2048</width> <height>1536</height> <html_attribution><a href="https://maps.google.com/maps/contrib/113088009011192061895">Keith Bauman</a></html_attribution> </photo> <user_ratings_total>5</user_ratings_total> <place_id>ChIJpU8KgUKuEmsRKErVGEaa11w</place_id> <scope>GOOGLE</scope> <plus_code> <global_code>4RRH46Q5+JW</global_code> <compound_code>46Q5+JW Sydney, New South Wales</compound_code> </plus_code> <icon_background_color>#7B9EB0</icon_background_color> <business_status>OPERATIONAL</business_status> <icon_mask_base_uri>https://maps.gstatic.com/mapfiles/place_api/icons/v2/generic_pinlet</icon_mask_base_uri> </result> <result> <name>Rhythmboat Cruises</name> <vicinity>King Street Wharf, King St, Sydney</vicinity> <type>restaurant</type> <type>food</type> <type>travel_agency</type> <type>point_of_interest</type> <type>establishment</type> <geometry> <location> <lat>-33.8686058</lat> <lng>151.2018206</lng> </location> <viewport> <southwest> <lat>-33.8699997</lat> <lng>151.2005721</lng> </southwest> <northeast> <lat>-33.8673000</lat> <lng>151.2032718</lng> </northeast> </viewport> </geometry> <rating>3.9</rating> <icon>https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/generic_business-71.png</icon> <reference>ChIJyWEHuEmuEmsRm9hTkapTCrk</reference> <opening_hours> <open_now>false</open_now> </opening_hours> <photo> <photo_reference>Aap_uEAP5i23uwF3dotBD71Tr0YcEXCHnPOem0CKzKev5YX5dvp63wX7rbLZ3bHNNshIf9P0v3z6GKdF8yJkX3wxXWvzv7EfLwWbwGXYkA-vrXm72ek66P1FlNtNHcbIIyF9HQ1MDXZAhwLcnNJObbk8z9lKmCkBQJCQnkLsGHshZ_ZZCM6L</photo_reference> <width>4032</width> <height>2269</height> <html_attribution><a href="https://maps.google.com/maps/contrib/104066891898402903288">Rhythmboat Sydney Harbour Cruises</a></html_attribution> </photo> <user_ratings_total>30</user_ratings_total> <place_id>ChIJyWEHuEmuEmsRm9hTkapTCrk</place_id> <scope>GOOGLE</scope> <plus_code> <global_code>4RRH46J2+HP</global_code> <compound_code>46J2+HP Sydney, New South Wales</compound_code> </plus_code> <icon_background_color>#7B9EB0</icon_background_color> <business_status>OPERATIONAL</business_status> <icon_mask_base_uri>https://maps.gstatic.com/mapfiles/place_api/icons/v2/generic_pinlet</icon_mask_base_uri> </result> <result> <name>Glass Island</name> <vicinity>37 Bank St, Pyrmont</vicinity> <type>bar</type> <type>restaurant</type> <type>food</type> <type>point_of_interest</type> <type>establishment</type> <geometry> <location> <lat>-33.8712692</lat> <lng>151.1898651</lng> </location> <viewport> <southwest> <lat>-33.8722276</lat> <lng>151.1887564</lng> </southwest> <northeast> <lat>-33.8695279</lat> <lng>151.1914560</lng> </northeast> </viewport> </geometry> <rating>4.1</rating> <icon>https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/generic_business-71.png</icon> <reference>ChIJnScuboavEmsRyh-FGxhc3pw</reference> <opening_hours> <open_now>false</open_now> </opening_hours> <photo> <photo_reference>Aap_uECzZC-aNaQunm_EMgTFeFyR5-u7E19MSZNuRbK14Tq-GxK-glsLoeqtmdOkA307MesbO6Xqau_7bGM4w5vwxMnPPkc8tEQniNQjgC1M1g9OpMwdd4_8nhmBwOMkzUZk1KU0R9CFYxx7YY5a-HywQSK8kTr1FLXX3y23bSkaDvsgenBr</photo_reference> <width>6720</width> <height>4480</height> <html_attribution><a href="https://maps.google.com/maps/contrib/117745044320706972021">A Google User</a></html_attribution> </photo> <user_ratings_total>90</user_ratings_total> <place_id>ChIJnScuboavEmsRyh-FGxhc3pw</place_id> <scope>GOOGLE</scope> <plus_code> <global_code>4RRH45HQ+FW</global_code> <compound_code>45HQ+FW Pyrmont, New South Wales</compound_code> </plus_code> <icon_background_color>#7B9EB0</icon_background_color> <business_status>OPERATIONAL</business_status> <icon_mask_base_uri>https://maps.gstatic.com/mapfiles/place_api/icons/v2/generic_pinlet</icon_mask_base_uri> </result> <result> <name>Junk Lounge</name> <vicinity>Level 2, Overseas Passenger Terminal, Circular Quay W, The Rocks</vicinity> <type>restaurant</type> <type>food</type> <type>point_of_interest</type> <type>establishment</type> <geometry> <location> <lat>-33.8587614</lat> <lng>151.2100004</lng> </location> <viewport> <southwest> <lat>-33.8600771</lat> <lng>151.2084323</lng> </southwest> <northeast> <lat>-33.8573774</lat> <lng>151.2111319</lng> </northeast> </viewport> </geometry> <rating>4.1</rating> <icon>https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/restaurant-71.png</icon> <reference>ChIJq9W3HZOvEmsRYtKNTRmq34M</reference> <opening_hours> <open_now>false</open_now> </opening_hours> <photo> <photo_reference>Aap_uEBNQHy0vHfeUWJid28kkZIf4EcgMp50UmkpvhoYPwZJBYImlASnKV4fHlaXTlNQI8H_jUqDpToiMwFOE2XsDpHBdLeZGxpoMq5ThL1gSEMo1zp9U_Pd5jhamilQbpkEeZN_CVeHLAnOX5CG21IF8pda1Zj8IuuENzaKi2BLNQ5TCyYq</photo_reference> <width>1080</width> <height>608</height> <html_attribution><a href="https://maps.google.com/maps/contrib/104473997089847488714">A Google User</a></html_attribution> </photo> <price_level>2</price_level> <user_ratings_total>63</user_ratings_total> <place_id>ChIJq9W3HZOvEmsRYtKNTRmq34M</place_id> <scope>GOOGLE</scope> <plus_code> <global_code>4RRH46R6+F2</global_code> <compound_code>46R6+F2 The Rocks, New South Wales</compound_code> </plus_code> <icon_background_color>#FF9E67</icon_background_color> <business_status>OPERATIONAL</business_status> <icon_mask_base_uri>https://maps.gstatic.com/mapfiles/place_api/icons/v2/restaurant_pinlet</icon_mask_base_uri> </result> <result> <name>Sydney New Year's Eve Cruises</name> <vicinity>King Street Wharf 5, 32 The Promenade, Sydney</vicinity> <type>restaurant</type> <type>food</type> <type>travel_agency</type> <type>point_of_interest</type> <type>establishment</type> <geometry> <location> <lat>-33.8677035</lat> <lng>151.2017297</lng> </location> <viewport> <southwest> <lat>-33.8690456</lat> <lng>151.2004785</lng> </southwest> <northeast> <lat>-33.8663460</lat> <lng>151.2031781</lng> </northeast> </viewport> </geometry> <rating>5.0</rating> <icon>https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/generic_business-71.png</icon> <reference>ChIJ__8_hziuEmsR27ucFXECfOg</reference> <opening_hours> <open_now>true</open_now> </opening_hours> <photo> <photo_reference>Aap_uEB3hrLc-p5rV8oczY8fo4vdDdw1c0ZXLzbcgek15WzOon1Qd3WbMfmx994E05fFb5Tt1E60Iux0jaEwGkoy477ru-ZYRD1KUZrfMNw46ciZhnHRD2ZX_nWVYkw2VG_AdEDw1DJ3YQEuDP4EJ5IpsoKianbWyIlmaeuy63TfjdvuFs18</photo_reference> <width>2400</width> <height>1600</height> <html_attribution><a href="https://maps.google.com/maps/contrib/115281801304517408477">A Google User</a></html_attribution> </photo> <user_ratings_total>5</user_ratings_total> <place_id>ChIJ__8_hziuEmsR27ucFXECfOg</place_id> <scope>GOOGLE</scope> <plus_code> <global_code>4RRH46J2+WM</global_code> <compound_code>46J2+WM Sydney, New South Wales</compound_code> </plus_code> <icon_background_color>#7B9EB0</icon_background_color> <business_status>OPERATIONAL</business_status> <icon_mask_base_uri>https://maps.gstatic.com/mapfiles/place_api/icons/v2/generic_pinlet</icon_mask_base_uri> </result> <result> <name>King Street Wharf Darling Harbour</name> <vicinity>The Promenade, Lime St, Sydney</vicinity> <type>tourist_attraction</type> <type>bowling_alley</type> <type>convenience_store</type> <type>bar</type> <type>restaurant</type> <type>food</type> <type>travel_agency</type> <type>point_of_interest</type> <type>store</type> <type>establishment</type> <geometry> <location> <lat>-33.8669866</lat> <lng>151.2017231</lng> </location> <viewport> <southwest> <lat>-33.8683316</lat> <lng>151.2004351</lng> </southwest> <northeast> <lat>-33.8656320</lat> <lng>151.2031347</lng> </northeast> </viewport> </geometry> <rating>4.4</rating> <icon>https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/generic_business-71.png</icon> <reference>ChIJkfDzJ72vEmsR8xtYbk5f0p0</reference> <opening_hours> <open_now>true</open_now> </opening_hours> <photo> <photo_reference>Aap_uEACFUVsoIAR-DdQfFF-95EUG-vLZ4rE0twMHUMam4JM7qPjrfmrVpC80g8CHtMEcimKBxtiGYaEVp7dw12FhfkJw8hZI-bK4Ls9BY3AnvdoUbfVkBvLC7yqT5ly-gMW2ZT8rLc5-mKaZHbWZyZEPgWs84Qd6KPnEKRx6dGNEevYaUlL</photo_reference> <width>4032</width> <height>3024</height> <html_attribution><a href="https://maps.google.com/maps/contrib/101920674986627213698">朱品貞</a></html_attribution> </photo> <user_ratings_total>3213</user_ratings_total> <place_id>ChIJkfDzJ72vEmsR8xtYbk5f0p0</place_id> <scope>GOOGLE</scope> <plus_code> <global_code>4RRH46M2+6M</global_code> <compound_code>46M2+6M Sydney, New South Wales</compound_code> </plus_code> <icon_background_color>#13B5C7</icon_background_color> <business_status>OPERATIONAL</business_status> <icon_mask_base_uri>https://maps.gstatic.com/mapfiles/place_api/icons/v2/generic_pinlet</icon_mask_base_uri> </result> <result> <name>The Little Snail Restaurant</name> <vicinity>3/50 Murray St, Pyrmont</vicinity> <type>restaurant</type> <type>food</type> <type>point_of_interest</type> <type>establishment</type> <geometry> <location> <lat>-33.8703830</lat> <lng>151.1979245</lng> </location> <viewport> <southwest> <lat>-33.8717106</lat> <lng>151.1964706</lng> </southwest> <northeast> <lat>-33.8690109</lat> <lng>151.1991703</lng> </northeast> </viewport> </geometry> <rating>4.5</rating> <icon>https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/restaurant-71.png</icon> <reference>ChIJtwapWjeuEmsRcxV5JARHpSk</reference> <opening_hours> <open_now>false</open_now> </opening_hours> <photo> <photo_reference>Aap_uEB9EuRqd4be_9HrlUI7lbC5aDokS8UASO_ogA9OFQwEZsFD_jXDwK2Xc2kQm_wDE9TBI_20Na4TcRkgZoers93pw9cJ5RAbedKbUYAvAJz9c-zWKdqRd7pWaOlInQmbJVohI4ZsqbtlhynDqmfgX1SIccGuh066nlxyX7oFvYoLSbNb</photo_reference> <width>1350</width> <height>900</height> <html_attribution><a href="https://maps.google.com/maps/contrib/114727320476039103791">The Little Snail</a></html_attribution> </photo> <price_level>2</price_level> <user_ratings_total>1916</user_ratings_total> <place_id>ChIJtwapWjeuEmsRcxV5JARHpSk</place_id> <scope>GOOGLE</scope> <plus_code> <global_code>4RRH45HX+R5</global_code> <compound_code>45HX+R5 Pyrmont, New South Wales</compound_code> </plus_code> <icon_background_color>#FF9E67</icon_background_color> <business_status>OPERATIONAL</business_status> <icon_mask_base_uri>https://maps.gstatic.com/mapfiles/place_api/icons/v2/restaurant_pinlet</icon_mask_base_uri> </result> </PlaceSearchResponse>
PlacesNearbySearchResponse
| 字段 | 必需 | 类型 | 说明 |
|---|---|---|---|
|
required | 数组<string> |
可能包含有关相应商家信息的一组提供方信息,这些信息必须向用户显示(某些商家信息可能没有提供方信息)。 |
|
required | 数组<地点> |
包含一个地点数组。
“地点搜索”请求会返回“地点详情”请求返回的部分字段。如果“地点搜索”未返回您所需的字段,您可以使用“地点搜索”获取
place_id,然后使用该地点 ID 发出“地点详情”请求。
如需了解详情,请参阅地点。 |
|
required | PlacesSearchStatus |
包含请求的状态,可能还包含调试信息,以帮助您跟踪请求失败的原因。 如需了解详情,请参阅 PlacesSearchStatus。 |
|
可选 | 字符串 |
当服务返回的状态代码不是 |
|
可选 | 数组<string> |
当服务返回有关请求规范的其他信息时,响应对象中可能会包含额外的 |
|
可选 | 字符串 |
包含一个令牌,可用于返回最多 20 个额外结果。如果没有其他结果可供显示,系统将不会返回 next_page_token。可返回的结果数上限为 60。从发出 next_page_token 到该令牌生效之间存在短暂的延迟。 |
PlacesSearchStatus
服务返回的状态代码。
OK:表示 API 请求成功。-
ZERO_RESULTS表示搜索成功,但未返回任何结果。如果搜索传递了远程位置中的latlng,就可能会发生这种情况。 -
INVALID_REQUEST表示 API 请求格式有误,通常是因为缺少必需的查询参数(location或radius)。 -
OVER_QUERY_LIMIT表示以下任一情况:- 您已超出 QPS 限额。
- 您的账号尚未启用结算功能。
- 超出了每月 200 美元的赠金或您设定的用量上限。
- 提供的付款方式不再有效(例如,信用卡已过期)。
-
REQUEST_DENIED表示您的请求已遭拒,通常是因为:- 请求中缺少 API 密钥。
key参数无效。
UNKNOWN_ERROR:表示出现未知错误。
地点
描述地点的属性。并非所有属性都适用于所有地点类型。
| 字段 | 必需 | 类型 | 说明 |
|---|---|---|---|
|
可选 | 数组<AddressComponent> |
一个数组,其中包含适用于相应地址的各个组成部分。 如需了解详情,请参阅 AddressComponent。 |
|
可选 | 字符串 |
以 adr 微格式表示的地点地址。 |
|
可选 | 字符串 |
表示地点的营业状态(如果该地点为商家)。
如果不存在任何数据,将不会返回
The allowed values include:
OPERATIONAL,
CLOSED_TEMPORARILY, and CLOSED_PERMANENTLY
|
|
可选 | 布尔值 |
指定商家是否支持路边取货。 |
|
可选 | PlaceOpeningHours |
包含未来 7 天(包括今天)的营业时间。时间段从请求当天的午夜开始,到六天后的晚上 11:59 结束。此字段包含所有营业时间的 如需了解详情,请参阅 PlaceOpeningHours。 |
|
可选 | 布尔值 |
指定商家是否支持配送。 |
|
可选 | 布尔值 |
指定商家是否支持室内或室外座位选项。 |
|
可选 | PlaceEditorialSummary |
包含地点的摘要。摘要包含文本概览,如果适用,还包含这些文本概览的语言代码。摘要文本必须按原样呈现,不得修改或更改。 如需了解详情,请参阅 PlaceEditorialSummary。 |
|
可选 | 字符串 |
一个字符串,包含此地点直观易懂的地址。 此地址通常相当于邮政地址。请注意,由于许可限制,某些国家/地区(例如英国)不允许发布真实的邮政地址。 设置了格式的地址在逻辑上包含一个或多个地址组成部分。例如,地址“111 8th Avenue, New York, NY”包含以下组成部分:“111”(门牌号)、“8th Avenue”(路由)、“New York”(城市)和“NY”(美国州名)。 请勿以程序化方式解析设有格式的地址。您应改用单独的地址组成部分,API 响应除了包含设有格式的地址字段外,还包含这些组成部分。 |
|
可选 | 字符串 |
包含地点的电话号码(采用本地格式)。 |
|
可选 | 几何图形 |
包含相应位置的位置和视口。 如需了解详情,请参阅几何图形。 |
|
可选 | 字符串 |
包含建议的图标的网址,该图标可能会在地图上显示此结果时向用户显示。 |
|
可选 | 字符串 |
包含地点类别的默认十六进制颜色代码。 |
|
可选 | 字符串 |
包含建议图标的网址,但不含 |
|
可选 | 字符串 |
包含地点的电话号码(采用国际电话号码格式)。
国际电话号码格式包含国家/地区代码,并且带有一个加号 (+) 前缀。例如,Google 澳大利亚悉尼办事处的 international_phone_number 为 |
|
可选 | 字符串 |
包含返回结果的简单易懂的名称。对于 |
|
可选 | PlaceOpeningHours |
包含正常营业时间。 如需了解详情,请参阅 PlaceOpeningHours。 |
|
可选 | 布尔值 |
使用 |
|
可选 | 数组<PlacePhoto> |
照片对象数组,每个对象都包含对图片的引用。 一个请求最多可返回 10 张照片。如需详细了解地点照片以及如何在应用中使用这些图片,请参阅地点照片文档。 如需了解详情,请参阅 PlacePhoto。 |
|
可选 | 字符串 |
唯一标识地点的文本标识符。如需检索地点的相关信息,请在 Places API 请求的 |
|
可选 | PlusCode |
经过编码的位置引用,衍生自纬度和经度坐标,表示面积不超过 1/8, 000 度 x 1/8, 000 度(在赤道处约为 14 米 x 14 米)的区域。 在没有街道地址的地点(例如建筑物未编号,或者街道未命名),Plus Code 可替代街道地址使用。请参阅 Open Location Code 和 Plus Code。 如需了解详情,请参阅 PlusCode。 |
|
可选 | 数值 |
相应地点的价格水平,范围为 0 到 4。具体金额会因地区而异。价格水平的解读如下:
|
|
可选 | 数值 |
包含根据用户总体评价得出的地点评分(从 1.0 到 5.0)。 |
|
可选 | 字符串 | |
|
可选 | 布尔值 |
指定相应地点是否支持预订。 |
|
可选 | Array<PlaceReview> |
一个最多包含五条评价的 JSON 数组。默认情况下,评价会按相关性排序。使用
Google 建议向用户指明结果是按 如需了解详情,请参阅 PlaceReview。 |
|
可选 | 字符串 | |
|
可选 | Array<PlaceOpeningHours> |
包含未来 7 天的条目数组,其中包括有关商家次要营业时间的信息。次要营业时间与商家的主要营业时间不同。例如,餐厅可以将外卖自取时间或送餐时间指定为次要营业时间。此字段会填充 如需了解详情,请参阅 PlaceOpeningHours。 |
|
可选 | 布尔值 |
指定相应场所是否供应啤酒。 |
|
可选 | 布尔值 |
指定相应场所是否供应早餐。 |
|
可选 | 布尔值 |
指定营业地点是否供应早午餐。 |
|
可选 | 布尔值 |
指定相应场所是否提供晚餐。 |
|
可选 | 布尔值 |
指定相应场所是否提供午餐。 |
|
可选 | 布尔值 |
指定相应场所是否供应素食。 |
|
可选 | 布尔值 |
指定相应场所是否供应葡萄酒。 |
|
可选 | 布尔值 |
指定商家是否支持外卖。 |
|
可选 | 数组<string> |
包含一个描述指定结果的地图项类型数组。请参阅支持的类型列表。 |
|
可选 | 字符串 |
包含相应地点的官方 Google 页面的网址。这是由 Google 拥有的页面,其中包含有关该地点的实用信息。在任何向用户显示该地点详细结果的界面上,应用必须提供此页面的链接或者嵌入此页面。 |
|
可选 | 数值 |
此地点的评价总数(无论是否包含文字)。 |
|
可选 | 数值 |
包含相应地点当前时区与世界协调时间 (UTC) 的偏移分钟数。例如,对于澳大利亚悉尼在夏令时期间的地点,此值为 660(比世界协调时间 (UTC) 快 11 小时);对于加利福尼亚州在非夏令时期间的地点,此值为 -480(比世界协调时间 (UTC) 慢 8 小时)。 |
|
可选 | 字符串 |
对于商家 (
对于所有其他结果, 此内容应按原样读取。请勿以程序化方式解析设置了格式的地址。 |
|
可选 | 字符串 |
此地点的权威网站,例如商家主页。 |
|
可选 | 布尔值 |
指定场所是否有无障碍入口。 |
PlaceEditorialSummary
包含地点的摘要。摘要包含文本概览,还包括这些文本概览的语言代码(如适用)。摘要文本必须按原样呈现,不得修改或更改。
| 字段 | 必需 | 类型 | 说明 |
|---|---|---|---|
|
可选 | 字符串 |
上述字段的语言。可能不一定存在。 |
|
可选 | 字符串 |
地点的中等长度文本摘要。 |
PlaceOpeningHours
一个用于描述地点营业时间的对象。
| 字段 | 必需 | 类型 | 说明 |
|---|---|---|---|
|
可选 | 布尔值 |
一个布尔值,用于指示相应地点当前是否正在营业。 |
|
可选 | Array<PlaceOpeningHoursPeriod> |
一个涵盖七天的营业时段数组,从星期日开始,按时间顺序排列。 如需了解详情,请参阅 PlaceOpeningHoursPeriod。 |
|
可选 | 数组<PlaceSpecialDay> |
一个数组,最多包含 7 个条目,分别对应未来 7 天。 如需了解详情,请参阅 PlaceSpecialDay。 |
|
可选 | 字符串 |
用于标识次要营业时间类型的类型字符串(例如 |
|
可选 | 数组<string> |
一个字符串数组,以人类可读的文本描述相应地点的营业时间。 |
PlaceOpeningHoursPeriod
| 字段 | 必需 | 类型 | 说明 |
|---|---|---|---|
|
required | PlaceOpeningHoursPeriodDetail |
包含一对日期和时间对象,用于说明该地点的营业时段。 如需了解详情,请参阅 PlaceOpeningHoursPeriodDetail。 |
|
可选 | PlaceOpeningHoursPeriodDetail |
可能包含一对日期和时间对象,用于说明该地点的休息时段。如果某个地点全天营业,响应中将缺少“关闭”部分。客户端可以通过以下方式表示全天营业:将营业时间段中的日期设置为 如需了解详情,请参阅 PlaceOpeningHoursPeriodDetail。 |
PlaceSpecialDay
| 字段 | 必需 | 类型 | 说明 |
|---|---|---|---|
|
可选 | 字符串 |
以 RFC3339 格式表示的日期,采用相应地点的本地时区,例如 2010-12-31。 |
|
可选 | 布尔值 |
如果当天有特殊营业时间,则为 True。如果值为 |
PlaceOpeningHoursPeriodDetail
| 字段 | 必需 | 类型 | 说明 |
|---|---|---|---|
|
required | 数值 |
一个介于 0 到 6 之间的数字,对应于星期几(从星期日开始)。例如,2 表示星期二。 |
|
required | 字符串 |
可能包含一天中的某个时段,采用 24 小时制 hhmm 格式。值介于 0000 到 2359 之间。系统将按地点的时区报告时间。 |
|
可选 | 字符串 |
以 RFC3339 格式表示的日期,采用相应地点的本地时区,例如 2010-12-31。 |
|
可选 | 布尔值 |
如果给定的时间段因七天截止时间而截断,则为 true;其中,时间段的开始时间早于请求日期午夜,并且/或者结束时间为最后一天午夜或之后。此属性表示开放或关闭的期限可以超过此七天截止期限。 |
PlacePhoto
地点的照片。可以使用 Place Photo API 通过以下格式的网址访问照片:
https://maps.googleapis.com/maps/api/place/photo?maxwidth=400&photo_reference=photo_reference&key=YOUR_API_KEY
如需了解详情,请参阅地点照片。
| 字段 | 必需 | 类型 | 说明 |
|---|---|---|---|
|
required | 数值 |
照片的高度。 |
|
required | 数组<string> |
照片的 HTML 提供方信息。 |
|
required | 字符串 |
在执行照片请求时用于标识照片的字符串。 |
|
required | 数值 |
照片的宽度。 |
PlaceReview
用户提交的地点评价。
| 字段 | 必需 | 类型 | 说明 |
|---|---|---|---|
|
required | 字符串 |
提交评价的用户的名称。匿名评价的作者统称为“Google 用户”。 |
|
required | 数值 |
用户对此地点的总体评分。这是一个整数,范围为 1 至 5。 |
|
required | 字符串 |
评价提交时间(以文本形式表示,相对于当前时间)。 |
|
required | 数值 |
提交评价的时间,以自世界协调时间 (UTC) 1970 年 1 月 1 日午夜起经过的秒数表示。 |
|
可选 | 字符串 |
指向用户 Google 地图本地向导个人资料(如果有的话)的网址。 |
|
可选 | 字符串 |
表示返回的评价所用语言的 IETF 语言代码。此字段仅包含主要语言标记,而不包含表示国家或地区的辅助标记。例如,所有英语评价都标记为“en”,而不是“en-AU”或“en-UK”等。如果只有评分而没有评价文本,则此字段为空。 |
|
可选 | 字符串 |
表示评价的原始语言的 IETF 语言代码。如果评价已翻译,则 |
|
可选 | 字符串 |
指向用户个人资料照片的网址(如果有)。 |
|
可选 | 字符串 |
用户的评价。通过 Google 地点评价某个位置时,文本评价被视为可选项。因此,此字段可能为空。请注意,此字段可能包含简单的 HTML 标记。例如,实体引用 |
|
可选 | 布尔值 |
一个布尔值,用于指示评价是否是从撰写时使用的原始语言翻译而来的。如果评价已翻译,则此值为 true,Google 建议您向用户指明这一点。例如,您可以在评价中添加以下字符串:“由 Google 翻译”。 |
访问其他结果
默认情况下,每个响应每次查询最多返回 20 条 establishment 结果;不过,每次搜索最多可以返回 60 条结果,分三页显示。如果搜索结果超过 20 个,搜索响应将包含一个额外的值:next_page_token。将 next_page_token 的值传递给新请求的 pagetoken 参数,即可查看下一组结果。
- 如果
next_page_token为 null 或未返回,则表示没有更多结果。 - 使用相同的
next_page_token重试请求将返回下一页结果。 - 如果将此参数设置为
pagetoken,系统会忽略所有其他参数。 - 在原始查询之后,您最多可以请求两次新页面。
- 每次请求(包括使用
next_page_token的请求)都算作用量限额中的一次请求,并单独收费。 - 从签发
next_page_token到其生效之间会有几秒钟的延迟。如果在下一页可用之前请求该页,系统将返回INVALID_REQUEST响应。带有next_page_token的请求始终会收费。
例如,在以下查询中,我们搜索了澳大利亚悉尼达令港附近的餐厅,并按距离对结果进行了排名。您可以看到,响应包含 next_page_token 属性。
{
"html_attributions" : [],
"next_page_token" : "CpQCAgEAAFxg8o-eU7_uKn7Yqjana-HQIx1hr5BrT4zBaEko29ANsXtp9mrqN0yrKWhf-y2PUpHRLQb1GT-mtxNcXou8TwkXhi1Jbk-ReY7oulyuvKSQrw1lgJElggGlo0d6indiH1U-tDwquw4tU_UXoQ_sj8OBo8XBUuWjuuFShqmLMP-0W59Vr6CaXdLrF8M3wFR4dUUhSf5UC4QCLaOMVP92lyh0OdtF_m_9Dt7lz-Wniod9zDrHeDsz_by570K3jL1VuDKTl_U1cJ0mzz_zDHGfOUf7VU1kVIs1WnM9SGvnm8YZURLTtMLMWx8-doGUE56Af_VfKjGDYW361OOIj9GmkyCFtaoCmTMIr5kgyeUSnB-IEhDlzujVrV6O9Mt7N4DagR6RGhT3g1viYLS4kO5YindU6dm3GIof1Q",
"results" : [...]
"status" : "OK"
}如需查看下一组结果,您可以提交新查询,并将 next_page_token 的结果传递给 pagetoken 参数。例如:
https://maps.googleapis.com/maps/api/place/nearbysearch/json?pagetoken=CpQCAgEAAFxg8o-eU7_uKn7Yqjana-HQIx1hr5BrT4zBaEko29ANsXtp9mrqN0yrKWhf-y2PUpHRLQb1GT-mtxNcXou8TwkXhi1Jbk-ReY7oulyuvKSQrw1lgJElggGlo0d6indiH1U-tDwquw4tU_UXoQ_sj8OBo8XBUuWjuuFShqmLMP-0W59Vr6CaXdLrF8M3wFR4dUUhSf5UC4QCLaOMVP92lyh0OdtF_m_9Dt7lz-Wniod9zDrHeDsz_by570K3jL1VuDKTl_U1cJ0mzz_zDHGfOUf7VU1kVIs1WnM9SGvnm8YZURLTtMLMWx8-doGUE56Af_VfKjGDYW361OOIj9GmkyCFtaoCmTMIr5kgyeUSnB-IEhDlzujVrV6O9Mt7N4DagR6RGhT3g1viYLS4kO5YindU6dm3GIof1Q&key=YOUR_API_KEY