AI 輔助區域摘要

系統會為地點周圍區域生成 AI 輔助的區域摘要。區域摘要會提供地點的額外背景資訊,包括附近的景點,方便使用者更明智地決定目的地和行程。

舉例來說,當您造訪新城市時,可以查看飯店的街區摘要,進一步瞭解周邊區域:

  • "這個位於舊金山的熱鬧區域融合了北灘和中國城,位於金融區西北方,有文學地標、獨特的文化景點和多元的餐飲選擇。值得一遊的地點包括標誌性的城市之光書店、引人入勝的纜車博物館,以及熱鬧的唐人街。

    這個地區融合了歷史與文化,雖然有些山丘和人潮,但友善的行人環境仍吸引許多人前來探索。在 City Lights Bookstore 沉浸於文學史中,在唐人街體驗充滿活力的文化,參觀寺廟和幸運餅乾工廠,或在纜車博物館回到過去。從道地的中式料理到美味的披薩,這裡有各式各樣的餐飲選擇。"

如果你考慮為電動車充電,可以查看電動車充電站的摘要,尋找附近的咖啡館或餐廳,在等待期間前往:

  • 「這個區域提供多種餐飲選擇,步行 9 分鐘即可抵達, 包括星巴克、Sushi Jin 和 Safeway。」

除了區域說明外,回應也包含說明中提及的地點 ID 清單。

Places API (新版) 提供兩種 AI 輔助區域摘要:

  • 鄰近地區摘要:針對類型為 premisestreet_address 的地點,以及「住家」和「住宿」類別中的所有類型,提供附近景點的高層級總覽。
  • 電動車充電站 (EVCS) 設施摘要,針對類型為 electric_vehicle_charging_station 的地點,提供附近景點的概略總覽。

Place Details (新版)Text Search (新版)Nearby Search (新版) 均支援 AI 技術生成區域摘要。

要求提供鄰里摘要

如果地點類型屬於「房屋」和「住宿」類別,系統就會產生鄰近地區摘要。如要在回應中傳回鄰里摘要,請在要求欄位遮罩中加入下列項目:

  • 地點詳細資料 (新版): neighborhoodSummary
  • Text Search (新版)Nearby Search (新版): places.neighborhoodSummary

回應中地點的 neighborhoodSummary 欄位包含下列項目:

  • 兩個子欄位:overviewdescriptionoverview 子欄位包含地點附近的特定搜尋點,而 description 子欄位則提供周邊區域的更一般資訊。每個子欄位都包含參照地點資源名稱的清單,格式為 place/PLACE_ID
  • flagContentUri連結:使用者可透過這個連結檢舉生成的摘要有問題。
  • 含有揭露文字「由 Gemini 摘要」的本地化文字字串,必須納入出處資訊。

以下範例要求紐約市某間飯店的鄰近地區摘要:

curl -X GET -H 'Content-Type: application/json' \
-H "X-Goog-Api-Key: API_KEY" \
-H "X-Goog-FieldMask: id,displayName,neighborhoodSummary" \
'https://places.googleapis.com/v1/places/ChIJT0DdRo1ZwokRkufwSD-TdGM'

回覆格式如下:

{
  "id": "ChIJT0DdRo1ZwokRkufwSD-TdGM",
  "displayName": {
    "text": "Courtyard New York Manhattan/SoHo",
    "languageCode": "en"
  }
  "neighborhoodSummary": {
    "overview": {
      "content": {
        "text": "This area resides within SoHo, a trendy Lower Manhattan neighborhood celebrated for its upscale boutiques, designer shops, and thriving art scene. The area is home to the Color Factory and Dominique Ansel Bakery, known for its popular Cronuts.",
        "languageCode": "en-US"
      },
      "referencedPlaces": [
        "places/ChIJZd0F3oxZwokRiaEouMZKQ-0",
        /.../
      ]
    },
    "description": {
      "content": {
        "text": "SoHo's walkability and convenient public transportation options make exploration easy. A diverse array of restaurants and cafes cater to varied tastes. SoHo's central location, surrounded by vibrant neighborhoods, contributes to its fast-paced and energetic atmosphere, with a focus on fashion and design.",
        "languageCode": "en-US"
      },
      "referencedPlaces": [
        "places/ChIJZd0F3oxZwokRiaEouMZKQ-0",
        /.../
      ]
    },
    "flagContentUri": "https://www.google.com/local/review/rap/report?postId=&d=17924085&t=12",
    "disclosureText": {
      "text": "Summarized with Gemini",
      "languageCode": "en-US"
    }
  }
}

要求提供電動車充電站設施摘要

如果地點類型為 electric_vehicle_charging_station,系統可以產生電動車充電站 (EVCS) 設施摘要。如要在回應中加入 EVCS 設施摘要,請在要求的欄位遮罩中加入下列項目:

  • 地點詳細資料 (新版): evChargeAmenitySummary
  • Text Search (新版)Nearby Search (新版): places.evChargeAmenitySummary

回應中地點的 evChargeAmenitySummary 欄位包含下列資訊:

  • 四個子欄位:overviewcoffeerestaurantstore。每個子欄位都包含附近搜尋點的簡短說明,以及 place/PLACE_ID 格式的參照地點資源名稱清單。
  • flagContentUri 連結,使用者可透過這個連結檢舉生成的摘要有問題。
  • 本地化文字字串,內含揭露文字「由 Gemini 摘要」 ,必須納入出處資訊。

以下範例要求 Mountain View 充電站的電動車充電站設施摘要:

curl -X GET -H 'Content-Type: application/json' \
-H "X-Goog-Api-Key: API_KEY" \
-H "X-Goog-FieldMask: id,displayName,evChargeAmenitySummary" \
'https://places.googleapis.com/v1/places/ChIJtwHgNNa2j4ARlC8vbI9lLZA'

回覆格式如下:

{
  "id": "ChIJf8j-4z23j4AR_MQ2-bgMmrY",
  "displayName": {
    "text": "EVgo Charging Station",
    "languageCode": "en"
  },
  "evChargeAmenitySummary": {
    "overview": {
      "content": {
        "text": "Within a short walk, there are several coffee and restaurant options, including Clocktower Coffee Roasting Company, Khao Kang Thai Kitchen, and Roger's Deli & Donuts.",
        "languageCode": "en-US"
      },
      "referencedPlaces": [
        "places/ChIJZZR2-j23j4ARi5CXEIAc57Q",
        /.../
      ]
    },
    "coffee": {
      "content": {
        "text": "Clocktower Coffee Roasting Company has Wi-Fi and a variety of coffee and pastries in a laid-back atmosphere.",
        "languageCode": "en-US"
      },
      "referencedPlaces": [
        "places/ChIJZZR2-j23j4ARi5CXEIAc57Q"
      ]
    },
    "restaurant": {
      "content": {
        "text": "Roger's Deli & Donuts is a bustling deli with sandwiches and breakfast items.\nJoy Sushi serves classic Japanese dishes, including vegetarian and healthy options.\nSubway is a chain sandwich shop offering its usual subs, wraps, and salads.",
        "languageCode": "en-US"
      },
      "referencedPlaces": [
        "places/ChIJQ4F3PBa3j4ARf7_QjN1Cklo",
        /.../
      ]
    },
    "store": {
      "content": {
        "text": "Rotten Robbie is a chain gas station with a convenience store and a restroom.",
        "languageCode": "en-US"
      },
      "referencedPlaces": [
        "places/ChIJA6deFBa3j4AREY0EyTEGhN8",
        /.../
      ]
    },
    "flagContentUri": "https://www.google.com/local/review/rap/report?postId=ABCDEFG=1234567&t=12",
    "disclosureText": {
      "text": "Summarized with Gemini",
      "languageCode": "en-US"
    }
  }
}

歸因

應用程式中顯示的所有 AI 生成摘要,都必須按照 Google 政策和標準附上適當的出處資訊。詳情請參閱「Places API 政策」。