# 反向链接历史

**API:** Data API

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

**Tags:** DataForSEO

单个 `target` 在指定日期范围内每一天的反向链接概况，包含 `date_from`、`date_to`，每个时间点一项。若只需要当前概况，请使用 `post_dataforseo_backlinks_summary_live`。若需要更轻量的时间序列，`post_dataforseo_backlinks_timeseries_summary_live` 每个时间点报告的指标更少。该端点不接受 limit 参数，唯一的调节手段就是减少调用次数。

### 计费参考

- 计量方式：按上报的响应成本计量。
- 参考请求估算：0.0271 美元。
- 参考客户倍率：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": {
          "target": {
            "type": "string",
            "description": "<em>域名</em><br><strong>必填字段</strong><br>域名不应包含 <code>https://</code> 和 <code>www.</code>"
          },
          "date_from": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>时间范围的开始日期</em><br>可选字段<br>最小值 <code>2019-01-01</code><br>如果未指定此字段，将默认使用最小值<br>日期格式：<code>\"yyyy-mm-dd\"</code><br>示例：<br><code>\"2019-01-15\"</code>"
          },
          "date_to": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>时间范围的结束日期</em><br>可选字段<br>如果未指定此字段，将默认使用今天的日期<br>日期格式：<code>\"yyyy-mm-dd\"</code><br>示例：<br><code>\"2019-01-15\"</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": [
          {
            "target": "cnn.com",
            "date_from": "2020-01-01",
            "date_to": "2021-01-01"
          }
        ]
      }
    ]
  },
  "example": [
    {
      "target": "cnn.com",
      "date_from": "2020-01-01",
      "date_to": "2021-01-01"
    }
  ]
}
```

## Responses

### 200 — 操作成功

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

**application/json**

Schema: object | null

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

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

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

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

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

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

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

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

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

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

**application/json**

Schema:

```json
{}
```

## Schema definitions

### Response36Afe1097B20_BacklinksHistoryLiveItem

`#/components/schemas/Response36Afe1097B20_BacklinksHistoryLiveItem`

```json
{
  "type": "object",
  "properties": {
    "type": {
      "type": [
        "string",
        "null"
      ],
      "description": "元素类型"
    },
    "date": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>目标数据的存储日期和时间</em><br>采用 UTC 格式：\"yyyy-mm-dd hh-mm-ss +00:00\"<br>示例：<br><code>2019-11-15 12:57:46 +00:00</code>"
    },
    "rank": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>指定 <code>date</code> 的域名排名</em><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"
    },
    "new_backlinks": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em><code>target</code> 的新增反向链接数量</em><br>数据基于与上一周期的对比提供<br><strong>注意：</strong>此数据自 2021 年 5 月起可用；<br>如果 POST 请求中指定的日期范围早于 2021 年 5 月，该字段将等于 <code>0</code>",
      "format": "int64"
    },
    "lost_backlinks": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em><code>target</code> 的丢失反向链接数量</em><br>数据基于与上一周期的对比提供<br><strong>注意：</strong>此数据自 2021 年 5 月起可用；<br>如果 POST 请求中指定的日期范围早于 2021 年 5 月，该字段将等于 <code>0</code>",
      "format": "int64"
    },
    "new_referring_domains": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em><code>target</code> 的新增引用域名数量</em><br>数据基于与上一周期的对比提供<br><strong>注意：</strong>此数据自 2021 年 5 月起可用；<br>如果 POST 请求中指定的日期范围早于 2021 年 5 月，该字段将等于 <code>0</code>",
      "format": "int64"
    },
    "lost_referring_domains": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em><code>target</code> 的丢失引用域名数量</em><br>数据基于与上一周期的对比提供<br><strong>注意：</strong>此数据自 2021 年 5 月起可用；<br>如果 POST 请求中指定的日期范围早于 2021 年 5 月，该字段将等于 <code>0</code>",
      "format": "int64"
    },
    "crawled_pages": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em><code>target</code> 的已抓取页面数量</em>"
    },
    "info": {
      "type": [
        "object",
        "null"
      ],
      "oneOf": [
        {
          "$ref": "#/components/schemas/Response36Afe1097B20_TargetInfo"
        }
      ],
      "description": "<em>有关 <code>target</code> 的信息</em>"
    },
    "internal_links_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>内部链接数量</em><br>按指定 <code>target</code> 各页面上的内部链接总和计算",
      "format": "int64"
    },
    "external_links_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>页面上的外部链接数量</em><br>按指定 <code>target</code> 各页面上的外部链接总和计算",
      "format": "int64"
    },
    "broken_backlinks": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>失效反向链接数量</em><br>指向 <code>target</code> 的失效反向链接数量",
      "format": "int64"
    },
    "broken_pages": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>失效页面数量</em><br>接收反向链接但响应 4xx 或 5xx 状态码的页面数量"
    },
    "referring_domains": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>引用域名数量</em><br>此指标中的引用域名包含被单独计为域名的子域名",
      "format": "int64"
    },
    "referring_domains_nofollow": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>向 <code>target</code> 指向至少一个 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><br>指向该页面的 IP 地址数量",
      "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"
        ],
        "format": "int64"
      },
      "description": "<em>引用链接的顶级域名</em><br>包含顶级域名以及每个顶级域名的引用链接数量"
    },
    "referring_links_types": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": [
          "integer",
          "null"
        ],
        "format": "int64"
      },
      "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"
        ],
        "format": "int64"
      },
      "description": "<em>引用链接的链接属性</em><br>表示引用链接的链接属性以及每种属性的链接数量"
    },
    "referring_links_platform_types": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": [
          "integer",
          "null"
        ],
        "format": "int64"
      },
      "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"
        ],
        "format": "int64"
      },
      "description": "<em>引用链接的语义位置</em><br>表示引用链接在 HTML 中所处的语义元素，以及每个语义位置的链接数量<br>完整的语义元素列表见<a href=\"https://www.w3schools.com/html/html5_semantic_elements.asp\" target=\"_blank\" rel=\"noopener noreferrer\">此处</a><br>示例：<br><code>article</code>、<code>section</code>、<code>summary</code>"
    },
    "referring_links_countries": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": [
          "integer",
          "null"
        ],
        "format": "int64"
      },
      "description": "<em>引用链接的 ISO 国家代码</em><br>表示引用链接所在域名的 ISO 国家代码以及每个国家的链接数量"
    }
  }
}
```

### Response36Afe1097B20_BacklinksHistoryLiveResponseInfo

`#/components/schemas/Response36Afe1097B20_BacklinksHistoryLiveResponseInfo`

```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_BacklinksHistoryLiveTaskInfo"
              }
            ]
          },
          "description": "<em>任务数组</em>"
        }
      }
    }
  ]
}
```

### Response36Afe1097B20_BacklinksHistoryLiveResultInfo

`#/components/schemas/Response36Afe1097B20_BacklinksHistoryLiveResultInfo`

```json
{
  "type": "object",
  "properties": {
    "target": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>POST 数组中的 <code>target</code></em>"
    },
    "date_from": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>时间范围的开始日期</em><br>采用 UTC 格式：“yyyy-mm-dd”<br>示例：<br><code>2019-01-01</code>"
    },
    "date_to": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>时间范围的结束日期</em><br>采用 UTC 格式：<code>\"yyyy-mm-dd\"</code><br>示例：<br><code>\"2019-01-15\"</code>"
    },
    "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_BacklinksHistoryLiveItem"
          }
        ]
      },
      "description": "<em>包含指定域名的历史反向链接数据</em><br>数据按月提供；<br>指标按指定域名在每月第一天所拥有的反向链接进行汇总"
    }
  }
}
```

### Response36Afe1097B20_BacklinksHistoryLiveTaskInfo

`#/components/schemas/Response36Afe1097B20_BacklinksHistoryLiveTaskInfo`

```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_BacklinksHistoryLiveResultInfo"
              }
            ]
          },
          "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_TargetInfo

`#/components/schemas/Response36Afe1097B20_TargetInfo`

```json
{
  "type": "object",
  "properties": {
    "server": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>服务器</em>"
    },
    "cms": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>内容管理系统</em>"
    },
    "platform_type": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "string",
          "null"
        ]
      },
      "description": "<em>平台类型</em>"
    },
    "ip_address": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em><code>target</code> 的 IP 地址</em>"
    },
    "country": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em><code>target</code> 域名被判定所属的国家代码</em>"
    },
    "is_ip": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "<em>指示 <code>target</code> 是否为 IP</em><br>如果为 <code>true</code>，该域名、子域名或网页作为 IP 地址使用，没有域名"
    },
    "target_spam_score": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em><code>target</code> 的垃圾评分</em><br>如果 <code>target</code> 是域名/子域名，此字段表示该域名/子域名所有页面的平均垃圾评分；<br>有关该指标计算方式的更多信息，请参阅<a href=\"https://dataforseo.com/help-center/what-is-spam-score-and-how-is-it-calculated\" rel=\"noopener noreferrer\" target=\"_blank\">此帮助中心页面</a>"
    }
  }
}
```
