Skip to content

获取 Google 商家评论任务结果

通过任务 ID 获取 Google 商家评论采集结果。

本接口返回的数据与创建任务时指定的本地商家名称、搜索引擎、locationlanguage 参数严格对应。本平台会尽可能高精度地模拟指定地区和搜索环境,因此返回结果通常可与任务创建时该条件下的搜索结果保持一致。

你也可以使用响应中的 check_url,在浏览器无痕模式下打开,以核验结果性。需要注意的是,个性化因素(如用户偏好、搜索历史及个性化排序信号)不会纳本平台模拟范围,因此不会反映在返回结果中。

接口说明

  • 请求方式GET
  • 请求地址https://api.seermartech.cn/v3/business_data/google/reviews/task_get/$id

计费说明

本接口在创建任务时计费,任务结果在后续 30 天 可多次获取。

由于本接口是结果获取接口,通常不会产生额外费用;扣费以响应头 X-SeerMarTech-Charge-CNY 为准。

路径参数

字段类型说明
idstring任务唯一标识符,UUID 格式。该 ID 可在任务创建后的 30 天 用于随时获取结果。

返回结构

接口返回 JSON 数据,顶层 tasks 数组,每个任务对象中对应结果。

顶层字段

字段类型说明
versionstring当前 API 版本
status_codeinteger通用状态码,完整列表请参考 /v3/appendix/errors
status_messagestring通用状态信息
timestring执行耗时,单位秒
costfloat本次请求总成本,单位 USD
tasks_countintegertasks 数组中的任务数量
tasks_errorintegertasks 数组中返回错误的任务数量
tasksarray任务结果数组

tasks 数组字段

字段类型说明
idstring任务唯一标识符,UUID 格式
status_codeinteger任务状态码,范围通常为 10000-60000,完整列表请参考 /v3/appendix/errors
status_messagestring任务状态信息
timestring任务执行耗时,单位秒
costfloat单个任务成本,单位 USD
result_countintegerresult 数组中的结果数
patharray请求路径
dataobject与创建任务时提交的参数一致
resultarray结果数组

result 数组字段

字段类型说明
keywordstringPOST 提交时传的。返回时会解码 %##+ 会被解码为空格
typestringPOST 提交时指定的搜索引擎类型
se_domainstringPOST 提交时指定的搜索引擎域名
location_codeintegerPOST 提交时指定的位置编码
language_codestringPOST 提交时指定的语言编码
check_urlstring搜索结果直达链接,可用于校验返回结果准确性
datetimestring结果抓取时间,UTC 格式:yyyy-mm-dd hh-mm-ss +00:00
titlestringSERP 中 reviews 模块标题,通常为商家名称
sub_titlestringreviews 模块副标题,通常为地址等补信息
ratingobject商家整体评分信息
feature_idstringSERP 中 reviews素的唯一标识
place_idstringGoogle 分给商家地点的唯一标识
cidstringGoogle 定义的本地商家客户端 ID
reviews_countinteger评论总数
items_countinteger当前结果中返回的评论条数
itemsarray评论列表。若需更多评论,应在创建任务时增大 depth

商家整体评分 rating

字段类型说明
rating_typestring评分类型,可为 Max5PercentsCustomMax
valuefloat基于评论计算的平均分
votes_countinteger投票数
rating_maxinteger对应 rating_type 的满分值

items 评论字段

字段类型说明
typestring评论类型,当前可能值:google_reviews_search
rank_groupinteger同类型中的排序位置
rank_absoluteinteger在评论中的绝对位置
positionstring评论在 SERP 中的位置,可能值:right
xpathstring评论的 XPath
review_textstring评论
original_review_textstring原始评论,未进行自动翻译
original_languagestring评论原始语言
time_agostring相对发布时间,如“a month ago”
timestampstring评论发布时间,UTC 格式:yyyy-mm-dd hh-mm-ss +00:00
ratingobject评论提交的评分
reviews_countinteger评论累计提交的评论数
photos_countinteger评论累计提交的数
local_guideboolean评论是否为本地向导
profile_namestring评论资料名称
profile_urlstring评论资料链接
review_urlstring该条评论链接
profile_image_urlstring评论头像链接
owner_answerstring商家对评论的回复
original_owner_answerstring商家回复原文,未进行自动翻译
owner_time_agostring商家回复的相对发布时间
owner_timestampstring商家回复时间,UTC 格式:yyyy-mm-dd hh-mm-ss +00:00
review_idstringGoogle 评论唯一标识
imagesarray评论附带图片
review_highlightsarray评论高亮要点,评价维度及对应判断

评论评分 items[].rating

字段类型说明
rating_typestring评分类型,当前为 Max5
valuefloat评分值
votes_countinteger该评论获得的反馈票数
rating_maxinteger满分值,Max5 通常为 5

评论图片 images

字段类型说明
typestring素类型,固定为 images_element
altstring图片 alt 文本
urlstringGoogle 图片链接
image_urlstring评论中展示的图片地址

评论高亮 review_highlights

字段类型说明
featurestring被评价的特征项
assessmentstring对该特征项的评价结论

沙箱调试

你可以通过以下沙箱地址获取模拟结果,返回中会该端点支持的字段及示例数据,不会产生费用:

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。 建议在接时设计统一的异常处理机制,以覆盖任务不存在、结果未就绪、参数错误、额不足等场景。

使用建议

  1. 通过创建任务接口创建评论采集任务。
  2. 通过任务就绪接口获取已完成任务,或直接保存创建任务时返回的 id
  3. 使用本接口按 id 拉取评论结果。
  4. 若当前返回评论数量不足,可在创建任务时提高 depth 参数以获取更多评论。
  5. 如需校验抓取结果,可使用 check_url 在无痕模式下打开核对。

实用场景

  • 监控门店口碑变化:定期抓取单店评论、评分与评论总量,及时发现满意度波动和服务异常。
  • 分析差评与好评主题:提取 review_textreview_highlights 和评分字段,识别用户最常提及的服务、环境、价格等问题。
  • 评估商家回复效率:结合 owner_answerowner_time_agoowner_timestamp 分析门店是否及时回复评论,优化客户管理。
  • 识别高影响力评论:根据 local_guidereviews_countphotos_count 判断评论影响力,本地品牌声誉运营。
  • 对比竞品门店体验:对多个商家并行拉取评论和评分结构,比较点与品牌服务差异。

统一入口:官网 · LLM API · 控制台