AI 輔助生成的地點摘要是簡短的 100 字元簡介,專為特定地點 ID 製作。地點摘要會彙整多種資料,提供高層級的概覽,協助使用者快速瞭解地點。
舉例來說,地點摘要可能會強調某個地點提供的熱門食品、服務或商品:
- 「Forum Shops 餐廳,在休閒空間供應大份量的傳統義式料理。」
- 「時尚沙龍,提供剪髮、染髮和吹整服務。」
- "大型商店,許多供應商提供各式復古裝飾、家具和服飾。"
Place Details (新版)、Text Search (新版) 和 Nearby Search (新版) 均支援地點摘要。地點摘要適用於「支援的類型」中顯示的地點類型,包括「文化」、「娛樂和休閒」、「餐飲」、「購物」、「服務」和「運動」。
要求生成地點摘要
如要在回應中傳回地點摘要,請在要求的欄位遮蓋中加入下列欄位:
- 地點詳細資料 (新版):
generativeSummary
- Text Search (新版)和 Nearby Search (新版):
places.generativeSummary
generativeSummary 欄位包含下列欄位:
generativeSummary
:地點摘要。overviewFlagContentUri
: 使用者可透過這個連結回報地點摘要的問題。disclosureText
:本地化文字字串,內含揭露文字「使用 Gemini 摘要」,必須納入出處資訊。
Place Details (New) 要求
下列 Place Details (新版) 要求會傳回伊利諾州芝加哥的壽司餐廳overview
摘要:
curl -X GET https://places.googleapis.com/v1/places/ChIJ1eOF7HLTD4gRry3xPjk8DkU \ -H 'Content-Type: application/json' \ -H "X-Goog-Api-Key: API_KEY" \ -H "X-Goog-FieldMask: displayName,generativeSummary"
回覆格式如下:
{ "displayName": { "text": "Sushi Nova - Lincoln Park", "languageCode": "en" }, "generativeSummary": { "overview": { "text": "Casual eatery with all-you-can-eat sushi and other Japanese fare, plus beer and sake.", "languageCode": "en-US" }, "overviewFlagContentUri": "https://www.google.com/local/review/rap/report?postId=CiUweDg4MGZkMzcyZWM4NWUzZDU6MHg0NTBlM2MzOTNlZjEyZGFmMAI&d=17924085&t=12", "disclaimerText": { "text": "Summarized with Gemini", "languageCode": "en-US" } } }
Text Search (新版) 要求
下列 Text Search (New) 要求會傳回美國加州山景城辣味素食餐廳的overview
摘要:
curl -X POST -d '{ "textQuery": "Spicy Vegetarian Food", "location_bias": { "rectangle": { "low": { "latitude": 37.415, "longitude": -122.091 }, "high": { "latitude": 37.429, "longitude": -122.065 } } }, "maxResultCount": 5 }' \ -H 'Content-Type: application/json' -H "X-Goog-Api-Key: API_KEY" \ -H "X-Goog-FieldMask: places.id,places.displayName,places.generativeSummary" \ 'https://places.googleapis.com/v1/places:searchText'
回覆格式如下:
{ "places": [ { "id": "ChIJ8wN5kzm3j4AR_dRdUHoqrPI", "displayName": { "text": "Plant-Based Vegan Vietnamese", "languageCode": "en" } }, { "id": "ChIJw4RuczO3j4ARC7RByZ5K9nI", "displayName": { "text": "sweetgreen", "languageCode": "en" }, "generativeSummary": { "overview": { "text": "Casual eatery offering healthy, made-to-order salads, plates, and grain bowls with vegan options.", "languageCode": "en-US" }, "overviewFlagContentUri": "https://www.google.com/local/review/rap/report?postId=CiUweDgwOGZiNzMzNzM2ZTg0YzM6MHg3MmY2NGE5ZWM5NDFiNDBiMAI&d=17924085&t=12", "disclosureText": { "text": "Summarized with Gemini", "languageCode": "en-US" } } }, /.../ ] }
Nearby Search (新版) 要求
下列 Nearby Search (新版) 要求會傳回奧勒岡州波特蘭的餐廳和咖啡廳overview
摘要:
curl -X POST -d '{ "maxResultCount": 5, "locationRestriction": { "circle": { "center": { "latitude": 45.553360, "longitude": -122.674934 }, "radius": 1000 } }, "includedTypes": ["restaurant", "cafe"], "excludedTypes": [], "rankPreference":"POPULARITY" }' \ -H 'Content-Type: application/json' -H "X-Goog-Api-Key: API_KEY" \ -H "X-Goog-FieldMask: places.id,places.generativeSummary" \ 'https://places.googleapis.com/v1/places:searchNearby'
回覆格式如下:
{ "places": [ { "id": "ChIJOa08KlqnlVQR_ZZx1jEcTYY", "generativeSummary": { "overview": { "text": "BBQ and Thai street fare, plus imaginative tropical cocktails, served in a vibrant space.", "languageCode": "en-US" }, "disclosureText": { "text": "Summarized with Gemini", "languageCode": "en-US" } } }, { "id": "ChIJU4OzoWynlVQRxlQMpGenSvA", "generativeSummary": { "overview": { "text": "Beer hall with a big selection of German brews, plus a central courtyard with food trucks.", "languageCode": "en-US" }, "disclosureText": { "text": "Summarized with Gemini", "languageCode": "en-US" } } }, /.../ ] }
歸因
應用程式中顯示的所有 AI 生成摘要,都必須按照 Google 政策和標準附上適當的出處資訊。詳情請參閱「Places API 政策」。