主题
按任务 ID 获取 Google 应用评论 HTML 结果
本接口使用 GET 方法,通过以下路径获取已提交任务的 HTML 结果:
/v3/app_data/google/app_reviews/task_get/html/$id
任务结果可在任务创建后的 7 天查询。费用在提交任务时产生,扣费以响应头 X-SeerMarTech-Charge-CNY 为准。
请求
请求方法
http
GET https://api.seermartech.cn/v3/app_data/google/app_reviews/task_get/html/{id}路径参数
| 参数 | 类型 | 填 | 说明 |
|---|---|---|---|
id | string | 是 | 任务唯一标识符,UUID 格式。任务创建后 7 天可使用该 ID 查询结果。 |
本接口无需请求体。
请求示例
cURL
bash
id="04171455-0696-0192-0000-4c69cc29b945"
curl --location --request GET \
"https://api.seermartech.cn/v3/app_data/google/app_reviews/task_get/html/${id}" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json"TypeScript
typescript
import axios from "axios";
const taskId = "02201115-0001-0066-0000-c06c8f23fce5";
axios
.get(
`https://api.seermartech.cn/v3/app_data/google/app_reviews/task_get/html/${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);
});Python
python
import requests
task_id = "04171455-0696-0192-0000-4c69cc29b945"
url = (
"https://api.seermartech.cn"
f"/v3/app_data/google/app_reviews/task_get/html/{task_id}"
)
response = requests.get(
url,
headers={
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
},
)
if response.ok:
result = response.json()
print(result)
else:
print(f"请求失败:HTTP {response.status_code}")
print(response.text)响应结构
接口返回 JSON 数据,顶层 tasks 数组。每个任务对象中任务状态及 HTML 结果。
顶层字段
| 字段 | 类型 | 说明 |
|---|---|---|
version | string | 当前 API 版本。 |
status_code | integer | 通用响应状态码。完整状态码列表请参考 /v3/appendix/errors。建议客户端对异常和错误状态进行统一处理。 |
status_message | string | 通用状态说明。完整说明请参考 /v3/appendix/errors。 |
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 范围。完整状态码列表请参考 /v3/appendix/errors。 |
status_message | string | 当前任务的状态说明。 |
time | string | 任务执行耗时,单位为秒。 |
cost | float | 平台原始 USD 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。 |
result_count | integer | result 数组中的数量。 |
path | array | 请求 URL 路径信息。 |
data | object | 创建任务时提交的参数,结构与 POST 请求中的任务对象一致。 |
result | array | 任务结果数组。 |
result 字段
| 字段 | 类型 | 说明 |
|---|---|---|
app_id | string | 创建任务时提交的应用 ID。 |
type | string | 创建任务时提交的搜索引擎类型。 |
se_domain | string | 创建任务时提交的搜索引擎域名。 |
location_code | integer | 创建任务时提交的地区代码。 |
language_code | string | 创建任务时提交的语言代码。 |
datetime | string | 获取结果的日期和时间,采用 UTC 格式:yyyy-mm-dd hh-mm-ss +00:00。例如:2019-11-15 12:57:46 +00:00。 |
items_count | integer | items 数组中的结果数量。 |
items | array | HTML 页面及数据。 |
items 字段
| 字段 | 类型 | 说明 |
|---|---|---|
page | integer | 返回 HTML 页面的序号。 |
date | string | HTML 页面抓取时间,采用 UTC 格式:yyyy-mm-dd hh-mm-ss +00:00。例如:2019-11-15 12:57:46 +00:00。 |
html | string | 返回的 HTML 页面。 |
响应示例
json
{
"version": "0.1.20220420",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.0688 sec.",
"cost": 0,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"id": "04171455-0696-0192-0000-4c69cc29b945",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.0521 sec.",
"cost": 0,
"result_count": 1,
"path": [
"v3",
"app_data",
"google",
"app_reviews",
"task_get",
"html"
],
"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,
"rating": 5,
"device": "desktop",
"os": "windows"
},
"result": [
{
"app_id": "org.telegram.messenger",
"type": "reviews",
"se_domain": "google.com",
"location_code": 2840,
"language_code": "en",
"datetime": "2019-11-15 12:57:46 +00:00",
"items_count": 1,
"items": [
{
"page": 1,
"date": "2019-11-15 12:57:46 +00:00",
"html": "<html>...</html>"
}
]
}
]
}
]
}任务状态处理建议
- 当顶层或任务级
status_code为成功状态时,检查result是否存在并读取 HTML。 - 当
status_code表示错误时,结合status_message记录日志并执行重试或人工排查。 - 当
result_count为0或items_count为0时,应将视为无可用结果,而不是直接判定接口异常。 - 任务结果保留 7 天,建议在获取成功后及时保存所需 HTML及数据。
- 完整响应状态码和错误说明请参考
/v3/appendix/errors。
实用场景
- 抓取应用评论页面 HTML,保存原始页面,便于后续构建评论归档和审计系统。
- 解析评论页面中的评分与文本信息,分析用户反馈、常见问题和产品口碑变化。
- 对比不同应用或版本的评论,识别竞品功能优势与用户点,为产品迭代提供依据。
- 按地区和语言获取评论页面,评估应用在不同市场的用户反馈差异,支持本地化运营决策。
- 建立评论数据快,结合抓取时间和页面序号进行历史留存,支持舆趋势分析与 SEO研究。