主题
站点(实时)接口
POST /v3/keywords_data/bing/keywords_for_site/live
接口说明
该接口用于根据指定域名或页面 URL,返回与该站点的列表,并附带以下核心指标:
- 最近一个月的搜索量
- 最多过去 24 个月的搜索趋势
- 当前平均点击单价(CPC)
- 付费搜索竞争度(competition)
单次请求最多返回 3000 个。
如果你的业务需要实时拿到结果,推荐使用 Live 方法。与标准任务模式不同,该方法无需创建任务、再单独获取结果,而是在一次请求中直接返回数据。
如果你不要求实时结果,也可以使用标准模式 /v3/keywords_data/bing/keywords_for_site/task_post/。标准模式通常更经济,但需要拆分为 POST 创建任务和 GET 获取结果两步。
历史数据最长可覆盖 24 个月。
请求信息
POST https://api.seermartech.cn/v3/keywords_data/bing/keywords_for_site/live
计费说明
该接口按请求计费,每次请求都会扣费。无论返回 1 个还是 3000 个,单次请求价格一致。
参考价约 ¥1.2000 / 次扣费以响应头 X-SeerMarTech-Charge-CNY 为准。
请求要求
- 请求体为 JSON(UTF-8 编码)
- POST 请求体格式为 JSON 数组:
[{ ... }] - 每分钟最多可发起 2000 次 API 调用
你可以在一次请求中获取最多 3000 条建议及指标。
请求参数
任务对象字段说明
| 字段名 | 类型 | 说明 |
|---|---|---|
target | string | 填。目标网站的域名或 URL。 |
location_name | string | 搜索引擎地域名。若未提供 location_code 或 location_coordinate,则该字段填。使用该字段时,无需再传 location_code 或 location_coordinate。示例:London,England,United Kingdom |
location_code | integer | 搜索引擎地域编码。若未提供 location_name 或 location_coordinate,则该字段填。使用该字段时,无需再传 location_name 或 location_coordinate。示例:2840 |
location_coordinate | string | GPS 坐标。若未提供 location_name 或 location_code,则该字段填。格式:latitude,longitude。返回数据对应坐标所属国家。 示例:52.6178549,-155.352142 |
language_name | string | 搜索语言名。若未提供 language_code,则该字段填。使用该字段时无需再传 language_code。支持:English、French、German |
language_code | string | 搜索语言代码。若未提供 language_name,则该字段填。使用该字段时无需再传 language_name。支持:en、fr、de |
keywords_negative | array | 可选。需要从结果中排除的数组。最多可指定 200 个词;系统会自动转为小写后匹。 |
device | string | 可选。设备类型。可选值:all、mobile、desktop、tablet。默认:all |
date_from | string | 可选。时间范围起始日期。最早可到今天往前 24 个月。未填写时默认返回最近 12 个月数据。格式:yyyy-mm-dd,示例:2020-01-01。注意:不建议对过去一年的日期自定义时间范围。 |
date_to | string | 可选。时间范围结束日期。未填写时默认返回最近 12 个月数据。最早可到今天往前两年,最晚可到今天往前一个月。格式:yyyy-mm-dd,示例:2020-03-15。注意:不建议对过去一年的日期自定义时间范围。 |
sort_by | string | 可选。结果排序字段,按降序排序。可选:search_volume、cpc、competition、relevance。默认:relevance |
search_partners | boolean | 可选。是否 Bing 搜索合作网络数据。传 true 时,结果 Bing、Yahoo、AOL 及合作站点网络;默认 false,返回 Bing、AOL、Yahoo 搜索网络数据。 |
tag | string | 可选。用户自定义任务标识,最大长度 255 字符。可用于请求结果,响应的 data 对象中会原样返回该值。 |
地域列表获取
可通过以下接口查询可用地域及 location_name / location_code:
/v3/keywords_data/bing/locations
响应结构
接口返回 JSON 数据,顶层 tasks 数组。
顶层字段
| 字段名 | 类型 | 说明 |
|---|---|---|
version | string | 当前 API 版本 |
status_code | integer | 通用状态码 |
status_message | string | 通用状态信息 |
time | string | 执行耗时,单位秒 |
cost | float | 本次所有任务总成本,单位 USD |
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 |
result_count | integer | result 数组中的数量 |
path | array | 请求路径 |
data | object | 与请求中提交参数一致的数据对象 |
result | array | 结果数组 |
result[] 字段
| 字段名 | 类型 | 说明 |
|---|---|---|
keyword | string | |
location_code | integer | 请求中的地域编码 |
language_code | string | 请求中的语言代码 |
search_partners | boolean | 响应是否合作网络数据 |
device | string | 请求中的设备类型;无数据时为 null |
competition | float | 竞争度针对付费搜索结果页。基于平台广告数据。可能值:0.1(低)、0.5(中)、0.9(高);无数据时为 null |
cpc | float | 平均点击单价(USD),历史平均值;无数据时为 null |
search_volume | integer | 月均搜索量,基于指定地域和语言条件的近似搜索次数;数值会做取整处理;无数据时为 null |
categories | array | 产品或服务分类。遗留字段,始终为 null |
monthly_searches | array | 月度搜索量明细;返回指定地域下该过去若干月的近似搜索次数;无数据时为 null |
monthly_searches[] 字段
| 字段名 | 类型 | 说明 |
|---|---|---|
year | integer | 年份 |
month | integer | 月份 |
search_volume | integer | 当月搜索量,数值会做取整处理 |
错误处理
请根据响应中的 status_code 与 status_message 处理异常,并为接口调用设计的错误处理与重试机制。
常见处理建议:
- 判断顶层
status_code是否为成功 - 遍历
tasks,检查每个任务的status_code - 当
tasks_error > 0时,按任务级别处理失败项 - 使用响应中的
cost、time、result_count做调用监控与审计
错误码完整定义请参考 /v3/appendix/errors。
请求示例
cURL
bash
curl --location --request POST "https://api.seermartech.cn/v3/keywords_data/bing/keywords_for_site/live" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json" \
--data-raw '[
{
"location_name": "United States",
"language_name": "English",
"target": "example.com"
}
]'Python
python
import requests
url = "https://api.seermartech.cn/v3/keywords_data/bing/keywords_for_site/live"
headers = {
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json"
}
# POST 请求体为 JSON 数组
payload = [
{
"location_name": "United States",
"language_name": "English",
"target": "example.com"
}
]
response = requests.post(url, headers=headers, json=payload)
print(response.json)TypeScript
typescript
import axios from "axios";
const payload = [
{
location_name: "United States",
language_name: "English",
target: "example.com",
},
];
axios({
method: "post",
url: "https://api.seermartech.cn/v3/keywords_data/bing/keywords_for_site/live",
headers: {
Authorization: "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
},
data: payload,
})
.then((response) => {
// 输出接口返回结果
console.log(response.data);
})
.catch((error) => {
console.error(error);
});响应示例
json
{
"version": "0.1.20200923",
"status_code": 20000,
"status_message": "Ok.",
"time": "11.5961 sec.",
"cost": 0.075,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"data": {
"api": "keywords_data",
"function": "keywords_for_site",
"se": "bing",
"language_code": "en",
"location_code": 2840,
"target": "https://example.com"
},
"result": [
{
"keyword": "tracking",
"location_code": 2840,
"language_code": "en",
"search_partners": false,
"device": "all",
"competition": 0.9,
"cpc": 0.12,
"search_volume": 7800,
"categories": null,
"monthly_searches": []
},
{
"keyword": "marketing",
"location_code": 2840,
"language_code": "en",
"search_partners": false,
"device": "all",
"competition": 0.9,
"cpc": 1.9,
"search_volume": 6190,
"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": []
}
]
}
]
}返回结果解读
该接口适合用于快速识别某个站点可能覆盖或的搜索主题。返回结果中的并不等同于该站点的自然排名,而是基于目标站点推断出的集合。
重点可以下字段:
search_volume:判断需求规模monthly_searches:分析近 12 至 24 个月趋势变化cpc:评估商业价值与投放成本competition:评估广告竞争强度sort_by:结合排序方式优提取高搜索量或高商业价值词
使用建议
- 需要实时返回时,优使用本接口
- 批量低成本采集可改用标准任务模式
- 若只心某类主题,建议结合
keywords_negative排除无词 - 做跨地区分析时,优使用
location_code,地域名称格式不一致 - 若做设备差异分析,可分别请求
mobile与desktop
实用场景
- 挖掘站点主题词:竞品域名,快速获取集合,用于补齐行业词库和选题池。
- 评估商业价值:结合
cpc与competition,识别高转化潜力词,广告投放与落地页规划。 - 分析需求趋势变化:利用
monthly_searches观察近 12–24 个月波动,判断季节性与增长机会。 - 做竞品市场映射:针对多个竞品站点分别请求数据,对比各自覆盖的方向,发现市场空白。
- 筛选不同设备机会词:按
mobile、desktop分设备获取数据,识别移动端或桌面端更值得优布局的主题。