Place Details (舊版)

歐洲經濟區 (EEA) 開發人員

取得 Place Search 結果的 place_id 後,您可以發出 Place Details (舊版) 要求,索取特定商家或搜尋點的詳細資料。Place Details (舊版) 要求會傳回指定地點的更完整資訊,例如完整地址、電話號碼、使用者評分和評論。

Place Details (Legacy) 要求

Place Details (Legacy) 要求是以下形式的 HTTP 網址:

https://maps.googleapis.com/maps/api/place/details/output?parameters

其中 output 可以是下列任一值:

  • json (建議使用) 表示以 JavaScript 物件標記法 (JSON) 輸出
  • xml 表示輸出內容為 XML

您必須加入某些參數,才能提出搜尋要求。依照網址標準,所有參數都會以 & 字元分隔。以下列出參數和可能的值。

必要參數

  • place_id

    用來識別特定地點的文字 ID,由地點搜尋服務傳回。如要進一步瞭解地點 ID,請參閱地點 ID 總覽

選用參數

  • 欄位

    注意:Place Search 要求和 Place Details 要求不會傳回相同的欄位。Place Search 要求會傳回 Place Details 要求傳回的部分欄位。如果 Place Search 沒有傳回所需的欄位,您可以使用 Place Search 取得 place_id,然後使用該地點 ID 提出 Place Details 要求。如要進一步瞭解 Place Search 要求中無法使用的欄位,請參閱「Places API 欄位支援」。

    使用 fields 參數指定要傳回的地點資料類型,並以半形逗號分隔。例如:fields=formatted_address,name,geometry。指定複合值時,請使用斜線,例如: opening_hours/open_now

    欄位分為三種計費類別:基本聯絡資訊氣氛除了基本 SKU (Places Details、Find Place、Nearby Search 或 Text Search) 以外,系統也會針對觸發要求的 Basic、Contact 和 Atmosphere SKU 收費。詳情請參閱價目表

    基本版

    「Basic」類別包含下列欄位: address_componentsadr_addressbusiness_statusformatted_addressgeometryiconicon_mask_base_uriicon_background_colornamepermanently_closed (已淘汰)、photoplace_idplus_codetypeurlutc_offsetvicinitywheelchair_accessible_entrance

    聯絡人

    「Contact」類別包含下列欄位: current_opening_hoursformatted_phone_number international_phone_numberopening_hours secondary_opening_hourswebsite

    Atmosphere

    「Atmosphere」類別包含下列欄位: curbside_pickupdeliverydine_ineditorial_summaryprice_levelratingreservablereviewsserves_beerserves_breakfastserves_brunchserves_dinnerserves_lunchserves_vegetarian_foodserves_winetakeoutuser_ratings_total

    注意:無論是否要求作者資訊欄位,每次呼叫一律都會傳回作者資訊 (html_attributions)。
  • language

    傳回結果時使用的語言。

    • 查看支援語言清單。Google 會經常更新支援的語言,因此這份清單可能不完整。
    • 如果未提供 language,API 會嘗試使用 Accept-Language 標頭中指定的偏好語言。
    • API 會盡量提供使用者和當地人都能辨識的街道地址。為達成這個目標,系統會以當地語言傳回街道地址,並視需要根據偏好語言,將地址音譯為使用者可讀取的文字。所有其他地址都會以偏好語言顯示。地址元件一律會以同一種語言傳回,而該語言是從第一個元件中選擇。
    • 如果偏好語言沒有名稱,API 會使用最接近的名稱。
    • 偏好語言對 API 選擇傳回的結果集和傳回順序影響不大。地理編碼器會根據語言解讀縮寫,例如街道類型縮寫,或在某種語言中有效但在另一種語言中無效的同義字。舉例來說,utcatér 是匈牙利文的街道同義詞。
  • 區域

    區碼,指定為 ccTLD (「頂層網域」) 的兩位字元值。大多數 ccTLD 代碼與 ISO 3166-1 代碼相同,但有一些需要注意的例外情況。舉例來說,英國的 ccTLD 是「uk」(.co.uk),而 ISO 3166-1 代碼是「gb」(技術上是指「大不列顛及北愛爾蘭聯合王國」實體)。

  • reviews_no_translations

    指定 reviews_no_translations=true 即可停用評論翻譯功能;指定 reviews_no_translations=false 即可啟用評論翻譯功能。系統會以原文顯示評論。

    如果省略或傳遞的值為空值,系統會啟用評論翻譯功能。如果要求中指定了 language 參數,請使用指定的語言做為翻譯的偏好語言。如果省略 language,API 會嘗試使用 Accept-Language 標頭做為偏好語言。

  • reviews_sort

    傳回評論時使用的排序方式。可以設為 most_relevant (預設值) 或 newest

    • 如果是 most_relevant (預設),評論會依相關性排序;服務會偏向回傳以偏好語言撰寫的評論。
    • newest 中,評論會依時間先後排序,偏好語言不會影響排序方式。

    Google 建議向使用者顯示評論的排序方式。

  • sessiontoken

    隨機字串,用於識別自動完成工作階段,以利計費。

    工作階段是從使用者輸入查詢時開始,到使用者選取地點並發出 Place Details 呼叫時結束。在每個工作階段中,使用者可以輸入多筆查詢,最終選擇一個地點。工作階段中每個要求使用的 API 金鑰必須隸屬於同一個 Google Cloud 控制台專案。工作階段結束後,符記就會失效。您的應用程式必須為每個工作階段產生新的符記。如果省略 sessiontoken 參數或重複使用工作階段符記,系統會視為未提供工作階段符記,並針對工作階段收費 (每個要求分別收費)。

    建議遵循下列準則:

    • 在所有自動完成工作階段使用工作階段符記。
    • 為每個工作階段產生新的符記。建議使用第 4 版 UUID。
    • 請確認工作階段中所有 Place Autocomplete 和 Place Details 要求使用的 API 金鑰都屬於同一個 Cloud 控制台專案。
    • 請務必針對每個新的工作階段傳遞不重複的工作階段符記。如果多個工作階段使用同一個符記,則每個要求會分別計費。

Place Details (Legacy) 範例

以下範例會透過 place_id 要求地點詳細資料,並包含 nameratingformatted_phone_number 欄位:

貝殼

curl -L -X GET 'https://maps.googleapis.com/maps/api/place/details/json?place_id=ChIJN1t_tDeuEmsRUsoyG83frY4&fields=name%2Crating%2Cformatted_phone_number&key=YOUR_API_KEY'

HTTP

https://maps.googleapis.com/maps/api/place/details/json
  ?fields=name%2Crating%2Cformatted_phone_number
  &place_id=ChIJN1t_tDeuEmsRUsoyG83frY4
  &key=YOUR_API_KEY

請注意,您必須將本例中的金鑰替換為自己的 API 金鑰,要求才能在應用程式中運作。

Place Details (舊版) 回應

Place Details (Legacy) 回應會以要求網址路徑中的 output 標記所指出的格式傳回。

JSON

{
  "html_attributions": [],
  "result":
    {
      "address_components":
        [
          { "long_name": "48", "short_name": "48", "types": ["street_number"] },
          {
            "long_name": "Pirrama Road",
            "short_name": "Pirrama Rd",
            "types": ["route"],
          },
          {
            "long_name": "Pyrmont",
            "short_name": "Pyrmont",
            "types": ["locality", "political"],
          },
          {
            "long_name": "City of Sydney",
            "short_name": "City of Sydney",
            "types": ["administrative_area_level_2", "political"],
          },
          {
            "long_name": "New South Wales",
            "short_name": "NSW",
            "types": ["administrative_area_level_1", "political"],
          },
          {
            "long_name": "Australia",
            "short_name": "AU",
            "types": ["country", "political"],
          },
          {
            "long_name": "2009",
            "short_name": "2009",
            "types": ["postal_code"],
          },
        ],
      "adr_address": "48 Pirrama Rd, Pyrmont NSW 2009, Australia",
      "business_status": "OPERATIONAL",
      "formatted_address": "48 Pirrama Rd, Pyrmont NSW 2009, Australia",
      "formatted_phone_number": "(02) 9374 4000",
      "geometry":
        {
          "location": { "lat": -33.866489, "lng": 151.1958561 },
          "viewport":
            {
              "northeast":
                { "lat": -33.8655112697085, "lng": 151.1971156302915 },
              "southwest":
                { "lat": -33.86820923029149, "lng": 151.1944176697085 },
            },
        },
      "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",
      "international_phone_number": "+61 2 9374 4000",
      "name": "Google Workplace 6",
      "opening_hours":
        {
          "open_now": false,
          "periods":
            [
              {
                "close": { "day": 1, "time": "1700" },
                "open": { "day": 1, "time": "0900" },
              },
              {
                "close": { "day": 2, "time": "1700" },
                "open": { "day": 2, "time": "0900" },
              },
              {
                "close": { "day": 3, "time": "1700" },
                "open": { "day": 3, "time": "0900" },
              },
              {
                "close": { "day": 4, "time": "1700" },
                "open": { "day": 4, "time": "0900" },
              },
              {
                "close": { "day": 5, "time": "1700" },
                "open": { "day": 5, "time": "0900" },
              },
            ],
          "weekday_text":
            [
              "Monday: 9:00 AM – 5:00 PM",
              "Tuesday: 9:00 AM – 5:00 PM",
              "Wednesday: 9:00 AM – 5:00 PM",
              "Thursday: 9:00 AM – 5:00 PM",
              "Friday: 9:00 AM – 5:00 PM",
              "Saturday: Closed",
              "Sunday: Closed",
            ],
        },
      "photos":
        [
          {
            "height": 3024,
            "html_attributions":
              [
                "Cynthia Wei",
              ],
            "photo_reference": "Aap_uEC6jqtpflLS8GxQqPHBjlcwBf2sri0ZErk9q1ciHGZ6Zx5HBiiiEsPEO3emtB1PGyWbBQhgPL2r9CshoVlJEG4xzB71QMhGBTqqeaCNk1quO3vTTiP50aM1kmOaBQ-DF1ER7zpu6BQOEtnusKMul0m4KA45wfE3h6Xh2IxjLNzx-IiX",
            "width": 4032,
          },
          {
            "height": 3264,
            "html_attributions":
              [
                "Heyang Li",
              ],
            "photo_reference": "Aap_uECyRjHhOQgGaKTW6Z3ZfTEaDhNc44m0F6GrNSFIMffixwI5xqD35QhecdzVY-FUuDtVE1huu8-2HkxgI9Gwvy6W18fU-_E3UUkdSFBQqGK8_slKlT8BZZc66sTX53IEcTDrZfT-E5_YUBYBOm13yxOTOfWfEDABhaxCGC5Hu_XYh0fI",
            "width": 4912,
          },
          {
            "height": 3036,
            "html_attributions":
              [
                "Anna Linetsky",
              ],
            "photo_reference": "Aap_uEAumTzSdhRHDutPAj6wVPSZZmBV-brI6TPFwI0tcQlbSR74z44mUPr4aXMQKck_AzHaKmbfR3P2c1qsu45i1RQPHrcpIXxrA78FmDjCdWYYZWUnFozdcmEj9OQ_V0G08adpKivMKZyeaQ1NuwRy9GhSopeKpzkzkFZG5vXMYPPSgpa1",
            "width": 4048,
          },
          {
            "height": 4016,
            "html_attributions":
              [
                "Jonah Dell",
              ],
            "photo_reference": "Aap_uECC7cSbDkh-TdmXr6m5d5pgVXJmvXg8dF2jzhL0b0Ko4CtnVll6-tIvdz7vhbCsd3hl2u9EgZ4Y30FBxKmFcimfeYUgW2XJyv8JY5IYGuXsKkCLqpV3QH9dIGwoUv2uX0eosDsUsTN2DOlyOasUgVxcYqzIzEmrL5ofIssThQWZeozD",
            "width": 6016,
          },
          {
            "height": 3024,
            "html_attributions":
              [
                "Anthony Huynh",
              ],
            "photo_reference": "Aap_uEDTdw58CglFmZZAR9iZ05x3y2oK9r5_dRqKWnbZKSS9gs6gp9AeBa1QDvBL6dzZyQAZfN8H2Eppu6y4NBaPOp-GkulZYiKRM7Yww8sUEv-8dmcq35Tx38pe4LEX2wIicFkQHedRgMc0FfV9aFtgosQ5ps5-HCjJSApg8eLGyuxxqPm9",
            "width": 4032,
          },
          {
            "height": 3024,
            "html_attributions":
              [
                "Jasen Baker",
              ],
            "photo_reference": "Aap_uEAGqslqZPhZUk0T2Y6l7mkCYnY7JN9li4g5NkZsE0N4Cdy7_cZ-fZWyV02VhpQR4Ph4fLUL6_WTXrlGMXXzUJXUcSmSTs2d_Dzf3Q_A1y07Dm-vtv7pS3JXsWyrWETGIoT1pIj81PPdUc1vlR2i3GFMWAbx9rCC472ZJclY8JlvMg-x",
            "width": 4032,
          },
          {
            "height": 3024,
            "html_attributions":
              [
                "Jeremy Hsiao",
              ],
            "photo_reference": "Aap_uEBaGxeN90YFjD-AUjxZqM44kpMcICKKBBhb0RQQS7DHHFaay8RRAwjWsAt8GEmmB5QnxrbQWHU3TwhVXXHP0m-YNp9Ds3ihpiFan0moNv4QB7kern5cfjWhhrWe8B0dz_vYvmPssJE24P-24YfWWHubOo0L2MjQyueZfDv57N_RvDZk",
            "width": 4032,
          },
          {
            "height": 1515,
            "html_attributions":
              [
                "Andrew W",
              ],
            "photo_reference": "Aap_uEBDzJlmTeNUreMop6_hkC1HKTCRLyPs5fikJi58qCejtkWp5PIM6vzNN3HErkSWUwnamTr_WLyT7jXMAIdByR-hx8dG-OHjj5JxzmcPvuT_VeVLmdSbNPeIlpmp6EUcPOhaVrhEKojSd44QXkl0za29eZ0oj1KDOnAsGxmhanDFW7lI",
            "width": 2048,
          },
          {
            "height": 3024,
            "html_attributions":
              [
                "Jeremy Hsiao",
              ],
            "photo_reference": "Aap_uEBvYFpzCDQzvQ0kdBxxB70lTkLbTM0yH3xF-BCHsb7DQ63cuWnutvwv8oVLDSbA14_kns3WVlEInTyy2elvmH5lzQteb6zzRu3exkwE65_55TgJqdLO7RYYiPFliWk4ocszn9nn5ELv5uP2BQmqr9QET5vwgxR-0eshyVmcdM42jb39",
            "width": 4032,
          },
          {
            "height": 4032,
            "html_attributions":
              [
                "Jeremy Hsiao",
              ],
            "photo_reference": "Aap_uECQynuD_EnSnbz8sJQ6-B6uR-j2tuu4Z1tuGUjq8xnxFDk-W8OdeLzWBX8suNKTCsPlkzTqC22BXf_hX33XclGPL4SS9xnPmHcMrLoUl0H_xHYevFvT17Hgw5DZpSyVmLvDvxzzJ1rsZTh55QwopmAty083a1r1ZIfL32iXh_q8FUas",
            "width": 3024,
          },
        ],
      "place_id": "ChIJN1t_tDeuEmsRUsoyG83frY4",
      "plus_code":
        {
          "compound_code": "45MW+C8 Pyrmont NSW, Australia",
          "global_code": "4RRH45MW+C8",
        },
      "rating": 4,
      "reference": "ChIJN1t_tDeuEmsRUsoyG83frY4",
      "reviews":
        [
          {
            "author_name": "Luke Archibald",
            "author_url": "https://www.google.com/maps/contrib/113389359827989670652/reviews",
            "language": "en",
            "profile_photo_url": "https://lh3.googleusercontent.com/a-/AOh14GhGGmTmvtD34HiRgwHdXVJUTzVbxpsk5_JnNKM5MA=s128-c0x00000000-cc-rp-mo",
            "rating": 1,
            "relative_time_description": "a week ago",
            "text": "Beautiful building with a great view.",
            "time": 1652286798,
          },
          {
            "author_name": "Tevita Taufoou",
            "author_url": "https://www.google.com/maps/contrib/105937236918123663309/reviews",
            "language": "en",
            "profile_photo_url": "https://lh3.googleusercontent.com/a/AATXAJwZANdRSSg96QeZG--6BazG5uv_BJMIvpZGqwSz=s128-c0x00000000-cc-rp-mo",
            "rating": 1,
            "relative_time_description": "6 months ago",
            "text": "Conference rooms were well equipped.",
            "time": 1637215605,
          },
          {
            "author_name": "Jordy Baker",
            "author_url": "https://www.google.com/maps/contrib/102582237417399865640/reviews",
            "language": "en",
            "profile_photo_url": "https://lh3.googleusercontent.com/a/AATXAJwgg1tM4aVA4nJCMjlfJtHtFZuxF475Vb6tT74S=s128-c0x00000000-cc-rp-mo",
            "rating": 1,
            "relative_time_description": "4 months ago",
            "text": "The staff is very friendly.",
            "time": 1641389490,
          },
          {
            "author_name": "Prem Rathod",
            "author_url": "https://www.google.com/maps/contrib/115981614018592114142/reviews",
            "language": "en",
            "profile_photo_url": "https://lh3.googleusercontent.com/a/AATXAJyEQpqs4YvPPzMPG2dnnRTFPC4jxJfn8YXnm2gz=s128-c0x00000000-cc-rp-mo",
            "rating": 1,
            "relative_time_description": "4 months ago",
            "text": "The location is convenient and easy to find.",
            "time": 1640159655,
          },
          {
            "author_name": "Husuni Hamza",
            "author_url": "https://www.google.com/maps/contrib/102167316656574288776/reviews",
            "language": "en",
            "profile_photo_url": "https://lh3.googleusercontent.com/a/AATXAJwRkyvoSlgd06ahkF9XI9D39o6Zc_Oycm5EKuRg=s128-c0x00000000-cc-rp-mo",
            "rating": 5,
            "relative_time_description": "7 months ago",
            "text": "A modern and impressive facility.",
            "time": 1633197305,
          },
        ],
      "types": ["point_of_interest", "establishment"],
      "url": "https://maps.google.com/?cid=10281119596374313554",
      "user_ratings_total": 939,
      "utc_offset": 600,
      "vicinity": "48 Pirrama Road, Pyrmont",
      "website": "http://google.com/",
    },
  "status": "OK",
}
    

XML

<?xml version="1.0" encoding="UTF-8"?>
<PlaceDetailsResponse>
 <status>OK</status>
 <result>
  <name>Google Workplace 6</name>
  <vicinity>48 Pirrama Road, Pyrmont</vicinity>
  <type>point_of_interest</type>
  <type>establishment</type>
  <formatted_phone_number>(02) 9374 4000</formatted_phone_number>
  <formatted_address>48 Pirrama Rd, Pyrmont NSW 2009, Australia</formatted_address>
  <address_component>
   <long_name>48</long_name>
   <short_name>48</short_name>
   <type>street_number</type>
  </address_component>
  <address_component>
   <long_name>Pirrama Road</long_name>
   <short_name>Pirrama Rd</short_name>
   <type>route</type>
  </address_component>
  <address_component>
   <long_name>Pyrmont</long_name>
   <short_name>Pyrmont</short_name>
   <type>locality</type>
   <type>political</type>
  </address_component>
  <address_component>
   <long_name>City of Sydney</long_name>
   <short_name>City of Sydney</short_name>
   <type>administrative_area_level_2</type>
   <type>political</type>
  </address_component>
  <address_component>
   <long_name>New South Wales</long_name>
   <short_name>NSW</short_name>
   <type>administrative_area_level_1</type>
   <type>political</type>
  </address_component>
  <address_component>
   <long_name>Australia</long_name>
   <short_name>AU</short_name>
   <type>country</type>
   <type>political</type>
  </address_component>
  <address_component>
   <long_name>2009</long_name>
   <short_name>2009</short_name>
   <type>postal_code</type>
  </address_component>
  <geometry>
   <location>
    <lat>-33.8664890</lat>
    <lng>151.1958561</lng>
   </location>
   <viewport>
    <southwest>
     <lat>-33.8682092</lat>
     <lng>151.1944177</lng>
    </southwest>
    <northeast>
     <lat>-33.8655113</lat>
     <lng>151.1971156</lng>
    </northeast>
   </viewport>
  </geometry>
  <rating>4.0</rating>
  <url>https://maps.google.com/?cid=10281119596374313554</url>
  <icon>https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/generic_business-71.png</icon>
  <reference>ChIJN1t_tDeuEmsRUsoyG83frY4</reference>
  <international_phone_number>+61 2 9374 4000</international_phone_number>
  <website>http://google.com/</website>
  <review>
   <time>1652286798</time>
   <text>Beautiful building with a great view.</text>
   <author_name>Luke Archibald</author_name>
   <author_url>https://www.google.com/maps/contrib/113389359827989670652/reviews</author_url>
   <rating>1.0</rating>
   <language>en</language>
   <profile_photo_url>https://lh3.googleusercontent.com/a-/AOh14GhGGmTmvtD34HiRgwHdXVJUTzVbxpsk5_JnNKM5MA=s128-c0x00000000-cc-rp-mo</profile_photo_url>
   <relative_time_description>a week ago</relative_time_description>
  </review>
  <review>
   <time>1637215605</time>
   <text>Conference rooms were well equipped.</text>
   <author_name>Joe Schmoe</author_name>
   <author_url>https://www.google.com/maps/contrib/105937236918123663309/reviews</author_url>
   <rating>1.0</rating>
   <language>en</language>
   <profile_photo_url>https://lh3.googleusercontent.com/a/AATXAJwZANdRSSg96QeZG--6BazG5uv_BJMIvpZGqwSz=s128-c0x00000000-cc-rp-mo</profile_photo_url>
   <relative_time_description>6 months ago</relative_time_description>
  </review>
  <review>
   <time>1641389490</time>
   <text>The staff is very friendly.</text>
   <author_name>Jordy Baker</author_name>
   <author_url>https://www.google.com/maps/contrib/102582237417399865640/reviews</author_url>
   <rating>1.0</rating>
   <language>en</language>
   <profile_photo_url>https://lh3.googleusercontent.com/a/AATXAJwgg1tM4aVA4nJCMjlfJtHtFZuxF475Vb6tT74S=s128-c0x00000000-cc-rp-mo</profile_photo_url>
   <relative_time_description>4 months ago</relative_time_description>
  </review>
  <review>
   <time>1640159655</time>
   <text>The location is convenient and easy to find.</text>
   <author_name>Prem Rathod</author_name>
   <author_url>https://www.google.com/maps/contrib/115981614018592114142/reviews</author_url>
   <rating>1.0</rating>
   <language>en</language>
   <profile_photo_url>https://lh3.googleusercontent.com/a/AATXAJyEQpqs4YvPPzMPG2dnnRTFPC4jxJfn8YXnm2gz=s128-c0x00000000-cc-rp-mo</profile_photo_url>
   <relative_time_description>4 months ago</relative_time_description>
  </review>
  <review>
   <time>1633197305</time>
   <text>A modern and impressive facility.</text>
   <author_name>Husuni Hamza</author_name>
   <author_url>https://www.google.com/maps/contrib/102167316656574288776/reviews</author_url>
   <rating>5.0</rating>
   <language>en</language>
   <profile_photo_url>https://lh3.googleusercontent.com/a/AATXAJwRkyvoSlgd06ahkF9XI9D39o6Zc_Oycm5EKuRg=s128-c0x00000000-cc-rp-mo</profile_photo_url>
   <relative_time_description>7 months ago</relative_time_description>
  </review>
  <opening_hours>
   <open_now>false</open_now>
   <period>
    <open>
     <day>1</day>
     <time>0900</time>
    </open>
    <close>
     <day>1</day>
     <time>1700</time>
    </close>
   </period>
   <period>
    <open>
     <day>2</day>
     <time>0900</time>
    </open>
    <close>
     <day>2</day>
     <time>1700</time>
    </close>
   </period>
   <period>
    <open>
     <day>3</day>
     <time>0900</time>
    </open>
    <close>
     <day>3</day>
     <time>1700</time>
    </close>
   </period>
   <period>
    <open>
     <day>4</day>
     <time>0900</time>
    </open>
    <close>
     <day>4</day>
     <time>1700</time>
    </close>
   </period>
   <period>
    <open>
     <day>5</day>
     <time>0900</time>
    </open>
    <close>
     <day>5</day>
     <time>1700</time>
    </close>
   </period>
   <weekday_text>Monday: 9:00 AM  5:00 PM</weekday_text>
   <weekday_text>Tuesday: 9:00 AM  5:00 PM</weekday_text>
   <weekday_text>Wednesday: 9:00 AM  5:00 PM</weekday_text>
   <weekday_text>Thursday: 9:00 AM  5:00 PM</weekday_text>
   <weekday_text>Friday: 9:00 AM  5:00 PM</weekday_text>
   <weekday_text>Saturday: Closed</weekday_text>
   <weekday_text>Sunday: Closed</weekday_text>
  </opening_hours>
  <utc_offset>600</utc_offset>
  <photo>
   <photo_reference>Aap_uEDT4DC26Lk_VoI6CvsZl1NzU7BOPjEyqEHlf8tCA0hFtlrsI1Tmed_LmjSUQghWnZq-E7SsYZSlvGP0X5ZAfH6w0Tmw6biO4PPI8BTPwvo6FqLfZgC2RGNQyI81HRnJGB3ZJUAYEXvxBfA_upEcsITxk52joPkK9d7cfFptY0z-Oy7Y</photo_reference>
   <width>4032</width>
   <height>3024</height>
   <html_attribution>&lt;a href=&quot;https://maps.google.com/maps/contrib/117600448889234589608&quot;&gt;Cynthia Wei&lt;/a&gt;</html_attribution>
  </photo>
  <photo>
   <photo_reference>Aap_uEAPNVkxDxxHa0aRFAkA2gMygFUuaKujSSv-zdad_vuaxTkaDHgX-aVPeNATp7VEgwqa3A3QutoeKdDd6aGZPBPCLl8XTf1vYckEBxIWEXZjFlMXK2TwIVfe4qa6O31AbYQQ5TCrEs9nz2fuBBWJwifTiKIIrv4NrEpQok6i8nnn8xKS</photo_reference>
   <width>4912</width>
   <height>3264</height>
   <html_attribution>&lt;a href=&quot;https://maps.google.com/maps/contrib/102493344958625549078&quot;&gt;Heyang Li&lt;/a&gt;</html_attribution>
  </photo>
  <photo>
   <photo_reference>Aap_uEBXOmqXNblj10HJavekmUNyUwccggfNN9KVE9TjYcU9HXkBHdvnwfYHDx3dfrjJJwnN8yooP-5412iJNRk8cwUbAVYbD2326cfiJJ3oK6pOrAi1oBmCYuAwKTHnX3EQvSbheVhJZPNDHlT5TjKcwfwAb80eyLB2UNyWl3Y6D7YS7ZSf</photo_reference>
   <width>4048</width>
   <height>3036</height>
   <html_attribution>&lt;a href=&quot;https://maps.google.com/maps/contrib/104829437842034782235&quot;&gt;Anna Linetsky&lt;/a&gt;</html_attribution>
  </photo>
  <photo>
   <photo_reference>Aap_uEAWyGsK1fp3SE73xICq8FJNlrVVqRk8E6YfMiz-o8IJj1vESmuDj4NnPDP4S2kWFrfoBpqw9lmXBGxtYo6nPMySfBAcRIbdEg0ko4dcdzsBvo6cRUz9XpmlcoptCpIAKEb6f7Bh_OD0zFntYbTz-pLdQ9ZHB8tBvTb3kzfTdK2Du0yC</photo_reference>
   <width>6016</width>
   <height>4016</height>
   <html_attribution>&lt;a href=&quot;https://maps.google.com/maps/contrib/107755640736541028674&quot;&gt;Jonah Dell&lt;/a&gt;</html_attribution>
  </photo>
  <photo>
   <photo_reference>Aap_uEAxbn61tx1hwCo3kUMd2KPlWaBkrFhXHxsZDgkYxpJqc-ZYC6U0MH6urfbHVrwmMoosOG0G39anmR68B7p2Up3AACxTa21vCopSL6-RHIphVsBhfhOrFMlGNqBDEsnmY15X0FzzNMKASXqmqtzBphiRyGhAFKfRs3Js1ymXP_FWjqzT</photo_reference>
   <width>4032</width>
   <height>3024</height>
   <html_attribution>&lt;a href=&quot;https://maps.google.com/maps/contrib/115886271727815775491&quot;&gt;Anthony Huynh&lt;/a&gt;</html_attribution>
  </photo>
  <photo>
   <photo_reference>Aap_uEClwnjuvgS58OknaXxZeVGf5ydyG6U6lO9srr8FU7tPoZ4DvqQo-GUeemssC11tzDBUMWit4ILWF-GmlRfIHS8FuAtttOgp2wvgPhs-ADUrznLRXYKBRkNQnRLEIA1PBgJN9Eev8tFWxpY_jBMklkEUZJRjm-mk9R0bSKSelpPgMYAz</photo_reference>
   <width>4032</width>
   <height>3024</height>
   <html_attribution>&lt;a href=&quot;https://maps.google.com/maps/contrib/102939237947063969663&quot;&gt;Jasen Baker&lt;/a&gt;</html_attribution>
  </photo>
  <photo>
   <photo_reference>Aap_uEBvISYtwjSgTQntTJJ_-XhPUF4CVCQF3wxM0FjcQJuzomYLfZWFlIWsOgXhwt2Sd8K6OqFrSP8XHHrBaqQJHD-om-H_wfRLVmiAoQa8QG5oxt540AucTMP4H2QfhTXngqEoNuOcbb-xo2l01OPUetTdIZQ3S6U5s2iyGrHpTs3qz8CH</photo_reference>
   <width>4032</width>
   <height>3024</height>
   <html_attribution>&lt;a href=&quot;https://maps.google.com/maps/contrib/100678816592586275978&quot;&gt;Jeremy Hsiao&lt;/a&gt;</html_attribution>
  </photo>
  <photo>
   <photo_reference>Aap_uEB2cYxbKE7uIXQ_IhX3TvZHDcFHXjWSwezoiwP3eWlfIDTWwq3xtsYZY7QSrhR2d9s1eWmZlM5zr9iHlC_n0gsJXNeRcfd2JjuLFaNuC7VfpeIsdQchhOybG0drJ2CxzD187Az-Foip-6MutDA22LINPw0Iyc_yT04WbxQDxhiwu2Cn</photo_reference>
   <width>2048</width>
   <height>1515</height>
   <html_attribution>&lt;a href=&quot;https://maps.google.com/maps/contrib/112343109286948028063&quot;&gt;Andrew W&lt;/a&gt;</html_attribution>
  </photo>
  <photo>
   <photo_reference>Aap_uEBJyLgeilgow1JnoKW83IBsl8CPkmryN8nGYtBzzLaiLjFicWxC1YPQusM-_Fvfb1bkbuShrzjXmHCOp5HoBgJsgit8o0HPYWgjSwrdySqde1BgfKbwS-TWbPg_dwTnVR8LrVPxa_vpLzNlx1b-WpDZo3-_KvxH2GARhVrcvWkvMYD0</photo_reference>
   <width>4032</width>
   <height>3024</height>
   <html_attribution>&lt;a href=&quot;https://maps.google.com/maps/contrib/100678816592586275978&quot;&gt;Jeremy Hsiao&lt;/a&gt;</html_attribution>
  </photo>
  <photo>
   <photo_reference>Aap_uEADyMSxLevgbLWCJeHA8kIN3w6-JcndbuHvTB0oqR-IlWbml4bbYmR-_iYU15HBh8xi3w5hZ455pda6m-BlLCscr6g_Zc5FmBOHW56IsZF3Pxif5UmeGZSsg3WIjHCoL-JyndN0nkfyzS31E05tZi61RfXQ2UPY2_5ceKYua5U6d5Zd</photo_reference>
   <width>3024</width>
   <height>4032</height>
   <html_attribution>&lt;a href=&quot;https://maps.google.com/maps/contrib/100678816592586275978&quot;&gt;Jeremy Hsiao&lt;/a&gt;</html_attribution>
  </photo>
  <adr_address>&lt;span class=&quot;street-address&quot;&gt;48 Pirrama Rd&lt;/span&gt;, &lt;span class=&quot;locality&quot;&gt;Pyrmont&lt;/span&gt; &lt;span class=&quot;region&quot;&gt;NSW&lt;/span&gt; &lt;span class=&quot;postal-code&quot;&gt;2009&lt;/span&gt;, &lt;span class=&quot;country-name&quot;&gt;Australia&lt;/span&gt;</adr_address>
  <user_ratings_total>939</user_ratings_total>
  <place_id>ChIJN1t_tDeuEmsRUsoyG83frY4</place_id>
  <plus_code>
   <global_code>4RRH45MW+C8</global_code>
   <compound_code>45MW+C8 Pyrmont NSW, Australia</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>
</PlaceDetailsResponse>

    

JSON 和 XML 回應都包含下列元素:

PlacesDetailsResponse

欄位 必填 類型 說明
required 陣列<字串>

可能包含一組關於這個商家資訊的出處資訊,必須向使用者顯示 (部分商家資訊可能沒有出處資訊)。

required 地點

內含所要求地點的詳細資訊。

詳情請參閱「地點」。

required PlacesDetailsStatus

內含要求的狀態,還可能包含偵錯資訊,方便您追查要求失敗的原因。

詳情請參閱 PlacesDetailsStatus

選用 陣列<字串>

如果服務傳回要求規格的額外資訊,回應物件中可能會有額外的 info_messages 欄位。只有在要求成功時,系統才會傳回這個欄位。這項屬性不一定會傳回,且內容可能會變更。

在 JSON 回應中,這些會以根元素表示。在 XML 回應中,這些元素會顯示為 <PlaceDetailsResponse> 底下的頂層元素。

PlacesDetailsStatus

服務傳回的狀態碼。

  • OK:表示 API 要求成功。
  • ZERO_RESULTS 表示參照的位置 place_id 有效,但不再參照有效結果。如果商家已停業,就可能發生這種情況。
  • NOT_FOUND,表示在 Google 地點介面集資料庫中找不到參照位置 place_id
  • INVALID_REQUEST:表示 API 要求格式有誤。
  • OVER_QUERY_LIMIT,表示下列任一情況:
    • 您已超過每秒查詢次數限制。
    • 您的帳戶尚未啟用帳單功能。
    • 超過每月 $200 美元的抵免額或自行設定的用量上限。
    • 您提供的付款方式已失效 (例如信用卡已過期)。
    請參閱 地圖常見問題 ,進一步瞭解如何解決這項錯誤。
  • REQUEST_DENIED:表示您的要求遭拒,一般是因為:
    • 要求缺少 API 金鑰。
    • key」參數無效。
  • UNKNOWN_ERROR:表示發生未知錯誤。

地點

描述地點的屬性。並非所有屬性都適用於所有地點類型。

欄位 必填 類型 說明
選用 Array<AddressComponent>

這個陣列包含這個地址適用的各種元件。

詳情請參閱 AddressComponent

選用 字串

adr 微格式表示地點地址。

選用 字串

表示地點的營業狀態 (如果地點為商家)。 如果沒有任何資料,則不會傳回 business_status

The allowed values include: OPERATIONAL, CLOSED_TEMPORARILY, and CLOSED_PERMANENTLY
選用 布林值

指定商家是否支援路邊取餐。

選用 PlaceOpeningHours

包含接下來七天 (包括今天) 的營業時間。時間範圍從要求當天的午夜開始,並在六天後的晚上 11:59 結束。這個欄位包含所有時段的 special_days 子欄位,適用於有例外營業時間的日期。

詳情請參閱 PlaceOpeningHours

選用 布林值

指定商家是否支援外送。

選用 布林值

指定商家是否提供室內或戶外雅座選項。

選用 PlaceEditorialSummary

含有地點摘要。摘要包含文字總覽,以及適用的語言代碼。摘要文字必須照實呈現,不得修改或變更。

詳情請參閱 PlaceEditorialSummary

選用 字串

字串,內含這個地點的人類可讀地址。

這個地址通常等於郵寄地址。請注意,由於授權上的限制,部分國家/地區 (例如英國) 不允許散布真實的郵寄地址。

格式化地址在邏輯上是由一或多個地址元件組成。舉例來說,「111 8th Avenue, New York, NY」這個地址包含以下元件:「111」(門牌號碼)、「8th Avenue」(路名)、「New York」(城市) 和「NY」(美國州名)。

請勿以程式輔助方式剖析格式化地址。建議您改用個別地址元件,API 回應除了包含格式化地址欄位之外,也會包含這些元件。

選用 字串

包含地點的電話號碼 (當地格式)。

選用 Geometry

內含地點的位置和可視區域。

詳情請參閱 Geometry

選用 字串

包含建議圖示的網址,在使用者於地圖上指出這項結果時,系統可能會向使用者顯示該圖示。

選用 字串

包含地點類別的預設十六進位顏色代碼。

選用 字串

包含建議圖示的網址,刪除 .svg.png 檔案類型副檔名。

選用 字串

包含地點的電話號碼 (國際電話號碼格式)。國際電話號碼格式包含國碼,且前置字元為加號 (+)。舉例來說,Google 澳洲雪梨辦公室的 international_phone_number 為 +61 2 9374 4000

選用 字串

包含傳回結果的使用者可解讀名稱。如果是 establishment 結果,這通常是標準化的商家名稱。

選用 PlaceOpeningHours

包含一般營業時間。

詳情請參閱 PlaceOpeningHours

選用 布林值

使用 business_status 取得商家的營業狀態。

選用 陣列<PlacePhoto>

相片物件陣列,每個物件都包含圖片的參照。要求最多可傳回十張相片。如要進一步瞭解地點相片,以及如何在應用程式中使用這些圖片,請參閱「地點相片」說明文件。

詳情請參閱 PlacePhoto

選用 字串

用來識別特定地點的文字 ID,如要擷取地點資訊,請在 Places API 要求的 place_id 欄位中傳遞這個 ID。如要進一步瞭解地點 ID,請參閱地點 ID 總覽

選用 PlusCode

經過編碼的位置參照,衍生自經緯度座標,表示面積不超過 1/8000 度 x 1/8000 度 (在赤道區約 14 公尺 x 14 公尺) 的區域。對於沒有詳細地址的地點,Plus Codes 可用於取代街道地址,例如無編號的建築物或無名街道。請參閱「開放式位置代碼」和「Plus Codes」。

詳情請參閱 PlusCode

選用 數字

地點的價格等級,範圍為 0 到 4。特定值所代表的確切金額會因地區而異。價格等級的解讀方式如下:

  • 0 免費
  • 1 低價位
  • 2 中等
  • 3 Expensive
  • 4 超高價位
選用 數字

包含地點評分 (1.0 到 5.0,根據綜合使用者評論計算)。

選用 字串
選用 布林值

指定地點是否支援訂位。

選用 Array<PlaceReview>

最多包含 5 則評論的 JSON 陣列。評論預設會依關聯性排序。使用 reviews_sort 要求參數控制排序。

  • 如果是 most_relevant (預設),評論會依據關聯性排序,並優先顯示以偏好語言撰寫的評論。
  • newest 中,評論會依時間先後排序,偏好語言不會影響排序方式。

Google 建議向使用者說明結果是否依 most_relevantnewest 排序。

詳情請參閱 PlaceReview

選用 字串
選用 Array<PlaceOpeningHours>

包含未來七天的項目陣列,包括商家次要營業時間的相關資訊。次要營業時間與商家的主要營業時間不同。舉例來說,餐廳可以將得來速或外送時間指定為次要營業時間。這個欄位會填入 type 子欄位,該子欄位會根據地點類型,從預先定義的營業時間類型清單 (例如 DRIVE_THROUGHPICKUPTAKEOUT) 中繪製。這個欄位包含所有時數的 special_days 子欄位,並為有例外時數的日期設定。

詳情請參閱 PlaceOpeningHours

選用 布林值

指定地點是否供應啤酒。

選用 布林值

指定該場所是否供應早餐。

選用 布林值

指定地點是否供應早午餐。

選用 布林值

指定該場所是否供應晚餐。

選用 布林值

指定商家是否供應午餐。

選用 布林值

指定地點是否供應素食餐點。

選用 布林值

指定地點是否供應葡萄酒。

選用 布林值

指出商家是否支援外帶。

選用 陣列<字串>

包含描述指定結果的特徵類型陣列。請參閱支援類型清單。

選用 字串

包含這個地點的官方 Google 頁面網址。這是 Google 自有的頁面,內含該地點的實用資訊。在向使用者顯示地點詳細結果的任何畫面上,應用程式必須連結或嵌入這個頁面。

選用 數字

這個地點的評論總數 (無論是否包含文字)。

選用 數字

包含這個地點目前時區與世界標準時間的時差 (以分鐘為單位)。舉例來說,如果地點位於澳洲雪梨,且正值日光節約時間,則為 660 (比世界標準時間快 11 小時);如果地點位於加州,且非日光節約時間,則為 -480 (比世界標準時間慢 8 小時)。

選用 字串

如果是場所 (types:["establishment", ...]) 結果),vicinity 欄位會包含地點的簡化地址,包括街道名稱、門牌號碼和縣市,但不含省/州、郵遞區號或國家/地區。

對於所有其他結果,vicinity 欄位會包含結果地址中最窄的政治地圖項目 (types:["political", ...]) 名稱。

這類內容應按原樣讀取。請勿以程式輔助方式剖析格式化地址。

選用 字串

這個地點的官方網站,例如商家的首頁。

選用 布林值

指定該地點是否設有無障礙入口。

PlaceEditorialSummary

含有地點摘要。摘要包含文字總覽,以及這些文字的語言代碼 (如適用)。摘要文字必須照實呈現,不得修改或變更。

欄位 必填 類型 說明
選用 字串

前幾個欄位的語言。不一定會顯示。

選用 字串

地點的文字摘要,長度適中。

PlaceOpeningHours

說明地點營業時間的物件。

欄位 必填 類型 說明
選用 布林值

布林值,指出地點目前是否營業中。

選用 Array<PlaceOpeningHoursPeriod>

涵蓋 7 天的營業時段陣列,從週日開始,按時間順序排列。

詳情請參閱「PlaceOpeningHoursPeriod」。

選用 Array<PlaceSpecialDay>

最多七個項目的陣列,對應未來七天。

詳情請參閱 PlaceSpecialDay

選用 字串

用來識別次要營業時間類型的類型字串 (例如 DRIVE_THROUGHHAPPY_HOURDELIVERYTAKEOUTKITCHENBREAKFASTLUNCHDINNERBRUNCHPICKUPSENIOR_HOURS)。僅適用於 secondary_opening_hours

選用 陣列<字串>

這個地點的營業時間,以使用者容易理解的文字表示。

PlaceOpeningHoursPeriod

欄位 必填 類型 說明
required PlaceOpeningHoursPeriodDetail

包含一組日期和時間物件,用來描述地點的營業時間。

詳情請參閱 PlaceOpeningHoursPeriodDetail

選用 PlaceOpeningHoursPeriodDetail

可能包含一組日期和時間物件,用來描述地點的休息時間。如果地點全年無休,回應中會缺少「關閉」部分。如果用戶端要表示「全年無休」,可以將營業時間設為包含值為 0 的日期和值為 0000 的時間,且不含 close

詳情請參閱 PlaceOpeningHoursPeriodDetail

PlaceSpecialDay

欄位 必填 類型 說明
選用 字串

以 RFC3339 格式表示的日期,時區為地點的當地時區,例如 2010-12-31。

選用 布林值

如果當天有特殊營業時間,則為 True。如果 true,表示當天至少有一項例外情形。例外狀況會導致 current_opening_hourssecondary_opening_hours 的子欄位出現不同值,例如 periodsweekday_textopen_now。例外狀況會套用至營業時間,而營業時間會用於產生其他欄位。

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 陣列<字串>

相片的 HTML 來源資訊。

required 字串

執行相片要求時,用來識別相片的字串。

required 數字

相片的寬度。

PlaceReview

使用者提交的地點評論。

欄位 必填 類型 說明
required 字串

提交評論的使用者名稱。匿名評論會歸類為「Google 使用者」。

required 數字

使用者給予這個地點的整體評分 (從 1 到 5 的整數)。

required 字串

以文字形式顯示評論提交時間,相對於目前時間。

required 數字

評論提交時間,以自世界標準時間 1970 年 1 月 1 日午夜起算的時間 (秒) 為單位。

選用 字串

使用者 Google 地圖在地嚮導個人資料的網址 (如有)。

選用 字串

網際網路工程任務組 (IETF) 語言代碼,指出傳回評論的語言。這個欄位只包含主要語言標記,不含表示國家/地區或區域的次要標記。舉例來說,所有英文評論都會標示為「en」,而非「en-AU」或「en-UK」等等。如果只有評分而沒有評論文字,這個欄位會是空白。

選用 字串

網際網路工程任務組 (IETF) 語言代碼,指出評論的原始語言。如果評論經過翻譯,則 original_language != language。這個欄位只包含主要語言標記,不含表示國家/地區或區域的次要標記。舉例來說,所有英文評論都會標示為「en」,而非「en-AU」或「en-UK」等等。如果只有評分而沒有評論文字,這個欄位會是空白。

選用 字串

使用者個人資料相片的網址 (如有)。

選用 字串

使用者的評論。在 Google Places 介面集中評論地點時,使用者不一定要填寫文字評論,因此這個欄位可能會空白。請注意,這個欄位可能包含基本 HTML 標記。例如,實體參照 &amp; 可能代表連字號字元。

選用 布林值

布林值,指出評論是否從原始語言翻譯而來。如果評論經過翻譯 (對應的值為 true),Google 建議您向使用者說明這點。舉例來說,您可以在評論中加入「由 Google 翻譯」字串。