主题
域名交集分析(旧版)- 实时接口
接口说明
该接口用于查询两个指定域名在同一搜索结果页(SERP)中同时获得排名的。
返回结果中可:
- 交集本身
- 搜索量、竞争度、平均点击价格(CPC)、展示量等指标
- 两个域名分别在该下对应的 SERP素信息
- 预估流量(ETV)
- 预估广告流量成本
本接口支持以下结果类型:
organicpaidlocal_packfeatured_snippet
容性说明
本页说明的是旧版结构(Legacy)。虽然平台 API 已在 2022-03-19 更新了 Labs 接口的请求与响应结构,但旧版仍保持容支持。
请求信息
HTTP 方法: POST请求地址:
https://api.seermartech.cn/v3/dataforseo_labs/domain_intersection/live
计费说明
该接口按请求计费。 扣费以响应头 X-SeerMarTech-Charge-CNY 为准。
根据示例响应,单次请求参考价约为:
- 参考价约 ¥0.1632 / 次
调用限制
- 请求体为 UTF-8 编码的 JSON
- POST 请求体格式为 JSON 数组:
[{ ... }] - 最高支持 2000 次 API 调用/分钟
- 可通过
limit、offset、filters、order_by控制返回数量、分页、筛选和排序
请求参数
| 字段 | 类型 | 说明 |
|---|---|---|
target1 | string | 填。第一个目标网站的域名,不要带 https:// 和 www. |
target2 | string | 填。第二个目标网站的域名,不要带 https:// 和 www. |
location_name | string | 地区完整名称。未传 location_code 时填。location_name 与 location_code 二选一 |
location_code | integer | 地区编码。未传 location_name 时填。location_name 与 location_code 二选一 |
language_name | string | 语言完整名称。未传 language_code 时填。language_name 与 language_code 二选一 |
language_code | string | 语言代码。未传 language_name 时填。language_name 与 language_code 二选一 |
intersections | boolean | 是否返回两个域名在同一 SERP 中同时出现的。默认 true |
item_types | array | 结果类型过滤。用于指定返回哪些搜索结果类型 |
include_serp_info | boolean | 是否返回每个对应的 serp_info 数据。默认 false |
limit | integer | 返回数量上限。默认 100,最大 1000 |
offset | integer | 分页偏移量。默认 0 |
filters | array | 结果过滤条件数组,最多 8 个过滤条件,可合 and / or |
order_by | array | 排序规则。最多支持 3 条排序规则 |
tag | string | 自定义任务标识,最长 255 字符,便于结果匹 |
地区与语言获取
可通过以下接口获取支持的地区和语言列表:
/v3/dataforseo_labs/locations_and_languages
intersections 参数说明
true:返回target1与target2在同一 SERP 中都出现的,并返回两个域名对应的 SERP素false:返回target1出现、但target2未出现的返回target1的 SERP素数据
注意:当交集数量 1000 万时,本接口不会返回结果。
filters 支持的运算符
支持以下运算符:
<<=>>==<>innot_inlikenot_like
like 与 not_like 支持 % 通符,可匹任意长度字符串。
order_by 说明
排序格式与 filters 中字段路径一致,支持:
asc:升序desc:降序
请求示例
cURL
bash
curl --location --request POST "https://api.seermartech.cn/v3/dataforseo_labs/domain_intersection/live" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json" \
--data-raw '[
{
"target1": "mom.me",
"target2": "quora.com",
"location_code": 2840,
"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%"]
]
}
]'Python
python
import requests
url = "https://api.seermartech.cn/v3/dataforseo_labs/domain_intersection/live"
headers = {
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json"
}
data = [
{
"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%"]
]
}
]
response = requests.post(url, headers=headers, json=data)
print(response.json)TypeScript
typescript
import axios from "axios";
const postData = [
{
target1: "mom.me",
target2: "quora.com",
location_code: 2840,
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%"]
]
}
];
axios({
method: "post",
url: "https://api.seermartech.cn/v3/dataforseo_labs/domain_intersection/live",
headers: {
Authorization: "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json"
},
data: postData
})
.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 | 请求路径 |
data | object | 回显请求参数 |
result | array | 获取结果数组 |
result[] 字段
| 字段 | 类型 | 说明 |
|---|---|---|
target1 | string | 请求中的第一个域名 |
target2 | string | 请求中的第二个域名 |
location_code | integer | 请求中的地区编码 |
language_code | string | 请求中的语言代码 |
total_count | integer | 数据库中匹请求的总结果数 |
items_count | integer | 当前返回的结果数量 |
items | array | 及 SERP 数据 |
items[] 结果字段
keyword_data
| 字段 | 类型 | 说明 |
|---|---|---|
keyword | string | 返回的 |
location_code | integer | 地区编码 |
language_code | string | 语言代码 |
keyword_info | object | 基础指标 |
impressions_info | object | 展示量指标 |
bing_keyword_info | object | 基于 Bing Ads 的数据部分地区和语言可用 |
serp_info | object / null | SERP 信息;若未启用 include_serp_info,则为 null |
keyword_info
| 字段 | 类型 | 说明 |
|---|---|---|
last_updated_time | string | 数据更新时间,UTC 格式:yyyy-mm-dd hh-mm-ss +00:00 |
competition | float | 竞争度,范围 0 到 1 |
cpc | float | 平均点击价格,单位 USD |
search_volume | integer | 平均月搜索量 |
categories | array | 产品/服务分类 |
monthly_searches | array | 过去 12 个月的月度搜索量数据 |
monthly_searches[]
| 字段 | 类型 | 说明 |
|---|---|---|
year | integer | 年份 |
month | integer | 月份 |
search_volume | integer | 该月搜索量 |
impressions_info
| 字段 | 类型 | 说明 |
|---|---|---|
last_updated_time | string | 展示数据更新时间 |
bid | integer | 最大 CPC 出价;平台使用 999 作为统一计算基准 |
match / match_type | string | 匹类型,可能为 exact、broad、phrase |
ad_position_min | float | 广告最小位置 |
ad_position_max | float | 广告最大位置 |
ad_position_average | float | 广告平均位置 |
cpc_min | float | 基于 999 出价计算的最小 CPC,不代表真实 CPC |
cpc_max | float | 基于 999 出价计算的最大 CPC,不代表真实 CPC |
cpc_average | float | 基于 999 出价计算的平均 CPC,不代表真实 CPC |
daily_impressions_min | float | 最小日展示量 |
daily_impressions_max | float | 最大日展示量 |
daily_impressions_average | float | 平均日展示量 |
daily_clicks_min | float | 最小日点击量 |
daily_clicks_max | float | 最大日点击量 |
daily_clicks_average | float | 平均日点击量 |
daily_cost_min | float | 最小日花费,单位 USD |
daily_cost_max | float | 最大日花费,单位 USD |
daily_cost_average | float | 平均日花费,单位 USD |
bing_keyword_info
| 字段 | 类型 | 说明 |
|---|---|---|
last_updated_time | string | 更新时间 |
search_volume | integer | Bing 近一个月搜索量 |
monthly_searches | array | Bing 月度搜索量 |
serp_info
| 字段 | 类型 | 说明 |
|---|---|---|
check_url | string | 搜索结果直达链接,用于人工核验 |
serp_item_types | array | 该 SERP 中出现的结果类型 |
se_results_count | string | 搜索结果总数 |
keyword_difficulty | integer | 难度,范围 0-100 |
last_updated_time | string | SERP 数据最新更新时间 |
previous_updated_time | string | 上一次 SERP 数据更新时间 |
serp_item_types 可能值
answer_boxappcarouselmulti_carouselfeatured_snippetgoogle_flightsgoogle_reviewsimagesjobsknowledge_graphlocal_packmaporganicpaidpeople_also_askrelated_searchespeople_also_searchshoppingtop_storiestwittervideoeventsmention_carouselrecipestop_sightsscholarly_articlespopular_productspodcastsquestions_and_answersfind_results_onstocks_box
注意:本接口返回
organic、paid、featured_snippet、local_pack这四类 SERP素的详细对象。
域名 SERP素字段
返回中可能:
first_domain_serp_elementsecond_domain_serp_element
二结构相同,但字段会随 type 不同而变化。
organic素字段
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 organic |
rank_group | integer | 同类型结果排名 |
rank_absolute | integer | SERP 绝对排名 |
position | string | 结果位置:left / right |
xpath | string | 素 XPath |
domain | string | SERP 中的子域名 |
title | string | 标题 |
url | string | 落地页 URL |
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 | 评分信息 |
highlighted | array | 描述中加粗的 |
links | array / null | 子链接 |
about_this_result | object | “此结果”面板信息 |
main_domain | string | 主域名 |
relative_url | string | 不含协议与域名的相对路径 |
etv | float | 预估自然流量 |
impressions_etv | float | 基于展示量估算的自然流量 |
estimated_paid_traffic_cost | float | 用广告购买同等流量的预估成本,单位 USD |
rank_changes | object | 排名变动信息 |
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 |
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 | 上次绝对排名 |
is_new | boolean | 是否为新出现结果 |
is_up | boolean | 排名是否上升 |
is_down | boolean | 排名是否下降 |
paid素字段
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 paid |
rank_group | integer | 同类型结果排名 |
rank_absolute | integer | SERP 绝对排名 |
position | string | 结果位置:left / right |
xpath | string | 素 XPath |
title | string | 标题 |
domain | string | 广告域名 |
description | string | 描述 |
breadcrumb | string | 广告面屑 |
url | string | 广告链接 |
highlighted | array | 描述中高亮词 |
extra | array | 额外信息 |
ad_aclk | string | 广告标识 |
description_rows | array / null | 扩展描述 |
links | array / null | 广告子链接 |
main_domain | string | 主域名 |
relative_url | string | 相对链接 |
etv | float | 预估自然流量 |
impressions_etv | float | 基于展示量的流量估算 |
estimated_paid_traffic_cost | float | 预估付费月流量成本,单位 USD |
rank_changes | object / array | 排名变化 |
local_pack素字段
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 local_pack |
rank_group | integer | 同类型结果排名 |
rank_absolute | integer | SERP 绝对排名 |
position | string | 结果位置:left / right |
xpath | string | 素 XPath |
title | string | 标题 |
description | string | 描述 |
domain | string | 域名 |
phone | string | 电话 |
url | string | 结果 URL |
is_paid | boolean | 是否为广告 |
rating | array | 评分信息 |
main_domain | string | 主域名 |
relative_url | string | 相对路径 |
etv | float | 预估自然流量 |
impressions_etv | float | 基于展示量的流量估算 |
estimated_paid_traffic_cost | float | 预估等价广告流量成本,单位 USD |
rank_changes | object / array | 排名变化 |
featured_snippet素字段
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 featured_snippet |
rank_group | integer | 同类型结果排名 |
rank_absolute | integer | SERP 绝对排名 |
position | string | 结果位置:left / right |
xpath | string | 素 XPath |
domain | string | 域名 |
title | string | 标题 |
featured_title | string | 精选摘要来源页标题 |
description | string | 描述 |
url | string | 结果 URL |
table | array / null | 表格结果 |
main_domain | string | 主域名 |
relative_url | string | 相对路径 |
etv | float | 预估自然流量 |
impressions_etv | float | 基于展示量的流量估算 |
estimated_paid_traffic_cost | float | 预估等价广告流量成本,单位 USD |
rank_changes | object / array | 排名变化 |
table[]
| 字段 | 类型 | 说明 |
|---|---|---|
table_header | array | 列名 |
table_content | array | 表格,每个代表一行 |
响应示例
json
{
"version": "0.1.20201204",
"status_code": 20000,
"status_message": "Ok.",
"time": "1.6172 sec.",
"cost": 0.0102,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"data": {
"api": "dataforseo_labs",
"function": "domain_intersection",
"target1": "mom.me",
"target2": "quora.com",
"language_name": "English",
"location_code": 2840,
"include_serp_info": true,
"limit": 2,
"filters": [
["first_domain_serp_element.etv", ">", 0],
"and",
["first_domain_serp_element.description", "like", "%goat%"]
]
},
"result": [
{
"keyword_data": {
"keyword": "find my phone",
"location_code": 2840,
"language_code": "en",
"keyword_info": {
"last_updated_time": "2021-01-18 14:12:40 +00:00",
"competition": 0.5,
"cpc": 0.8,
"search_volume": 1000
},
"impressions_info": {
"last_updated_time": "2021-01-18 14:12:40 +00:00",
"bid": 999,
"match_type": "exact"
},
"bing_keyword_info": {
"last_updated_time": "2021-01-18 14:12:40 +00:00",
"search_volume": null,
"monthly_searches": []
},
"serp_info": {
"check_url": "https://www.google.com/search?q=find%20my%20phone&num=100&hl=en&gl=US",
"serp_item_types": ["organic"],
"se_results_count": 14920000000,
"keyword_difficulty": 47,
"last_updated_time": "2021-03-14 12:34:40 +00:00",
"previous_updated_time": "2021-03-14 20:20:35 +00:00"
}
},
"first_domain_serp_element": {
"type": "organic",
"rank_group": 89,
"rank_absolute": 91,
"position": "left",
"domain": "animals.mom.me",
"title": "How to Feed a Goat for Weight Gain | Animals - mom.me",
"url": "https://animals.mom.me/how-to-feed-a-goat-for-weight-gain-3742927.html",
"breadcrumb": "animals.mom.me › Farm Animals",
"description": "Aug 11, 2017 - Give your goats a vitamin and mineral supplement...",
"main_domain": "mom.me",
"relative_url": "/how-to-feed-a-goat-for-weight-gain-3742927.html",
"etv": 0.020999999716877937,
"rank_changes": {
"previous_rank_absolute": 40,
"is_new": false,
"is_up": false,
"is_down": true
}
},
"second_domain_serp_element": {
"type": "organic",
"rank_group": 11,
"rank_absolute": 13,
"position": "left",
"domain": "www.quora.com",
"title": "How to naturally gain healthy weight with Nigerian foods - Quora",
"url": "https://www.quora.com/How-can-I-naturally-gain-healthy-weight-with-Nigerian-foods",
"breadcrumb": "www.quora.com › How-can-I-naturally-gain-healthy-wei...",
"description": "One can gain weight naturally as well as by taking pills...",
"main_domain": "quora.com",
"relative_url": "/How-can-I-naturally-gain-healthy-weight-with-Nigerian-foods",
"etv": 0.09099999815225601,
"rank_changes": {
"previous_rank_absolute": 40,
"is_new": false,
"is_up": false,
"is_down": true
}
}
}
]
}
]
}错误处理
请根据响应中的以下字段进行错误判断:
- 顶层
status_code - 顶层
status_message tasks[].status_codetasks[].status_message
建议在系统中实现统一的异常处理和重试机制,重点处理:
- 参数缺失或格式错误
- 地区/语言不支持
- 过滤条件语法错误 -出频率限制
- 获取结果过大或无可返回数据
错误码解释请参考 /v3/appendix/errors。
使用建议
- 域名请传主机名,不要协议头和
www. - 如需核验搜索环境与排名上下文,建议开启
include_serp_info - 当返回量较大时,结合
limit + offset分页获取 - 优使用
filters缩小结果范围,减少无效数据 - 若要分析“某站覆盖、另一站未覆盖”的差异,可设置
intersections: false
实用场景
- 挖掘竞品覆盖词:找出两个竞争站点都在同一 SERP 出现的,识别核心竞争主题与重叠流量战场。
- 筛选高价值交集词:结合
search_volume、cpc、competition、etv过滤高商业价值,和投放优级排序。 - 分析 SERP 占位差距:对比两个域名在同一下的
rank_absolute、type和rank_changes,判断谁在该主题上更排名优势。 - 发现精选摘要和本地机会:基于
featured_snippet、local_pack类型结果,识别可争取的特殊搜索位,提高自然率。 - 定位优化方向:通过
description、title、url等字段观察竞品落地页表达方式,反推标题、摘要与结构优化策略。