# 網域交集

**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>，結果陣列中的前 10 筆反向連結將被略過，並傳回後續反向連結的資料"
          },
          "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"
    }
  }
}
```
