Skip to content

Bing 页面交集(实时)

接口概述

POST /v3/dataforseo_labs/bing/page_intersection/live

本接口用于查询指定页面在 Bing 搜索结果中排名的,并返回指标、SERP 信息、页面排名及外链概况。

主要支持以下分析方式:

  • 查询多个页面排名的:传 pages,返回所有指定页面在同一 Bing SERP 中排名的。
  • 查询竞争对手排名而目标页面未排名的:同时传 pagesexclude_pages,返回 pages 中页面排名、但 exclude_pages 中页面未排名的。
  • 合并或交集分析:通过 intersection_mode 控制采用并集或交集逻辑。

> 当交集数量 1,000 万时,本接口不会返回结果。

请求限制与计费

  • 每个请求单独计费。
  • 每分钟最多提交 2,000 次 API 调用。
  • 同时进行的请求数最多为 30 个。
  • 请求体使用 UTF-8 编码的 JSON。
  • 实扣费以响应头 X-SeerMarTech-Charge-CNY 为准。

请求参数

请求体为 JSON 数组,每个数组代表一个任务。

请求参数表

参数类型说明
pagesobject要分析的目标页面,最多 20 个。对象键名应使用 "1""20"。URL须为 http://https:// 的绝对地址。
exclude_pagesarray要排除的页面,最多 10 个。返回 pages 中页面排名、但排除页面未排名的。
location_namestring条件填地理位置名。未指定 location_code 时填。当前支持美国。
location_codeinteger条件填地理位置编码。未指定 location_name 时填。美国编码为 2840
language_namestring条件填语言名。未指定 language_code 时填,例如 English
language_codestring条件填语言编码。未指定 language_name 时填,例如 en
item_typesarray要纳分析的搜索结果类型。默认值为空数组。
ignore_synonymsboolean是否忽略高度相似的。设为 true 时返回核心。默认值为 false
limitinteger返回的最大数量。默认值为 100,最大值为 1000
offsetinteger结果偏移量。默认值为 0。例如设置为 10 时,跳过前 10 条结果。
include_subdomainsboolean是否子域名。设为 false 时忽略子域名。默认值为 true
intersection_modestring合并模式,可选值为 unionintersect
include_serp_infoboolean是否返回每个的 SERP 数据。设为 true 时返回 serp_info。默认值为 false
filtersarray结果过滤条件,最多 8 个过滤器。
order_byarray结果排序规则,最多设置 3 条。
tagstring用户自定义任务标识,最多 255 个字符。该值会原样返回在响应的 data 对象中。

pagesexclude_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 个过滤器,并使用逻辑运算符 andor 连接条件。

支持的运算符:

text
regex
not_regex
<
<=
>
>=
=
<>
in
not_in
ilike
not_ilike
like
not_like
match
not_match

likenot_likeilikenot_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 数组。

顶层字段

字段类型说明
versionstring当前 API 版本。
status_codeinteger请求级状态码。成功通常为 20000
status_messagestring请求级状态消息。
timestring请求执行耗时,单位为秒。
costfloat平台原始 USD 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。
tasks_countintegertasks 数组中的任务总数。
tasks_errorinteger返回错误的任务数量。
tasksarray任务结果数组。

tasks 字段

字段类型说明
idstring任务唯一标识,UUID 格式。
status_codeinteger任务状态码,通常位于 1000060000 范围。
status_messagestring任务状态消息。
timestring任务执行耗时。
costfloat平台原始 USD 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。
result_countintegerresult 数组中的数量。
patharray请求路径。
dataobject创建任务时提交的参数。
resultarray当前任务的结果数组。

result 字段

字段类型说明
se_typestring搜索引擎类型。本接口固定为 bing
pagesobject请求中指定的目标页面。
exclude_pagesarray请求中指定的排除页面。
location_codeinteger地理位置编码。
language_codestring语言编码。
total_countinteger数据库中与请求条件的结果总数。
items_countintegeritems 数组中的结果数量。
itemsarray及 SERP、排名和外链数据。

items 字段

keyword_data

字段类型说明
se_typestring搜索引擎类型,固定为 bing
keywordstring返回的。
location_codeinteger地理位置编码。
language_codestring语言编码。
keyword_infoobject指标。
keyword_propertiesobject附加属性。
serp_infoobject/nullSERP 数据。未启用 include_serp_info 或无对应数据时为 null
avg_backlinks_infoobject/null该排名前 10 个自然结果的平均外链指标。

keyword_info

字段类型说明
se_typestring搜索引擎类型,固定为 bing
last_updated_timestring数据更新时间,UTC 格式:yyyy-mm-dd hh:mm:ss +00:00
competitionfloat竞争度,基于 Bing Ads 数据,取值范围为 01
cpcfloat/null历史平均每次点击成本。
search_volumeintegerBing 平均月搜索量。
monthly_searchesarray最近 12 个月的月度搜索量。

monthly_searches素字段:

字段类型说明
yearinteger年份。
monthinteger月份。
search_volumeinteger当月搜索量。

keyword_properties

字段类型说明
se_typestring搜索引擎类型,固定为 bing
core_keywordstring/null同义词分组中的核心。若无法识别同义词,则为 null
synonym_clustering_algorithmstring/null同义词聚类算法。可选值:keyword_metricstext_processing
keyword_difficultyinteger难度,取值范围为 0100,表示自然结果前 10 名的难度。
detected_languagestring系统识别出的语言。
is_another_languageboolean语言是否与请求中设置的语言不同。

serp_info

字段类型说明
se_typestring搜索引擎类型,固定为 bing
check_urlstring对应的 Bing 搜索结果页面地址,可用于核验结果。
serp_item_typesarraySERP 中出现的结果类型。
se_results_countstring/integer搜索结果数量。
last_updated_timestringSERP 数据最近更新时间。
previous_updated_timestringSERP 数据上一次更新时间。

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_pack

该对象表示自然排名前 10 个网站的平均外链和排名指标。

字段类型说明
se_typestring搜索引擎类型。
backlinksfloat平均反向链接数量。
dofollowfloat平均 dofollow 链接数量。
referring_pagesfloat平均引用页面数量。
referring_domainsfloat平均引用域名数量。
referring_main_domainsfloat平均引用主域名数量。
rankfloat平均排名值。
main_domain_rankfloat平均主域名排名值。
last_updated_timestring外链数据更新时间。

intersection_result

intersection_result含每个指定页面在该 SERP 中对应的结果。

  • 对象键名与 pages 中的页面编号对应。
  • 根据请求中指定页面的数量,最多返回 "1""20" 个对象。
  • 支持的结果类型:organicpaidfeatured_snippetlocal_pack

通用 SERP素字段

以下字段可能出现在自然结果、广告、本地结果或精选摘要中:

字段类型说明
se_typestring搜索引擎类型,固定为 bing
typestringSERP素类型。
rank_groupinteger同类型结果中的组排名。
rank_absoluteinteger在整个 SERP 中的绝对排名。
positionstring素在页面中的位置,可为 leftright
xpathstringSERP素的 XPath。
domainstringSERP 中显示的域名或子域名。
titlestring结果标题。
urlstring结果 URL。
breadcrumbstring面屑路径。
main_domainstring主域名。
relative_urlstring相对 URL。
descriptionstring结果描述。
highlightedarray描述中加粗显示的。
etvfloat预估流量,通常根据点击率与搜索量估算。
estimated_paid_traffic_costfloat/null将预估自然流量转化为付费流量时的预估成本。
rank_changesobject与上一次采集相比的排名变化。
backlinks_infoobject当前排名页面的外链信息。
rank_infoobject页面和主域名排名信息。

自然结果 organic

自然结果可能额外:

字段类型说明
website_namestring网站名称。
is_imageboolean是否图片。
is_videoboolean是否视频。
is_featured_snippetboolean是否为精选摘要。
is_maliciousboolean是否被标记为恶意结果。
pre_snippetstring/null描述前附加的信息。
extended_snippetstring/null描述后附加的信息。
amp_versionboolean是否 AMP 版本。
ratingobject/null结果评分。
linksarray/null站点链接。
about_this_resultobject/null“此结果”信息。

rating 字段:

字段类型说明
rating_typestring评分类型:Max5PercentsCustomMax
valueinteger评分值。
votes_countinteger评价数量。
rating_maxinteger当前评分类型的最大值。

links 中的站点链接:

字段类型说明
typestring固定为 link_element
titlestring链接标题。
descriptionstring链接描述。
urlstring站点链接 URL。
main_domainstring主域名。
relative_urlstring相对 URL。

广告结果 paid

广告结果字段:

字段类型说明
se_typestring搜索引擎类型,固定为 bing
typestring固定为 paid
rank_groupinteger同类型广告中的组排名。
rank_absoluteinteger在整个 SERP 中的绝对排名。
positionstring广告位置,可为 leftright
xpathstringSERP素 XPath。
titlestring广告标题。
domainstring广告域名。
descriptionstring广告描述。
breadcrumbstring广告面屑。
urlstring广告 URL。
highlightedarray描述中高亮的词语。
extraarray广告附加信息。
ad_aclkstring广告标识符。
description_rowsarray/null扩展描述。
linksarray/null广告站点链接。

广告站点链接的 type 固定为 ad_link_element,还可能:

  • title:链接标题
  • description:链接描述
  • url:链接地址
  • ad_aclk:广告标识符

本地结果 local_pack

本地结果字段:

字段类型说明
se_typestring搜索引擎类型,固定为 bing
typestring固定为 local_pack
rank_groupinteger同类型结果中的组排名。
rank_absoluteinteger在整个 SERP 中的绝对排名。
positionstring素位置,可为 leftright
xpathstringSERP素 XPath。
titlestring本地结果标题。
descriptionstring结果描述。
domainstring结果域名。
phonestring电话号码。
urlstringURL。
is_paidboolean是否为广告结果。
ratingobject/null评分信息。
main_domainstring主域名。
relative_urlstring相对 URL。
etvfloat预估流量。
estimated_paid_traffic_costfloat/null预估付费流量成本。

精选摘要字段:

字段类型说明
se_typestring搜索引擎类型,固定为 bing
typestring固定为 featured_snippet
rank_groupinteger同类型结果中的组排名。
rank_absoluteinteger在整个 SERP 中的绝对排名。
positionstring素位置,可为 leftright
xpathstringSERP素 XPath。
domainstring结果域名。
titlestring结果标题。
featured_titlestring精选摘要来源页面标题。
descriptionstring摘要描述。
urlstringURL。
tablearray/null摘要中的表格数据。
table_headerarray表格列名。
table_contentarray表格。
about_this_resultobject/null“此结果”信息。
main_domainstring主域名。
relative_urlstring相对 URL。
etvfloat预估流量。
estimated_paid_traffic_costfloat/null预估付费流量成本。

about_this_result 可能:

字段类型说明
typestring固定为 about_this_result_element
urlstring结果 URL。
sourcestring附加信息来源。
source_infostring来源补说明。
source_urlstring来源详细信息 URL。
languagestring结果语言。
locationstring结果适用地区。
search_termsarray结果中匹的搜索词。
related_termsarray结果中出现的搜索词。

排名变化字段 rank_changes

字段类型说明
previous_rank_absoluteinteger/null上一次检查时的绝对排名。新结果为 null
is_newboolean是否为新出现的 SERP素。
is_upboolean排名是否上升。
is_downboolean排名是否下降。
字段类型说明
referring_domainsinteger引用域名数量,子域名按独立域名统计。
referring_main_domainsinteger引用主域名数量。
referring_pagesinteger指向该页面的页面数量。
dofollowintegerdofollow 链接数量。
backlinksinteger反向链接总数 dofollow 和 nofollow。
time_updatestring外链数据更新时间,UTC 格式。

页面排名字段 rank_info

字段类型说明
page_rankinteger页面排名指标。
main_domain_rankinteger主域名排名指标。

响应示例

以下示例展示了型响应结构,itemsintersection_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
                  }
                }
              }
            }
          ]
        }
      ]
    }
  ]
}

错误处理

客户端应同时检查:

  1. HTTP 状态码;
  2. 顶层 status_code
  3. 每个任务的 tasks[].status_code
  4. status_message 中的错误说明。

成功响应通常使用状态码 20000。状态码表示请求参数、认证、额、任务执行或数据处理异常。建议在业务系统中对失败任务进行日志记录、重试和告警。

实用场景

  • 挖掘多个竞品页面覆盖的:识别竞争对手页面同时排名的主题,提炼集群和选题方向。
  • 发现竞争对手独有:将目标页面放 exclude_pages,定位竞争对手已排名但自身尚未覆盖的,指导补齐。
  • 比较不同页面的 SERP 表现:利用 intersection_result 对比各页面的自然排名、SERP 类型、预估流量和排名变化。
  • 筛选高价值机会:结合搜索量、难度、CPC 和预估流量,优安排更商业价值的 SEO 任务。
  • 评估排名页面的竞争强度:使用 backlinks_inforank_info 对比排名页面的外链规模与页面权重,为链接建设和页面优化制定依据。

统一入口:官网 · LLM API · 控制台