主题
设置 Bing 实时任务
POST /v3/keywords_data/bing/keywords_for_keywords/live
接口概述
POST /v3/keywords_data/bing/keywords_for_keywords/live
本接口根据指定,从 Bing 广告数据中筛选并返回建议。单个任务最多提交 200 个,最多可获得约 3000 条建议。
Live 实时接口会在同一次请求中直接返回结果,无需提交任务、再通过 GET 接口查询。若不要求实时获取结果,也可以使用 Standard 异步方式;该方式需要分别调用 POST 和 GET 接口,但参考价格通常更低。
历史数据最长可追溯 24 个月。
请求地址
text
https://api.seermartech.cn/v3/keywords_data/bing/keywords_for_keywords/live计费说明
- 每次请求按任务计费。
- 参考价约 ¥0.54 / 次。
- 实扣费以响应头
X-SeerMarTech-Charge-CNY为准。 平台限流以认证说明中的 30/60/120 次/分钟规则为准。 - 每次 Live 请求只能 1 个任务。
- 请求体使用 UTF-8 编码的 JSON 数组格式。
请求参数
请求体格式:
json
[
{
"keywords": [
"average page rpm adsense",
"adsense blank ads how long",
"leads and prospects"
],
"location_name": "United States",
"language_name": "English"
}
]任务参数
| 参数 | 类型 | 填 | 说明 |
|---|---|---|---|
keywords | array | 是 | 用于获取的种子。最多 200 个,每个最多 100 个字符。平台会将转换为小写,并在结果中分别返回。 |
location_name | string | 条件填 | 搜索引擎地域的完整名称。未指定 location_code 或 location_coordinate 时填。使用此参数后,不要同时传另外两个地域参数。示例:London,England,United Kingdom。 |
location_code | integer | 条件填 | 搜索引擎地域代码。未指定 location_name 或 location_coordinate 时填。示例:2840。 |
location_coordinate | string | 条件填 | 地域 GPS 坐标,格式为 "纬度,经度"。数据将该坐标所属国家提供。示例:52.6178549,-155.352142。 |
language_name | string | 条件填 | 搜索引擎语言的完整名称。未指定 language_code 时填。支持:English、French、German。 |
language_code | string | 条件填 | 搜索引擎语言代码。未指定 language_name 时填。支持:en、fr、de。 |
sort_by | string | 否 | 结果排序字段,支持 search_volume、cpc、competition、relevance。结果按降序排列。默认值:relevance。 |
keywords_negative | array | 否 | 需要从结果中排除的。最多 200 个,平台会将转换为小写。 |
device | string | 否 | 设备类型。可选值:all、mobile、desktop、tablet。默认值:all。 |
date_from | string | 否 | 数据起始日期,格式为 yyyy-mm-dd。默认返回最近 12 个月的数据。可查询范围最长为 24 个月。示例:2020-01-01。 |
date_to | string | 否 | 数据结束日期,格式为 yyyy-mm-dd。默认返回最近 12 个月的数据。最大可设置为当前日期前一个月。示例:2020-03-15。 |
search_partners | boolean | 否 | 是否 Bing 搜索合作伙伴网络数据。true 表示 Bing、Yahoo、AOL 及合作伙伴网站;默认值为 false,返回 Bing、AOL 和 Yahoo 搜索网络数据。 |
tag | string | 否 | 用户自定义任务标识,最多 255 个字符。可用于请求和响应,提交的值会原样返回在响应的 data 对象中。 |
日期参数说明
- 未指定
date_from或date_to时,返回最近 12 个月的数据。 date_from最早可设置为当前日期前 24 个月。date_to最晚可设置为当前日期前 1 个月。- 如果状态接口
/v3/keywords_data/bing/status/的actual_data为false,date_from可设置为上上个月及更早日期。 - 如果
actual_data为true,date_from可设置为上个月及更早日期。 - 不建议针对过去一年设置自定义时间范围。
地域代码查询
可通过以下接口获取 Bing 支持的地域及名称、代码:
text
GET https://api.seermartech.cn/v3/keywords_data/bing/locations响应结构
接口返回 JSON 数据,顶层 tasks 数组。
顶层字段
| 字段 | 类型 | 说明 |
|---|---|---|
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 | 任务结果数组。 |
任务字段
| 字段 | 类型 | 说明 |
|---|---|---|
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 | 请求 URL 路径信息。 |
data | object | 与 POST 请求中提交的任务参数对应的数据。 |
result | array | 建议结果数组。 |
result 字段
| 字段 | 类型 | 说明 |
|---|---|---|
keyword | string | 返回的。 |
location_code | integer | 地域代码。无数据时为 null。 |
language_code | string | 语言代码。无数据时为 null。 |
search_partners | boolean | 是否搜索合作伙伴网络数据。 |
device | string | 数据对应的设备类型,可选值为 all、mobile、desktop、tablet。 |
competition | float | 付费搜索结果中的相对竞争程度,基于 Bing 广告数据。可选值通常为 0.1、0.5、0.9,分别表示低、中、高竞争度。无数据时为 null。 |
cpc | float | 该历史平均每次点击费用。无数据时为 null。 |
search_volume | integer | 月均搜索量,即目标地域和定位条件估算的 Bing 月均搜索次数,结果会进行取整。无数据时为 null。 |
categories | array | 产品和服务分类。该字段为历史容字段,始终返回 null。 |
monthly_searches | array | 过去 12 个月的月度搜索量数据,指定地域提供。无数据时为 null。 |
monthly_searches 字段
| 字段 | 类型 | 说明 |
|---|---|---|
year | integer | 年份。 |
month | integer | 月份。 |
search_volume | integer | 当月估算搜索量,结果会进行取整。 |
请求示例
curl
bash
curl --location --request POST \
"https://api.seermartech.cn/v3/keywords_data/bing/keywords_for_keywords/live" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json" \
--data-raw '[
{
"location_name": "United States",
"language_name": "English",
"keywords": [
"average page rpm adsense",
"adsense blank ads how long",
"leads and prospects"
]
}
]'Python
python
import requests
url = "https://api.seermartech.cn/v3/keywords_data/bing/keywords_for_keywords/live"
headers = {
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
}
payload = [
{
"location_name": "United States",
"language_name": "English",
"keywords": [
"average page rpm adsense",
"adsense blank ads how long",
"leads and prospects",
],
}
]
response = requests.post(url, headers=headers, json=payload, timeout=60)
result = response.json()
if result.get("status_code") == 20000:
print(result)
else:
print(
"请求失败,状态码:%s,信息:%s"
% (result.get("status_code"), result.get("status_message"))
)TypeScript
typescript
import axios from "axios";
const payload = [
{
location_name: "United States",
language_name: "English",
keywords: [
"average page rpm adsense",
"adsense blank ads how long",
"leads and prospects",
],
},
];
axios
.post(
"https://api.seermartech.cn/v3/keywords_data/bing/keywords_for_keywords/live",
payload,
{
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);
});响应示例
json
{
"version": "0.1.20200923",
"status_code": 20000,
"status_message": "Ok.",
"time": "9.5821 sec.",
"cost": 0.54,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"id": "01234567-89ab-cdef-0123-456789abcdef",
"status_code": 20000,
"status_message": "Ok.",
"time": "9.1234 sec.",
"cost": 0.54,
"result_count": 2,
"path": [
"v3",
"keywords_data",
"bing",
"keywords_for_keywords",
"live"
],
"data": {
"api": "keywords_data",
"function": "keywords_for_keywords",
"se": "bing",
"location_code": 2840,
"language_code": "en",
"keywords": [
"average page rpm adsense",
"adsense blank ads how long",
"leads and prospects"
],
"keywords_negative": []
},
"result": [
{
"keyword": "coupon",
"location_code": 2840,
"language_code": "en",
"search_partners": false,
"device": "all",
"competition": 0.9,
"cpc": 0.51,
"search_volume": 14640,
"categories": null,
"monthly_searches": [
{
"year": 2024,
"month": 3,
"search_volume": 14640
}
]
},
{
"keyword": "advertise my business",
"location_code": 2840,
"language_code": "en",
"search_partners": false,
"device": "all",
"competition": 0.9,
"cpc": 1.5,
"search_volume": 8980,
"categories": null,
"monthly_searches": [
{
"year": 2024,
"month": 3,
"search_volume": 8980
}
]
}
]
}
]
}错误处理
请根据顶层及任务级 status_code 判断请求是否成功:
20000:请求成功。- 状态码:请求或任务执行失败,应结合
status_message定位问题。 - 即使顶层请求成功,也应检查
tasks_error以及每个任务的status_code。 - 建议在业务系统中实现时、限流、空结果和异常状态的重试或降级处理。
完整错误码请参考本平台的错误码文档。
实用场景
- 扩展种子:批量提交核心并获取 Bing 词,扩大 SEO选题和覆盖范围。
- 筛选高潜力词:结合
search_volume、competition和cpc评估价值,优安排生产或广告投放。 - 构建否定库:使用
keywords_negative排除无词和低转化词,提升研究结果的性。 - 分析地域与设备差异:按地域、语言和
device获取数据,为本地 SEO、移动端优化和市场投放制定策略。 - 追踪搜索趋势:读取
monthly_searches的历史月度数据,识别季节性需求并安排发布节奏。