主题
反向链接页面交集查询(实时)
POST /v3/backlinks/page_intersection/live
接口概述
/v3/backlinks/page_intersection/live 用于返回同时指向指定目标的引荐页面列表。
这个接口特别适合做外链交集分析,例如找出:哪些页面链接了竞争对手,但没有链接到你的网站。你也可以通过排除目标(exclude_targets)进一步筛选保留“链接到目标,但不链接到排除目标”的页面。
- 请求方式:
POST - 接口地址:
https://api.seermartech.cn/v3/backlinks/page_intersection/live - 请求体格式:JSON 数组
[{ ... }] - 频率限制:每分钟最多 2000 次 API 调用
- 支持能力:
- 指定返回结果数量
- 结果过滤
- 结果排序
- 计费方式:按请求计费,扣费以响应头
X-SeerMarTech-Charge-CNY为准
请求参数
顶层请求体示例
json
[
{
"targets": {
"1": "football.com",
"2": "fifa.com"
},
"exclude_targets": ["skysports.com"],
"limit": 5,
"order_by": ["1.rank,desc"],
"filters": [
["2.domain_from_rank", ">", 400],
"and",
["1.dofollow", "=", true]
]
}
]字段说明
| 字段 | 类型 | 说明 |
|---|---|---|
targets | object | 需要分析外链的目标集合,填。最多可设置 20 个域名、子域名或网页。域名/子域名请不要带 https:// 和 www.;网页使用完整绝对 URL( http:// 或 https://)。 |
exclude_targets | array | 可选。要排除的域名、子域名或网页,最多 10 个。设置后,结果返回“链接到 targets,但不链接到 exclude_targets”的引荐页面。 |
backlinks_status_type | string | 可选。指定返回和统计哪类外链。可选值:all(外链)、live(最近一次检查时仍存在的外链)、lost(已丢失外链)。默认值:live。 |
filters | array | 可选。结果过滤条件数组,最多 8 个过滤条件。多个条件之间需使用逻辑运算符 and 或 or。支持的操作符:regex、not_regex、=、<>、in、not_in、like、not_like、ilike、not_ilike、match、not_match。like 和 not_like 支持使用 % 匹任意长度字符串。可用过滤字段请参考 /v3/backlinks/filters/。 |
order_by | array | 可选。排序规则数组。可使用与 filters 相同的字段;排序方向支持 asc 和 desc,字段与方向之间用逗号分隔,如 ["1.rank,desc"]。单次请求最多支持 3 条排序规则。 |
offset | integer | 可选。结果偏移量,默认 0。例如设置为 10 时,将跳过前 10 条结果并返回后续数据。 |
limit | integer | 可选。返回的最大外链数量。默认 100,最大 1000。 |
internal_list_limit | integer | 可选。限制数组的最大数量,适用于 attributes、domain_from_platform_type 等字段。默认 10,最大 1000。 |
include_subdomains | boolean | 可选。是否将 targets 的子域名纳搜索范围。false 表示忽略子域名。默认 true。 |
include_indirect_links | boolean | 可选。是否间接链接。true 时,结果会指向某个中间页面的链接,而该中间页面会重定向到目标页或指向规范页(canonical)。默认 true。 |
exclude_internal_backlinks | boolean | 可选。是否排除来自同一主域下子域名的反向链接。true 表示排除,false 表示保留。默认 true。 |
intersection_mode | string | 可选。指定按何种方式处理多个目标的交集。可选值:all、partial。all 表示基于外链结果;partial 表示基于相交外链。默认 all。 |
rank_scale | string | 可选。指定 rank、domain_from_rank、page_from_rank 的数值刻度。可选值:one_hundred(0–100)、one_thousand(0–1000)。默认 one_thousand。 |
tag | string | 可选。自定义任务标识,最长 255 个字符。可用于将请求与响应结果对应起来;返回时会出现在响应的 data 对象中。 |
返回结构
接口返回 JSON 编码数据,顶层 tasks 数组。
顶层字段
| 字段 | 类型 | 说明 |
|---|---|---|
version | string | 当前 API 版本。 |
status_code | integer | 通用状态码。错误码列表参考 /v3/appendix/errors。建议在业务中做好异常处理。 |
status_message | string | 通用状态信息。 |
time | string | 执行耗时,单位秒。 |
cost | float | 本次请求总费用,单位 USD。扣费以该字段为准。 |
tasks_count | integer | tasks 数组中的任务数量。 |
tasks_error | integer | 返回错误的任务数量。 |
tasks | array | 任务结果数组。 |
tasks[] 字段
| 字段 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一标识,UUID 格式。 |
status_code | integer | 任务状态码,范围通常为 10000–60000。 |
status_message | string | 任务状态说明。 |
time | string | 任务执行耗时。 |
cost | float | 单个任务费用,单位 USD。 |
result_count | integer | result 数组中的数量。 |
path | array | 接口路径。 |
data | object | 与请求体中提交的参数基本一致。 |
result | array | 结果数组。 |
result[] 字段
| 字段 | 类型 | 说明 |
|---|---|---|
targets | object | 请求中的 targets。 |
total_count | integer | 与请求匹的总结果数。 |
items_count | integer | items 数组中返回的结果数。 |
items | array | 交集页面及对应外链。 |
items[] 字段
| 字段 | 类型 | 说明 |
|---|---|---|
page_intersection | object | 按 targets 中的编号返回对应目标的链接数据。 |
summary | object | 当前交集结果的汇总信息。 |
page_intersection 对象
page_intersection 中会按 targets 的编号返回对象,例如 1、2……20。
每个编号下的数据表示:同一个引荐页面对该目标的链接。
page_intersection.{n}[] 字段
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 素类型,固定为 backlinks_page_intersection。 |
domain_from | string | 引荐目标域名或页面的来源域名。 |
url_from | string | 发现外链的来源页面 URL。 |
url_from_https | boolean | 来源 URL 是否为 HTTPS。 |
domain_to | string | 外链指向的目标域名。 |
url_to | string | 外链指向的目标 URL。 |
url_to_https | boolean | 目标 URL 是否为 HTTPS。 |
tld_from | string | 来源 URL 的顶级域名。 |
is_new | boolean | 是否为新发现的外链。true 表示该外链是在爬虫最近一次访问该页面时发现的。 |
is_lost | boolean | 是否已丢失。true 表示外链或整个页面已被移除。 |
backlink_spam_score | integer | 外链垃圾分值。 |
rank | integer | 外链权重值。 |
page_from_rank | integer | 来源页面权重值。 |
domain_from_rank | integer | 来源域名权重值。 |
domain_from_platform_type | array | 来源域名的平台类型。可能值:cms、blogs、ecommerce、message-boards、wikis、news、organization。 |
domain_from_is_ip | boolean | 来源是否为 IP 地址而非域名。 |
domain_from_ip | string | 来源域名对应的 IP 地址。 |
domain_from_country | string | 来源域名所在国家/地区,ISO 国家代码。 |
page_from_external_links | integer | 来源页面上的外部链接数量。 |
page_from_internal_links | integer | 来源页面上的链接数量。 |
page_from_size | integer | 来源页面大小,单位字节。 |
page_from_encoding | string | 来源页面编码,例如 utf-8。 |
page_from_language | string | 来源页面语言,ISO 639-1 格式,例如 en。 |
page_from_title | string | 来源页面标题。 |
page_from_status_code | integer | 来源页面返回的 HTTP 状态码。 |
first_seen | string | 首次发现该外链的时间,UTC 格式:yyyy-mm-dd hh-mm-ss +00:00。 |
prev_seen | string | 最近一次之前,爬虫访问该外链的时间。 |
last_seen | string | 最近一次爬虫访问该外链的时间。 |
item_type | string | 链接类型。可选值:anchor、image、link、meta、canonical、alternate、redirect。 |
attributes | array | 链接属性,例如 nofollow。 |
dofollow | boolean | 是否为 dofollow。false 表示 nofollow。 |
original | boolean | 爬虫首次访问来源页面时,该外链是否已存在。 |
alt | string | 图片链接的替代文本;当链接类型不是图片时为 null。 |
anchor | string | 锚文本。 |
text_pre | string | 锚文本前的文本片段。 |
text_post | string | 锚文本后的文本片段。 |
semantic_location | string | 外链所在 HTML 语义区域,例如 article、section、summary。 |
links_count | integer | 来源页面上相同外链的数量。 |
group_count | integer | 来自该域名的外链总数。 |
is_broken | boolean | 是否为失效链接。true 表示目标页返回 4xx 或 5xx。 |
url_to_status_code | integer | 目标页面的 HTTP 状态码。如果为 null,表示爬虫尚未访问目标页。 |
url_to_spam_score | integer | 目标页面垃圾分值;若为 null,表示尚未访问。 |
url_to_redirect_target | string | 若目标 URL 发生跳转,则为最终跳转目标。 |
is_indirect_link | boolean | 是否为间接链接。true 表示链接指向中间页面,再通过重定向或 canonical 指向 url_to。 |
indirect_link_path | array | 间接链接路径,即最终到达 url_to 的 URL 序列。 |
indirect_link_path[] 字段
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 间接链接类型,可选值:redirect、canonical。 |
status_code | integer | 该 URL 的 HTTP 状态码。 |
url | string | 间接链路中的 URL。 |
summary 字段
| 字段 | 类型 | 说明 |
|---|---|---|
intersections_count | integer | 交集数量。 |
请求示例
cURL
bash
curl --location --request POST "https://api.seermartech.cn/v3/backlinks/page_intersection/live" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json" \
--data-raw '[
{
"targets": {
"1": "football.com",
"2": "fifa.com"
},
"exclude_targets": ["skysports.com"],
"limit": 5,
"order_by": ["1.rank,desc"],
"filters": [
["2.domain_from_rank", ">", 400],
"and",
["1.dofollow", "=", true]
]
}
]'Python
python
import requests
url = "https://api.seermartech.cn/v3/backlinks/page_intersection/live"
headers = {
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json"
}
data = [
{
"targets": {
"1": "football.com",
"2": "fifa.com"
},
"exclude_targets": ["skysports.com"],
"limit": 5,
"order_by": ["1.rank,desc"],
"filters": [
["2.domain_from_rank", ">", 400],
"and",
["1.dofollow", "=", True]
]
}
]
response = requests.post(url, headers=headers, json=data)
print(response.json)TypeScript
typescript
import axios from "axios";
const postData = [
{
targets: {
"1": "football.com",
"2": "fifa.com"
},
exclude_targets: ["skysports.com"],
limit: 5,
order_by: ["1.rank,desc"],
filters: [
["2.domain_from_rank", ">", 400],
"and",
["1.dofollow", "=", true]
]
}
];
axios({
method: "post",
url: "https://api.seermartech.cn/v3/backlinks/page_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
{
"version": "0.1.20221214",
"status_code": 20000,
"status_message": "Ok.",
"time": "14.9959 sec.",
"cost": 0.02015,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"data": {
"api": "backlinks",
"function": "page_intersection",
"targets": {
"1": "football.com",
"2": "fifa.com"
},
"exclude_targets": ["skysports.com"],
"limit": 5,
"order_by": ["1.rank,desc"],
"filters": [
["2.domain_from_rank", ">", 400],
"and",
["1.dofollow", "=", true]
]
},
"result": [
{
"page_intersection": {
"1": [
{
"domain_from_is_ip": false,
"domain_from_ip": "104.18.165.219",
"domain_from_country": null,
"page_from_external_links": 11,
"page_from_internal_links": 55,
"page_from_size": 33621,
"page_from_encoding": "utf-8",
"page_from_language": null,
"page_from_title": "Lucas Severino",
"page_from_status_code": 200,
"first_seen": "2023-01-16 06:04:13 +00:00",
"prev_seen": "2023-01-16 06:04:13 +00:00",
"last_seen": "2023-03-20 17:18:13 +00:00",
"item_type": "anchor",
"attributes": null,
"dofollow": true,
"original": false,
"alt": null,
"anchor": null,
"text_pre": null,
"text_post": null,
"semantic_location": null,
"links_count": 1,
"group_count": 0,
"is_broken": false,
"url_to_status_code": 301,
"url_to_spam_score": 0,
"url_to_redirect_target": "https://www.football.com/en-gb/the-forgotten-18m-forward-now-making-a-splash-in-japan/",
"is_indirect_link": true,
"indirect_link_path": []
}
],
"2": [
{
"domain_from_is_ip": false,
"domain_from_ip": "104.18.165.219",
"domain_from_country": null,
"page_from_external_links": 11,
"page_from_internal_links": 55,
"page_from_size": 33621,
"page_from_encoding": "utf-8",
"page_from_language": null,
"page_from_title": "Lucas Severino",
"page_from_status_code": 200,
"first_seen": "2023-01-16 06:04:13 +00:00",
"prev_seen": "2023-01-16 06:04:13 +00:00",
"last_seen": "2023-03-20 17:18:13 +00:00",
"item_type": "anchor",
"attributes": null,
"dofollow": true,
"original": false,
"alt": null,
"anchor": "http://www.fifa.com/tournaments/archive/mensolympic/sydney2000/teams/team=1889256/index.html",
"text_pre": null,
"text_post": null,
"semantic_location": null,
"links_count": 1,
"group_count": 0,
"is_broken": false,
"url_to_status_code": 302,
"url_to_spam_score": 0,
"url_to_redirect_target": "https://www.fifa.com/tournaments/mens/mensolympic/sydney2000/match-center",
"is_indirect_link": false,
"indirect_link_path": null
}
]
},
"summary": {
"intersections_count": 2
}
}
]
}
]
}状态码说明
- 顶层
status_code表示整次请求的处理状态 tasks[].status_code表示单个任务的处理状态- 完整错误码与信息说明请参考
/v3/appendix/errors
建议至少处理以下:
| 场景 | 建议处理方式 |
|---|---|
status_code != 20000 | 视为请求失败,记录错误并重试或告警 |
tasks_error > 0 | 遍历 tasks,定位失败任务并单独处理 |
result 为空 | 检查过滤条件、目标格式、分页参数是否过于严格 |
url_to_status_code 为 null | 表示目标页尚未被抓取,不宜直接判定为有效或失效 |
使用说明与注意事项
targets中的键名是字符串编号,如"1"、"2"。- 如果目标是域名或子域名,不要带协议头和
www.。 - 如果目标是页面 URL,传完整绝对地址。
- 使用
exclude_targets时,可快速构造“竞争对手有、自己没有”的外链机会分析。 intersection_mode=partial更适合只看真正交集页面;all更适合做并集基础上的综合分析。- 如果你需要统一量纲的权重值,可显式指定
rank_scale,不同接口或任务之间刻度不一致。
实用场景
- 挖掘竞争对手外链机会:传多个竞品为
targets,并将自己站点放exclude_targets,找出“竞品有而我没有”的可争取引荐页面。 - 筛选高质量外链源:结合
domain_from_rank、dofollow、backlink_spam_score过滤条件,定位更值得联系的高价值来源页面。 - 分析行业资源页覆盖:查看多个行业站点被哪些目录页、资源页或媒体页引用,用于制定外联拓展名单。
- 排查失效或间接外链风险:通过
is_broken、is_indirect_link、url_to_status_code识别跳转链路和失效链接,优化链接落地页承接。 - 监控品牌与竞品被提及页面重叠度:比较品牌站与竞品站的引荐页面,评估品牌在行业网络中的覆盖广度。