主题
根据任务 ID 获取 Google Reviews 结果
本接口使用 GET 方法,通过任务 ID 获取 Google Reviews 任务结果:
GET https://api.seermartech.cn/v3/reviews/google/task_get/$id
返回结果与创建任务时指定的本地商家名称、搜索引擎、地区和语言参数对应。本平台会尽可能准确地模拟指定地区和搜索引擎,以确保返回结果接近任务创建时的搜索结果。
你可以访问返回结果中的 check_url,并使用无痕模式进行核验。系统不会考虑用户偏好、搜索历史及个性化搜索因素,因此这些因素不会反映在返回结果中。
计费说明
- 创建任务时计费。
- 任务创建后的 30 天,可获取该任务结果。
- 该接口本身不重复收取结果查询费用。
- 实扣费以响应头
X-SeerMarTech-Charge-CNY为准。
请求参数
接口通过 URL 路径接收任务 ID,无需请求体。
| 参数 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一标识符,UUID 格式。任务创建后 30 天可使用该 ID 随时获取结果。 |
请求示例:
text
GET /v3/reviews/google/task_get/04011058-0696-0199-0000-2196151a15cb响应结构
API 返回 JSON 数据, tasks 任务数组。
顶层字段
| 字段 | 类型 | 说明 |
|---|---|---|
version | string | 当前 API 版本。 |
status_code | integer | 请求级状态码。 |
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 | 当前请求的 URL 路径。 |
data | array | 创建任务时提交的参数,通常与 POST 请求体中的参数一致。 |
result | array | 任务结果数组。 |
系统可能返回请求级或任务级错误,接方应根据 status_code 和 status_message 处理异常。
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。例如:2019-11-15 12:57:46 +00:00。 |
title | string | SERP 中评论模块的标题,通常为收集评论的本地商家名称。 |
sub_title | string | SERP 中评论模块的副标题,例如商家地址等补信息。 |
rating | array | 本地商家的综合评分信息。 |
feature_id | string | SERP 中评论模块的唯一标识符。 |
place_id | string | SERP 中评论模块的 XPath。 |
cid | string | Google 定义的商家客户端 ID,即本地商家的唯一标识符。可合 Google Reviews 接口获取完整评论列表。 |
reviews_count | integer | 商家的评论总数。 |
items_count | integer | 当前结果中的评论条目数量。通过创建任务时增加 depth 参数,可以获取更多评论。 |
items | array | 获取到的评论列表。 |
综合评分 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 | 评论在 SERP 中的对齐位置,目前可能为 right。 |
xpath | string | 评论在 SERP 中的 XPath。 |
review_text | string | 评论正文。 |
time_ago | string | 评论发布时间的相对时间描述。 |
timestamp | string | 评论发布时间,UTC 格式:yyyy-mm-dd hh-mm-ss +00:00。例如:2019-11-15 12:57:46 +00:00。 |
rating | array | 评论提交的评分。 |
reviews_count | integer | 评论提交的评论总数。 |
photos_count | integer | 评论提交的总数。 |
local_guide | boolean | 是否拥有本地向导身份。 |
profile_name | string | 评论的个人资料名称。 |
profile_url | string | 评论的个人资料 URL。 |
profile_image_url | string | 评论的个人资料头像 URL。 |
owner_answer | string | 商家对该评论的回复。 |
owner_time_ago | string | 商家回复的相对发布时间。 |
评论评分 items.rating
| 字段 | 类型 | 说明 |
|---|---|---|
rating_type | string | 评分类型,目前为 Max5。 |
value | float | 评论提交的评分值。 |
votes_count | integer | 该评论获得的反馈或票数。 |
rating_max | integer | 评分最大值;当 rating_type 为 Max5 时,最大值为 5。 |
cURL 示例
bash
id="04011058-0696-0199-0000-2196151a15cb"
curl --location --request GET \
"https://api.seermartech.cn/v3/reviews/google/task_get/${id}" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json"TypeScript 示例
typescript
import axios from "axios";
const taskId = "02231934-2604-0066-2000-570459f04879";
axios
.get(
`https://api.seermartech.cn/v3/reviews/google/task_get/${taskId}`,
{
headers: {
// 使用本平台 API Key 进行 Bearer 认证
Authorization: "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
},
}
)
.then((response) => {
// 处理任务结果
console.log(response.data);
})
.catch((error) => {
// 处理 HTTP 或 API 错误
console.error(error.response?.data || error.message);
});Python 示例
python
import requests
task_id = "04011058-0696-0199-0000-2196151a15cb"
url = f"https://api.seermartech.cn/v3/reviews/google/task_get/{task_id}"
headers = {
# 使用本平台 API Key 进行 Bearer 认证
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
}
response = requests.get(url, headers=headers, timeout=60)
response.raise_for_status()
data = response.json()
if data.get("status_code") != 20000:
print(
f"请求失败,状态码:{data.get('status_code')},"
f"消息:{data.get('status_message')}"
)
else:
for task in data.get("tasks", []):
if task.get("status_code", 0) >= 40000 or not task.get("result"):
print(
f"任务失败,状态码:{task.get('status_code')},"
f"消息:{task.get('status_message')}"
)
else:
for result in task["result"]:
print(result)响应示例
json
{
"version": "3.0.0",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.1234",
"cost": 0.0000,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"id": "04011058-0696-0199-0000-2196151a15cb",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.0987",
"cost": 0.0000,
"result_count": 1,
"path": [
"v3",
"reviews",
"google",
"task_get",
"04011058-0696-0199-0000-2196151a15cb"
],
"data": [],
"result": [
{
"keyword": "示例商家",
"type": "google",
"se_domain": "google.com",
"location_code": 1000,
"language_code": "en",
"check_url": "https://www.google.com/search?q=example",
"datetime": "2019-11-15 12:57:46 +00:00",
"title": "示例商家",
"sub_title": "示例地址",
"rating": {
"rating_type": "Max5",
"value": 4.5,
"votes_count": 120,
"rating_max": 5
},
"feature_id": "example_feature_id",
"place_id": "example_xpath",
"cid": "example_cid",
"reviews_count": 120,
"items_count": 1,
"items": [
{
"type": "google_reviews_search",
"rank_group": 1,
"rank_absolute": 1,
"position": "right",
"xpath": "example_review_xpath",
"review_text": "这是一条示例评论。",
"time_ago": "2 周前",
"timestamp": "2019-11-15 12:57:46 +00:00",
"rating": {
"rating_type": "Max5",
"value": 5,
"votes_count": 3,
"rating_max": 5
},
"reviews_count": 8,
"photos_count": 2,
"local_guide": true,
"profile_name": "示例用户",
"profile_url": "https://example.com/profile",
"profile_image_url": "https://example.com/profile/image.jpg",
"owner_answer": "感谢您的反馈!",
"owner_time_ago": "1 周前"
}
]
}
]
}
]
}实用场景
- 监控本地商家评分与评论数量,及时发现评分变化和口碑趋势,为门店运营和声誉管理提供依据。
- 抓取竞争对手的最新评论,分析用户对价格、服务、环境等方面的反馈,支持竞品研究和运营优化。
- 提取评论与商家回复信息,评估商家互动频率和客户响应质量,本地 SEO 与客户体验分析。
- 结合
cid获取指定商家的完整评论列表,建立商家级评论数据库,用于长期口碑追踪和感分析。 - 使用
check_url校验采集结果,核对特定地区和语言下的搜索展示,提升 SEO 报告与本地排名分析的可信度。