Skip to content

获取 Google App Info HTML 结果

接口说明

用于根据任务 id 获取 Google App Info 的 HTML 抓取结果。

请求方式: GET请求地址: /v3/app_data/google/app_info/task_get/html/$id

完整示例:

https://api.seermartech.cn/v3/app_data/google/app_info/task_get/html/$id

计费说明

该接口本身不会重复收费,在创建任务时扣费。任务创建后,可在 7 天多次获取结果。

扣费以响应头 X-SeerMarTech-Charge-CNY 为准。

路径参数

字段类型说明
idstring任务唯一标识,UUID 格式。任务提交后,可在 7 天随时使用该 id 获取结果。

响应结构

接口返回 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与创建任务时 POST 请求中传的参数一致
resultarray结果数组

result[] 字段

字段类型说明
app_idstring创建任务时传的应用 ID
typestringPOST 请求中指定的搜索引擎类型
se_domainstringPOST 请求中指定的搜索引擎域名
location_codeintegerPOST 请求中指定的位置代码
language_codestringPOST 请求中指定的语言代码
datetimestring结果获取时间,UTC 格式:yyyy-mm-dd hh-mm-ss +00:00
items_countintegeritems 数组中的结果数量
itemsarrayHTML 页面及数据

items[] 字段

字段类型说明
pageinteger返回的 HTML 页面序号
datestringHTML 页面抓取时间,UTC 格式:yyyy-mm-dd hh-mm-ss +00:00
htmlstringHTML 页面原始

调用说明

通常建议按以下流程获取结果:

  1. 通过创建任务接口创建抓取任务;
  2. 通过 /v3/app_data/google/app_info/tasks_ready 查询已完成任务;
  3. 再通过本接口按任务 id 拉取 HTML 结果。

请求示例

cURL

bash
id="04171455-0696-0192-0000-4c69cc29b945"

curl --location --request GET "https://api.seermartech.cn/v3/app_data/google/app_info/task_get/html/${id}" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json"

Python

python
import requests

task_id = "02201115-0001-0066-0000-c06c8f23fce5"

url = f"https://api.seermartech.cn/v3/app_data/google/app_info/task_get/html/{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 = "02201115-0001-0066-0000-c06c8f23fce5";

axios({
 method: "get",
 url: `https://api.seermartech.cn/v3/app_data/google/app_info/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);
 });

查询已完成任务后批量获取结果

如果需要批量获取已完成任务,通常调用:

GET /v3/app_data/google/app_info/tasks_ready

然后从返回结果中读取可用任务,再逐个请求:

GET /v3/app_data/google/app_info/task_get/html/$id

Python 示例:查 ready 任务,再获取 HTML 结果

python
import requests

base_url = "https://api.seermartech.cn"
headers = {
 "Authorization": "Bearer smt_live_YOUR_KEY",
 "Content-Type": "application/json"
}

# 1. 获取已完成任务列表
ready_resp = requests.get(
 f"{base_url}/v3/app_data/google/app_info/tasks_ready",
 headers=headers
)
ready_data = ready_resp.json

results = []

if ready_data.get("status_code") == 20000:
 for task_group in ready_data.get("tasks", []):
 for task_item in task_group.get("result", []) or []:
 task_id = task_item.get("id")
 if not task_id:
 continue

 # 2. 根据任务 id 获取 HTML 结果
 result_resp = requests.get(
 f"{base_url}/v3/app_data/google/app_info/task_get/html/{task_id}",
 headers=headers
 )
 results.append(result_resp.json)

print(results)

TypeScript 示例:查 ready 任务,再获取 HTML 结果

typescript
import axios from "axios";

const client = axios.create({
 baseURL: "https://api.seermartech.cn",
 headers: {
 Authorization: "Bearer smt_live_YOUR_KEY",
 "Content-Type": "application/json",
 },
});

async function fetchCompletedHtmlResults {
 const readyRes = await client.get("/v3/app_data/google/app_info/tasks_ready");
 const readyData = readyRes.data;
 const results: any[] = [];

 if (readyData.status_code === 20000) {
 for (const taskGroup of readyData.tasks || []) {
 for (const taskItem of taskGroup.result || []) {
 if (!taskItem.id) continue;

 const res = await client.get(
 `/v3/app_data/google/app_info/task_get/html/${taskItem.id}`
 );
 results.push(res.data);
 }
 }
 }

 console.log(results);
}

fetchCompletedHtmlResults.catch(console.error);

响应示例

json
{
 "version": "0.1.20220422",
 "status_code": 20000,
 "status_message": "Ok.",
 "time": "0.0874 sec.",
 "cost": 0,
 "tasks_count": 1,
 "tasks_error": 0,
 "tasks": [
 {
 "id": "04171455-0696-0192-0000-4c69cc29b945",
 "status_code": 20000,
 "status_message": "Ok.",
 "time": "0.0210 sec.",
 "cost": 0,
 "result_count": 1,
 "path": [
 "v3",
 "app_data",
 "google",
 "app_info",
 "task_get",
 "html",
 "04171455-0696-0192-0000-4c69cc29b945"
 ],
 "data": {
 "se_type": "app_info",
 "api": "app_data",
 "function": "app_info",
 "se": "google",
 "app_id": "org.telegram.messenger",
 "location_code": 2840,
 "language_code": "en",
 "device": "desktop",
 "os": "windows"
 },
 "result": [
 {
 "app_id": "org.telegram.messenger",
 "type": "app_info",
 "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 表示整个请求的执行状态;
  • tasks[].status_code 表示单个任务的执行状态;
  • tasks[].status_code 大于等于 40000,通常表示任务级错误;
  • 建议对接口时、任务未完成、任务不存在、参数错误等建立完善的异常处理机制。

完整错误码请参考:/v3/appendix/errors

使用建议

  • 任务结果保证在 7 天 可查询,请及时落库;
  • 如果需要原始页面结构、调试字段解析逻辑或做页面比对,优使用 HTML 结果接口;
  • 若任务尚未完成,建议轮询 /v3/app_data/google/app_info/tasks_ready,频繁按 id 空查。

实用场景

  • 回溯应用页原始结构:抓取并保存应用页 HTML,便于排查字段解析异常、页面结构变更和采集失败原因。
  • 监控商店页面改版:定期比对不同时间点的 HTML,快速发现 Google 应用页 DOM 结构变化,降低解析规则失效风险。
  • 校验数据抓取结果:将结构化字段结果与原始 HTML 对,验证应用名称、描述、评分、评论量等信息是否被正确提取。
  • 构建应用竞品快库:按应用 ID 存档页面 HTML,用于竞品页面审计、版本变化分析和历史证据留存。
  • 定位地域与语言差异:结合 location_codelanguage_code 获取不同市场下的页面 HTML,分析本地化展示差异与商店运营策略。

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