主题
Bing 实时查询
POST /v3/dataforseo_labs/bing/related_keywords/live
接口概述
/v3/dataforseo_labs/bing/related_keywords/live 用于获取 Bing 搜索结果页中“搜索(searches related to)”模块里的。
你可以基于一个种子词,按设定的搜索深度递归扩展。接口最多可返回 4680 个建议。每个通常以下数据:
- 最近一个月的搜索量
- 过去 12 个月的搜索趋势
- 当前平均点击价格(CPC)
- 竞争度
- 难度
- 归一化/核心词信息
- 可选的 SERP 信息
数据源: 本平台 SERP 数据库 搜索算法: 针对指定种子词,对 SERP 中“搜索”执行深度优搜索
示例说明
当 depth=1,种子词为 keyword research 时,可能返回如下词:
free keyword researchkeyword research toolsbest free keyword research toolkeyword research tipsseo keyword research toolkeyword research step by stephow to do keyword research 2019keyword research google ads
请求方式
POST https://api.seermartech.cn/v3/dataforseo_labs/bing/related_keywords/live
计费说明
该接口按请求计费。 扣费以响应头 X-SeerMarTech-Charge-CNY 为准。
并发与频率限制:
- 每分钟最多
2000次 API 调用 - 最多
30个并发请求
请求体说明
所有 POST 数据使用 JSON(UTF-8 编码)提交。 请求体格式为 JSON 数组:
json
[
{
"keyword": "phone",
"language_name": "English",
"location_code": 2840,
"limit": 3
}
]你可以在请求中指定:
- 返回结果数量
- 过滤条件
- 排序规则
- 偏移量
请求参数
| 字段名 | 类型 | 说明 |
|---|---|---|
keyword | string | 填。目标种子。使用 UTF-8 编码。系统会自动将转换为小写。 |
location_name | string | 地区名。如果未指定 location_code,则此字段填。location_name 与 location_code 二选一。可通过 /v3/dataforseo_labs/locations_and_languages 获取可用地区。注意:当前该接口支持美国地区。 示例:United States |
location_code | integer | 地区编码。如果未指定 location_name,则此字段填。location_name 与 location_code 二选一。可通过 /v3/dataforseo_labs/locations_and_languages 获取可用地区。注意:当前该接口支持美国地区。 示例:2840 |
language_name | string | 语言名。如果未指定 language_code,则此字段填。language_name 与 language_code 二选一。可通过 /v3/dataforseo_labs/locations_and_languages 获取可用语言。示例:English |
language_code | string | 语言代码。如果未指定 language_name,则此字段填。language_name 与 language_code 二选一。可通过 /v3/dataforseo_labs/locations_and_languages 获取可用语言。示例:en |
depth | integer | 可选。搜索深度,默认值:1。可选范围:0 到 4。返回数量与该值:0 = 种子词;1 ≈ 8 个;2 ≈ 72 个;3 ≈ 584 个;4 ≈ 4680 个。 |
include_seed_keyword | boolean | 可选。是否在响应的 seed_keyword_data 中种子词数据。默认值:false。 |
include_serp_info | boolean | 可选。是否为每个返回 serp_info 数据搜索结果数量、 URL、SERP 特征等。默认值:false。 |
replace_with_core_keyword | boolean | 可选。是否用该词所在分组的核心词返回数据。若为 true,则返回核心词对应的 serp_info 和 related_keywords;若为 false,则优返回你指定本身的数据(如可用)。默认值:false。 |
ignore_synonyms | boolean | 可选。是否忽略高度相似。若设为 true,返回核心词,排除高度相似词。默认值:false。 |
filters | array | 可选。结果过滤条件数组,最多支持 8 个过滤条件。多个条件之间需要使用逻辑运算符 and / or。支持的操作符:regex、not_regex、<、<=、>、>=、=、<>、in、not_in、ilike、not_ilike、like、not_like、match、not_match。在 like / not_like / ilike / not_ilike 中可使用 % 匹任意长度字符串。更多规则参考 /v3/dataforseo_labs/filters。 |
order_by | array | 可选。结果排序规则。可使用与 filters 相同的字段路径。排序方式支持 asc 和 desc,字段与排序方式之间使用逗号。单次请求最多支持 3 条排序规则。 |
limit | integer | 可选。返回数量上限。默认值:100,最大值:1000。 |
offset | integer | 可选。结果偏移量。默认值:0。例如设为 10 时,将跳过前 10 条结果,返回后的。 |
tag | string | 可选。自定义任务标识,最长 255 个字符。可用于请求与响应结果的匹,响应中的 data 对象会原样返回该值。 |
过滤与排序
过滤示例
例如筛选搜索量大于 10 的:
json
[
{
"keyword": "phone",
"location_code": 2840,
"language_name": "English",
"filters": [
["keyword_data.keyword_info.search_volume", ">", 10]
],
"limit": 3
}
]排序说明
order_by 支持按字段升序或降序排序,例如:
json
[
{
"keyword": "phone",
"location_code": 2840,
"language_name": "English",
"order_by": [
"keyword_data.keyword_info.search_volume,desc"
],
"limit": 10
}
]响应结构
接口返回 JSON 编码数据,顶层 tasks 数组。
顶层响应字段
| 字段名 | 类型 | 说明 |
|---|---|---|
version | string | API 当前版本。 |
status_code | integer | 通用状态码。完整列表可参考 /v3/appendix/errors。建议在系统中做好异常与错误处理。 |
status_message | string | 通用状态信息。完整列表可参考 /v3/appendix/errors。 |
time | string | 执行耗时,单位秒。 |
cost | float | 当前请求总成本,单位 USD。 |
tasks_count | integer | tasks 数组中的任务数。 |
tasks_error | integer | 返回错误的任务数。 |
tasks | array | 任务结果数组。 |
tasks字段
| 字段名 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一标识,UUID 格式。 |
status_code | integer | 任务状态码,范围通常为 10000-60000。完整列表参考 /v3/appendix/errors。 |
status_message | string | 任务状态说明。 |
time | string | 任务执行耗时,单位秒。 |
cost | float | 当前任务成本,单位 USD。 |
result_count | integer | result 数组中的数量。 |
path | array | URL 路径。 |
data | object | 你在请求中提交的参数。 |
result | array | 结果数组。 |
result字段
| 字段名 | 类型 | 说明 |
|---|---|---|
se_type | string | 搜索引擎类型。 |
seed_keyword | string | 请求中的种子词。 |
seed_keyword_data | array | 种子词的数据;当 include_seed_keyword=true 时返回。字段结构与 keyword_data 相同。 |
location_code | integer | 请求中的地区编码。 |
language_code | string | 请求中的语言代码。 |
total_count | integer | 数据库中与当前请求的结果总数。 |
items_count | integer | items 数组中返回的结果数。 |
items | array | 及详细数据。 |
items字段
| 字段名 | 类型 | 说明 |
|---|---|---|
se_type | string | 搜索引擎类型。 |
keyword_data | object | 当前返回的数据对象。 |
depth | integer | 当前所在的搜索深度。 |
related_keywords | array | 与当前的搜索词列表。 |
keyword_data字段
| 字段名 | 类型 | 说明 |
|---|---|---|
se_type | string | 搜索引擎类型。 |
keyword | string | 。 |
location_code | integer | 请求中的地区编码。 |
language_code | string | 请求中的语言代码。 |
keyword_info | object | 指标数据。 |
keyword_properties | object | 附加属性。 |
serp_info | object | SERP 数据;若未设置 include_serp_info=true,或数据库中没有该词的 SERP 数据,则为 null。 |
keyword_info字段
| 字段名 | 类型 | 说明 |
|---|---|---|
se_type | string | 搜索引擎类型。 |
last_updated_time | string | 数据更新时间,UTC 格式:yyyy-mm-dd hh:mm:ss +00:00。示例:2019-11-15 12:57:46 +00:00 |
competition | float | 竞争度。基于 Bing Ads 数据,取值范围 0 到 1。 |
cpc | float | 平均点击价格,单位 USD。 |
search_volume | integer | 平均月搜索量,表示该在 bing.com 上的近似搜索次数。 |
monthly_searches | array | 过去 12 个月的月度搜索量数据。 |
monthly_searches字段
| 字段名 | 类型 | 说明 |
|---|---|---|
year | integer | 年份。 |
month | integer | 月份。 |
search_volume | integer | 对应月份的搜索量。 |
keyword_properties字段
| 字段名 | 类型 | 说明 |
|---|---|---|
se_type | string | 搜索引擎类型。 |
core_keyword | string | 分组中的核心词。由同义词聚类算法识别;若为 null,表示暂无可识别的同义词分组。 |
synonym_clustering_algorithm | string | 同义词识别算法。可能值:keyword_metrics(基于指标),text_processing(基于文本处理)。若为 null,表示未识别出同义。 |
keyword_difficulty | integer | 难度,范围 0-100。表示自然搜索前 10 名的难易程度,基于 SERP 前 10 页面的外链画像等因素综合计算。 |
detected_language | string | 系统识别出的语言。 |
is_another_language | boolean | 若为 true,表示该识别出的语言与请求中指定语言不一致。 |
serp_info字段
| 字段名 | 类型 | 说明 |
|---|---|---|
se_type | string | 搜索引擎类型。 |
check_url | string | 直达搜索结果页的 URL,可用于人工校验结果准确性。 |
serp_item_types | array | SERP 中出现的结果类型。可能:answer_box、carousel、events、featured_snippet、hotels_pack、images、jobs、local_pack、map、organic、paid、people_also_ask、people_also_search、questions_and_answers、recipes、related_searches、shopping、top_stories、video、ai_overview。注意: 实结果明细通常返回 organic、paid、featured_snippet、local_pack素。 |
se_results_count | integer | 当前的搜索结果数量。 |
last_updated_time | string | SERP 数据更新时间,UTC 格式:yyyy-mm-dd hh:mm:ss +00:00。 |
depth | integer | 搜索深度。 |
请求示例
cURL
bash
curl --location --request POST "https://api.seermartech.cn/v3/dataforseo_labs/bing/related_keywords/live" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json" \
--data-raw '[
{
"keyword": "phone",
"language_name": "English",
"location_code": 2840,
"filters": [
["keyword_data.keyword_info.search_volume", ">", 10]
],
"limit": 3
}
]'Python
python
import requests
url = "https://api.seermartech.cn/v3/dataforseo_labs/bing/related_keywords/live"
headers = {
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json"
}
payload = [
{
"keyword": "phone",
"location_name": "United States",
"language_name": "English",
"filters": [
["keyword_data.keyword_info.search_volume", ">", 10]
],
"limit": 3
}
]
response = requests.post(url, json=payload, headers=headers)
print(response.json)TypeScript
typescript
import axios from "axios";
const postArray = [
{
keyword: "phone",
language_name: "English",
location_code: 2840,
filters: [
["keyword_data.keyword_info.search_volume", ">", 10]
],
limit: 3
}
];
axios({
method: "post",
url: "https://api.seermartech.cn/v3/dataforseo_labs/bing/related_keywords/live",
headers: {
Authorization: "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json"
},
data: postArray
}).then((response) => {
console.log(response.data);
}).catch((error) => {
console.error(error);
});响应示例
json
{
"version": "0.1.20220216",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.0730 sec.",
"cost": 0.0105,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"data": {
"api": "dataforseo_labs",
"function": "related_keywords",
"se_type": "bing",
"keyword": "windows",
"language_name": "English",
"location_code": 2840,
"limit": 5
},
"result": [
{
"se_type": "bing",
"seed_keyword": "windows",
"location_code": 2840,
"language_code": "en",
"total_count": 5,
"items_count": 5,
"items": [
{
"se_type": "bing",
"keyword_data": {
"se_type": "bing",
"keyword": "windows",
"location_code": 2840,
"language_code": "en",
"keyword_info": {
"se_type": "bing",
"last_updated_time": "2022-03-14 11:42:07 +00:00",
"competition": 1,
"cpc": 0.91,
"search_volume": 40900,
"monthly_searches": []
},
"keyword_properties": {
"se_type": "bing",
"core_keyword": null,
"synonym_clustering_algorithm": "text_processing",
"keyword_difficulty": 100,
"detected_language": "en",
"is_another_language": false
},
"serp_info": null
},
"depth": 0,
"related_keywords": []
},
{
"se_type": "bing",
"keyword_data": {
"se_type": "bing",
"keyword": "windows replacement",
"location_code": 2840,
"language_code": "en",
"keyword_info": {
"se_type": "bing",
"last_updated_time": "2022-03-14 11:42:07 +00:00",
"competition": 0.9,
"cpc": 5.79,
"search_volume": 470,
"monthly_searches": []
},
"keyword_properties": {
"se_type": "bing",
"core_keyword": "replacement windows",
"synonym_clustering_algorithm": "text_processing",
"keyword_difficulty": 100,
"detected_language": "en",
"is_another_language": false
},
"serp_info": null
},
"depth": 1,
"related_keywords": []
},
{
"se_type": "bing",
"keyword_data": {
"se_type": "bing",
"keyword": "home depot vinyl windows",
"location_code": 2840,
"language_code": "en",
"keyword_info": {
"se_type": "bing",
"last_updated_time": "2022-02-24 22:50:24 +00:00",
"competition": 0.5,
"cpc": 0.5,
"search_volume": 50,
"monthly_searches": []
},
"keyword_properties": {
"se_type": "bing",
"core_keyword": null,
"synonym_clustering_algorithm": "text_processing",
"keyword_difficulty": 100,
"detected_language": "en",
"is_another_language": false
},
"serp_info": null
},
"depth": 1,
"related_keywords": []
},
{
"se_type": "bing",
"keyword_data": {
"se_type": "bing",
"keyword": "residential windows",
"location_code": 2840,
"language_code": "en",
"keyword_info": {
"se_type": "bing",
"last_updated_time": "2022-03-01 03:07:14 +00:00",
"competition": 0.9,
"cpc": 0.9,
"search_volume": 780,
"monthly_searches": []
},
"keyword_properties": {
"se_type": "bing",
"core_keyword": null,
"synonym_clustering_algorithm": "text_processing",
"keyword_difficulty": 100,
"detected_language": "en",
"is_another_language": false
},
"serp_info": null
},
"depth": 1,
"related_keywords": []
},
{
"se_type": "bing",
"keyword_data": {
"se_type": "bing",
"keyword": "microsoft official home page",
"location_code": 2840,
"language_code": "en",
"keyword_info": {
"se_type": "bing",
"last_updated_time": "2022-03-14 13:39:08 +00:00",
"competition": 0.1,
"cpc": null,
"search_volume": 110,
"monthly_searches": []
},
"keyword_properties": {
"se_type": "bing",
"core_keyword": null,
"synonym_clustering_algorithm": "text_processing",
"keyword_difficulty": 100,
"detected_language": "en",
"is_another_language": false
},
"serp_info": null
},
"depth": 1,
"related_keywords": []
}
]
}
]
}
]
}状态码与错误处理
- 顶层
status_code表示整个请求的处理状态 tasks[].status_code表示单个任务的处理状态- 建议同时检查:
- 顶层
status_code tasks_error- 每个任务的
status_code
常见做法:
- 判断 HTTP 状态码是否为
200 - 再判断 JSON 中
status_code是否为成功状态 - 若有多任务请求,逐一检查
tasks[].status_code - 遇到异常时参考
/v3/appendix/errors进行处理
使用建议
- 若你只需要一层词扩展,可将
depth设为1,成本和结果规模更可控 - 若用于批量选词,建议结合
filters筛掉低搜索量或高难度词 - 若要查看搜索结果特征,记得开启
include_serp_info - 若想减少同义词干扰,可使用
ignore_synonyms=true - 若用于分页,请合
limit和offset
实用场景
- 扩展长尾词库:以核心业务词为种子,批量获取 Bing 搜索词,快速补长尾池,提升选题覆盖面。
- 筛选高价值:结合
search_volume、cpc、competition等指标过滤结果,优识别备商业价值的投放或 SEO 目标词。 - 识别用户搜索意图分支:通过词及递归深度结构,发现用户围绕种子词的不同需求方向,用于规划专题页和矩阵。
- 去重和归并近义词:利用
core_keyword、replace_with_core_keyword、ignore_synonyms识别并合并相似,减少重复建页和耗。 - 分析 SERP 机会位:开启
include_serp_info后,结合serp_item_types判断是否存在精选摘要、本地、图片等结果类型,从而制定更有针对性的排名策略。