主题
获取 Google 商家评论任务结果
通过任务 ID 获取 Google 商家评论采集结果。
本接口返回的数据与创建任务时指定的本地商家名称、搜索引擎、location 和 language 参数严格对应。本平台会尽可能高精度地模拟指定地区和搜索环境,因此返回结果通常可与任务创建时该条件下的搜索结果保持一致。
你也可以使用响应中的 check_url,在浏览器无痕模式下打开,以核验结果性。需要注意的是,个性化因素(如用户偏好、搜索历史及个性化排序信号)不会纳本平台模拟范围,因此不会反映在返回结果中。
接口说明
- 请求方式:
GET - 请求地址:
https://api.seermartech.cn/v3/business_data/google/reviews/task_get/$id
计费说明
本接口在创建任务时计费,任务结果在后续 30 天 可多次获取。
由于本接口是结果获取接口,通常不会产生额外费用;扣费以响应头 X-SeerMarTech-Charge-CNY 为准。
路径参数
| 字段 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一标识符,UUID 格式。该 ID 可在任务创建后的 30 天 用于随时获取结果。 |
返回结构
接口返回 JSON 数据,顶层 tasks 数组,每个任务对象中对应结果。
顶层字段
| 字段 | 类型 | 说明 |
|---|---|---|
version | string | 当前 API 版本 |
status_code | integer | 通用状态码,完整列表请参考 /v3/appendix/errors |
status_message | string | 通用状态信息 |
time | string | 执行耗时,单位秒 |
cost | float | 本次请求总成本,单位 USD |
tasks_count | integer | tasks 数组中的任务数量 |
tasks_error | integer | tasks 数组中返回错误的任务数量 |
tasks | array | 任务结果数组 |
tasks 数组字段
| 字段 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一标识符,UUID 格式 |
status_code | integer | 任务状态码,范围通常为 10000-60000,完整列表请参考 /v3/appendix/errors |
status_message | string | 任务状态信息 |
time | string | 任务执行耗时,单位秒 |
cost | float | 单个任务成本,单位 USD |
result_count | integer | result 数组中的结果数 |
path | array | 请求路径 |
data | object | 与创建任务时提交的参数一致 |
result | array | 结果数组 |
result 数组字段
| 字段 | 类型 | 说明 |
|---|---|---|
keyword | string | POST 提交时传的。返回时会解码 %##, + 会被解码为空格 |
type | string | POST 提交时指定的搜索引擎类型 |
se_domain | string | POST 提交时指定的搜索引擎域名 |
location_code | integer | POST 提交时指定的位置编码 |
language_code | string | POST 提交时指定的语言编码 |
check_url | string | 搜索结果直达链接,可用于校验返回结果准确性 |
datetime | string | 结果抓取时间,UTC 格式:yyyy-mm-dd hh-mm-ss +00:00 |
title | string | SERP 中 reviews 模块标题,通常为商家名称 |
sub_title | string | reviews 模块副标题,通常为地址等补信息 |
rating | object | 商家整体评分信息 |
feature_id | string | SERP 中 reviews素的唯一标识 |
place_id | string | Google 分给商家地点的唯一标识 |
cid | string | Google 定义的本地商家客户端 ID |
reviews_count | integer | 评论总数 |
items_count | integer | 当前结果中返回的评论条数 |
items | array | 评论列表。若需更多评论,应在创建任务时增大 depth |
商家整体评分 rating
| 字段 | 类型 | 说明 |
|---|---|---|
rating_type | string | 评分类型,可为 Max5、Percents、CustomMax |
value | float | 基于评论计算的平均分 |
votes_count | integer | 投票数 |
rating_max | integer | 对应 rating_type 的满分值 |
items 评论字段
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 评论类型,当前可能值:google_reviews_search |
rank_group | integer | 同类型中的排序位置 |
rank_absolute | integer | 在评论中的绝对位置 |
position | string | 评论在 SERP 中的位置,可能值: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 | 评论是否为本地向导 |
profile_name | string | 评论资料名称 |
profile_url | string | 评论资料链接 |
review_url | string | 该条评论链接 |
profile_image_url | string | 评论头像链接 |
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 |
评论图片 images
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 素类型,固定为 images_element |
alt | string | 图片 alt 文本 |
url | string | Google 图片链接 |
image_url | string | 评论中展示的图片地址 |
评论高亮 review_highlights
| 字段 | 类型 | 说明 |
|---|---|---|
feature | string | 被评价的特征项 |
assessment | string | 对该特征项的评价结论 |
沙箱调试
你可以通过以下沙箱地址获取模拟结果,返回中会该端点支持的字段及示例数据,不会产生费用:
https://sandbox.seermartech.cn/v3/business_data/google/reviews/task_get/00000000-0000-0000-0000-000000000000
请求示例
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"
url = 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 = requests.get(url, headers=headers)
print(response.json)TypeScript
typescript
import axios from "axios";
const taskId = "02231934-2604-0066-2000-570459f04879";
axios({
method: "get",
url: `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);
});响应示例
json
{
"version": "0.1.20240514",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.0790 sec.",
"cost": 0,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"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": [
{
"review_text": "You will love the attention to detail and so many selections. Rare options and affordable take away bottles for the night. Located in beautiful Mayfair, the selection here is remarkable. Enomatic wine machines to taste so rare wines as well. Hide is their Michelin Star restaurant just down the road which is also a must visit.",
"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/104039353279027434275?hl=en-US&ved=1t:31294&ictx=111",
"review_url": "https://www.google.com/maps/reviews/data=!4m8!14m7!1m6!2m5!1sChdDSUhNMG9nS0VJQ0FnSURqdk5hTHB3RRAB!2m1!1s0x0:0x4e1505095325804d!3m1!1s2@1:CIHM0ogKEICAgIDjvNaLpwE%7CCgwIi8jEsQYQoOn5hAE%7C?hl=en-US",
"profile_image_url": "https://lh3.googleusercontent.com/a-/ALV-UjUy74ouVG2MVKWQwnYOAk36nXWri5-jelEVkmaMtSsBbxkfj9AyMA=s40-c-rp-mo-ba5-br100",
"owner_answer": null,
"original_owner_answer": null,
"owner_time_ago": null,
"owner_timestamp": null,
"review_id": "ChdDSUhNMG9nS0VJQ0FnSURqdk5hTHB3RRAB",
"images": [],
"review_highlights": null
}
]
}
]
}状态码与错误处理
- 顶层
status_code表示整个请求的处理结果 tasks[].status_code表示单个任务的处理结果- 建议同时校验:
- HTTP 状态码
- 顶层
status_code - 任务级
tasks[].status_code result是否为空
完整错误码与说明请参考 /v3/appendix/errors。 建议在接时设计统一的异常处理机制,以覆盖任务不存在、结果未就绪、参数错误、额不足等场景。
使用建议
- 通过创建任务接口创建评论采集任务。
- 通过任务就绪接口获取已完成任务,或直接保存创建任务时返回的
id。 - 使用本接口按
id拉取评论结果。 - 若当前返回评论数量不足,可在创建任务时提高
depth参数以获取更多评论。 - 如需校验抓取结果,可使用
check_url在无痕模式下打开核对。
实用场景
- 监控门店口碑变化:定期抓取单店评论、评分与评论总量,及时发现满意度波动和服务异常。
- 分析差评与好评主题:提取
review_text、review_highlights和评分字段,识别用户最常提及的服务、环境、价格等问题。 - 评估商家回复效率:结合
owner_answer、owner_time_ago、owner_timestamp分析门店是否及时回复评论,优化客户管理。 - 识别高影响力评论:根据
local_guide、reviews_count、photos_count判断评论影响力,本地品牌声誉运营。 - 对比竞品门店体验:对多个商家并行拉取评论和评分结构,比较点与品牌服务差异。