主题
Google 应用列表任务创建
POST /v3/app_data/google/app_list/task_post
本接口使用 POST 方法,路径为 /v3/app_data/google/app_list/task_post。用于创建 Google Play 应用列表采集任务,获取各类热门榜单中的移动应用。返回结果受应用榜单类型、语言和地区参数影响。
每返回最多 100 条结果计费一次。例如,设置 "depth": 101 时,可能按 200 条结果计费。扣费以响应头 X-SeerMarTech-Charge-CNY 为准。
请求信息
- 请求方法:POST
- 请求路径:
/v3/app_data/google/app_list/task_post - 请求格式:JSON
- 认证方式:Bearer Token
- 单次请求任务数:最多 100 个 平台限流以认证说明中的 30/60/120 次/分钟规则为准
请求体是 JSON 数组,每个数组代表一个任务。
请求参数
| 参数 | 类型 | 填 | 说明 |
|---|---|---|---|
app_collection | string | 是 | Google Play 应用榜单类型。可选值:featured、topselling_paid、topselling_free、topselling_new_free、topselling_new_paid、topgrossing、movers_shakers。当值为 featured 时,不可同时使用 app_category。 |
location_name | string | 条件填 | 搜索引擎地区的完整名称。未指定 location_code 时填。示例:West Los Angeles,California,United States。可通过 /v3/app_data/google/locations 获取可用地区。 |
location_code | integer | 条件填 | 搜索引擎地区代码。未指定 location_name 时填。示例:9061121。可通过 /v3/app_data/google/locations 获取。 |
language_name | string | 条件填 | 搜索引擎语言的完整名称。未指定 language_code 时填。示例:English。可通过 /v3/app_data/google/languages 获取。 |
language_code | string | 条件填 | 搜索引擎语言代码。未指定 language_name 时填。示例:en。可通过 /v3/app_data/google/languages 获取。 |
priority | integer | 否 | 任务优级。1:普通优级,默认值;2:高优级。高优级任务会产生额外费用。 |
depth | integer | 否 | 返回的应用数量。默认值为 100,最大值为 200。建议设置为 100 的倍数,因为系统按每批 100 条结果处理。每批最多 100 条结果计费一次。 |
app_category | string | 否 | Google Play 应用分类,用于筛选结果。例如:family、shopping。可通过 /v3/app_data/google/categories 获取完整分类列表。当 app_collection 为 featured 时不可使用。 |
age_rating | string | 否 | 按年龄分级筛选应用。可选值:ages_up_to_5:适合 5 岁及以下儿童;ages_6_8:适合 6 至 8 岁儿童;ages_9_12:适合 9 至 12 岁儿童。默认返回所有年龄段应用。此参数在应用分类为 family 时生效。 |
tag | string | 否 | 自定义任务标识,最长 255 个字符。可用于任务与结果,提交的值会在响应的 data 对象中返回。 |
postback_url | string | 否 | 任务完成后接收结果的 URL。平台会向该地址发送 POST 请求,结果使用 gzip 格式压缩。可使用 $id 和 $tag 占位符,平台发送请求时会替换为任务 ID 和 URL 编码后的标签值。 |
postback_data | string | 使用 postback_url 时填 | 指定回传数据类型。可选值:advanced、html。 |
pingback_url | string | 否 | 任务完成通知 URL。任务完成后,平台会向该地址发送 GET 请求。可使用 $id 和 $tag 占位符。 |
地区与语言参数说明
location_name 与 location_code 二选一;language_name 与 language_code 二选一。建议优使用代码参数,以名称匹差异。
特殊字符会在 postback_url 或 pingback_url 中进行 URL 编码。例如,# 会编码为 %23。
如果回调服务器在 10 秒未返回响应,连接将因时中止,任务会转移至任务就绪列表。建议确保回调接口能够快速返回 HTTP 成功响应,并在异步任务中处理数据。
计费说明
- 创建任务会产生任务提交费用。
- 返回结果时,根据
items数组中的结果数量计费。 - 每最多 100 条结果计费一次。
depth大于 100 时,如果返回 100 条结果,可能产生额外费用。- 使用
priority: 2会产生额外的高优级任务费用。 - 实扣费以响应头
X-SeerMarTech-Charge-CNY为准。
请求示例
cURL
bash
curl --location --request POST \
"https://api.seermartech.cn/v3/app_data/google/app_list/task_post" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json" \
--data-raw '[
{
"app_collection": "topselling_free",
"location_code": 2840,
"language_code": "en",
"depth": 100
}
]'Python
python
import requests
url = "https://api.seermartech.cn/v3/app_data/google/app_list/task_post"
headers = {
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
}
# 创建一个普通应用榜单采集任务
post_data = [
{
"app_collection": "topselling_free",
"location_code": 2840,
"language_code": "en",
"depth": 100,
}
]
# 创建高优级、标签和通知地址的任务
# 任务完成后,平台会向 pingback_url 发送 GET 请求
post_data.append(
{
"app_collection": "topselling_free",
"location_code": 2840,
"language_code": "en",
"depth": 100,
"priority": 2,
"tag": "some_string_123",
"pingback_url": "https://your-server.com/pingscript?id=$id&tag=$tag",
}
)
# 创建通过 postback_url 接收结果的任务
post_data.append(
{
"app_collection": "topselling_free",
"location_code": 2840,
"language_code": "en",
"depth": 100,
"postback_data": "html",
"postback_url": "https://your-server.com/postbackscript",
}
)
response = requests.post(url, headers=headers, json=post_data)
response.raise_for_status()
result = response.json()
if result.get("status_code") == 20000:
print(result)
else:
print(
"请求失败,错误码:{},消息:{}".format(
result.get("status_code"),
result.get("status_message"),
)
)TypeScript
typescript
import axios from "axios";
const postData = [
{
app_collection: "topselling_free",
location_code: 2840,
language_code: "en",
depth: 100,
},
{
app_collection: "topselling_free",
location_code: 2840,
language_code: "en",
depth: 100,
priority: 2,
tag: "some_string_123",
pingback_url:
"https://your-server.com/pingscript?id=$id&tag=$tag",
},
{
app_collection: "topselling_free",
location_code: 2840,
language_code: "en",
depth: 100,
postback_data: "html",
postback_url: "https://your-server.com/postbackscript",
},
];
axios
.post(
"https://api.seermartech.cn/v3/app_data/google/app_list/task_post",
postData,
{
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);
});响应说明
接口返回 JSON 对象 tasks 数组每个提交任务的信息。任务创建成功后,result 通常为 null,需要使用返回的任务 id 查询后续结果,或通过 postback_url 接收结果。
顶层响应字段
| 字段 | 类型 | 说明 |
|---|---|---|
version | string | 当前 API 版本。 |
status_code | integer | 请求级状态码。20000 表示请求成功。 |
status_message | string | 请求级提示信息。 |
time | string | 请求处理耗时,例如 0.0818 sec.。 |
cost | float | 平台原始 USD 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。 |
tasks_count | integer | tasks 数组中的任务数量。 |
tasks_error | integer | tasks 数组中返回错误的任务数量。 |
tasks | array | 任务信息数组。 |
tasks 数组字段
| 字段 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一标识,UUID 格式。后续可使用该 ID 获取任务结果。 |
status_code | integer | 任务状态码,通常为 10000 至 60000 范围的编码。 |
status_message | string | 任务状态说明。 |
time | string | 任务处理耗时。 |
cost | float | 平台原始 USD 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。 |
result_count | integer | result 数组中的数量。创建任务成功时通常为 0。 |
path | array | 请求 URL 路径信息。 |
data | object | 创建任务时提交的参数。 |
result | array | null | 任务结果数组。任务创建接口返回时通常为 null。 |
响应示例
json
{
"version": "0.1.20220422",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.0818 sec.",
"cost": 0.0012,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"id": " ರೂಪ-example-task-id",
"status_code": 20100,
"status_message": "Task Created.",
"time": "0.0123 sec.",
"cost": 0.0012,
"result_count": 0,
"path": [
"v3",
"app_data",
"google",
"app_list",
"task_post"
],
"data": {
"api": "app_data",
"function": "app_list",
"se": "google",
"app_collection": "topselling_free",
"location_code": 2840,
"language_code": "en",
"depth": 100,
"app_category": "shopping",
"se_type": "app_list",
"device": "desktop",
"os": "windows"
},
"result": null
}
]
}> id 为示例任务标识,响应中会返回真实 UUID。
错误处理
请求级和任务级错误分别通过 status_code 与 status_message 返回。建议同时检查:
- HTTP 状态码;
- 顶层
status_code; tasks_error;- 每个任务对象中的
status_code和status_message。
单次 POST 请求 100 个任务时,出限制的任务会返回错误码 40006。
实用场景
- 监控热门榜单排名:定期采集、付费、新上架和销应用榜单,分析竞品排名变化与市场热度。
- 对比不同地区的应用表现:按地区和语言创建任务,识别同一应用在不同市场中的榜单差异,为本地化运营提供依据。
- 筛选细分品类应用:结合
app_category和age_rating参数提取目标品类应用,支持竞品库建设和行业市场研究。 - 跟踪榜单异动:使用
movers_shakers榜单定时发现排名快速上升或下降的应用,识别潜在竞品和市场趋势。 - 构建应用市场数据管道:通过
postback_url或pingback_url自动接收任务通知和结果,减少轮询开销并提高数据更新效率。