由 AI 赋能的地点摘要是简短的 100 字符概览,专门针对给定的地点 ID。地点摘要会将多种不同类型的数据汇总成一个高级别概览,帮助用户快速了解某个地点。
例如,地点摘要可能会突出显示某地点提供的热门食品、服务或可供购买的商品:
- “福临购物广场的餐厅,在休闲空间内供应分量十足的传统意大利美食。”
- “时尚沙龙,提供剪发、染发和吹发服务。”
- “这家大型商店内有许多供应商,提供各种复古装饰品、家具和服装。”
地点详情(新)、文本搜索(新)和附近搜索(新)均支持地点摘要。地点摘要适用于支持的类型中显示的地点类型,这些类型属于文化、娱乐和休闲、餐饮、购物、服务和体育类别。
以下语言和区域支持兴趣点摘要:
语言 | 区域 |
---|---|
英语 |
印度 美国 |
请求生成地点摘要
如需在响应中返回地点摘要,请在请求的字段掩码中添加以下字段:
- 地点详情(新):
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 的政策和标准附上适当的提供方信息。如需了解详情,请参阅 Places API 政策。