AI 赋能的酒店摘要是特定于给定地点 ID 的简短概览,不超过 100 个字符。地点摘要会将许多不同类型的数据汇总到一个概览中,以帮助用户快速了解某个地点。
例如,地点摘要可能会重点介绍某个地点的热门美食、服务或商品:
- “福临购物广场内的餐厅,供应分量十足的传统意大利美食,环境休闲。”
- “时尚沙龙,提供剪发、染发和吹整服务。”
- “这家大型商店有许多供应商,出售各种复古装饰品、家具和服装。”
地点详情(新)、文本搜索(新)和附近搜索(新)支持地点摘要。文化、娱乐和休闲、餐饮、购物、服务和体育类别中受支持的地点类型中列出地点类型均可显示地点摘要。
请求生成地点摘要
如需在响应中返回地点摘要,请在请求的字段掩码中添加以下字段:
- 地点详情(新):
generativeSummary
- 文本搜索(新)和附近搜索(新):
places.generativeSummary
generativeSummary 字段包含以下字段:
generativeSummary
:地点摘要。overviewFlagContentUri
:用户可以通过此链接举报地点摘要存在的问题。disclosureText
:包含“使用 Gemini 总结”披露文本的本地化文本字符串,必须纳入提供方说明中。
“地点详情(新)”请求
以下“地点详情(新)”请求会返回伊利诺伊州芝加哥一家寿司餐厅的 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" } } }
文本搜索(新)请求
以下“文本搜索(新)”请求会返回加利福尼亚州山景城供应辛辣素食的餐厅的 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" } } }, /.../ ] }
“附近搜索(新)”请求
以下“附近搜索(新)”请求会返回俄勒冈州波特兰市餐厅和咖啡馆的 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 的政策和标准。如需了解详情,请参阅 适用于地点 API 的政策。