Skip to content

Bing 域名交集实时查询

GET /v3/dataforseo_labs/locations_and_languages

接口说明

POST /v3/dataforseo_labs/bing/domain_intersection/live

本接口用于查询两个指定域名在 Bing 同一 SERP 中排名的,并返回每个的搜索量、竞争度、点击价格、预估流量、广告流量成本,以及两个域名对应的 SERP素。

本接口支持以下 SERP 类型:

  • 自然搜索结果(organic
  • 付费广告结果(paid
  • 本地结果(local_pack
  • 精选摘要(featured_snippet

所有 POST 请求体使用 UTF-8 编码的 JSON 数组格式。平台限流以认证说明中的 30/60/120 次/分钟规则为准,同时并发请求数最多为 30 次。

> 实扣费以响应头 X-SeerMarTech-Charge-CNY 为准。

请求参数

请求体是数组,数组中的每个对象代表一个查询任务。

参数类型说明
target1string第一个目标域名。不得 https://www.,例如 mom.me
target2string第二个目标域名。不得 https://www.,例如 quora.com
location_namestring条件填地理位置完整名称。未指定 location_code 时填。与 location_code 二选一。当前接口支持美国位置,例如 United States
location_codeinteger条件填地理位置代码。未指定 location_name 时填。与 location_name 二选一。美国的位置代码为 2840
language_namestring条件填语言完整名称。未指定 language_code 时填。与 language_code 二选一,例如 English
language_codestring条件填语言代码。未指定 language_name 时填。与 language_name 二选一,例如 en
intersectionsboolean是否返回两个域名排名的。设为 true 时,返回两个域名均出现在同一 SERP 中的及对应 SERP素;设为 false 时,返回 target1 有排名、target2 没有排名的返回 target1 的数据。默认值为 true。当设为 true 且交集 1000 万条时,不返回结果。
item_typesarray限定返回的搜索结果类型。支持的结果类型 organicpaidlocal_packfeatured_snippet
include_serp_infoboolean是否为每个返回 SERP 结果总数、检查 URL 和 SERP 特征。默认值为 false
limitinteger返回的最大数量。默认值为 100,最大值为 1000
offsetinteger结果偏移量。默认值为 0。例如设置为 10 时,跳过前 10 个,从第 11 个开始返回。
filtersarray结果过滤条件。最多设置 8 个过滤条件,条件之间使用 andor 连接。
order_byarray结果排序规则。最多设置 3 条排序规则,排序字段可使用与 filters 相同的字段。
tagstring用户自定义任务标识,最多 255 个字符。该值会在响应任务的 data 对象中返回。

filters 支持的运算符

支持以下运算符:

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

likenot_likeilikenot_ilike 支持使用 % 匹零个或多个字符。

示例:

json
[
  ["first_domain_serp_element.etv", ">", 0],
  "and",
  ["first_domain_serp_element.description", "like", "%goat%"]
]

位置与语言

可通过以下接口获取可用的位置和语言:

text
/v3/dataforseo_labs/locations_and_languages

示例:

json
{
  "location_code": 2840,
  "language_code": "en"
}

order_by 示例

json
[
  "keyword_info.search_volume,desc",
  "first_domain_serp_element.rank_absolute,asc"
]

排序方向支持:

  • asc:升序
  • desc:降序

请求示例

cURL

bash
curl --location --request POST \
  "https://api.seermartech.cn/v3/dataforseo_labs/bing/domain_intersection/live" \
  --header "Authorization: Bearer smt_live_YOUR_KEY" \
  --header "Content-Type: application/json" \
  --data-raw '[
    {
      "target1": "mom.me",
      "target2": "quora.com",
      "location_name": "United States",
      "language_name": "English",
      "intersections": true,
      "include_serp_info": true,
      "limit": 5,
      "filters": [
        ["first_domain_serp_element.etv", ">", 0],
        "and",
        ["first_domain_serp_element.description", "like", "%goat%"]
      ],
      "order_by": [
        "keyword_info.search_volume,desc"
      ]
    }
  ]'

Python

python
import requests

url = "https://api.seermartech.cn/v3/dataforseo_labs/bing/domain_intersection/live"

payload = [
    {
        "target1": "mom.me",
        "target2": "quora.com",
        "location_name": "United States",
        "language_name": "English",
        "intersections": True,
        "limit": 5,
        "filters": [
            ["first_domain_serp_element.etv", ">", 0],
            "and",
            ["first_domain_serp_element.description", "like", "%goat%"]
        ]
    }
]

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(
        "请求失败,错误码:{},错误信息:{}".format(
            result.get("status_code"),
            result.get("status_message")
        )
    )

TypeScript

typescript
import axios from "axios";

const response = await axios.post(
  "https://api.seermartech.cn/v3/dataforseo_labs/bing/domain_intersection/live",
  [
    {
      target1: "mom.me",
      target2: "quora.com",
      location_name: "United States",
      language_name: "English",
      intersections: true,
      include_serp_info: true,
      limit: 5,
      filters: [
        ["first_domain_serp_element.etv", ">", 0],
        "and",
        ["first_domain_serp_element.description", "like", "%goat%"]
      ]
    }
  ],
  {
    headers: {
      Authorization: "Bearer smt_live_YOUR_KEY",
      "Content-Type": "application/json"
    }
  }
);

console.log(response.data);

响应结构

接口返回 JSON 对象,顶层 tasks 数组。

顶层字段

字段类型说明
versionstring当前 API 版本。
status_codeinteger通用响应状态码。成功时通常为 20000
status_messagestring通用状态信息。
timestring请求执行耗时,例如 0.8964 sec.
costfloat平台原始 USD 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。
tasks_countintegertasks 数组中的任务总数。
tasks_errorinteger执行失败的任务数量。
tasksarray任务结果数组。

任务字段

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

result 字段

字段类型说明
se_typestring搜索引擎类型。本接口固定为 bing
target1string请求中的第一个目标域名。
target2string请求中的第二个目标域名。
location_codeinteger地理位置代码。
language_codestring语言代码。
total_countinteger数据库中符合请求条件的结果总数。
items_countinteger本次 items 数组返回的结果数量。
itemsarray、 SERP素及数据。

items 字段

基础字段

字段类型说明
se_typestring搜索引擎类型,固定为 bing
keyword_dataobject当前的数据。
serp_infoobject / null当前的 SERP 数据。只有在请求中将 include_serp_info 设为 true 且存在对应数据时返回。
first_domain_serp_elementobject / nulltarget1 针对当前发现的 SERP素。
second_domain_serp_elementobject / nulltarget2 针对当前发现的 SERP素。

keyword_data

字段类型说明
se_typestring搜索引擎类型,固定为 bing
keywordstring返回的。
location_codeinteger地理位置代码。
language_codestring语言代码。
keyword_infoobject指标。
keyword_propertiesobject附加属性。

keyword_info

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

monthly_searches 数组中的字段:

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

keyword_properties

字段类型说明
se_typestring搜索引擎类型,固定为 bing
core_keywordstring / null同义词分组中的核心。若为 null,表示未识别到对应的同义词分组。
synonym_clustering_algorithmstring / null同义词识别算法。keyword_metrics 表示基于指标,text_processing 表示基于文本处理。
keyword_difficultyinteger难度,取值范围为 0100,用于表示自然搜索结果前十名的难度。
detected_languagestring系统识别出的语言。
is_another_languageboolean识别出的语言是否与请求设置的语言不同。

serp_info 字段

字段类型说明
se_typestring搜索引擎类型,固定为 bing
check_urlstring可直接访问的 Bing 搜索结果 URL,可用于核验结果。
serp_item_typesarraySERP 中出现的结果类型。
se_results_countinteger / null当前的搜索结果数量。
last_updated_timestringSERP 数据最近更新时间,UTC 格式。
previous_updated_timestringSERP 数据上一次更新时间,UTC 格式。

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

SERP素通用字段

first_domain_serp_elementsecond_domain_serp_element 会根据 type 返回不同的字段。以下字段适用于多个 SERP素类型。

字段类型说明
se_typestring搜索引擎类型,固定为 bing
typestringSERP素类型。
rank_groupinteger在相同 type素组中的排名。不同类型不会计该排名。
rank_absoluteinteger在整个 SERP 中的绝对排名。
positionstring素在 SERP 中的对齐位置,可为 leftright
xpathstringSERP素的 XPath。
domainstringSERP 中展示的域名或子域名。
titlestring搜索结果标题。
urlstring结果 URL。
breadcrumbstring面屑路径。
main_domainstring结果的主域名。
relative_urlstring相对于主域名的 URL。
etvfloat预估月流量,通常根据点击率与搜索量估算。
estimated_paid_traffic_costfloat / null将预估自然流量转化为付费流量所需的预估月成本。
rank_changesobject自上次更新时间以来的排名变化。
backlinks_infoobject排名页面的外链信息。
rank_infoobject页面和主域名的排名信息。

自然结果 organic

除通用字段外,还可能:

字段类型说明
is_imageboolean是否图片。
is_videoboolean是否视频。
is_featured_snippetboolean是否为精选摘要。
is_maliciousboolean是否被标记为恶意结果。
descriptionstring搜索结果描述。
pre_snippetstring / null描述前附加的信息。
extended_snippetstring / null描述后附加的信息。
amp_versionboolean是否存在 AMP 版本。
ratingobject / null结果评分。
highlightedarray描述中以粗体突出显示的词语。
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

除通用字段外,还可能:

字段类型说明
titlestring广告标题。
domainstring广告展示域名。
descriptionstring广告描述。
breadcrumbstring广告面屑。
urlstring广告目标 URL。
highlightedarray描述中突出显示的词语。
extraarray结果附加信息。
ad_aclkstring广告标识符。
description_rowsarray / null扩展描述行。
linksarray / null广告站点链接。

付费结果中的 links 数组字段:

字段类型说明
typestring固定为 ad_link_element
titlestring链接标题。
descriptionstring链接描述。
urlstring链接 URL。
ad_aclkstring广告标识符。
main_domainstring主域名。
relative_urlstring相对 URL。

本地结果 local_pack

除通用字段外,还可能:

字段类型说明
titlestring本地结果标题。
descriptionstring本地结果描述。
phonestring电话号码。
urlstringURL。
is_paidboolean是否为广告结果。
ratingobject / null结果评分。

除通用字段外,还可能:

字段类型说明
titlestring结果标题。
featured_titlestring精选摘要来源页面标题。
descriptionstring结果描述。
urlstringURL。
tablearray / null精选摘要中的表格数据。
table_headerarray表格列名。
table_contentarray表格,每个代表一行。
about_this_resultobject / 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外链总数 dofollownofollow 外链。
time_updatestring外链数据更新时间,UTC 格式。

页面排名字段 rank_info

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

响应示例

以下为精简响应示例,完整结果字段会根据 SERP 类型和请求参数返回:

json
{
  "version": "0.1.20220327",
  "status_code": 20000,
  "status_message": "Ok.",
  "time": "0.8964 sec.",
  "cost": 0.0105,
  "tasks_count": 1,
  "tasks_error": 0,
  "tasks": [
    {
      "id": "00000000-0000-0000-0000-000000000000",
      "status_code": 20000,
      "status_message": "Ok.",
      "time": "0.8964 sec.",
      "cost": 0.0105,
      "result_count": 1,
      "data": {
        "api": "dataforseo_labs",
        "function": "domain_intersection",
        "se_type": "bing",
        "target1": "mom.me",
        "target2": "quora.com",
        "language_code": "en",
        "location_code": 2840,
        "include_serp_info": true,
        "limit": 5
      },
      "result": [
        {
          "se_type": "bing",
          "target1": "mom.me",
          "target2": "quora.com",
          "location_code": 2840,
          "language_code": "en",
          "total_count": 5,
          "items_count": 5,
          "items": [
            {
              "se_type": "bing",
              "keyword_data": {
                "se_type": "bing",
                "keyword": "peacocks as pets",
                "location_code": 2840,
                "language_code": "en",
                "keyword_info": {
                  "se_type": "bing",
                  "last_updated_time": "2022-03-09 11:40:31 +00:00",
                  "competition": 0.1,
                  "cpc": 0.1,
                  "search_volume": 20,
                  "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": {
                "se_type": "bing",
                "check_url": "https://www.bing.com/search?q=peacocks%20as%20pets",
                "serp_item_types": ["organic"],
                "se_results_count": 1290000,
                "last_updated_time": "2022-03-09 11:40:31 +00:00",
                "previous_updated_time": "2022-02-03 19:58:33 +00:00"
              },
              "first_domain_serp_element": {
                "se_type": "bing",
                "type": "organic",
                "rank_group": 28,
                "rank_absolute": 31,
                "position": "left",
                "domain": "animals.mom.me",
                "title": "How to Own Peacocks as Pets | Animals - mom.me",
                "url": "https://animals.mom.me/own-peacocks-pets-1544.html",
                "main_domain": "mom.me",
                "relative_url": "/own-peacocks-pets-1544.html",
                "etv": 0.084,
                "estimated_paid_traffic_cost": 0.0084,
                "rank_changes": {
                  "previous_rank_absolute": null,
                  "is_new": true,
                  "is_up": false,
                  "is_down": false
                },
                "backlinks_info": {
                  "referring_domains": 1,
                  "referring_main_domains": 1,
                  "referring_pages": 1,
                  "dofollow": 1,
                  "backlinks": 1,
                  "time_update": "2024-08-09 06:01:22 +00:00"
                },
                "rank_info": {
                  "page_rank": 43,
                  "main_domain_rank": 420
                }
              },
              "second_domain_serp_element": {
                "se_type": "bing",
                "type": "organic",
                "rank_group": 19,
                "rank_absolute": 22,
                "position": "left",
                "domain": "www.quora.com",
                "title": "What are the risks of having a big peacock as a pet? - Quora",
                "url": "https://www.quora.com/What-are-the-risks-of-having-a-big-peacock-as-a-pet",
                "main_domain": "quora.com",
                "relative_url": "/What-are-the-risks-of-having-a-big-peacock-as-a-pet",
                "etv": 0.108,
                "estimated_paid_traffic_cost": 0.0108
              }
            }
          ]
        }
      ]
    }
  ]
}

错误处理

请根据顶层或任务级别的 status_codestatus_message 判断请求是否成功:

  • 20000:请求成功。
  • 20000:请求或任务执行失败,应结合 status_message 记录并处理异常。

建议客户端同时检查:

  1. HTTP 状态码;
  2. 顶层 status_code
  3. tasks_error
  4. 每个任务的 status_code
  5. result 是否为空。

实用场景

  • 对比两个竞品域名的,识别双方争夺的搜索需求并制定竞争策略。
  • 筛选一个域名已排名、另一个域名未排名的,发现可优布局的 SEO 增长机会。
  • 按搜索量、排名或预估流量排序,帮助团队确定选题优级和资源顺序。
  • 分析两个域名在自然结果、广告、本地和精选摘要中的表现,评估不同 SERP 类型下的竞争格局。
  • 结合排名变化、外链数量和难度评估竞争页面,定位需要补、优化页面或建设外链的对象。

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