主题
获取 Bing「分类」任务结果
通过本接口可按任务 id 获取 Bing「分类」任务结果。接口会基于指定的商品/服务分类返回建议,并附带以下指标:
- 上个月搜索量
- 过去 12 个月搜索趋势
- 当前平均点击成本(CPC)
- 付费搜索竞争度(competition)
需要注意:
- 返回的建议本身不因地域而变化
- 但
competition、cpc、search_volume、monthly_searches等数据会随任务设置的地域而变化 - 单次任务最多可返回 3000 条建议及核心指标
接口地址
GET /v3/keywords_data/bing/keywords_for_category/task_get/{id}
完整请求地址示例:
https://api.seermartech.cn/v3/keywords_data/bing/keywords_for_category/task_get/{id}
计费说明
该接口本身为按任务获取结果接口,账户通常在创建任务时扣费。
扣费以响应头 X-SeerMarTech-Charge-CNY 为准。
路径参数
| 参数名 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一标识,UUID 格式。任务创建后可在 30 天 使用该 id 随时获取结果。 |
返回结构
接口返回 JSON 数据,顶层 tasks 数组。
顶层字段
| 字段 | 类型 | 说明 |
|---|---|---|
version | string | 当前 API 版本 |
status_code | integer | 整体状态码 |
status_message | string | 整体状态信息 |
time | string | 请求执行时间,单位秒 |
cost | float | 本次请求总成本,单位 USD |
tasks_count | integer | tasks 数组中的任务数量 |
tasks_error | integer | 返回错误的任务数量 |
tasks | array | 任务结果数组 |
建议对
status_code和任务级status_code做统一异常处理。错误码可参考/v3/appendix/errors。
tasks[] 字段
| 字段 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一标识,UUID 格式 |
status_code | integer | 任务状态码,范围通常为 10000-60000 |
status_message | string | 任务状态说明 |
time | string | 任务执行时间,单位秒 |
cost | float | 该任务成本,单位 USD |
result_count | integer | result 数组中的数量 |
path | array | 请求路径 |
data | object | 与创建任务时一致的参数集合 |
result | array | 结果列表 |
result[] 字段
| 字段 | 类型 | 说明 |
|---|---|---|
keyword | string | 返回的 |
location_code | integer | 任务中设置的地域编码;无数据时为 null |
language_code | string | 任务中设置的语言编码;无数据时为 null |
search_partners | boolean | 是否合作搜索网络数据 |
device | string | 任务中指定的设备类型;无数据时为 null |
competition | float | 付费搜索竞争度,取值范围 0-1;基于 Bing Ads 数据;无数据时为 null |
cpc | float | 历史平均点击成本,单位 USD;无数据时为 null |
search_volume | integer | 过去一个月的搜索量;数值可能经过取整;无数据时为 null |
categories | array | 所属商品/服务分类列表;无数据时为 null |
monthly_searches | array | 最近 12 个月的月度搜索量;无数据时为 null |
monthly_searches[] 字段
| 字段 | 类型 | 说明 |
|---|---|---|
year | integer | 年份 |
month | integer | 月份 |
search_volume | integer | 对应月份搜索量,数值可能经过取整 |
请求示例
cURL
bash
id="10251448-0001-0109-0000-6f4dd84c430d"
curl --location --request GET "https://api.seermartech.cn/v3/keywords_data/bing/keywords_for_category/task_get/${id}" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json"Python
python
import requests
task_id = "10251448-0001-0109-0000-6f4dd84c430d"
url = f"https://api.seermartech.cn/v3/keywords_data/bing/keywords_for_category/task_get/{task_id}"
headers = {
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json"
}
response = requests.get(url, headers=headers)
print(response.status_code)
print(response.json)TypeScript
typescript
import axios from "axios";
const taskId = "10251448-0001-0109-0000-6f4dd84c430d";
axios({
method: "get",
url: `https://api.seermartech.cn/v3/keywords_data/bing/keywords_for_category/task_get/${taskId}`,
headers: {
Authorization: "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
},
})
.then((response) => {
// 输出任务结果
console.log(response.data);
})
.catch((error) => {
console.error(error);
});响应示例
json
{
"version": "0.1.20200923",
"status_code": 20000,
"status_message": "Ok.",
"time": "0 sec.",
"cost": 0,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"data": {
"api": "keywords_data",
"function": "keywords_for_category",
"se": "bing",
"location_code": 2840,
"language_code": "en",
"category_code": 10178
},
"result": [
{
"monthly_searches": []
},
{
"keyword": "sunglasses",
"location_code": 2840,
"language_code": "en",
"search_partners": false,
"competition": 0.9,
"cpc": 0.28,
"search_volume": 177700,
"categories": [],
"monthly_searches": []
}
]
}
]
}响应说明
当任务执行成功时,tasks[].result 中会返回该分类下的列表。每条通常:
- 文本
keyword - 地域与语言信息
- 付费竞争度
competition - 平均点击成本
cpc - 最近一个月搜索量
search_volume - 最近 12 个月搜索趋势
monthly_searches
如果某些维度没有可用数据,对应字段可能为 null。
状态码与错误处理
- 顶层
status_code = 20000表示请求成功 - 任务级
tasks[].status_code用于判断单个任务是否成功 - 若
tasks_error > 0,说明部分任务返回错误 - 若
result为空或字段为null,通常表示该分类或指定地域下无可用数据
建议处理以下:
- 顶层请求成功,但任务级失败
- 任务成功,但
result为空 - 任务成功,但部分指标字段缺失
- 任务
id过期或不存在
使用建议
通常调用流程如下:
- 通过对应的创建任务接口创建「分类」任务
- 保存返回的任务
id - 使用本接口按
id轮询或延迟获取结果 - 解析
result中的及指标,用于选词、投放和趋势分析
实用场景
- 挖掘类目词:基于商品分类批量获取,快速建立类目页或广告组初始词库。
- 评估投放价值:结合
cpc与competition判断商业竞争强度, Bing 广告预算分。 - 分析区域需求:在不同
location_code下对比搜索量和趋势,识别重点市场与地域机会。 - 判断季节性波动:利用
monthly_searches观察近 12 个月趋势,为促销节点、备货和排期提供依据。 - 扩展 SEO 分类页:围绕分类自动补高,提升站分类页、专题页和筛选页的覆盖能力。