Skip to content

Google 域名交集(实时接口)

POST /v3/dataforseo_labs/google/domain_intersection/live

本接口使用 POST 方法,路径为:

/v3/dataforseo_labs/google/domain_intersection/live

用于查询两个指定域名在 Google 同一 SERP 中排名的,并返回搜索量、竞争度、每次点击费用、难度、搜索意图,以及两个域名对应的 SERP素、预估流量和付费流量成本等数据。

本接口支持以下 SERP 类型:

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

数据通常每周更新,最新更新时间可通过 /v3/dataforseo_labs/status/ 查询。

请求信息

  • 请求方法: POST
  • 请求路径: /v3/dataforseo_labs/google/domain_intersection/live
  • 请求地址: https://api.seermartech.cn/v3/dataforseo_labs/google/domain_intersection/live
  • Content-Type: application/json
  • 请求体格式: JSON 数组,数组中每次只能一个任务
  • 并发限制: 最多同时提交 30 个请求 平台限流以认证说明中的 30/60/120 次/分钟规则为准

每个实时接口请求只能提交一个任务,任务放在通用 POST 数组中。

计费说明

每次请求都会产生费用。启用 include_clickstream_data: true 时,请求费用按基础费用的 2 倍计算。

参考价约 ¥0.0750 / 次(以示例中的单任务费用折算供参考)。扣费以响应头 X-SeerMarTech-Charge-CNY 为准。

请求参数

任务级参数

参数类型说明
target1string第一个目标域名。不要 https://www.,例如 cnn.com
target2string第二个目标域名。不要 https://www.,例如 forbes.com
location_namestring条件填地理位置名。未指定 location_code 时填。与 location_code 二选一。
location_codeinteger条件填地理位置代码。未指定 location_name 时填。与 location_name 二选一。
language_namestring条件填语言名。未指定 language_code 时填。与 language_code 二选一。
language_codestring条件填语言代码。未指定 language_name 时填。与 language_name 二选一。
intersectionsboolean是否返回两个域名在同一 SERP 中出现的。默认值为 true
item_typesarray指定返回的搜索结果类型。可使用 organicpaidlocal_packfeatured_snippet。默认返回支持的类型。
include_serp_infoboolean是否返回每个的 SERP 数据结果总数、检查地址和 SERP素类型。默认值为 false
include_clickstream_databoolean是否返回基于点击流数据计算的指标。默认值为 false
limitinteger返回的最大数量。默认值为 100,最大值为 1000
offsetinteger结果偏移量,默认值为 0。例如设置为 10 时,将跳过前 10 条结果。
filtersarray结果过滤条件。最多设置 8 个过滤条件。
order_byarray结果排序规则。最多设置 3 条排序规则。
tagstring用户自定义任务标识,最长 255 个字符。该值会原样返回在响应的 data 对象中。

地理位置和语言

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

https://api.seermartech.cn/v3/dataforseo_labs/locations_and_languages

示例:

json
{
  "location_name": "United Kingdom",
  "location_code": 2840,
  "language_name": "English",
  "language_code": "en"
}

intersections 参数说明

当设置为 true 时:

  • 返回 target1target2 在同一 SERP 中均有排名的;
  • 返回两个域名各自对应的 SERP素;
  • 如果交集数量 1000 万条,则不会返回结果。

当设置为 false 时:

  • 返回 target1 有排名、target2 没有排名的;
  • 返回 target1 对应的 SERP素。

filters 过滤器

支持的运算符:

regexnot_regex<<=>>==<>innot_inmatchnot_matchilikenot_ilikelikenot_like

多个条件之间使用逻辑运算符 andor 连接。likenot_likeilikenot_ilike 支持 % 通符。

示例:筛选第一个域名预估流量大于 0,且难度小于 60 的结果。

json
[
  ["first_domain_serp_element.etv", ">", 0],
  "and",
  ["keyword_data.keyword_info.keyword_difficulty", "<", 60]
]

order_by 排序

排序格式为:

json
["字段名", "asc"]

  • asc:升序
  • desc:降序

示例:

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

请求示例

curl

bash
curl --location --request POST \
  "https://api.seermartech.cn/v3/dataforseo_labs/google/domain_intersection/live" \
  --header "Authorization: Bearer smt_live_YOUR_KEY" \
  --header "Content-Type: application/json" \
  --data-raw '[
    {
      "target1": "cnn.com",
      "target2": "forbes.com",
      "language_name": "English",
      "location_code": 2840,
      "intersections": true,
      "include_serp_info": true,
      "limit": 3,
      "filters": [
        ["first_domain_serp_element.etv", ">", 0]
      ],
      "order_by": [
        ["keyword_data.keyword_info.search_volume", "desc"]
      ],
      "tag": "domain-intersection-demo"
    }
  ]'

Python

python
import requests

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

headers = {
    "Authorization": "Bearer smt_live_YOUR_KEY",
    "Content-Type": "application/json",
}

post_data = [
    {
        "target1": "cnn.com",
        "target2": "forbes.com",
        "location_name": "United States",
        "language_name": "English",
        "filters": [
            ["first_domain_serp_element.etv", ">", 0]
        ],
        "limit": 3,
    }
]

response = requests.post(url, headers=headers, json=post_data)
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 postData = [
  {
    target1: "cnn.com",
    target2: "forbes.com",
    language_name: "English",
    location_code: 2840,
    filters: [
      ["first_domain_serp_element.etv", ">", 0],
    ],
    limit: 3,
  },
];

axios
  .post(
    "https://api.seermartech.cn/v3/dataforseo_labs/google/domain_intersection/live",
    postData,
    {
      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 数组。

json
{
  "version": "0.1.20240801",
  "status_code": 20000,
  "status_message": "Ok.",
  "time": "11.0816 sec.",
  "cost": 0.0103,
  "tasks_count": 1,
  "tasks_error": 0,
  "tasks": [
    {
      "id": " e1d7a6c5-1234-4bcd-8abc-123456789abc",
      "status_code": 20000,
      "status_message": "Ok.",
      "time": "10.9521 sec.",
      "cost": 0.0103,
      "result_count": 1,
      "data": {
        "api": "dataforseo_labs",
        "function": "domain_intersection",
        "se_type": "google",
        "target1": "mom.com",
        "target2": "quora.com",
        "language_code": "en",
        "location_code": 2840,
        "include_serp_info": true,
        "limit": 3
      },
      "result": [
        {
          "se_type": "google",
          "target1": "mom.com",
          "target2": "quora.com",
          "location_code": 2840,
          "language_code": "en",
          "total_count": 3,
          "items_count": 3,
          "items": []
        }
      ]
    }
  ]
}

> 示例中的 cost 字段保留平台容格式。人民币扣费请以响应头 X-SeerMarTech-Charge-CNY 为准。

顶层响应字段

字段类型说明
versionstring当前 API 版本。
status_codeinteger请求总体状态码。20000 表示成功。
status_messagestring请求总体状态消息。
timestring请求执行耗时,例如 11.0816 sec.
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当前请求的 URL 路径。
dataobject创建任务时提交的参数。
resultarray当前任务的结果数组。

result 结果字段

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

items 结果

基础字段

字段类型说明
se_typestring搜索引擎类型。
keyword_dataobject当前的数据。
first_domain_serp_elementobject第一个域名对应的 SERP素。
second_domain_serp_elementobject第二个域名对应的 SERP素。

keyword_data

字段类型说明
se_typestring搜索引擎类型。
keywordstring文本。
location_codeinteger地理位置代码。
language_codestring语言代码。
keyword_infoobject搜索量、竞争度和广告出价等指标。
clickstream_keyword_infoobject点击流数据。在 include_clickstream_datatrue 时返回。
keyword_propertiesobject属性和难度。
serp_infoobjectSERP 数据。在 include_serp_infotrue 且存在对应数据时返回。
avg_backlinks_infoobject排名前 10 个自然结果的平均外链指标。
search_intent_infoobject搜索意图数据。
keyword_info_normalized_with_bingobject使用 Bing 搜索量归一化后的数据。
keyword_info_normalized_with_clickstreamobject使用点击流数据归一化后的数据。

keyword_info

字段类型说明
se_typestring搜索引擎类型。
last_updated_timestring数据更新时间,UTC 格式:yyyy-mm-dd hh:mm:ss +00:00
competitionfloat广告竞争度,取值范围为 01
competition_levelstring/null付费 SERP 竞争等级:LOWMEDIUMHIGH。未知时为 null
cpcfloat历史平均每次点击费用。
search_volumeintegerGoogle 月均搜索量。
low_top_of_page_bidfloat广告展示在首页顶部所需的较低参考出价。
high_top_of_page_bidfloat广告展示在首页顶部所需的较高参考出价。
categoriesarray产品或服务分类。
monthly_searchesarray最近 12 个月的月度搜索量。
search_volume_trendobject搜索量趋势变化。

search_volume_trend 字段:

字段类型说明
monthlyinteger与上月相比的搜索量变化百分比。
quarterlyinteger与上一季度相比的搜索量变化百分比。
yearlyinteger与上年同期相比的搜索量变化百分比。

monthly_searches 数组:

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

clickstream_keyword_info

include_clickstream_data 设置为 true 时返回。

字段类型说明
search_volumeinteger基于点击流数据估算的月均搜索量。
last_updated_timestring点击流数据更新时间。
gender_distributionobject用户性别分布。
age_distributionobject用户年龄分布。
monthly_searchesarray基于点击流数据的月度搜索量。

gender_distribution

  • female:女性用户数量
  • male:男性用户数量

age_distribution

  • 18-24
  • 25-34
  • 35-44
  • 45-54
  • 55-64

这些字段表示对应年龄段的用户数量。

keyword_properties

字段类型说明
se_typestring搜索引擎类型。
core_keywordstring/null同义词聚类中的核心。无法识别同义词时为 null
synonym_clustering_algorithmstring/null同义词识别算法:keyword_metricstext_processing
keyword_difficultyinteger难度,取值范围为 0100,数值越高通常越难自然搜索前 10 名。
detected_languagestring/null系统识别出的语言。
is_another_languageboolean识别出的语言是否与请求设置的语言不同。

serp_info

当未启用 include_serp_info,或数据库中没有该的 SERP 数据时,字段值为 null

字段类型说明
se_typestring搜索引擎类型。
check_urlstring可直接访问的搜索结果检查地址。
serp_item_typesarraySERP 中发现的结果类型。
se_results_countstring该的搜索结果数量。
last_updated_timestringSERP 数据更新时间。
previous_updated_timestring上一次 SERP 数据更新时间。

支持识别的 SERP 类型:

answer_boxappcarouselmulti_carouselfeatured_snippetimagesjobsknowledge_graphlocal_packmaporganicpaidpeople_also_askrelated_searchesshoppingtop_storiesvideoeventsrecipespopular_productspodcastsquestions_and_answersshort_videosdiscussions_and_forumscoursesai_overview 等。

返回详细 SERP素数据的类型为:

  • 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外链数据更新时间。

search_intent_info

字段类型说明
se_typestring搜索引擎类型,通常为 google
main_intentstring主要搜索意图。
foreign_intentarray/null搜索意图。
last_updated_timestring搜索意图数据更新时间。

main_intentforeign_intent 支持:

  • informational:信息型
  • navigational:导航型
  • commercial:商业调研型
  • transactional:交易型

归一化数据

keyword_info_normalized_with_bingkeyword_info_normalized_with_clickstream 结构相似,均:

字段类型说明
last_updated_timestring数据集更新时间。
search_volumeinteger归一化后的当前搜索量。
is_normalizedboolean是否已完成归一化。
monthly_searchesarray月度归一化搜索量。

域名 SERP素

first_domain_serp_elementsecond_domain_serp_element 分别表示两个目标域名在当前下发现的 SERP素。对象中的 se_type 表示搜索引擎类型,结构取决于类型。

通用 SERP 字段

自然结果、付费结果、本地结果和精选摘要通常以下字段:

字段类型说明
typestringSERP素类型。
rank_groupinteger同类型中的排名。
rank_absoluteinteger在 SERP素中的绝对排名。
positionstring素在页面中的位置:leftright
xpathstring素在页面中的 XPath。
domainstringSERP 中展示的域名或子域名。
titlestring搜索结果标题。
urlstring结果 URL。
breadcrumbstring面屑路径。
main_domainstring主域名。
relative_urlstring不协议和域名的相对 URL。
etvfloat预估月流量,根据点击率和搜索量估算。
estimated_paid_traffic_costfloat将预估自然流量通过付费广告获取的预估月成本。
clickstream_etvinteger/null基于点击流数据估算的流量。启用 include_clickstream_data 后返回。
rank_changesobject自上次更新以来的排名变化。
backlinks_infoobject/null当前排名页面的外链信息。
rank_infoobject当前页面和主域名的排名信息。

自然结果 organic

type 固定为 organic,此外还可能:

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

付费结果 paid

type 固定为 paid,此外还可能:

字段类型说明
domainstring广告结果中的域名。
descriptionstring广告描述。
breadcrumbstring广告面屑。
urlstring广告目标 URL。
highlightedarray描述中加粗显示的词语。
extraarray广告附加信息。
linksarray/null广告站点链接。

extra 常见字段:

字段类型说明
ad_aclkstring广告标识符。
description_rowsarray/null扩展描述。

本地结果 local_pack

type 固定为 local_pack,此外还可能:

字段类型说明
descriptionstring本地结果描述。
phonestring电话号码。
is_paidboolean是否为广告结果。
ratingarray本地结果评分。

type 固定为 featured_snippet,此外还可能:

字段类型说明
featured_titlestring精选摘要来源页面标题。
descriptionstring精选摘要。
tableobject/null精选摘要中的表格数据。

table 字段:

字段类型说明
table_headerarray表头。
table_contentarray表格,每个表示一行。

评分字段

rating 对象可能:

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

排名变化字段

rank_changes 对象当前 SERP素与上次更新相比的排名变化:

字段类型说明
previous_rank_absoluteinteger/null上一次的绝对排名。新出现的为 null
is_newboolean是否为新出现的 SERP素。
is_upboolean排名是否上升。
is_downboolean排名是否下降。

预估流量指标

  • etv:预估自然月流量,通常点击率乘以搜索量计算。
  • estimated_paid_traffic_cost:将对应自然流量通过 Google 搜索广告获取时的预估月成本,通常自然流量乘以付费 CPC 计算。
  • clickstream_etv:基于点击流搜索量和点击率估算的流量。只有启用 include_clickstream_data 时才会返回。

外链和排名信息

字段类型说明
referring_domainsinteger引荐域名数量,子域名会分别计数。
referring_main_domainsinteger引荐主域名数量。
referring_pagesinteger指向当前页面的页面数量。
dofollowintegerDofollow 链接数量。
backlinksinteger反向链接总数 Dofollow 和 Nofollow 链接。
time_updatestring外链数据更新时间。

rank_info

字段类型说明
page_rankinteger页面排名指标,根据链接数据库中的节点排名方法计算。
main_domain_rankinteger主域名排名指标,根据链接数据库中的节点排名方法计算。

错误处理

建议根据顶层和任务级 status_code 分别处理请求错误和任务错误:

  • 20000:请求成功
  • 20000:请求或任务处理失败,应结合 status_message 定位原因

完整错误码请参考错误码文档。

实用场景

  • 发现竞品排名:对比两个域名的交集,识别双方都覆盖但自身页面表现不足的主题,指导补齐和页面优化。
  • 筛选高价值机会:按 search_volumecpckeyword_difficultyetv 过滤,优高搜索量、高商业价值且可实现的 SEO 主题。
  • 比较两个域名的 SERP 表现:同时分析 first_domain_serp_elementsecond_domain_serp_element,定位排名差距、页面类型差异及对应 URL。
  • 评估自然流量的广告替代成本:使用 etvestimated_paid_traffic_cost 估算自然排名带来的流量价值,为 SEO 与 SEM 预算分提供依据。
  • 分析 SERP 特征覆盖:筛选 organicpaidlocal_packfeatured_snippet 结果,判断竞品在不同 SERP 展示位上的占位策略。

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