Skip to content

获取 Bing「分类」任务结果

通过本接口可按任务 id 获取 Bing「分类」任务结果。接口会基于指定的商品/服务分类返回建议,并附带以下指标:

  • 上个月搜索量
  • 过去 12 个月搜索趋势
  • 当前平均点击成本(CPC)
  • 付费搜索竞争度(competition)

需要注意:

  • 返回的建议本身不因地域而变化
  • competitioncpcsearch_volumemonthly_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 为准。

路径参数

参数名类型说明
idstring任务唯一标识,UUID 格式。任务创建后可在 30 天 使用该 id 随时获取结果。

返回结构

接口返回 JSON 数据,顶层 tasks 数组。

顶层字段

字段类型说明
versionstring当前 API 版本
status_codeinteger整体状态码
status_messagestring整体状态信息
timestring请求执行时间,单位秒
costfloat本次请求总成本,单位 USD
tasks_countintegertasks 数组中的任务数量
tasks_errorinteger返回错误的任务数量
tasksarray任务结果数组

建议对 status_code 和任务级 status_code 做统一异常处理。错误码可参考 /v3/appendix/errors

tasks[] 字段

字段类型说明
idstring任务唯一标识,UUID 格式
status_codeinteger任务状态码,范围通常为 10000-60000
status_messagestring任务状态说明
timestring任务执行时间,单位秒
costfloat该任务成本,单位 USD
result_countintegerresult 数组中的数量
patharray请求路径
dataobject与创建任务时一致的参数集合
resultarray结果列表

result[] 字段

字段类型说明
keywordstring返回的
location_codeinteger任务中设置的地域编码;无数据时为 null
language_codestring任务中设置的语言编码;无数据时为 null
search_partnersboolean是否合作搜索网络数据
devicestring任务中指定的设备类型;无数据时为 null
competitionfloat付费搜索竞争度,取值范围 0-1;基于 Bing Ads 数据;无数据时为 null
cpcfloat历史平均点击成本,单位 USD;无数据时为 null
search_volumeinteger过去一个月的搜索量;数值可能经过取整;无数据时为 null
categoriesarray所属商品/服务分类列表;无数据时为 null
monthly_searchesarray最近 12 个月的月度搜索量;无数据时为 null

monthly_searches[] 字段

字段类型说明
yearinteger年份
monthinteger月份
search_volumeinteger对应月份搜索量,数值可能经过取整

请求示例

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,通常表示该分类或指定地域下无可用数据

建议处理以下:

  1. 顶层请求成功,但任务级失败
  2. 任务成功,但 result 为空
  3. 任务成功,但部分指标字段缺失
  4. 任务 id 过期或不存在

使用建议

通常调用流程如下:

  1. 通过对应的创建任务接口创建「分类」任务
  2. 保存返回的任务 id
  3. 使用本接口按 id 轮询或延迟获取结果
  4. 解析 result 中的及指标,用于选词、投放和趋势分析

实用场景

  • 挖掘类目词:基于商品分类批量获取,快速建立类目页或广告组初始词库。
  • 评估投放价值:结合 cpccompetition 判断商业竞争强度, Bing 广告预算分。
  • 分析区域需求:在不同 location_code 下对比搜索量和趋势,识别重点市场与地域机会。
  • 判断季节性波动:利用 monthly_searches 观察近 12 个月趋势,为促销节点、备货和排期提供依据。
  • 扩展 SEO 分类页:围绕分类自动补高,提升站分类页、专题页和筛选页的覆盖能力。

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