主题
business_data/google/reviews/task_get
GET /v3/business_data/google/reviews/tasks_ready
接口说明
GET /v3/business_data/google/reviews/task_get/$id
根据任务 ID 获取 Google 本地商户评论结果。返回数据与创建任务时指定的商户名称、搜索引擎、位置和语言。本平台会尽可能准确地模拟指定位置和搜索环境,因此返回结果应与任务创建时对应条件下的搜索结果一致。
返回结果不考虑用户偏好、搜索历史及个性化因素。可访问响应中的 check_url,并使用无痕模式核验结果性。
任务结果自任务创建之日起 30 天可重复获取。获取结果本身不额外计费,费用在创建任务时产生。扣费以响应头 X-SeerMarTech-Charge-CNY 为准。
请求参数
路径参数:
| 参数 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一标识,使用 UUID 格式。任务创建成功后获得,可在 30 天用于获取任务结果。 |
请求示例
cURL
bash
id="04011058-0696-0199-0000-2196151a15cb"
curl --location --request GET \
"https://api.seermartech.cn/v3/business_data/google/reviews/task_get/${id}" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json"Python
python
import requests
task_id = "05211333-2692-0298-0000-047fc45592ce"
response = requests.get(
f"https://api.seermartech.cn/v3/business_data/google/reviews/task_get/{task_id}",
headers={
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
},
)
response.raise_for_status()
data = response.json()
print(data)TypeScript
typescript
import axios from "axios";
const taskId = "02231934-2604-0066-2000-570459f04879";
axios
.get(
`https://api.seermartech.cn/v3/business_data/google/reviews/task_get/${taskId}`,
{
headers: {
Authorization: "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
},
}
)
.then((response) => {
// 处理任务结果
console.log(response.data);
})
.catch((error) => {
console.error(error.response?.data || error.message);
});响应结构
接口返回 JSON 数据,顶层 tasks 数组。错误码和状态消息可参考错误码文档。
顶层字段
| 字段 | 类型 | 说明 |
|---|---|---|
version | string | 当前 API 版本。 |
status_code | integer | 通用响应状态码。通常 20000 表示成功。 |
status_message | string | 通用状态消息。 |
time | string | 接口执行耗时,单位为秒。 |
cost | float | 平台原始 USD 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。 |
tasks_count | integer | tasks 数组中的任务数量。 |
tasks_error | integer | tasks 数组中返回错误的任务数量。 |
tasks | array | 任务结果数组。 |
tasks 字段
| 字段 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一标识,UUID 格式。 |
status_code | integer | 任务状态码,通常为 10000 至 60000 范围的整数。 |
status_message | string | 任务状态消息。 |
time | string | 任务执行耗时,单位为秒。 |
cost | float | 平台原始 USD 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。 |
result_count | integer | result 数组中的数量。 |
path | array | 请求路径信息。 |
data | object | 创建任务时提交的参数。 |
result | array | 评论结果数组。 |
result 字段
商户评论汇总字段
| 字段 | 类型 | 说明 |
|---|---|---|
keyword | string | 创建任务时提交的。返回时会对编码进行解码,+ 会被解码为空格。 |
type | string | 搜索引擎结果类型。 |
se_domain | string | 搜索引擎域名。 |
location_code | integer | 位置代码。 |
language_code | string | 语言代码。 |
check_url | string | 对应搜索结果的直接 URL,可用于核验返回结果。 |
datetime | string | 获取结果的日期和时间,使用 UTC 格式:yyyy-mm-dd hh:mm:ss +00:00。 |
title | string | 评论模块标题,通常为商户名称。 |
sub_title | string | 评论模块副标题,例如商户地址等补信息。 |
rating | object | 商户总体评分信息。 |
feature_id | string | 搜索结果中评论模块的唯一标识。 |
place_id | string | Google 分给商户位置的唯一标识。 |
cid | string | Google 定义的商户唯一客户 ID。 |
reviews_count | integer | 商户评论总数。 |
items_count | integer | 当前结果中返回的评论数量。增加创建任务时的 depth 参数可获取更多评论。 |
items | array | 评论明细数组。 |
result.rating 字段
| 字段 | 类型 | 说明 |
|---|---|---|
rating_type | string | 评分类型,可为 Max5、Percents 或 CustomMax。 |
value | float | 基于评论计算的平均评分。 |
votes_count | integer | 评分票数。 |
rating_max | integer | 当前评分类型的最大值。 |
items 评论字段
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 评论类型,固定可能为 google_reviews_search。 |
rank_group | integer | 在相同 type 结果组中的排名。不同类型结果不会计该排名。 |
rank_absolute | integer | 评论在评论列表中的绝对排名。 |
position | string | 评论在搜索结果中的位置,目前可能为 right。 |
xpath | string | 评论在页面中的 XPath。 |
review_text | string | 评论文本,可能为自动翻译后的。 |
original_review_text | string | 评论原文,不应用自动翻译时的原始。 |
original_language | string | 评论原文语言。 |
time_ago | string | 相对发布时间,例如 a month ago。 |
timestamp | string | 评论发布时间,使用 UTC 格式:yyyy-mm-dd hh:mm:ss +00:00。 |
rating | object | 评论提交给出的评分。 |
reviews_count | integer | 评论提交发布的评论总数。 |
photos_count | integer | 评论提交发布的总数。 |
local_guide | boolean | 是否 Local Guide 身份。 |
profile_name | string | 评论个人资料名称。 |
profile_url | string | 评论个人资料 URL。 |
review_url | string | 评论 URL。 |
profile_image_url | string | 评论头像 URL。 |
owner_answer | string | 商户对评论的回复,可能为自动翻译后的。 |
original_owner_answer | string | 商户回复原文,不应用自动翻译时的原始。 |
owner_time_ago | string | 商户回复的相对发布时间。 |
owner_timestamp | string | 商户回复时间,使用 UTC 格式:yyyy-mm-dd hh:mm:ss +00:00。 |
review_id | string | Google 评论唯一标识。 |
images | array | 评论提交的图片。 |
review_highlights | array | 评论重点摘要,被突出显示的评价维度及判断。 |
items.rating 字段
| 字段 | 类型 | 说明 |
|---|---|---|
rating_type | string | 评分类型,目前为 Max5。 |
value | float | 评论评分值。 |
votes_count | integer | 该评分获得的反馈或票数。 |
rating_max | integer | 评分最大值,Max5 类型的最大值为 5。 |
items.images 字段
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 图片类型,通常为 images_element。 |
alt | string | 图片的替代文本。 |
url | string | Google 返回的图片 URL。 |
image_url | string | 评论中展示的图片 URL。 |
items.review_highlights 字段
| 字段 | 类型 | 说明 |
|---|---|---|
feature | string | 被评价的商户特征或维度。 |
assessment | string | 对该特征的评价。 |
响应示例
json
{
"version": "0.1.20240514",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.0790 sec.",
"cost": 0,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"id": "04011058-0696-0199-0000-2196151a15cb",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.0530 sec.",
"cost": 0,
"result_count": 1,
"path": [
"v3",
"business_data",
"google",
"reviews",
"task_get",
"04011058-0696-0199-0000-2196151a15cb"
],
"data": {
"se_type": "reviews",
"se": "google",
"api": "business_data",
"function": "reviews",
"location_name": "London,England,United Kingdom",
"language_name": "English",
"keyword": "hedonism wines",
"depth": 10,
"sort_by": "highest_rating",
"device": "desktop",
"os": "windows"
},
"result": [
{
"keyword": "hedonism wines",
"type": "google_reviews_search",
"se_domain": "google.com",
"location_code": 1006886,
"language_code": "en",
"check_url": "https://www.google.com/search?q=hedonism+wines",
"datetime": "2024-05-15 14:09:32 +00:00",
"title": "Hedonism Wine",
"sub_title": "London, United Kingdom",
"rating": {
"rating_type": "Max5",
"value": 4.7,
"votes_count": null,
"rating_max": 5
},
"feature_id": "reviews_feature_id",
"place_id": "ChIJexamplePlaceId",
"cid": "0x4e1505095325804d",
"reviews_count": 116,
"items_count": 1,
"items": [
{
"type": "google_reviews_search",
"rank_group": 1,
"rank_absolute": 1,
"position": "right",
"xpath": "/div/div/div/div/div/div",
"review_text": "You will love the attention to detail and so many selections.",
"original_review_text": null,
"original_language": "en",
"time_ago": "a month ago",
"timestamp": "2024-05-05 14:09:32 +00:00",
"rating": {
"rating_type": "Max5",
"value": 5,
"votes_count": null,
"rating_max": 5
},
"reviews_count": 116,
"photos_count": 369,
"local_guide": true,
"profile_name": "Cam Pinkney",
"profile_url": "https://www.google.com/maps/contrib/example",
"review_url": "https://www.google.com/maps/reviews/data=example",
"profile_image_url": "https://lh3.googleusercontent.com/example",
"owner_answer": null,
"original_owner_answer": null,
"owner_time_ago": null,
"owner_timestamp": null,
"review_id": "ChZDSUhNMG9nS0VJQ0FnSUMxbHFyMFlnEAE",
"images": null,
"review_highlights": null
}
]
}
]
}
]
}任务获取流程
通常通过以下接口获取已完成任务列表,再使用任务 ID 调用本接口:
text
GET /v3/business_data/google/reviews/tasks_ready
GET /v3/business_data/google/reviews/task_get/$id建议在程序中同时检查以下状态:
- 顶层
status_code是否为20000; - 任务级
status_code是否表示成功; tasks_error是否大于0;result是否为空;status_message是否错误原因。
沙盒环境
可使用沙盒接口查看该端点支持的字段结构。沙盒返回的数据为虚拟数据,不会产生费用:
text
https://sandbox.seermartech.cn/v3/business_data/google/reviews/task_get/00000000-0000-0000-0000-000000000000实用场景
- 监控商户评论数量与平均评分,识别本地 SEO 表现变化并及时发现声誉风险。
- 提取竞品评论文本和评分明细,分析竞品在服务、价格、产品等维度上的用户反馈。
- 统计评论、Local Guide 身份及评论活跃度,评估商户本地搜索结果的丰富度。
- 分析商户回复覆盖率与响应时效,优化品牌方的评论运营和客户服务流程。
- 采集评论重点摘要与原文语言,开展多语言感分析和跨地区口碑对比。