主题
按任务 ID 获取 Bing 类目结果
本接口使用 GET 方法,通过任务 ID 获取 Bing 类目任务的结果:
GET https://api.seermartech.cn/v3/keywords_data/bing/keywords_for_category/task_get/$id
接口会返回指定产品或服务类目下的建议,并提供以下数据:
- 最近一个月的搜索量
- 最近 12 个月的搜索量趋势
- 付费搜索竞争度
- 平均每次点击成本(CPC)
- 所属的产品或服务类目
同一类目返回的通常不随地域变化,但竞争度、CPC、搜索量和月度搜索数据会根据任务中指定的地域返回。单个任务最多可返回 3000 条建议。
计费说明
本接口查询已提交任务的结果,不会因重复获取结果而重复创建任务。扣费以响应头 X-SeerMarTech-Charge-CNY 为准。
任务结果通常可在任务创建后的 30 天通过任务 ID 查询。
请求参数
路径参数
| 参数 | 类型 | 填 | 说明 |
|---|---|---|---|
id | string | 是 | 任务唯一标识,UUID 格式。任务创建后 30 天可使用该 ID 查询结果。 |
请求示例
cURL
bash
task_id="10251448-0001-0109-0000-6f4dd84c430d"
curl --location --request GET \
"https://api.seermartech.cn/v3/keywords_data/bing/keywords_for_category/task_get/${task_id}" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json"TypeScript
typescript
import axios from "axios";
const taskId = "02231934-2604-0066-2000-570459f04879";
axios
.get(
`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.response?.data || error.message);
});Python
python
import requests
task_id = "02231934-2604-0066-2000-570459f04879"
url = (
"https://api.seermartech.cn/v3/keywords_data/bing/"
f"keywords_for_category/task_get/{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 对象,主要字段如下:
| 字段 | 类型 | 说明 |
|---|---|---|
version | string | 当前 API 版本。 |
status_code | integer | 接口级状态码。 |
status_message | string | 接口级状态说明。 |
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 范围。 |
status_message | string | 任务级状态说明。 |
time | string | 任务执行耗时,单位为秒。 |
cost | float | 平台原始 USD 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。 |
result_count | integer | result 数组中的结果数量。 |
path | array | 请求路径信息。 |
data | object | 创建任务时提交的参数。 |
result | array | 结果数组。 |
tasks.data 字段
data 对象通常创建任务时提交的参数,例如:
| 字段 | 类型 | 说明 |
|---|---|---|
api | string | API 模块名称,例如 keywords_data。 |
function | string | 功能名称,例如 keywords_for_category。 |
se | string | 搜索引擎名称,例如 bing。 |
location_code | integer | 地域代码。 |
language_code | string | 语言代码。 |
category_code | integer | 产品或服务类目代码。 |
tasks.result 字段
| 字段 | 类型 | 说明 |
|---|---|---|
keyword | string | 。 |
location_code | integer | 地域代码。无数据时为 null。 |
language_code | string | 语言代码。无数据时为 null。 |
search_partners | boolean | 是否合作伙伴网络中的数据。 |
device | string | 设备类型。数据会指定设备返回;无数据时为 null。 |
competition | float | 付费搜索竞争度,取值范围为 0 至 1,边界值。该值反映付费搜索结果中的相对竞争程度;无数据时为 null。 |
cpc | float | 平均每次点击成本。该值表示历史付费搜索中的平均点击成本;无数据时为 null。如需换算人民币,可按汇率或业务计价口径换算。 |
search_volume | integer | 最近一个月的月均搜索量。搜索量为近似值,可能经过取整;无数据时为 null。 |
categories | array | 对应的产品或服务类目。无数据时为 null。 |
monthly_searches | array | 最近 12 个月、针对指定地域的月度搜索量数据。无数据时为 null。 |
monthly_searches 字段
| 字段 | 类型 | 说明 |
|---|---|---|
year | integer | 年份。 |
month | integer | 月份。 |
search_volume | integer | 当月月均搜索量,通常为近似值并经过取整。 |
响应示例
json
{
"version": "0.1.20200923",
"status_code": 20000,
"status_message": "Ok.",
"time": "0 sec.",
"cost": 0,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"id": "10251448-0001-0109-0000-6f4dd84c430d",
"status_code": 20000,
"status_message": "Ok.",
"time": "0 sec.",
"cost": 0,
"result_count": 2,
"path": [
"v3",
"keywords_data",
"bing",
"keywords_for_category",
"task_get"
],
"data": {
"api": "keywords_data",
"function": "keywords_for_category",
"se": "bing",
"location_code": 2840,
"language_code": "en",
"category_code": 10178
},
"result": [
{
"keyword": "sunglasses",
"location_code": 2840,
"language_code": "en",
"search_partners": false,
"device": "desktop",
"competition": 0.9,
"cpc": 0.28,
"search_volume": 177700,
"categories": [
10178
],
"monthly_searches": [
{
"year": 2024,
"month": 1,
"search_volume": 165000
},
{
"year": 2024,
"month": 2,
"search_volume": 177700
}
]
},
{
"keyword": "cheap sunglasses",
"location_code": 2840,
"language_code": "en",
"search_partners": false,
"device": "desktop",
"competition": 0.72,
"cpc": 0.28,
"search_volume": 12100,
"categories": [
10178
],
"monthly_searches": [
{
"year": 2024,
"month": 1,
"search_volume": 9900
},
{
"year": 2024,
"month": 2,
"search_volume": 12100
}
]
}
]
}
]
}状态码与异常处理
接口级和任务级状态码均应进行判断:
20000:请求或任务执行成功。40000及以上:通常表示任务处理失败或返回异常。tasks_error > 0:表示至少有一个任务返回错误。
建议客户端同时检查以下字段:
- 顶层
status_code; tasks[].status_code;tasks[].status_message;tasks[].result是否存在;tasks_error是否大于0。
完整状态码和错误说明请参考本平台错误码文档。
实用场景
- 获取类目:根据产品类目批量发现搜索词,扩大 SEO和落地页的覆盖范围。
- 评估商业价值:结合
competition和cpc筛选付费竞争适中、转化潜力较高的。 - 分析搜索趋势:使用
monthly_searches对比过去 12 个月的搜索量,识别季节性需求和增长词。 - 制定地域化 SEO 策略:按不同
location_code获取搜索量、竞争度和 CPC 数据,为地区站点或市场投放制定优级。 - 规划与广告协同:将高搜索量用于选题,将高 CPC 或高竞争用于广告预算和竞品投放分析。