主题
Google Domain Intersection 实时查询
POST /v3/dataforseo_labs/google/domain_intersection/live
接口说明
/v3/dataforseo_labs/google/domain_intersection/live 用于查询两个指定域名在同一搜索结果页(SERP)中排名的。
接口会返回:
- 两个域名出现在同一 SERP 的
- 每个的搜索量、竞争度、CPC、月度搜索趋势等指标
- 两个域名在该下对应的 SERP素
- 预估流量(
etv)与预估付费流量成本(estimated_paid_traffic_cost)
支持的 SERP 结果类型:
organicpaidlocal_packfeatured_snippet
请求方式
POST https://api.seermartech.cn/v3/dataforseo_labs/google/domain_intersection/live
计费说明
该接口按请求计费。
- 参考价约 ¥0.1648 / 次
- 如果启用
include_clickstream_data: true,请求费用翻倍 - 实扣费以响应头
X-SeerMarTech-Charge-CNY为准
调用限制
- 每分钟最多
2000次 API 调用 - 同时并发请求上限
30 - POST 请求体为 UTF-8 编码的 JSON
- 请求体格式为 JSON 数组:
[{ ... }]
请求参数
以下为任务设置字段说明。
| 字段名 | 类型 | 说明 |
|---|---|---|
target1 | string | 填。第一个目标网站的域名,不要 https:// 和 www. |
target2 | string | 填。第二个目标网站的域名,不要 https:// 和 www. |
location_name | string | 地区名。未提供 location_code 时填。location_name 与 location_code 二选一。可通过 /v3/dataforseo_labs/locations_and_languages 获取可用地区,例如 United Kingdom |
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 |
intersections | boolean | 可选。是否返回两个域名同时出现在同一 SERP 的。默认 true。设为 true 时,返回 target1 和 target2 同时命中的,并在结果中两个域名对应的 SERP素。设为 false 时,返回 target1 有排名但 target2 没有排名的返回第一个域名的 SERP素。注意:当交集数量 1000 万时,接口不会返回结果。 |
item_types | array | 可选。指定返回的搜索结果类型。支持筛选 SERP 中的结果类型。默认返回接口支持的数据类型 |
include_serp_info | boolean | 可选。是否返回每个的 serp_info 数据搜索结果数、查询链接、SERP 特征等。默认 false |
include_clickstream_data | boolean | 可选。是否返回基于点击流的指标。设为 true 后,响应将 clickstream_keyword_info、clickstream_etv、keyword_info_normalized_with_clickstream、keyword_info_normalized_with_bing。默认 false。开启后费用翻倍 |
limit | integer | 可选。返回数量上限。默认 100,最大 1000 |
offset | integer | 可选。结果偏移量,作用于返回的 items 数组。默认 0。例如设置为 10 时,将跳过前 10 条结果 |
filters | array | 可选。结果过滤条件数组,最多支持 8 个过滤条件,可使用 and、or 组合 |
order_by | array | 可选。结果排序规则。最多可设置 3 个排序条件,支持 asc 和 desc |
tag | string | 可选。自定义任务标识,最长 255 个字符。会原样出现在响应的 data 对象中,便于请求结果对账与追踪 |
filters 支持的操作符
regex, not_regex, <, <=, >, >=, =, <>, in, not_in, match, not_match, ilike, not_ilike, like, not_like
说明:
- 可在多个条件之间使用
and/or like/not_like/ilike/not_ilike支持%通符,匹任意长度字符串
可参考的型字段:
keyword_data.keyword_info.search_volumekeyword_data.keyword_info.cpckeyword_data.keyword_properties.keyword_difficultyfirst_domain_serp_element.etvsecond_domain_serp_element.rank_absolute
order_by 说明
排序字段可使用与 filters 类似的字段路径,例如:
keyword_data.keyword_info.search_volume,descfirst_domain_serp_element.etv,desc
默认排序规则为平台预设排序。单次请求最多设置 3 条排序规则。
请求示例
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,
"filters": [
["first_domain_serp_element.etv", ">", 0]
],
"limit": 3
}
]'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"
}
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, json=data, headers=headers)
print(response.json)TypeScript
typescript
import axios from "axios";
// 请求体为 JSON 数组
const postArray = [
{
target1: "cnn.com",
target2: "forbes.com",
location_name: "United States",
language_name: "English",
filters: [
["first_domain_serp_element.etv", ">", 0]
],
limit: 3
}
];
axios({
method: "post",
url: "https://api.seermartech.cn/v3/dataforseo_labs/google/domain_intersection/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 对象,顶层 tasks 数组。
顶层响应字段
| 字段名 | 类型 | 说明 |
|---|---|---|
version | string | 当前 API 版本 |
status_code | integer | 通用状态码 |
status_message | string | 通用状态信息 |
time | string | 执行耗时,单位秒 |
cost | float | 本次请求总费用,单位 USD |
tasks_count | integer | tasks 数组中的任务数量 |
tasks_error | integer | 发生错误的任务数量 |
tasks | array | 任务结果数组 |
tasks 数组字段
| 字段名 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一标识,UUID 格式 |
status_code | integer | 任务状态码 |
status_message | string | 任务状态信息 |
time | string | 任务执行耗时 |
cost | float | 任务费用,单位 USD |
result_count | integer | result 数组数量 |
path | array | URL 路径 |
data | object | 与请求体中提交参数一致 |
result | array | 获取结果数组 |
result 数组字段
| 字段名 | 类型 | 说明 |
|---|---|---|
se_type | string | 搜索引擎类型 |
target1 | string | 第一个目标域名 |
target2 | string | 第二个目标域名 |
location_code | integer | 地区编码 |
language_code | string | 语言编码 |
total_count | integer | 平台数据库中符合条件的总结果数 |
items_count | integer | 当前返回的 items 数量 |
items | array | 及 SERP 数据 |
items 字段说明
每个 items素代表一个交集,以及两个域名在该下的 SERP 表现。
keyword_data
| 字段名 | 类型 | 说明 |
|---|---|---|
se_type | string | 搜索引擎类型 |
keyword | string | 返回的 |
location_code | integer | 地区编码 |
language_code | string | 语言编码 |
keyword_info | object | 基础指标 |
clickstream_keyword_info | object / null | 点击流指标在 include_clickstream_data=true 时返回 |
keyword_properties | object | 附加属性 |
serp_info | object / null | SERP 信息在 include_serp_info=true 时返回 |
avg_backlinks_info | object | 该 Top10 自然结果的平均外链指标 |
search_intent_info | object | 搜索意图信息 |
keyword_info_normalized_with_bing | object / null | 使用 Bing 数据归一化后的搜索量 |
keyword_info_normalized_with_clickstream | object / null | 使用点击流数据归一化后的搜索量 |
keyword_info
| 字段名 | 类型 | 说明 |
|---|---|---|
last_updated_time | string | 数据更新时间,UTC |
competition | float | 竞争度,范围 0 到 1 |
competition_level | string | 付费搜索竞争级别:LOW、MEDIUM、HIGH,未知时为 null |
cpc | float | 平均点击成本,单位 USD |
search_volume | integer | 平均月搜索量 |
low_top_of_page_bid | float | 首页顶部广告低位出价参考 |
high_top_of_page_bid | float | 首页顶部广告高位出价参考 |
categories | array | 产品/服务分类 |
monthly_searches | array | 过去 12 个月的月度搜索量 |
search_volume_trend | object | 搜索量趋势变化 |
search_volume_trend
| 字段名 | 类型 | 说明 |
|---|---|---|
monthly | integer | 相比上月的变化百分比 |
quarterly | integer | 相比上季度的变化百分比 |
yearly | integer | 相比上年的变化百分比 |
clickstream_keyword_info
当 include_clickstream_data=true 返回。
| 字段名 | 类型 | 说明 |
|---|---|---|
search_volume | integer | 基于点击流的月均搜索量 |
last_updated_time | string | 点击流数据更新时间 |
gender_distribution | object | 按性别分布的点击流估算数据 |
age_distribution | object | 按年龄分布的点击流估算数据 |
monthly_searches | array | 月度点击流搜索量 |
keyword_properties
| 字段名 | 类型 | 说明 |
|---|---|---|
core_keyword | string / null | 同义词聚类后的核心 |
synonym_clustering_algorithm | string / null | 同义词识别算法:keyword_metrics 或 text_processing |
keyword_difficulty | integer | 难度,范围 0-100 |
detected_language | string / null | 系统识别到的语言 |
is_another_language | boolean | 识别语言是否与请求设置语言不同 |
serp_info
| 字段名 | 类型 | 说明 |
|---|---|---|
check_url | string | 搜索引擎结果直达链接,可用于核验结果 |
serp_item_types | array | SERP 中出现的结果类型 |
se_results_count | string | 该的搜索结果数量 |
last_updated_time | string | 最近一次 SERP 数据更新时间 |
previous_updated_time | string | 上一次 SERP 数据更新时间 |
serp_item_types 可能的值:
answer_box, app, carousel, multi_carousel, featured_snippet, google_flights, google_reviews, third_party_reviews, google_posts, images, jobs, knowledge_graph, local_pack, hotels_pack, map, organic, paid, people_also_ask, related_searches, people_also_search, shopping, top_stories, twitter, video, events, mention_carousel, recipes, top_sights, scholarly_articles, popular_products, podcasts, questions_and_answers, find_results_on, stocks_box, visual_stories, commercial_units, local_services, google_hotels, math_solver, currency_box, product_considerations, found_on_web, short_videos, refine_products, explore_brands, perspectives, discussions_and_forums, compare_sites, courses, ai_overview
注意:本接口返回域名对应的 SERP素支持
organic、paid、featured_snippet、local_pack。
avg_backlinks_info
| 字段名 | 类型 | 说明 |
|---|---|---|
backlinks | float | 平均外链数 |
dofollow | float | 平均 dofollow 外链数 |
referring_pages | float | 平均引荐页面数 |
referring_domains | float | 平均引荐域名数 |
referring_main_domains | float | 平均主域名数 |
rank | float | 平均 rank 值 |
main_domain_rank | float | 平均主域 rank 值 |
last_updated_time | string | 外链数据更新时间 |
search_intent_info
| 字段名 | 类型 | 说明 |
|---|---|---|
main_intent | string | 主搜索意图:informational、navigational、commercial、transactional |
foreign_intent | array | 助搜索意图 |
last_updated_time | string | 搜索意图数据更新时间 |
keyword_info_normalized_with_bing
| 字段名 | 类型 | 说明 |
|---|---|---|
last_updated_time | string | 数据更新时间 |
search_volume | integer | 当前搜索量 |
is_normalized | boolean | 是否已使用 Bing 数据归一化 |
monthly_searches | array | 月度搜索量数据 |
keyword_info_normalized_with_clickstream
| 字段名 | 类型 | 说明 |
|---|---|---|
last_updated_time | string | 数据更新时间 |
search_volume | integer | 当前搜索量 |
is_normalized | boolean | 是否已使用点击流数据归一化 |
monthly_searches | array | 月度搜索量数据 |
域名 SERP素字段
first_domain_serp_element 与 second_domain_serp_element 分别表示两个目标域名在当前下命中的 SERP素。
二支持以下结果类型:
organicpaidlocal_packfeatured_snippet
通用字段通常:
| 字段名 | 类型 | 说明 |
|---|---|---|
se_type | string | 搜索引擎类型 |
type | string | SERP素类型 |
rank_group | integer | 同类型的排名 |
rank_absolute | integer | SERP 中的绝对排名 |
position | string | 显示位置,常见为 left 或 right |
xpath | string | 素 XPath |
domain | string | 结果中的域名或子域名 |
title | string | 标题 |
url | string | 结果 URL |
main_domain | string | 主域名 |
relative_url | string | 不含协议和域名的相对路径 |
etv | float | 预估自然流量 |
estimated_paid_traffic_cost | float | 等量流量换算为广告投放的预估成本,单位 USD |
clickstream_etv | integer | 基于点击流的预估流量在 include_clickstream_data=true 时返回 |
rank_changes | object/array | 与上次抓取相比的排名变化 |
backlinks_info | object / null | 排名页面的外链信息 |
rank_info | object | 页面与主域 rank 信息 |
organic素常见附加字段
| 字段名 | 类型 | 说明 |
|---|---|---|
breadcrumb | string | 面屑路径 |
is_image | boolean | 是否图片 |
is_video | boolean | 是否视频 |
is_featured_snippet | boolean | 是否为精选摘要结果 |
is_malicious | boolean | 是否被标记为恶意结果 |
description | string | 结果描述 |
pre_snippet | string | 描述前附加信息 |
extended_snippet | string | 描述后附加信息 |
amp_version | boolean | 是否有 AMP 版本 |
rating | object / null | 评分信息 |
highlighted | array | 描述中加粗的 |
links | array / null | sitelinks |
about_this_result | object / null | “此结果” 面板信息 |
paid素常见附加字段
| 字段名 | 类型 | 说明 |
|---|---|---|
description | string | 广告描述 |
breadcrumb | string | 广告面屑 |
highlighted | array | 加粗词 |
extra | array | 额外信息 |
ad_aclk | string | 广告标识 |
description_rows | array / null | 扩展描述 |
links | array / null | 广告附加链接 |
local_pack素常见附加字段
| 字段名 | 类型 | 说明 |
|---|---|---|
description | string | 本地结果描述 |
phone | string | 电话号码 |
is_paid | boolean | 是否为广告 |
rating | object / array | 评分信息 |
featured_snippet素常见附加字段
| 字段名 | 类型 | 说明 |
|---|---|---|
featured_title | string | 精选摘要来源页标题 |
description | string | 摘要描述 |
table | object / null | 表格型摘要 |
table_header | array | 表头 |
table_content | array | 表格 |
rank_changes
| 字段名 | 类型 | 说明 |
|---|---|---|
previous_rank_absolute | integer / null | 上次抓取时的绝对排名 |
is_new | boolean | 是否为新出现结果 |
is_up | boolean | 排名是否上升 |
is_down | boolean | 排名是否下降 |
backlinks_info
| 字段名 | 类型 | 说明 |
|---|---|---|
referring_domains | integer | 引荐域名数 |
referring_main_domains | integer | 引荐主域名数 |
referring_pages | integer | 引荐页面数 |
dofollow | integer | dofollow 链接数 |
backlinks | integer | 外链总数 |
time_update | string | 外链数据更新时间 |
rank_info
| 字段名 | 类型 | 说明 |
|---|---|---|
page_rank | integer | 页面 rank |
main_domain_rank | integer | 主域 rank |
响应示例
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": [
{
"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",
"keyword_data": {
"se_type": "google",
"keyword": "cool math games with math",
"location_code": 2840,
"language_code": "en",
"keyword_info": {
"se_type": "google",
"last_updated_time": "2024-08-09 16:04:56 +00:00",
"competition": 0.01,
"competition_level": "LOW",
"cpc": 2.23,
"search_volume": 5000000,
"search_volume_trend": {
"monthly": 22,
"quarterly": 22,
"yearly": 0
}
},
"clickstream_keyword_info": null,
"keyword_properties": {
"se_type": "google",
"core_keyword": "cool cool math games",
"synonym_clustering_algorithm": "text_processing",
"keyword_difficulty": 65,
"detected_language": "en",
"is_another_language": false
},
"serp_info": {
"se_type": "google",
"check_url": "https://www.google.com/search?q=cool%20math%20games%20with%20math&num=100&hl=en&gl=US&gws_rd=cr&ie=UTF-8&oe=UTF-8&glp=1&uule=w+CAIQIFISCQs2MuSEtepUEUK33kOSuTsc",
"se_results_count": 69500000,
"last_updated_time": "2024-08-04 11:24:39 +00:00",
"previous_updated_time": "2024-06-22 20:54:00 +00:00"
}
},
"first_domain_serp_element": {
"se_type": "google",
"type": "organic",
"rank_group": 64,
"rank_absolute": 67,
"position": "left",
"domain": "mom.com",
"title": "Cool Math Games for Kids",
"url": "https://mom.com/kids/cool-math-games-for-kids",
"main_domain": "mom.com",
"relative_url": "/kids/cool-math-games-for-kids",
"etv": 10500,
"estimated_paid_traffic_cost": 23415,
"rank_changes": {
"previous_rank_absolute": null,
"is_new": true,
"is_up": false,
"is_down": false
}
},
"second_domain_serp_element": {
"se_type": "google",
"type": "organic",
"rank_group": 10,
"rank_absolute": 12,
"position": "left",
"domain": "www.quora.com",
"title": "What are some cool math games?",
"url": "https://www.quora.com/What-are-some-cool-math-games",
"main_domain": "quora.com",
"relative_url": "/What-are-some-cool-math-games",
"etv": 56500,
"estimated_paid_traffic_cost": 125995,
"rank_changes": {
"previous_rank_absolute": null,
"is_new": true,
"is_up": false,
"is_down": false
}
}
}
]
}
]
}状态码与错误处理
- 顶层
status_code表示本次请求整体状态 tasks[].status_code表示单个任务执行状态- 建议同时检查:
- HTTP 状态码
- 顶层
status_code - 任务级
tasks[].status_code
当出现异常时,请根据 /v3/appendix/errors 对状态码进行处理,并在调用方实现重试、告警、参数校验和结果底逻辑。
使用建议
做交集分析时优使用
intersections: true适合比较两个竞争域名的覆盖。做“我有对方没有”的差异词分析时使用
intersections: false此时返回target1有排名而target2没有排名的,可用于补齐或竞争压制。需要 SERP 上下文时开启
include_serp_info可获得 SERP 特征、结果总量和核验链接,适合做策略分析。只在时开启
include_clickstream_data因为会导致费用翻倍,适合高价值项目或精细化流量评估场景。
实用场景
- 对比竞争域名重叠词库:找出两个网站同时排名的,评估竞争重合度,判断是否处于同一赛道。
- 筛选高价值交集词:结合
search_volume、cpc、keyword_difficulty过滤,优识别备商业价值且可争夺的词。 - 分析双方排名差距:对比
first_domain_serp_element.rank_absolute与second_domain_serp_element.rank_absolute,判断谁在同一下更占优势。 - 识别 SERP 版位机会:按
item_types或返回的type分析自然结果、广告、本地、精选摘要等版位,优化页面形式和投放策略。 - 评估流量成本替代价值:利用
etv与estimated_paid_traffic_cost判断当前自然流量如果改用广告获取需要多少预算, SEO 投资回报分析。