主题
Bing 页面交集(实时)
接口概述
POST /v3/dataforseo_labs/bing/page_intersection/live
本接口用于查询指定页面在 Bing 搜索结果中排名的,并返回指标、SERP 信息、页面排名及外链概况。
主要支持以下分析方式:
- 查询多个页面排名的:传
pages,返回所有指定页面在同一 Bing SERP 中排名的。 - 查询竞争对手排名而目标页面未排名的:同时传
pages和exclude_pages,返回pages中页面排名、但exclude_pages中页面未排名的。 - 合并或交集分析:通过
intersection_mode控制采用并集或交集逻辑。
> 当交集数量 1,000 万时,本接口不会返回结果。
请求限制与计费
- 每个请求单独计费。
- 每分钟最多提交 2,000 次 API 调用。
- 同时进行的请求数最多为 30 个。
- 请求体使用 UTF-8 编码的 JSON。
- 实扣费以响应头
X-SeerMarTech-Charge-CNY为准。
请求参数
请求体为 JSON 数组,每个数组代表一个任务。
请求参数表
| 参数 | 类型 | 填 | 说明 |
|---|---|---|---|
pages | object | 是 | 要分析的目标页面,最多 20 个。对象键名应使用 "1" 至 "20"。URL须为 http:// 或 https:// 的绝对地址。 |
exclude_pages | array | 否 | 要排除的页面,最多 10 个。返回 pages 中页面排名、但排除页面未排名的。 |
location_name | string | 条件填 | 地理位置名。未指定 location_code 时填。当前支持美国。 |
location_code | integer | 条件填 | 地理位置编码。未指定 location_name 时填。美国编码为 2840。 |
language_name | string | 条件填 | 语言名。未指定 language_code 时填,例如 English。 |
language_code | string | 条件填 | 语言编码。未指定 language_name 时填,例如 en。 |
item_types | array | 否 | 要纳分析的搜索结果类型。默认值为空数组。 |
ignore_synonyms | boolean | 否 | 是否忽略高度相似的。设为 true 时返回核心。默认值为 false。 |
limit | integer | 否 | 返回的最大数量。默认值为 100,最大值为 1000。 |
offset | integer | 否 | 结果偏移量。默认值为 0。例如设置为 10 时,跳过前 10 条结果。 |
include_subdomains | boolean | 否 | 是否子域名。设为 false 时忽略子域名。默认值为 true。 |
intersection_mode | string | 否 | 合并模式,可选值为 union、intersect。 |
include_serp_info | boolean | 否 | 是否返回每个的 SERP 数据。设为 true 时返回 serp_info。默认值为 false。 |
filters | array | 否 | 结果过滤条件,最多 8 个过滤器。 |
order_by | array | 否 | 结果排序规则,最多设置 3 条。 |
tag | string | 否 | 用户自定义任务标识,最多 255 个字符。该值会原样返回在响应的 data 对象中。 |
pages 与 exclude_pages
pages 使用对象形式指定页面:
json
{
"pages": {
"1": "https://www.apple.com/mac/*",
"2": "https://example.com/*",
"3": "https://support.microsoft.com/"
}
}URL 支持通符 *:
https://example.com:匹相同的 URL。https://example.com/eng/*:匹该页面及所有以/eng/开头的 URL,例如/eng/index.html、/eng/help/。- 通符放在域名后的路径部分,并且通常位于末尾,例如
https://example.com/*。 - 不支持直接在域名后使用通符,例如
https://example.com*。
指定 pages 时:
intersection_mode默认为intersect。- 结果所有
pages页面排名的。
同时指定 exclude_pages 时:
- 默认使用
union模式。 - 结果
pages中任意页面排名、但exclude_pages中页面未排名的。 - 如需要求
pages中所有页面均排名,可将intersection_mode设置为intersect。
intersection_mode
| 值 | 说明 |
|---|---|
union | 返回 pages 中任意页面排名的。 |
intersect | 返回 pages 中所有页面在同一 SERP 中排名的。 |
filters
最多可同时使用 8 个过滤器,并使用逻辑运算符 and 或 or 连接条件。
支持的运算符:
text
regex
not_regex
<
<=
>
>=
=
<>
in
not_in
ilike
not_ilike
like
not_like
match
not_matchlike、not_like、ilike 和 not_ilike 支持使用 % 匹任意长度的字符串。
如果要过滤 intersection_result 中的字段,使用对应页面在 pages 对象中的编号。例如:
- 过滤第 1 个页面的排名,应使用
intersection_result.1.rank_absolute。 - 过滤第 3 个页面且保留自然结果,应使用
intersection_result.3.type = organic。
示例:
json
"filters": [
["keyword_data.keyword", "like", "%seo%"],
"and",
["intersection_result.1.rank_absolute", "<=", 10]
]order_by
排序规则使用字段名和排序方向组成:
json
"order_by": [
"keyword_info.search_volume,desc",
"keyword_properties.keyword_difficulty,asc"
]可使用与 filters 相同的字段和比较逻辑进行排序。排序方向:
asc:升序desc:降序
单个请求最多设置 3 条排序规则。
请求示例
cURL
bash
curl --location --request POST \
"https://api.seermartech.cn/v3/dataforseo_labs/bing/page_intersection/live" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json" \
--data-raw '[
{
"pages": {
"1": "https://example.com/*",
"2": "https://competitor.example/*"
},
"location_name": "United States",
"language_name": "English",
"include_serp_info": true,
"limit": 100
}
]'Python
python
import requests
url = "https://api.seermartech.cn/v3/dataforseo_labs/bing/page_intersection/live"
payload = [
{
"pages": {
"1": "https://example.com/*",
"2": "https://competitor.example/*"
},
"location_name": "United States",
"language_name": "English",
"limit": 100
}
]
headers = {
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
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 postArray = [
{
pages: {
"1": "https://example.com/*",
"2": "https://competitor.example/*",
},
location_name: "United States",
language_name: "English",
include_serp_info: true,
limit: 100,
},
];
axios
.post(
"https://api.seermartech.cn/v3/dataforseo_labs/bing/page_intersection/live",
postArray,
{
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 对象 tasks 数组。
顶层字段
| 字段 | 类型 | 说明 |
|---|---|---|
version | string | 当前 API 版本。 |
status_code | integer | 请求级状态码。成功通常为 20000。 |
status_message | string | 请求级状态消息。 |
time | string | 请求执行耗时,单位为秒。 |
cost | float | 平台原始 USD 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。 |
tasks_count | integer | tasks 数组中的任务总数。 |
tasks_error | integer | 返回错误的任务数量。 |
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 | 当前任务的结果数组。 |
result 字段
| 字段 | 类型 | 说明 |
|---|---|---|
se_type | string | 搜索引擎类型。本接口固定为 bing。 |
pages | object | 请求中指定的目标页面。 |
exclude_pages | array | 请求中指定的排除页面。 |
location_code | integer | 地理位置编码。 |
language_code | string | 语言编码。 |
total_count | integer | 数据库中与请求条件的结果总数。 |
items_count | integer | items 数组中的结果数量。 |
items | array | 及 SERP、排名和外链数据。 |
items 字段
keyword_data
| 字段 | 类型 | 说明 |
|---|---|---|
se_type | string | 搜索引擎类型,固定为 bing。 |
keyword | string | 返回的。 |
location_code | integer | 地理位置编码。 |
language_code | string | 语言编码。 |
keyword_info | object | 指标。 |
keyword_properties | object | 附加属性。 |
serp_info | object/null | SERP 数据。未启用 include_serp_info 或无对应数据时为 null。 |
avg_backlinks_info | object/null | 该排名前 10 个自然结果的平均外链指标。 |
keyword_info
| 字段 | 类型 | 说明 |
|---|---|---|
se_type | string | 搜索引擎类型,固定为 bing。 |
last_updated_time | string | 数据更新时间,UTC 格式:yyyy-mm-dd hh:mm:ss +00:00。 |
competition | float | 竞争度,基于 Bing Ads 数据,取值范围为 0 至 1。 |
cpc | float/null | 历史平均每次点击成本。 |
search_volume | integer | Bing 平均月搜索量。 |
monthly_searches | array | 最近 12 个月的月度搜索量。 |
monthly_searches素字段:
| 字段 | 类型 | 说明 |
|---|---|---|
year | integer | 年份。 |
month | integer | 月份。 |
search_volume | integer | 当月搜索量。 |
keyword_properties
| 字段 | 类型 | 说明 |
|---|---|---|
se_type | string | 搜索引擎类型,固定为 bing。 |
core_keyword | string/null | 同义词分组中的核心。若无法识别同义词,则为 null。 |
synonym_clustering_algorithm | string/null | 同义词聚类算法。可选值:keyword_metrics、text_processing。 |
keyword_difficulty | integer | 难度,取值范围为 0 至 100,表示自然结果前 10 名的难度。 |
detected_language | string | 系统识别出的语言。 |
is_another_language | boolean | 语言是否与请求中设置的语言不同。 |
serp_info
| 字段 | 类型 | 说明 |
|---|---|---|
se_type | string | 搜索引擎类型,固定为 bing。 |
check_url | string | 对应的 Bing 搜索结果页面地址,可用于核验结果。 |
serp_item_types | array | SERP 中出现的结果类型。 |
se_results_count | string/integer | 搜索结果数量。 |
last_updated_time | string | SERP 数据最近更新时间。 |
previous_updated_time | string | SERP 数据上一次更新时间。 |
serp_item_types 可能:
text
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结果通常针对以下类型返回:
text
organic
paid
featured_snippet
local_packavg_backlinks_info
该对象表示自然排名前 10 个网站的平均外链和排名指标。
| 字段 | 类型 | 说明 |
|---|---|---|
se_type | string | 搜索引擎类型。 |
backlinks | float | 平均反向链接数量。 |
dofollow | float | 平均 dofollow 链接数量。 |
referring_pages | float | 平均引用页面数量。 |
referring_domains | float | 平均引用域名数量。 |
referring_main_domains | float | 平均引用主域名数量。 |
rank | float | 平均排名值。 |
main_domain_rank | float | 平均主域名排名值。 |
last_updated_time | string | 外链数据更新时间。 |
intersection_result
intersection_result含每个指定页面在该 SERP 中对应的结果。
- 对象键名与
pages中的页面编号对应。 - 根据请求中指定页面的数量,最多返回
"1"至"20"个对象。 - 支持的结果类型:
organic、paid、featured_snippet、local_pack。
通用 SERP素字段
以下字段可能出现在自然结果、广告、本地结果或精选摘要中:
| 字段 | 类型 | 说明 |
|---|---|---|
se_type | string | 搜索引擎类型,固定为 bing。 |
type | string | SERP素类型。 |
rank_group | integer | 同类型结果中的组排名。 |
rank_absolute | integer | 在整个 SERP 中的绝对排名。 |
position | string | 素在页面中的位置,可为 left 或 right。 |
xpath | string | SERP素的 XPath。 |
domain | string | SERP 中显示的域名或子域名。 |
title | string | 结果标题。 |
url | string | 结果 URL。 |
breadcrumb | string | 面屑路径。 |
main_domain | string | 主域名。 |
relative_url | string | 相对 URL。 |
description | string | 结果描述。 |
highlighted | array | 描述中加粗显示的。 |
etv | float | 预估流量,通常根据点击率与搜索量估算。 |
estimated_paid_traffic_cost | float/null | 将预估自然流量转化为付费流量时的预估成本。 |
rank_changes | object | 与上一次采集相比的排名变化。 |
backlinks_info | object | 当前排名页面的外链信息。 |
rank_info | object | 页面和主域名排名信息。 |
自然结果 organic
自然结果可能额外:
| 字段 | 类型 | 说明 |
|---|---|---|
website_name | string | 网站名称。 |
is_image | boolean | 是否图片。 |
is_video | boolean | 是否视频。 |
is_featured_snippet | boolean | 是否为精选摘要。 |
is_malicious | boolean | 是否被标记为恶意结果。 |
pre_snippet | string/null | 描述前附加的信息。 |
extended_snippet | string/null | 描述后附加的信息。 |
amp_version | boolean | 是否 AMP 版本。 |
rating | object/null | 结果评分。 |
links | array/null | 站点链接。 |
about_this_result | object/null | “此结果”信息。 |
rating 字段:
| 字段 | 类型 | 说明 |
|---|---|---|
rating_type | string | 评分类型:Max5、Percents 或 CustomMax。 |
value | integer | 评分值。 |
votes_count | integer | 评价数量。 |
rating_max | integer | 当前评分类型的最大值。 |
links 中的站点链接:
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 link_element。 |
title | string | 链接标题。 |
description | string | 链接描述。 |
url | string | 站点链接 URL。 |
main_domain | string | 主域名。 |
relative_url | string | 相对 URL。 |
广告结果 paid
广告结果字段:
| 字段 | 类型 | 说明 |
|---|---|---|
se_type | string | 搜索引擎类型,固定为 bing。 |
type | string | 固定为 paid。 |
rank_group | integer | 同类型广告中的组排名。 |
rank_absolute | integer | 在整个 SERP 中的绝对排名。 |
position | string | 广告位置,可为 left 或 right。 |
xpath | string | SERP素 XPath。 |
title | string | 广告标题。 |
domain | string | 广告域名。 |
description | string | 广告描述。 |
breadcrumb | string | 广告面屑。 |
url | string | 广告 URL。 |
highlighted | array | 描述中高亮的词语。 |
extra | array | 广告附加信息。 |
ad_aclk | string | 广告标识符。 |
description_rows | array/null | 扩展描述。 |
links | array/null | 广告站点链接。 |
广告站点链接的 type 固定为 ad_link_element,还可能:
title:链接标题description:链接描述url:链接地址ad_aclk:广告标识符
本地结果 local_pack
本地结果字段:
| 字段 | 类型 | 说明 |
|---|---|---|
se_type | string | 搜索引擎类型,固定为 bing。 |
type | string | 固定为 local_pack。 |
rank_group | integer | 同类型结果中的组排名。 |
rank_absolute | integer | 在整个 SERP 中的绝对排名。 |
position | string | 素位置,可为 left 或 right。 |
xpath | string | SERP素 XPath。 |
title | string | 本地结果标题。 |
description | string | 结果描述。 |
domain | string | 结果域名。 |
phone | string | 电话号码。 |
url | string | URL。 |
is_paid | boolean | 是否为广告结果。 |
rating | object/null | 评分信息。 |
main_domain | string | 主域名。 |
relative_url | string | 相对 URL。 |
etv | float | 预估流量。 |
estimated_paid_traffic_cost | float/null | 预估付费流量成本。 |
精选摘要 featured_snippet
精选摘要字段:
| 字段 | 类型 | 说明 |
|---|---|---|
se_type | string | 搜索引擎类型,固定为 bing。 |
type | string | 固定为 featured_snippet。 |
rank_group | integer | 同类型结果中的组排名。 |
rank_absolute | integer | 在整个 SERP 中的绝对排名。 |
position | string | 素位置,可为 left 或 right。 |
xpath | string | SERP素 XPath。 |
domain | string | 结果域名。 |
title | string | 结果标题。 |
featured_title | string | 精选摘要来源页面标题。 |
description | string | 摘要描述。 |
url | string | URL。 |
table | array/null | 摘要中的表格数据。 |
table_header | array | 表格列名。 |
table_content | array | 表格。 |
about_this_result | object/null | “此结果”信息。 |
main_domain | string | 主域名。 |
relative_url | string | 相对 URL。 |
etv | float | 预估流量。 |
estimated_paid_traffic_cost | float/null | 预估付费流量成本。 |
about_this_result 可能:
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 about_this_result_element。 |
url | string | 结果 URL。 |
source | string | 附加信息来源。 |
source_info | string | 来源补说明。 |
source_url | string | 来源详细信息 URL。 |
language | string | 结果语言。 |
location | string | 结果适用地区。 |
search_terms | array | 结果中匹的搜索词。 |
related_terms | array | 结果中出现的搜索词。 |
排名变化字段 rank_changes
| 字段 | 类型 | 说明 |
|---|---|---|
previous_rank_absolute | integer/null | 上一次检查时的绝对排名。新结果为 null。 |
is_new | boolean | 是否为新出现的 SERP素。 |
is_up | boolean | 排名是否上升。 |
is_down | boolean | 排名是否下降。 |
外链字段 backlinks_info
| 字段 | 类型 | 说明 |
|---|---|---|
referring_domains | integer | 引用域名数量,子域名按独立域名统计。 |
referring_main_domains | integer | 引用主域名数量。 |
referring_pages | integer | 指向该页面的页面数量。 |
dofollow | integer | dofollow 链接数量。 |
backlinks | integer | 反向链接总数 dofollow 和 nofollow。 |
time_update | string | 外链数据更新时间,UTC 格式。 |
页面排名字段 rank_info
| 字段 | 类型 | 说明 |
|---|---|---|
page_rank | integer | 页面排名指标。 |
main_domain_rank | integer | 主域名排名指标。 |
响应示例
以下示例展示了型响应结构,items 和 intersection_result 中的结果数量可能因请求参数而变化。
json
{
"version": "0.1.20240313",
"status_code": 20000,
"status_message": "Ok.",
"time": "1.5895 sec.",
"cost": 0.0103,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"id": "7f5c5f7e-1234-4567-8901-abcdef123456",
"status_code": 20000,
"status_message": "Ok.",
"time": "1.5895 sec.",
"cost": 0.0103,
"result_count": 1,
"path": [
"v3",
"dataforseo_labs",
"bing",
"page_intersection",
"live"
],
"data": {
"api": "dataforseo_labs",
"function": "page_intersection",
"se_type": "bing",
"pages": {
"1": "https://example.com/*",
"2": "https://competitor.example/*"
},
"language_name": "English",
"location_code": 2840,
"include_serp_info": true,
"limit": 3
},
"result": [
{
"se_type": "bing",
"pages": {
"1": "https://example.com/*",
"2": "https://competitor.example/*"
},
"exclude_pages": [],
"location_code": 2840,
"language_code": "en",
"total_count": 1250,
"items_count": 1,
"items": [
{
"se_type": "bing",
"keyword_data": {
"se_type": "bing",
"keyword": "example keyword",
"location_code": 2840,
"language_code": "en",
"keyword_info": {
"se_type": "bing",
"last_updated_time": "2024-03-21 10:18:06 +00:00",
"competition": 0.4,
"cpc": 0.05,
"search_volume": 100,
"monthly_searches": [
{
"year": 2024,
"month": 3,
"search_volume": 100
}
]
},
"keyword_properties": {
"se_type": "bing",
"core_keyword": "example keyword",
"synonym_clustering_algorithm": "text_processing",
"keyword_difficulty": 55,
"detected_language": "en",
"is_another_language": false
},
"serp_info": {
"se_type": "bing",
"check_url": "https://www.bing.com/search?q=example%20keyword",
"serp_item_types": ["organic"],
"se_results_count": 31600000,
"last_updated_time": "2024-03-21 10:18:06 +00:00",
"previous_updated_time": "2024-02-17 14:51:16 +00:00"
},
"avg_backlinks_info": null
},
"intersection_result": {
"1": {
"se_type": "bing",
"type": "organic",
"rank_group": 3,
"rank_absolute": 5,
"position": "left",
"domain": "www.example.com",
"title": "Example Page",
"url": "https://www.example.com/page",
"breadcrumb": "https://www.example.com/page",
"main_domain": "example.com",
"relative_url": "/page",
"description": "Example search result",
"is_image": false,
"is_video": false,
"is_featured_snippet": false,
"is_malicious": false,
"etv": 12.5,
"estimated_paid_traffic_cost": null,
"rank_changes": {
"previous_rank_absolute": 8,
"is_new": false,
"is_up": true,
"is_down": false
},
"backlinks_info": {
"referring_domains": 120,
"referring_main_domains": 110,
"referring_pages": 560,
"dofollow": 430,
"backlinks": 620,
"time_update": "2024-03-28 05:35:14 +00:00"
},
"rank_info": {
"page_rank": 500,
"main_domain_rank": 667
}
}
}
}
]
}
]
}
]
}错误处理
客户端应同时检查:
- HTTP 状态码;
- 顶层
status_code; - 每个任务的
tasks[].status_code; status_message中的错误说明。
成功响应通常使用状态码 20000。状态码表示请求参数、认证、额、任务执行或数据处理异常。建议在业务系统中对失败任务进行日志记录、重试和告警。
实用场景
- 挖掘多个竞品页面覆盖的:识别竞争对手页面同时排名的主题,提炼集群和选题方向。
- 发现竞争对手独有:将目标页面放
exclude_pages,定位竞争对手已排名但自身尚未覆盖的,指导补齐。 - 比较不同页面的 SERP 表现:利用
intersection_result对比各页面的自然排名、SERP 类型、预估流量和排名变化。 - 筛选高价值机会:结合搜索量、难度、CPC 和预估流量,优安排更商业价值的 SEO 任务。
- 评估排名页面的竞争强度:使用
backlinks_info和rank_info对比排名页面的外链规模与页面权重,为链接建设和页面优化制定依据。