AI 驱动的评价摘要是 AI 根据用户评价生成的地点摘要。通过综合用户评价的关键要素(例如地点属性和评价者的情绪),评价摘要可提供概括性分析,帮助用户做出明智的决定。
例如,旧金山渡轮大厦的评价摘要包含从美食和购物到风景和氛围的各种信息:
“游客表示,这座历史地标提供各种商店、 餐厅和农贸市场,许多人称赞这里的海湾和 城市景观。他们还强调了这里充满活力的氛围、前往其他目的地的便利渡轮交通,以及享受当地商家的机会。”
地点详情(新) 、 文本搜索(新) 和 附近搜索(新) 支持评价摘要。
以下语言和区域的地标支持评价摘要:
| 语言 | 区域 |
|---|---|
| 英语 | 阿根廷、玻利维亚、巴西、智利、哥伦比亚、哥斯达黎加、多米尼加 共和国、厄瓜多尔、危地马拉、印度、日本、墨西哥、巴拉圭、秘鲁、 英国、美国、乌拉圭、委内瑞拉 |
| 日语 | 日本 |
| 葡萄牙语 | 巴西 |
| 西班牙语 | 阿根廷、玻利维亚、智利、哥伦比亚、哥斯达黎加、多米尼加共和国、 厄瓜多尔、危地马拉、墨西哥、巴拉圭、秘鲁、美国、乌拉圭、 委内瑞拉 |
请求评价摘要
如需请求评价摘要,请在请求的字段掩码中添加 reviewSummary:
- 地点详情(新) :
reviewSummary - 文本搜索(新) 和附近搜索(新) :
places.reviewSummary
评价摘要的归因必须包含指向 Google 地图上该地点评价的链接。如需检索该链接,请在请求的字段掩码中添加
reviewSummary.reviewsUri
。
响应正文包含三个字段:
text:AI 生成的评价摘要。flagContentUri:用于标记不当内容,以便 Google 将其移除。disclosureText:本地化字符串,其中包含披露文本“使用 Gemini 总结”,必须将其纳入归因中。
地点详情(新)请求
以下示例请求纽约一家饺子馆的评价摘要:
curl -X GET https://places.googleapis.com/v1/places/ChIJD2l2k7ZL0YkRC80d-3MV1lM \ -H 'Content-Type: application/json' \ -H "X-Goog-Api-Key: API_KEY" \ -H "X-Goog-FieldMask: displayName,reviewSummary"
响应采用以下格式:
{ "displayName": { "text": "Dumpling House", "languageCode": "en" }, "reviewSummary": { "text": { "text": "People say this restaurant serves delicious dumplings, noodles, and pork belly buns. They highlight the generous portions, reasonable prices, and quick service. They also like the friendly and accommodating staff.", "languageCode": "en-US" }, "flagContentUri": "https://www.google.com/local/review/rap/report?postId=5%401:CAIQACodChtyc19oOnNwOUFtUVhIX1BoTEZjTFg0MmNXNEE%7CCAIQACorChtyc19oOnNwOUFtUVhIX1BoTEZjTFg0MmNXNEESDAikt7HDBhDopLLxAg&d=17924085&t=8", "disclosureText": { "text": "Summarized with Gemini", "languageCode": "en-US" }, "reviewsUri": "https://www.google.com/maps/place//data=!4m4!3m3!1s0x89d14bb69376690f:0x53d61573fb1dcd0b!9m1!1b1" } }
文本搜索(新)请求
以下示例请求纽约市一家咖啡馆的评价摘要:
curl -X POST -d '{
"textQuery": "coffee shop",
"locationBias": {
"circle": {
"center": {
"latitude": 40.722630,
"longitude": -74.001397
}
}
},
}' \
-H 'Content-Type: application/json' -H "X-Goog-Api-Key: API_KEY" \
-H "X-Goog-FieldMask: places.id,places.reviewSummary" \
'https://places.googleapis.com/v1/places:searchText'
响应正文采用以下格式:
{ "places": [ { "id": "ChIJyfJXNphZwokRbo-oe0DjVT4", "reviewSummary": { "text": { "text": "People say this coffee shop serves up delicious oat milk lattes, cold brew, and pastries, such as almond croissants and cheese danish. They also highlight the friendly staff, cozy atmosphere, and outdoor seating.", "languageCode": "en-US" }, "flagContentUri": "https://www.google.com/local/review/rap/report?postId=5%401:CAIQACodChtyc19oOkk1Z1UwZkp4cEJ3bnA3aGt5VGJLMFE%7CCAIQACorChtyc19oOkk1Z1UwZkp4cEJ3bnA3aGt5VGJLMFESDAj7p9_BBhCYsoeAAw&d=17924085&t=8", "disclosureText": { "text": "Summarized with Gemini", "languageCode": "en-US" }, "reviewsUri": "https://www.google.com/maps/place//data=!4m4!3m3!1s0x89c259983657f2c9:0x3e55e3407ba88f6e!9m1!1b1" } }, { "id": "ChIJHcFFXH9ZwokR_QKedPacLiQ", "reviewSummary": { "text": { "text": "People say this cafe offers delicious matcha, lattes, and freshly baked pastries, including the popular rose honey latte and blueberry lemon muffin. They highlight the spacious, chill, and cinema-inspired vibe, perfect for working or socializing, and the fast, friendly service. They also like the free WiFi, outlets, and clean restrooms.", "languageCode": "en-US" }, "flagContentUri": "https://www.google.com/local/review/rap/report?postId=5%401:CAIQACodChtyc19oOl8yWTlXS0NDVTk1UEhiTFdBQzhlelE%7CCAIQACorChtyc19oOl8yWTlXS0NDVTk1UEhiTFdBQzhlelESDAikt7HDBhDopLLxAg&d=17924085&t=8", "disclosureText": { "text": "Summarized with Gemini", "languageCode": "en-US" }, "reviewsUri": "https://www.google.com/maps/place//data=!4m4!3m3!1s0x89c2597f5c45c11d:0x242e9cf6749e02fd!9m1!1b1" } }, ... ] }
附近搜索(新)请求
以下示例请求西雅图市中心附近的酒店:
curl -X POST -d '{
"maxResultCount": 5,
"locationRestriction": {
"circle": {
"center": {
"latitude": 47.609937,
"longitude": -122.340714
},
"radius": 1000
}
},
"includedTypes": ["hotel"],
"excludedTypes": [],
"rankPreference":"POPULARITY"
}' \
-H 'Content-Type: application/json' -H "X-Goog-Api-Key: API_KEY" \
-H "X-Goog-FieldMask: places.id,places.reviewSummary" \
'https://places.googleapis.com/v1/places:searchNearby'
响应采用以下格式:
{ "places": [ { "id": "ChIJRwVmS-BrkFQRpAB3pO5JOuQ", "reviewSummary": { "text": { "text": "People say this hotel offers clean, modern, and spacious rooms with comfortable beds and phenomenal city views. They highlight the convenient downtown location, with easy walking access to popular attractions, and the efficient self-parking option. They also like the friendly and helpful staff, and the smooth check-in and check-out process.", "languageCode": "en-US" }, "flagContentUri": "https://www.google.com/local/review/rap/report?postId=5%401:CAIQACodChtyc19oOlJWVG5YOXZrSnZhTXBqUy1rc1JZc3c%7CCAIQACorChtyc19oOlJWVG5YOXZrSnZhTXBqUy1rc1JZc3cSDAikt7HDBhDopLLxAg&d=17924085&t=8", "disclosureText": { "text": "Summarized with Gemini", "languageCode": "en-US" }, "reviewsUri": "https://www.google.com/maps/place//data=!4m4!3m3!1s0x54906be04b660547:0xe43a49eea47700a4!9m1!1b1" } }, { "id": "ChIJQVJVX7RqkFQRcpsm3VVub9U", "reviewSummary": { "text": { "text": "People say this hotel offers spacious rooms, a convenient location near the convention center and Pike Place Market, and a tasty restaurant. They also highlight the friendly and attentive staff, the comfortable beds and pillows, and the convenient amenities such as a Starbucks in the lobby and a club lounge.\n\nSome reviews mention the rooms can be noisy.", "languageCode": "en-US" }, "flagContentUri": "https://www.google.com/local/review/rap/report?postId=5%401:CAIQACodChtyc19oOldJVUlodGhTUTJOdUdTSmFxQWw2Nnc%7CCAIQACorChtyc19oOldJVUlodGhTUTJOdUdTSmFxQWw2NncSDAikt7HDBhDopLLxAg&d=17924085&t=8", "disclosureText": { "text": "Summarized with Gemini", "languageCode": "en-US" }, "reviewsUri": "https://www.google.com/maps/place//data=!4m4!3m3!1s0x54906ab45f555241:0xd56f6e55dd269b72!9m1!1b1" } }, ... ] }
归因
根据 Google 的政策和标准,您的应用中显示的所有 AI 驱动的摘要都必须附带适当的归因。如需了解 详情,请参阅 Places API 政策。