Skip to content

竞争域名(旧版)

接口说明

POST /v3/dataforseo_labs/competitors_domain/live

该接口用于获取目标域名在自然搜索与付费搜索中的竞争域名概览,并返回双方在同一 SERP 中排名的交集指标。

除竞争域名列表外,响应还会提供:

  • 竞争域名在量维度下的排名与流量指标
  • 目标域名与竞争域名覆盖的交集指标
  • 目标域名在交集上的指标
  • 竞争域名在交集上的指标

说明:该接口为旧版(Legacy)结构。本平台仍容该版本;如需使用新版结构,请参考对应新版接口文档。

请求地址

bash
POST https://api.seermartech.cn/v3/dataforseo_labs/competitors_domain/live

计费与限频

  • 按请求计费
  • 参考价请以游结算为准,扣费以响应头 X-SeerMarTech-Charge-CNY 为准
  • 请求体为 UTF-8 编码的 JSON
  • POST 请求体格式为 JSON 数组:[{ ... }]
  • 最高请求频率:2000 次/分钟
  • 支持通过 limitoffsetfiltersorder_by 控制返回结果

请求参数

以下为任务对象字段说明,即 JSON 数组中每个对象可填写的参数。

字段名类型说明
targetstring。目标网站域名,不要 https://www.
location_namestring地区完整名称。未指定 location_code 时填。location_namelocation_code 二选一。可通过 /v3/dataforseo_labs/locations_and_languages 获取可用地区,例如 United Kingdom
location_codeinteger地区代码。未指定 location_name 时填。location_namelocation_code 二选一。可通过 /v3/dataforseo_labs/locations_and_languages 获取,例如 2840
language_namestring语言完整名称。未指定 language_code 时填。language_namelanguage_code 二选一。可通过 /v3/dataforseo_labs/locations_and_languages 获取,例如 English
language_codestring语言代码。未指定 language_name 时填。language_namelanguage_code 二选一。可通过 /v3/dataforseo_labs/locations_and_languages 获取,例如 en
item_typesarray可选。指定返回的搜索结果类型。若数组中非 organic 类型,结果会按数组中的第一个类型排序;且不能按未在响应中的结果类型进行排序或过滤
filtersarray可选。结果过滤条件数组,最多 8 个过滤条件。条件之间需使用逻辑运算符 and / or 连接。支持操作符:<<=>>==<>innot_in
order_byarray可选。排序规则。可使用与 filters 相同的字段路径。排序方式支持 ascdesc。单次请求最多设置 3 条排序规则
limitinteger可选。返回域名数量上限。默认 100,最大 1000
offsetinteger可选。结果偏移量。默认 0。例如设置为 10 时,将跳过前 10 条结果
max_rank_groupinteger可选。识别竞争对手时考虑的最大排名范围。默认 100。例如设置为 10,则只从 Google 前 10 名结果中提取竞争域名
exclude_top_domainsboolean可选。是否排除大型站点。默认 false。设置为 true 后,将排除如下高权重通用站点,以便获得更的竞争域名
intersecting_domainsarray可选。补已知与 target 在 SERP 中存在交集的域名,以提高结果准确性。若使用该参数,结果指标将基于 target 与这些域名出现的 SERP 计算。最多支持 20 个域名
tagstring可选。用户自定义任务标识,最长 255 字符。可用于结果回传时匹业务任务

exclude_top_domains=true 时排除的站点

  • wikipedia.org
  • pinterest.com
  • amazon.com
  • google.com
  • facebook.com
  • wordpress.com
  • medium.com
  • quora.com
  • reddit.com
  • youtube.com
  • ebay.com
  • uol.com.br
  • instagram.com
  • olx.com
  • twitter.com
  • linkedin.com
  • slideshare.net

过滤与排序说明

支持的过滤操作符

  • <
  • <=
  • >
  • >=
  • =
  • <>
  • in
  • not_in

过滤示例

下面示例表示:

  • 满足 metrics.organic.count >= 50metrics.organic.pos_1 属于 [1,2,3]
  • metrics.organic.etv >= 100
json
[
 [
 ["metrics.organic.count", ">=", 50],
 "and",
 ["metrics.organic.pos_1", "in", [1, 2, 3]]
 ],
 "or",
 ["metrics.organic.etv", ">=", 100]
]

排序示例

json
[
 ["metrics.organic.etv", "desc"],
 ["intersections", "desc"]
]

注意:

  • 单次请求最多设置 3 条排序规则
  • 如果 item_types 中非 organic 类型,结果会按 item_types 数组中的第一个类型排序

请求示例

cURL

bash
curl --location --request POST "https://api.seermartech.cn/v3/dataforseo_labs/competitors_domain/live" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json" \
--data-raw '[
 {
 "target": "example.com",
 "language_name": "English",
 "location_code": 2840,
 "filters": [
 [
 ["metrics.organic.count", ">=", 50],
 "and",
 ["metrics.organic.pos_1", "in", [1, 2, 3]]
 ],
 "or",
 ["metrics.organic.etv", ">=", 100]
 ],
 "limit": 5
 }
]'

Python

python
import requests

url = "https://api.seermartech.cn/v3/dataforseo_labs/competitors_domain/live"
headers = {
 "Authorization": "Bearer smt_live_YOUR_KEY",
 "Content-Type": "application/json"
}

data = [
 {
 "target": "example.com",
 "location_name": "United States",
 "language_name": "English",
 "filters": [
 [
 ["metrics.organic.count", ">=", 50],
 "and",
 ["metrics.organic.pos_1", "in", [1, 2, 3]]
 ],
 "or",
 ["metrics.organic.etv", ">=", 100]
 ],
 "limit": 5
 }
]

response = requests.post(url, headers=headers, json=data)
print(response.json)

TypeScript

typescript
import axios from "axios";

const postData = [
 {
 target: "example.com",
 language_name: "English",
 location_code: 2840,
 filters: [
 [
 ["metrics.organic.count", ">=", 50],
 "and",
 ["metrics.organic.pos_1", "in", [1, 2, 3]]
 ],
 "or",
 ["metrics.organic.etv", ">=", 100]
 ],
 limit: 5
 }
];

axios({
 method: "post",
 url: "https://api.seermartech.cn/v3/dataforseo_labs/competitors_domain/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 数组。

顶层字段

字段名类型说明
versionstring当前 API 版本
status_codeinteger通用状态码,完整列表见 /v3/appendix/errors
status_messagestring通用状态信息
timestring执行耗时,单位秒
costfloat本次请求总成本,单位 USD
tasks_countintegertasks 数组中的任务数量
tasks_errorinteger执行出错的任务数量
tasksarray任务结果数组

tasks[] 字段

字段名类型说明
idstring任务 ID,UUID 格式
status_codeinteger任务状态码,范围通常为 10000-60000
status_messagestring任务状态说明
timestring任务执行耗时
costfloat任务成本,单位 USD
result_countintegerresult 数组数
patharrayURL 路径
dataobject回显请求参数
resultarray结果数组

result[] 字段

字段名类型说明
targetstring请求中的目标域名
location_codeinteger请求中的地区代码
language_codestring请求中的语言代码
total_countinteger数据库中与请求匹的结果总量
items_countintegeritems 数组返回条数
itemsarray竞争域名列表及指标

items[] 字段

字段名类型说明
domainstring竞争域名
avg_positioninteger域名在 SERP 中的平均排名。基于交集计算;同一域名与不同目标域名组合时,该值可能不同
sum_positioninteger域名在 SERP 中的排名总和。基于交集计算;同一域名与不同目标域名组合时,该值可能不同
intersectionsinteger交集数量
full_domain_metricsobject该域名在****维度下的指标
metricsobject该域名与目标域名交集维度下,目标域名的指标
competitor_metricsobject该域名与目标域名交集维度下,竞争域名的指标

指标对象说明

以下结构适用于:

  • full_domain_metrics
  • metrics
  • competitor_metrics

这些对象都可能以下结果类型:

  • organic
  • paid
  • local_pack
  • featured_snippet

各结果类型下的通用字段

字段名类型说明
pos_1integer排名第 1 的 SERP 数量
pos_2_3integer排名第 2-3 的 SERP 数量
pos_4_10integer排名第 4-10 的 SERP 数量
pos_11_20integer排名第 11-20 的 SERP 数量
pos_21_30integer排名第 21-30 的 SERP 数量
pos_31_40integer排名第 31-40 的 SERP 数量
pos_41_50integer排名第 41-50 的 SERP 数量
pos_51_60integer排名第 51-60 的 SERP 数量
pos_61_70integer排名第 61-70 的 SERP 数量
pos_71_80integer排名第 71-80 的 SERP 数量
pos_81_90integer排名第 81-90 的 SERP 数量
pos_91_100integer排名第 91-100 的 SERP 数量
etvfloat预估流量值。按 CTR × 搜索量计算的月度预估流量
impressions_etvfloat基于量计算的预估流量值。按 CTR × impressions 计算
countinteger含该域名的对应类型 SERP 总数
estimated_paid_traffic_costfloat预估流量成本,单位 USD
is_newinteger新增排名项数量
is_upinteger排名上升项数量
is_downinteger排名下降项数量
is_lostinteger丢失排名项数量

不同指标对象的含义

full_domain_metrics

表示返回的竞争域名在所有已排名上的量概览自然搜索、付费搜索、本地、精选摘要等维度。

metrics

表示在该竞争域名与 target 出现的集合下,目标域名的指标表现。

competitor_metrics

表示在该竞争域名与 target 出现的集合下,竞争域名的指标表现。

响应示例

json
{
 "version": "0.1.20210622",
 "status_code": 20000,
 "status_message": "Ok.",
 "time": "0.7839 sec.",
 "cost": 0.0105,
 "tasks_count": 1,
 "tasks_error": 0,
 "tasks": [
 {
 "id": "8a7b8c2e-1f2a-4e98-9c49-1234567890ab",
 "status_code": 20000,
 "status_message": "Ok.",
 "time": "0.7612 sec.",
 "cost": 0.0105,
 "result_count": 1,
 "path": [
 "v3",
 "dataforseo_labs",
 "competitors_domain",
 "live"
 ],
 "data": {
 "api": "dataforseo_labs",
 "function": "competitors_domain",
 "target": "example.com",
 "language_name": "English",
 "location_code": 2840,
 "filters": [
 [
 ["metrics.organic.count", ">=", 50],
 "and",
 ["metrics.organic.pos_1", "in", [1, 2, 3]]
 ],
 "or",
 ["metrics.organic.etv", ">=", 100]
 ],
 "limit": 5
 },
 "result": [
 {
 "target": "example.com",
 "location_code": 2840,
 "language_code": "en",
 "total_count": 5,
 "items_count": 5,
 "items": [
 {
 "domain": "competitor1.com",
 "avg_position": 7,
 "sum_position": 154,
 "intersections": 86,
 "full_domain_metrics": {
 "organic": {
 "pos_1": 12,
 "pos_2_3": 34,
 "pos_4_10": 120,
 "pos_11_20": 96,
 "pos_21_30": 71,
 "pos_31_40": 55,
 "pos_41_50": 48,
 "pos_51_60": 36,
 "pos_61_70": 29,
 "pos_71_80": 20,
 "pos_81_90": 15,
 "pos_91_100": 10,
 "etv": 1540.67,
 "impressions_etv": 1843.22,
 "count": 546,
 "estimated_paid_traffic_cost": 320.14,
 "is_new": 18,
 "is_up": 72,
 "is_down": 41,
 "is_lost": 9
 }
 },
 "metrics": {
 "organic": {
 "pos_1": 4,
 "pos_2_3": 11,
 "pos_4_10": 29,
 "pos_11_20": 18,
 "pos_21_30": 12,
 "pos_31_40": 6,
 "pos_41_50": 3,
 "pos_51_60": 2,
 "pos_61_70": 1,
 "pos_71_80": 0,
 "pos_81_90": 0,
 "pos_91_100": 0,
 "etv": 268.42,
 "impressions_etv": 301.57,
 "count": 86,
 "estimated_paid_traffic_cost": 79.31,
 "is_new": 5,
 "is_up": 19,
 "is_down": 8,
 "is_lost": 2
 }
 },
 "competitor_metrics": {
 "organic": {
 "pos_1": 6,
 "pos_2_3": 13,
 "pos_4_10": 27,
 "pos_11_20": 17,
 "pos_21_30": 11,
 "pos_31_40": 5,
 "pos_41_50": 4,
 "pos_51_60": 2,
 "pos_61_70": 1,
 "pos_71_80": 0,
 "pos_81_90": 0,
 "pos_91_100": 0,
 "etv": 295.84,
 "impressions_etv": 332.16,
 "count": 86,
 "estimated_paid_traffic_cost": 91.44,
 "is_new": 4,
 "is_up": 16,
 "is_down": 9,
 "is_lost": 3
 }
 }
 }
 ]
 }
 ]
 }
 ]
}

错误处理

  • 顶层 status_code 表示整次请求状态
  • tasks[].status_code 表示单个任务状态
  • 建议同时校验:
  • HTTP 状态码
  • 顶层 status_code
  • 任务级 tasks[].status_code

常见成功状态:

状态码含义
20000请求成功

更多错误码请参考 /v3/appendix/errors

使用建议

  1. 如果需要更高性的竞争域名,建议设置 exclude_top_domains=true
  2. 如果已知一批与目标域名经常同页出现的站点,可通过 intersecting_domains 提高识别准确性
  3. 若主要头部竞争结果,可合 max_rank_group=10 限定在前 10 名 SERP 范围
  4. 分页抓取大量竞争域名时,建议结合 limitoffset 使用
  5. 若只分析某类 SERP,可使用 item_types 限定结果类型

实用场景

  • 识别核心自然搜索竞争对手:目标站点后返回 SERP 交集最高的竞争域名,帮助快速建立竞品池与监控名单
  • 筛选高价值流量竞争域名:结合 filters 过滤 etvcountpos_1 等指标,优锁定有真实 SEO 流量价值的对手
  • 对比目标站与竞品在交集词上的强弱:同时查看 metricscompetitor_metrics,定位双方在中的排名差距
  • 排除大型平台站点干扰:启用 exclude_top_domains 后聚焦垂直领域竞争,减少百科、电商、社媒平台对分析结果的污染
  • 评估竞品自然流量替代成本:使用 estimated_paid_traffic_cost 判断竞争域名当前自然流量如果改用 PPC 获取,理论上需要多少预算

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