主题
根据任务 ID 获取 Google 应用评论结果(高级版)
本接口使用 GET 方法,通过任务 ID 获取 Google Play 应用评论数据。
请求方法与路径:
text
GET https://api.seermartech.cn/v3/app_data/google/app_reviews/task_get/advanced/$id该接口可返回指定应用的评论评分、评论、评论资料、评论发布时间等数据。结果与创建任务时提交的 app_id、地区和语言参数。
系统会尽可能准确地模拟指定参数下的结果。你可以访问响应中的 check_url,并使用无痕模式核验结果。系统不会考虑用户偏好、搜索历史等个性化因素。
计费说明
- 在创建任务时计费。
- 任务结果在任务创建后的 30 天可获取。
- 实扣费以响应头
X-SeerMarTech-Charge-CNY为准。
请求参数
请求路径中的 $id 为任务 ID。
| 参数 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一标识符,UUID 格式。任务创建后 30 天可使用该 ID 随时获取结果。 |
示例:
text
GET https://api.seermartech.cn/v3/app_data/google/app_reviews/task_get/advanced/04011058-0696-0199-0000-2196151a15cb响应结构
接口返回 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 | 请求路径信息 |
data | object | 创建任务时提交的参数 |
result | array | 任务结果列表 |
data 对象
data 对象创建任务时提交的原始参数,例如应用 ID、地区、语言和抓取深度等。
result 对象
| 字段 | 类型 | 说明 |
|---|---|---|
app_id | string | 创建任务时提交的应用 ID |
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 | 应用名称 |
rating | object | 应用总体评分 |
reviews_count | integer | 评论总数 |
items_count | integer | 当前结果中的评论数量 |
items | array | 评论列表 |
datetime 示例:
text
2019-11-15 12:57:46 +00:00rating 对象
| 字段 | 类型 | 说明 |
|---|---|---|
rating_type | string | 评分类型,可为 Max5、Percents 或 CustomMax |
value | float | 根据评论计算出的平均评分 |
votes_count | integer | 投票数量 |
rating_max | integer | 当前评分类型的最大值 |
items 评论对象
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 评论类型,目前可能为 google_play_reviews_search |
rank_group | integer | 在相同 type素组中的排序位置。不同类型不会参与该字段排序 |
rank_absolute | integer | 在评论中的绝对排序位置 |
position | string | 评论在结果页中的位置,目前为 left |
version | string | 用户提交评论时使用的应用版本 |
rating | object | 评论提交的评分 |
timestamp | string | 评论发布时间,UTC 格式 |
id | string | 评论 ID |
helpful_count | integer | 被标记为“有帮助”的次数 |
title | string | 评论标题。Google Play 不支持评论标题,因此该字段始终为 null |
review_text | string | 评论正文 |
user_profile | object | 评论用户资料 |
responses | array | 开发回复列表 |
评论 rating 对象
| 字段 | 类型 | 说明 |
|---|---|---|
rating_type | string | 评分类型,目前为 Max5 |
value | float | 评论提交的评分 |
votes_count | integer | 反馈数量,该字段为 null |
rating_max | integer | 评分最大值,Max5 的最大值为 5 |
user_profile 对象
| 字段 | 类型 | 说明 |
|---|---|---|
profile_name | string | 评论的个人资料名称 |
profile_image_url | string | 评论头像 URL |
responses 开发回复对象
| 字段 | 类型 | 说明 |
|---|---|---|
author | string | 回复 |
title | string | 回复标题。该字段为 null |
text | string | 回复 |
timestamp | string | 回复发布时间,UTC 格式 |
如果需要获取更多评论,可在创建任务时增大 depth 参数。
请求示例
cURL
bash
id="04011058-0696-0199-0000-2196151a15cb"
curl --location --request GET \
"https://api.seermartech.cn/v3/app_data/google/app_reviews/task_get/advanced/${id}" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json"Python
python
import requests
task_id = "06141103-2692-0309-1000-980b778b6d25"
url = (
"https://api.seermartech.cn"
f"/v3/app_data/google/app_reviews/task_get/advanced/{task_id}"
)
headers = {
"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 task.get("result") is None:
print(
f"任务失败,状态码:{task.get('status_code')},"
f"信息:{task.get('status_message')}"
)
else:
print(task["result"])TypeScript
typescript
import axios from "axios";
const taskId = "02231934-2604-0066-2000-570459f04879";
axios
.get(
`https://api.seermartech.cn/v3/app_data/google/app_reviews/task_get/advanced/${taskId}`,
{
headers: {
Authorization: "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
},
}
)
.then((response) => {
const data = response.data;
if (data.status_code !== 20000) {
console.error(data.status_code, data.status_message);
return;
}
for (const task of data.tasks ?? []) {
if (task.status_code >= 40000 || !task.result) {
console.error(task.status_code, task.status_message);
} else {
console.log(task.result);
}
}
})
.catch((error) => {
console.error("请求异常:", error.message);
});响应示例
json
{
"version": "0.1.20230705",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.0915 sec.",
"cost": 0,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"id": "04011058-0696-0199-0000-2196151a15cb",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.0821 sec.",
"cost": 0,
"result_count": 1,
"path": [
"v3",
"app_data",
"google",
"app_reviews",
"task_get",
"advanced"
],
"data": {
"se_type": "reviews",
"se": "google",
"api": "app_data",
"function": "app_reviews",
"app_id": "org.telegram.messenger",
"location_code": 2840,
"language_code": "en",
"depth": 150,
"device": "desktop",
"os": "windows"
},
"result": [
{
"app_id": "org.telegram.messenger",
"type": "google_play_reviews_search",
"se_domain": "play.google.com",
"location_code": 2840,
"language_code": "en",
"check_url": "https://play.google.com/store/apps/details?id=org.telegram.messenger",
"datetime": "2019-11-15 12:57:46 +00:00",
"title": "Telegram",
"rating": {
"rating_type": "Max5",
"value": 4.5,
"votes_count": 1000000,
"rating_max": 5
},
"reviews_count": 100000,
"items_count": 1,
"items": [
{
"type": "google_play_reviews_search",
"rank_group": 1,
"rank_absolute": 1,
"position": "left",
"version": "10.0.0",
"rating": {
"rating_type": "Max5",
"value": 5,
"votes_count": null,
"rating_max": 5
},
"timestamp": "2019-11-15 12:57:46 +00:00",
"id": "review-id",
"helpful_count": 10,
"title": null,
"review_text": "应用运行稳定,功能丰富。",
"user_profile": {
"profile_name": "用户示例",
"profile_image_url": "https://example.com/avatar.png"
},
"responses": [
{
"author": "开发",
"title": null,
"text": "感谢您的反馈。",
"timestamp": "2019-11-16 08:00:00 +00:00"
}
]
}
]
}
]
}
]
}错误处理
建议根据顶层响应和任务对象中的状态字段分别处理错误:
- 顶层
status_code非20000:请求或 API 级别失败。 tasks[].status_code大于或等于40000:对应任务执行失败。tasks[].result为空:任务未返回有效结果,应结合status_message排查。tasks_error大于0:至少有一个任务返回错误。
实用场景
- 监测应用评分变化:按地区和语言定期获取应用评分与评论数量,及时发现用户满意度下降。
- 汇总用户反馈主题:抓取评论正文并进行、感和主题分析,为产品迭代提供依据。
- 对比竞品口碑表现:针对多个应用采集统一深度的评论数据,比较评分、评论量和有帮助票数。
- 评估版本发布影响:结合评论中的应用版本与发布时间,分析新版本上线后的用户反馈变化。
- 追踪开发回应效果:获取开发回复与时间,评估客服响应速度及用户反馈闭环。