主题
获取站点结果(按任务 ID)
接口说明
通过任务 ID 获取 Keywords For Site 的结果数据。本接口会返回与指定网站的列表,并附带以下核心指标:
- 最近一个月的搜索量
- 过去 12 个月的搜索量趋势
- 当前平均点击价格(CPC)
- 付费搜索竞争度
单次最多返回 3000 个。
接口路径:
GET https://api.seermartech.cn/v3/keywords_data/bing/keywords_for_site/task_get/{id}
计费说明
该接口本身用于获取已创建任务的结果,账户在创建任务时扣费;任务结果在完成后的 30 天可重复获取。
如需核对费用,请以响应中的 cost 字段为准。
请求参数
路径参数
| 字段名 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一标识,UUID 格式。任务完成后,可在 30 天 随时通过该 ID 获取结果。 |
响应结构
接口返回 JSON 数据,顶层 tasks 数组。
顶层字段
| 字段名 | 类型 | 说明 |
|---|---|---|
version | string | 当前 API 版本 |
status_code | integer | 通用状态码,完整列表参考 /v3/appendix/errors |
status_message | string | 通用状态信息,完整列表参考 /v3/appendix/errors |
time | string | 接口执行时间,单位秒 |
cost | float | 本次请求总成本 |
tasks_count | integer | tasks 数组中的任务数量 |
tasks_error | integer | 返回错误的任务数量 |
tasks | array | 任务结果数组 |
tasks[] 字段
| 字段名 | 类型 | 说明 |
|---|---|---|
id | string | 任务 ID,UUID 格式 |
status_code | integer | 任务状态码,范围通常为 10000-60000,完整列表参考 /v3/appendix/errors |
status_message | string | 任务状态信息 |
time | string | 任务执行耗时,单位秒 |
cost | float | 该任务成本,单位 USD |
result_count | integer | result 数组中的数量 |
path | array | 请求路径 |
data | object | 创建任务时传的原始参数 |
result | array | 结果列表 |
data 字段
data 中通常会创建任务时指定的参数,例如:
| 字段名 | 类型 | 说明 |
|---|---|---|
api | string | API 模块名 |
function | string | 功能名 |
se | string | 搜索引擎,当前为 bing |
language_code | string | 语言代码 |
location_code | integer | 地区代码 |
target | string | 目标网站 |
result[] 字段
| 字段名 | 类型 | 说明 |
|---|---|---|
keyword | string | |
location_code | integer | 创建任务时传的地区代码;无数据时为 null |
language_code | string | 创建任务时传的语言代码;无数据时为 null |
search_partners | boolean | 是否合作搜索网络数据 |
device | string | 创建任务时指定的设备类型;无数据时为 null |
competition | float | 付费搜索竞争度基于 Bing Ads 数据。可选值:0.1(低)、0.5(中)、0.9(高);无数据时为 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="10081459-0001-0108-0000-9cf7e621c573"
curl --location --request GET "https://api.seermartech.cn/v3/keywords_data/bing/keywords_for_site/task_get/${id}" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json"Python
python
import requests
task_id = "02231934-2604-0066-2000-570459f04879"
url = f"https://api.seermartech.cn/v3/keywords_data/bing/keywords_for_site/task_get/{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 = "02231934-2604-0066-2000-570459f04879";
axios({
method: "get",
url: `https://api.seermartech.cn/v3/keywords_data/bing/keywords_for_site/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_site",
"se": "bing",
"language_code": "en",
"location_code": 2840,
"target": "example.com"
},
"result": [
{
"keyword": "keyword",
"location_code": 2840,
"language_code": "en",
"search_partners": false,
"device": "all",
"competition": 0.9,
"cpc": 0.94,
"search_volume": 6300,
"categories": null,
"monthly_searches": []
},
{
"keyword": "seo",
"location_code": 2840,
"language_code": "en",
"search_partners": false,
"device": "all",
"competition": 0.9,
"cpc": 0.22,
"search_volume": 5210,
"categories": null,
"monthly_searches": []
}
]
}
]
}状态码与异常处理
建议对顶层状态码和任务级状态码分别做处理:
- 顶层
status_code:表示整个请求是否成功 tasks[].status_code:表示任务是否成功返回结果
完整错误码与状态信息可参考:
/v3/appendix/errors
实践中建议重点处理以下:
- 任务 ID 不存在或已过期
- 任务尚未完成,结果暂不可用
- 返回结果为空
- 权限或认证失败
- 请求频率或额限制
使用建议
- 通过创建任务接口提交站点挖掘请求,再保存返回的任务 ID
- 任务完成后,使用本接口按 ID 获取结果
- 如果需要批量轮询已完成任务,可结合任务就绪列表接口进行调度
monthly_searches适合用于分析热度变化,不建议凭单月值判断长期趋势competition与cpc可用于筛选更适合 SEO 或 SEM 投放的机会
实用场景
- 挖掘站点词库:基于目标网站一次性获取大量,快速补齐 SEO 池。
- 评估商业价值:结合
cpc与competition判断哪些词更投放价值, SEO/SEM 协同决策。 - 识别流量增长机会:通过
search_volume与monthly_searches找出搜索需求上升的词,提前布局。 - 分析竞品主题覆盖:对竞品域名获取,识别重点覆盖主题与潜在流量来源。
- 构建优级分层策略:按搜索量、竞争度、点击价格对词进行分层,指导生产与投放资源分。