# 域名交集

**API:** Data API

**Endpoint:** `POST /v1/beta/dataforseo/backlinks/domain_intersection/live`

**Tags:** DataForSEO

同时链接到多个目标的域名。⚠️ 这里的 `targets` 是**按位置作为键的对象**——`{"1": "a.com", "2": "b.com"}`——而不是批量端点接受的数组。`exclude_targets` 会把站点从对比中移除。每行包含 `domain_intersection` 以及每个目标的 `summary`。用它找出链接了你的竞争对手却没有链接你的站点。页面级对应端点是 `post_dataforseo_backlinks_page_intersection_live`。

### 计费参考

- 计量方式：按上报的响应成本计量。
- 参考请求估算：0.06 美元。
- 参考客户倍率：1.0。不得对已结算的客户金额再次应用。

仅供参考的元数据，不是账户报价、保证价格或消费上限。资源额度不同于 Felo 额度。最终扣费以 Felo 计费记录为准。

## Base URL

- `https://openapi.felo.ai`

## Authentication

- `FeloBearerAuth` (http bearer, bearer format Felo API Key)
- `FeloApiKey` (apiKey in header `X-API-Key`)

## Request body

Required: **no**

### application/json

Schema:

```json
{
  "type": "array",
  "items": {
    "type": [
      "object",
      "null"
    ],
    "oneOf": [
      {
        "type": "object",
        "properties": {
          "targets": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": {
              "type": [
                "string",
                "null"
              ]
            },
            "description": "<em>要获取链接的域名、子域名或网页</em><br><strong>必填字段</strong><br>最多可设置 20 个域名、子域名或网页<br>域名或子域名不应包含 <code>https://</code> 和 <code>www.</code><br>网页应使用绝对 URL（包含 <code>http://</code> 或 <code>https://</code>）<br>示例：<br>`\"targets\": {<br>\"1\": \"http://planet.postgresql.org/\",<br>\"2\": \"http://gborg.postgresql.org/\"<br>}`"
          },
          "exclude_targets": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "<em>要排除的域名、子域名或网页</em><br>可选字段<br>最多可指定 10 个域名、子域名或网页<br>如果使用此数组，结果将包含链接到 <code>targets</code> 但未链接到 <code>exclude_targets</code> 的引荐域名<br>示例：<br>`\"exclude_targets\": [<br>\"bbc.com\",<br>\"https://www.apple.com/iphone/*\",<br>\"https://dataforseo.com/apis/*\"]`"
          },
          "filters": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": [
                "object",
                "null"
              ]
            },
            "description": "<em>结果筛选参数数组</em><br>可选字段<br><strong>可同时添加多个筛选条件（最多 8 个）</strong><br>应在条件之间设置逻辑运算符 <code>and</code>、<code>or</code><br>支持以下运算符：<br><code>regex</code>, <code>not_regex</code>, <code>=</code>, <code>&lt;&gt;</code>, <code>in</code>, <code>not_in</code>, <code>like</code>, <code>not_like</code>, <code>ilike</code>, <code>not_ilike</code>, <code>match</code>, <code>not_match</code><br>可将 <code>%</code> 运算符与 <code>like</code>、<code>not_like</code> 配合使用，匹配任意长度（含零个字符）的字符串<br>示例：<br><code>[\"1.internal_links_count\",\"&gt;\",\"1\"]</code><p><code>[[\"2.referring_pages\",\"&gt;\",\"2\"],<br>\"and\",<br>[\"1.backlinks\",\"&gt;\",\"10\"]]</code><p><code>[[\"1.first_seen\",\">\",\"2017-10-23 11:31:45 +00:00\"],<br>\"and\",<br>[[\"2.target\",\"like\",\"%dataforseo.com%\"],\"or\",[\"1.referring_domains\",\"&gt;\",\"10\"]]]</code><p>完整的可用筛选条件列表见<a href=\"/v3/backlinks/filters/?bash\" rel=\"noopener noreferrer\" target=\"_blank\">此处。</a>"
          },
          "order_by": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "<em>结果排序规则</em><br>可选字段<br>可使用与 <code>filters</code> 数组相同的值对结果排序<br>可用的排序类型：<br><code>asc</code> - 结果按升序排列<br><code>desc</code> - 结果按降序排列<br>应使用逗号设置排序类型<br>示例：<br><code>[\"backlinks,desc\"]</code><br><strong>注意，单个请求中最多可设置三条排序规则</strong><br>应使用逗号分隔多条排序规则<br>示例：<br><code>[\"backlinks,desc\",\"rank,asc\"]</code>"
          },
          "offset": {
            "type": [
              "integer",
              "null"
            ],
            "description": "<em>返回结果数组中的偏移量</em><br>可选字段<br>默认值：<code>0</code><br>如果指定 <code>10</code>，结果数组中的前十条反向链接将被跳过，并返回后续反向链接的数据"
          },
          "limit": {
            "type": [
              "integer",
              "null"
            ],
            "description": "<em>返回的结果数量上限</em><br>可选字段<br>默认值：<code>100</code><br>最大值：<code>1000</code>"
          },
          "internal_list_limit": {
            "type": [
              "integer",
              "null"
            ],
            "description": "<em>内部数组中的最大元素数</em><br>可选字段<br>可使用此字段限制以下数组中的元素数量：<br><code>referring_links_tld</code><br><code>referring_links_types</code><br><code>referring_links_attributes</code><br><code>referring_links_platform_types</code><br><code>referring_links_semantic_locations</code><p>默认值：<code>10</code><br>最大值：<code>1000</code>"
          },
          "backlinks_status_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>设置要返回和统计的反向链接</em><br>可选字段<br>可使用此字段选择将返回并用于 <code>targets</code> 汇总指标的反向链接；<br>可选值：<br><code>all</code> - 返回并统计所有反向链接；<br><code>live</code> - 返回并统计上次检查中发现的反向链接；<br><code>lost</code> - 返回并统计已丢失的反向链接；<p>默认值：<code>live</code>"
          },
          "backlinks_filters": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": [
                "object",
                "null"
              ]
            },
            "description": "<em>筛选 <code>target</code> 的反向链接</em><br>可选字段<br>可使用此字段筛选将纳入 <code>target</code> 汇总指标数据集的初始反向链接<br>可按<a href=\"/v3/backlinks/backlinks/live\">此端点</a>响应中所有可用字段筛选反向链接<br>使用此参数，可以在响应中只纳入 dofollow 反向链接，并创建灵活的数据集用于计算指标<br>示例：<br><code>\"backlinks_filters\": [[\"dofollow\", \"=\", true]]</code>"
          },
          "include_subdomains": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "<em>表示 <code>target</code> 的子域名是否包含在搜索中</em><br>可选字段<br>如果设为 <code>false</code>，将忽略子域名<br>默认值：<code>true</code>"
          },
          "include_indirect_links": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "<em>表示结果中是否包含指向 <code>targets</code> 的间接链接</em><br>可选字段<br>如果设为 <code>true</code>，结果将包含指向重定向到目标或指向规范页面的页面的间接链接数据<br>如果设为 <code>false</code>，将忽略间接链接<br>默认值：<code>true</code>"
          },
          "exclude_internal_backlinks": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "<em>表示是否排除来自 <code>target</code> 子域名的反向链接</em><br>可选字段<br>如果设为 <code>false</code>，将省略来自 <code>target</code> 子域名的反向链接，响应中不会返回同一域名；<br>默认值：<code>true</code>"
          },
          "intersection_mode": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>表示是否对反向链接取交集</em><br>可选字段<br>使用此字段可对指定域名的结果取交集或合并<br>可选值：<code>all</code>、<code>partial</code><br><code>all</code> - 结果基于所有反向链接；<br><code>partial</code> - 结果仅基于交集的反向链接；<br>默认值：<code>all</code>"
          },
          "rank_scale": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>定义用于计算和显示 <code>rank</code>、<code>domain_from_rank</code> 和 <code>page_from_rank</code> 值的刻度</em><br>可选字段<p>可使用此参数选择 rank 值以 0–100 还是 0–1000 的刻度显示<p>可选值：<br><code>one_hundred</code> — rank 值以 0–100 的刻度显示<br><code>one_thousand</code> — rank 值以 0–1000 的刻度显示<p>默认值：<code>one_thousand</code><p>有关此参数的工作方式以及排名指标的计算方式，请参阅<a href=\"https://dataforseo.com/help-center/what_is_rank_in_backlinks_api#rank_scale\">这篇帮助中心文章</a>"
          },
          "tag": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>用户自定义任务标识符</em><br>可选字段<br><em>字符数上限为 255</em><br>可使用此参数标识任务，并将其与结果对应<br>可在响应的 <code>data</code> 对象中找到指定的 <code>tag</code> 值"
          }
        },
        "example": [
          {
            "targets": {
              "1": "moz.com",
              "2": "ahrefs.com"
            },
            "include_subdomains": false,
            "exclude_targets": [
              "semrush.com"
            ],
            "limit": 5,
            "order_by": [
              "1.backlinks,desc"
            ],
            "exclude_internal_backlinks": true
          }
        ]
      }
    ]
  },
  "example": [
    {
      "targets": {
        "1": "moz.com",
        "2": "ahrefs.com"
      },
      "include_subdomains": false,
      "exclude_targets": [
        "semrush.com"
      ],
      "limit": 5,
      "order_by": [
        "1.backlinks,desc"
      ],
      "exclude_internal_backlinks": true
    }
  ]
}
```

## Responses

### 200 — 操作成功

Headers:
- `X-Request-Id` (string) — 联系 Felo 支持时需提供的请求标识符。

**application/json**

Schema: object | null

```json
{
  "type": [
    "object",
    "null"
  ],
  "oneOf": [
    {
      "$ref": "#/components/schemas/Response36Afe1097B20_BacklinksDomainIntersectionLiveResponseInfo"
    }
  ]
}
```

### 400 — 无法处理该请求。请检查请求参数。

### 401 — 需要有效的 Felo API 密钥。

### 402 — 由于未满足计费要求，请求无法继续。

### 403 — 该账户无权执行此操作。

### 429 — 已达到请求或支出限额。

### 502 — 服务无法完成该请求。

### 503 — API 或计费服务暂时不可用。

### 504 — 服务在处理请求时超时。

### default — 错误响应；上游透传响应可能采用提供方格式

**application/json**

Schema:

```json
{}
```

## Schema definitions

### Response36Afe1097B20_BacklinksDomainIntersection

`#/components/schemas/Response36Afe1097B20_BacklinksDomainIntersection`

```json
{
  "type": "object",
  "properties": {
    "type": {
      "type": [
        "string",
        "null"
      ],
      "description": "元素类型"
    },
    "target": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>链接到 POST 数组中对应目标的域名</em>"
    },
    "rank": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>从 POST 数组中的 <code>target</code> 引用的排名</em><br>表示引用域名（上方 <code>target</code>）向 POST 数组中的你的目标传递的排名；<br><code>rank</code> 基于链接数据库中节点排名的方法计算——这一原理源自最初的 Google PageRank 算法<br>有关该指标及其计算方式的更多信息，请参阅这篇<a href=\"https://dataforseo.com/help-center/what_is_rank_in_backlinks_api\" rel=\"noopener noreferrer\" target=\"_blank\">帮助中心文章</a>"
    },
    "backlinks": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>表示反向链接数量</em>",
      "format": "int64"
    },
    "first_seen": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>我们的爬虫首次发现来自该 <code>target</code> 的反向链接的日期和时间</em><br>采用 UTC 格式：“yyyy-mm-dd hh-mm-ss +00:00”<br>示例：<br><code>2019-11-15 12:57:46 +00:00</code>"
    },
    "lost_date": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>来自该 <code>target</code> 的最后一条反向链接丢失的日期和时间</em><br>表示我们的爬虫访问该页面并收到 4xx 或 5xx 状态码，或最后一条反向链接被移除的日期和时间<br>采用 UTC 格式：“yyyy-mm-dd hh-mm-ss +00:00”<br>示例：<br><code>2019-11-15 12:57:46 +00:00</code>"
    },
    "backlinks_spam_score": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>指向 <code>target</code> 的反向链接的平均垃圾评分</em><br>有关该指标计算方式的更多信息，请参阅这篇<a href=\"https://dataforseo.com/help-center/what-is-spam-score-and-how-is-it-calculated\" rel=\"noopener noreferrer\" target=\"_blank\">帮助中心页面</a>",
      "format": "int64"
    },
    "broken_backlinks": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>失效反向链接数量</em>",
      "format": "int64"
    },
    "broken_pages": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>失效页面数量</em>"
    },
    "referring_domains": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>引用域名数量</em>",
      "format": "int64"
    },
    "referring_domains_nofollow": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>向对应目标指向至少一个 nofollow 链接的域名数量</em>",
      "format": "int64"
    },
    "referring_main_domains": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>引用主域名数量</em>",
      "format": "int64"
    },
    "referring_main_domains_nofollow": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>向 <code>target</code> 指向至少一个 nofollow 链接的主域名数量</em>",
      "format": "int64"
    },
    "referring_ips": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>引用 IP 地址数量</em>",
      "format": "int64"
    },
    "referring_subnets": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>引用子网数量</em>",
      "format": "int64"
    },
    "referring_pages": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>表示指向 <code>target</code> 的页面数量</em>",
      "format": "int64"
    },
    "referring_pages_nofollow": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>向 <code>target</code> 指向至少一个 nofollow 链接的引用页面数量</em>",
      "format": "int64"
    },
    "referring_links_tld": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": [
          "integer",
          "null"
        ]
      },
      "description": "<em>引用链接的顶级域名</em><br>包含顶级域名以及每个顶级域名的引用链接数量"
    },
    "referring_links_types": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": [
          "integer",
          "null"
        ]
      },
      "description": "<em>引用链接的类型</em><br>表示引用链接的类型以及每种类型的链接数量<br>可能的值：<br><code>anchor</code>、<code>image</code>、<code>link</code>、<code>meta</code>、<code>canonical</code>、<code>alternate</code>、<code>redirect</code>"
    },
    "referring_links_attributes": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": [
          "integer",
          "null"
        ]
      },
      "description": "<em>引用链接的链接属性</em><br>表示引用链接的链接属性以及每种属性的链接数量"
    },
    "referring_links_platform_types": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": [
          "integer",
          "null"
        ]
      },
      "description": "<em>引用平台的类型</em><br>表示引用平台类型以及每个平台的链接数量<p>可能的值：<code>cms</code>、<code>blogs</code>、<code>ecommerce</code>、<code>message-boards</code>、<code>wikis</code>、<code>news</code>、<code>organization</code>"
    },
    "referring_links_semantic_locations": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": [
          "integer",
          "null"
        ]
      },
      "description": "<em>引用链接的语义位置</em><br>表示引用链接在 HTML 中所处的语义元素，以及每个语义位置的链接数量<br>完整的语义元素列表见<a href=\"https://www.w3schools.com/html/html5_semantic_elements.asp\" rel=\"noopener noreferrer\" target=\"_blank\">此处</a>"
    },
    "referring_links_countries": {
      "type": [
        "object",
        "null"
      ],
      "description": "<em>引用链接的 ISO 国家代码</em><br>表示引用链接所在域名的 ISO 国家代码以及每个国家的链接数量"
    }
  }
}
```

### Response36Afe1097B20_BacklinksDomainIntersectionLiveItem

`#/components/schemas/Response36Afe1097B20_BacklinksDomainIntersectionLiveItem`

```json
{
  "type": "object",
  "properties": {
    "domain_intersection": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": [
          "object",
          "null"
        ],
        "oneOf": [
          {
            "$ref": "#/components/schemas/Response36Afe1097B20_BacklinksDomainIntersection"
          }
        ]
      },
      "description": "<em>包含有关链接到 POST 数组中指定目标的数据</em><br>数据按域名、子域名或页面分别提供在独立对象中，对应 <code>targets</code> 对象中指定的各项"
    },
    "summary": {
      "type": [
        "object",
        "null"
      ],
      "oneOf": [
        {
          "$ref": "#/components/schemas/Response36Afe1097B20_IntersectionSummaryInfo"
        }
      ],
      "description": "<em>包含域名交集的汇总信息</em>"
    }
  }
}
```

### Response36Afe1097B20_BacklinksDomainIntersectionLiveResponseInfo

`#/components/schemas/Response36Afe1097B20_BacklinksDomainIntersectionLiveResponseInfo`

```json
{
  "type": "object",
  "allOf": [
    {
      "$ref": "#/components/schemas/Response36Afe1097B20_BaseResponseInfo"
    },
    {
      "type": "object",
      "properties": {
        "tasks": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": [
              "object",
              "null"
            ],
            "oneOf": [
              {
                "$ref": "#/components/schemas/Response36Afe1097B20_BacklinksDomainIntersectionLiveTaskInfo"
              }
            ]
          },
          "description": "<em>任务数组</em>"
        }
      }
    }
  ]
}
```

### Response36Afe1097B20_BacklinksDomainIntersectionLiveResultInfo

`#/components/schemas/Response36Afe1097B20_BacklinksDomainIntersectionLiveResultInfo`

```json
{
  "type": "object",
  "properties": {
    "targets": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": [
          "string",
          "null"
        ]
      },
      "description": "<em>POST 数组中的目标域名、子域名或网页</em>"
    },
    "total_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>与你的请求相关的结果总数</em>",
      "format": "int64"
    },
    "items_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em><code>items</code> 数组中返回的结果数</em>",
      "format": "int64"
    },
    "items": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "object",
          "null"
        ],
        "oneOf": [
          {
            "$ref": "#/components/schemas/Response36Afe1097B20_BacklinksDomainIntersectionLiveItem"
          }
        ]
      },
      "description": "<em>包含链接到 POST 数组中所有 <code>targets</code> 的域名</em>"
    }
  }
}
```

### Response36Afe1097B20_BacklinksDomainIntersectionLiveTaskInfo

`#/components/schemas/Response36Afe1097B20_BacklinksDomainIntersectionLiveTaskInfo`

```json
{
  "type": "object",
  "allOf": [
    {
      "$ref": "#/components/schemas/Response36Afe1097B20_BaseResponseTaskInfo"
    },
    {
      "type": "object",
      "properties": {
        "result": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": [
              "object",
              "null"
            ],
            "oneOf": [
              {
                "$ref": "#/components/schemas/Response36Afe1097B20_BacklinksDomainIntersectionLiveResultInfo"
              }
            ]
          },
          "description": "<em>结果数组</em>"
        }
      }
    }
  ]
}
```

### Response36Afe1097B20_BaseResponseInfo

`#/components/schemas/Response36Afe1097B20_BaseResponseInfo`

```json
{
  "properties": {
    "version": {
      "type": [
        "string",
        "null"
      ],
      "description": "API 的当前版本"
    },
    "status_code": {
      "type": [
        "integer",
        "null"
      ],
      "description": "通用状态码\n完整响应码列表见此处"
    },
    "status_message": {
      "type": [
        "string",
        "null"
      ],
      "description": "通用信息性消息\n完整的一般信息性消息列表见此处"
    },
    "time": {
      "type": [
        "string",
        "null"
      ],
      "description": "总执行时间，秒"
    },
    "cost": {
      "type": [
        "number",
        "null"
      ],
      "description": "任务总费用，美元",
      "format": "double"
    },
    "tasks_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "tasks 数组中的任务数",
      "format": "int64"
    },
    "tasks_error": {
      "type": [
        "integer",
        "null"
      ],
      "description": "tasks 数组中返回错误的任务数",
      "format": "int64"
    }
  }
}
```

### Response36Afe1097B20_BaseResponseTaskInfo

`#/components/schemas/Response36Afe1097B20_BaseResponseTaskInfo`

```json
{
  "properties": {
    "id": {
      "type": [
        "string",
        "null"
      ],
      "description": "任务标识符\n我们系统中 UUID 格式的唯一任务标识符"
    },
    "status_code": {
      "type": [
        "integer",
        "null"
      ],
      "description": "任务的状态码\n由 DataForSEO 生成，范围如下：10000-60000\n完整响应码列表见此处"
    },
    "status_message": {
      "type": [
        "string",
        "null"
      ],
      "description": "任务的信息性消息\n完整的一般信息性消息列表见此处"
    },
    "time": {
      "type": [
        "string",
        "null"
      ],
      "description": "执行时间，秒"
    },
    "cost": {
      "type": [
        "number",
        "null"
      ],
      "description": "任务总费用，美元",
      "format": "double"
    },
    "result_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "result 数组中的元素数",
      "format": "int64"
    },
    "path": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "string",
          "null"
        ]
      },
      "description": "URL 路径"
    },
    "data": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": [
          "object",
          "null"
        ]
      },
      "description": "包含你在 POST 请求中指定的相同参数"
    }
  }
}
```

### Response36Afe1097B20_IntersectionSummaryInfo

`#/components/schemas/Response36Afe1097B20_IntersectionSummaryInfo`

```json
{
  "type": "object",
  "properties": {
    "intersections_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>交叉总数</em>",
      "format": "int64"
    }
  }
}
```
