主题
页面交集(实时)
POST /v3/backlinks/page_intersection/live
本接口使用 POST 方法,路径为:
/v3/backlinks/page_intersection/live
页面交集接口用于获取指向多个指定目标的引荐页面列表。它适合发现同时链接到竞争对手、但未链接到自身网站的页面,从而挖掘潜在外链机会。
请求使用 UTF-8 编码的 JSON 格式。每个实时接口请求只能一个任务,单次请求最多提交 1 个任务。平台限流以认证说明中的 30/60/120 次/分钟规则为准,同时发送的请求数最多为 30 个。
您可以设置返回结果数量、筛选条件和排序规则。
计费说明
每次请求均会产生费用。示例响应中的任务费用为 0.02015 美,按参考汇率折算后约为 ¥0.1451 / 次。扣费以响应头 X-SeerMarTech-Charge-CNY 为准。
请求参数
请求体是 JSON 数组:
json
[
{
"targets": {
"1": "football.com",
"2": "fifa.com"
},
"exclude_targets": [
"skysports.com"
],
"backlinks_status_type": "live",
"filters": [
[
"1.domain_from_rank",
">",
400
],
"and",
[
"1.dofollow",
"=",
true
]
],
"order_by": [
"1.rank,desc"
],
"offset": 0,
"limit": 5,
"internal_list_limit": 10,
"include_subdomains": true,
"include_indirect_links": true,
"exclude_internal_backlinks": true,
"intersection_mode": "all",
"rank_scale": "one_thousand",
"tag": "competitor-gap-202503"
}
]请求字段
| 字段 | 类型 | 填 | 说明 |
|---|---|---|---|
targets | object | 是 | 要查询外链的域名、子域名或网页。最多支持 20 个目标。域名或子域名不得 https:// 和 www.;网页使用协议的绝对 URL。对象键名应使用 1 至 20。 |
exclude_targets | array | 否 | 要排除的域名、子域名或网页,最多支持 10 个。设置后返回链接到 targets、但未链接到这些排除目标的引荐页面。 |
backlinks_status_type | string | 否 | 指定返回并计聚合指标的外链状态。可选值:all(外链)、live(最近一次检查时仍存在的外链)、lost(已丢失外链)。默认值:live。 |
filters | array | 否 | 结果筛选条件。最多设置 8 个筛选条件,条件之间使用 and 或 or 连接。 |
order_by | array | 否 | 结果排序规则。最多设置 3 条。格式为 字段,排序方向,排序方向为 asc 或 desc。 |
offset | integer | 否 | 结果偏移量。设置为 10 时,跳过前 10 条结果。默认值:0。 |
limit | integer | 否 | 返回的最大结果数。默认值:100,最大值:1000。 |
internal_list_limit | integer | 否 | 限制数组的最大数量,适用于 attributes 和 domain_from_platform_type。默认值:10,最大值:1000。 |
include_subdomains | boolean | 否 | 是否目标的子域名。false 表示忽略子域名。默认值:true。 |
include_indirect_links | boolean | 否 | 是否间接链接。true 表示指向重定向页面或规范页面的链接;false 表示忽略。默认值:true。 |
exclude_internal_backlinks | boolean | 否 | 是否排除同一主域名下子域名指向目标的外链。true 表示排除;false 表示保留。默认值:true。 |
intersection_mode | string | 否 | 指定多个目标之间的外链交集模式。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 对象中,便于匹请求与结果。 |
筛选条件
支持以下运算符:
regex、not_regex、=、<>、in、not_in、like、not_like、ilike、not_ilike、match、not_match
like 和 not_like 支持使用 % 匹任意长度的字符串空字符串。
示例:
json
"filters": [
[
"1.domain_from_rank",
">",
400
],
"and",
[
"1.dofollow",
"=",
true
]
]排序规则
排序格式如下:
json
"order_by": [
"1.rank,desc",
"1.domain_from_rank,desc"
]:
asc:升序;desc:降序;- 单次请求最多设置 3 条排序规则。
响应结构
接口返回 JSON 数据,顶层 tasks 数组。
顶层响应字段
| 字段 | 类型 | 说明 |
|---|---|---|
version | string | 当前接口版本。 |
status_code | integer | 通用响应状态码。完整错误码可参考 /v3/appendix/errors。 |
status_message | string | 通用状态说明。 |
time | string | 请求执行耗时,单位为秒。 |
cost | float | 平台原始 USD 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。 |
tasks_count | integer | tasks 数组中的任务总数。 |
tasks_error | integer | 执行失败的任务数量。 |
tasks | array | 任务结果数组。 |
任务字段
| 字段 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一标识,UUID 格式。 |
status_code | integer | 任务状态码,通常位于 10000 至 60000 范围。 |
status_message | string | 任务状态说明。 |
time | string | 任务执行耗时,单位为秒。 |
cost | float | 平台原始 USD 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。 |
result_count | integer | result 数组中的数量。 |
path | array | 请求 URL 路径。 |
data | object | 创建任务时提交的参数。 |
result | array | 任务结果数组。 |
结果字段
| 字段 | 类型 | 说明 |
|---|---|---|
targets | object | 请求中的目标对象。 |
total_count | integer | 符合条件的结果总数。 |
items_count | integer | items 数组返回的结果数。 |
items | array | 引荐页面及外链数据。 |
summary | object | 页面交集汇总信息。 |
items.page_intersection 字段
page_intersection 对象会 targets 中的目标分别返回数据。键名范围为 1 至 20,与请求中 targets 的键名对应。
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 数据类型,固定为 backlinks_page_intersection。 |
domain_from | string | 引荐域名。 |
url_from | string | 含外链的引荐页面 URL。 |
url_from_https | boolean | 引荐页面是否使用 HTTPS。 |
domain_to | string | 外链指向的目标域名。 |
url_to | string | 外链指向的 URL。 |
url_to_https | boolean | 目标 URL 是否使用 HTTPS。 |
tld_from | string | 引荐 URL 的顶级域名。 |
is_new | boolean | 是否为新发现的外链。 |
is_lost | boolean | 外链或所在页面是否已移除。 |
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 | 最近一次检查之前的访问时间,UTC 格式。 |
last_seen | string | 最近一次发现该外链的时间,UTC 格式。 |
item_type | string | 链接类型。可选值:anchor、image、link、meta、canonical、alternate、redirect。 |
attributes | array | 外链属性,例如 nofollow、dofollow。 |
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 | 是否为间接链接。间接链接可能指向重定向页面或规范页面。 |
indirect_link_path | array | 间接链接路径,记录从原始 URL 到目标 URL 的一个或多个 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": [
[
"1.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",
}
# POST 请求体是 JSON 数组
post_data = [
{
"targets": {
"1": "football.com",
"2": "fifa.com",
},
"exclude_targets": [
"skysports.com",
],
"limit": 5,
"order_by": [
"1.rank,desc",
],
"filters": [
["1.domain_from_rank", ">", 400],
"and",
["1.dofollow", "=", True],
],
}
]
response = requests.post(url, headers=headers, json=post_data)
result = response.json()
if result.get("status_code") == 20000:
print(result)
else:
print(
"请求失败,状态码:{},信息:{}".format(
result.get("status_code"),
result.get("status_message"),
)
)TypeScript
typescript
import axios from "axios";
const requestBody = [
{
targets: {
"1": "football.com",
"2": "fifa.com",
},
exclude_targets: ["skysports.com"],
limit: 5,
order_by: ["1.rank,desc"],
filters: [
["1.domain_from_rank", ">", 400],
"and",
["1.dofollow", "=", true],
],
},
];
axios
.post(
"https://api.seermartech.cn/v3/backlinks/page_intersection/live",
requestBody,
{
headers: {
Authorization: "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
},
},
)
.then((response) => {
// 处理接口返回结果
console.log(response.data);
})
.catch((error) => {
// 处理网络错误或接口错误
console.error(error.response?.data || error.message);
});响应示例
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": [
{
"id": "00000000-0000-0000-0000-000000000000",
"status_code": 20000,
"status_message": "Ok.",
"time": "14.9959 sec.",
"cost": 0.02015,
"result_count": 1,
"data": {
"api": "backlinks",
"function": "page_intersection",
"targets": {
"1": "football.com",
"2": "fifa.com"
},
"exclude_targets": [
"skysports.com"
],
"limit": 5
},
"result": [
{
"targets": {
"1": "football.com",
"2": "fifa.com"
},
"total_count": 5,
"items_count": 5,
"items": [
{
"page_intersection": {
"1": [
{
"type": "backlinks_page_intersection",
"domain_from": "example.org",
"url_from": "https://example.org/article",
"url_from_https": true,
"domain_to": "football.com",
"url_to": "https://football.com/",
"url_to_https": true,
"is_new": true,
"is_lost": false,
"rank": 420,
"page_from_rank": 380,
"domain_from_rank": 450,
"dofollow": true,
"is_broken": false,
"url_to_status_code": 200,
"item_type": "anchor",
"anchor": "Football",
"is_indirect_link": false,
"indirect_link_path": null
}
],
"2": [
{
"type": "backlinks_page_intersection",
"domain_from": "example.org",
"url_from": "https://example.org/article",
"url_from_https": true,
"domain_to": "fifa.com",
"url_to": "https://fifa.com/",
"url_to_https": true,
"is_new": true,
"is_lost": false,
"rank": 410,
"page_from_rank": 370,
"domain_from_rank": 450,
"dofollow": true,
"is_broken": false,
"url_to_status_code": 200,
"item_type": "anchor",
"anchor": "FIFA",
"is_indirect_link": false,
"indirect_link_path": null
}
]
},
"summary": {
"intersections_count": 2
}
}
]
}
]
}
]
}实用场景
- 挖掘竞争对手外链:对比多个竞争对手的目标域名,定位同时引用这些网站的页面,建立高性的外链拓展名单。
- 筛选尚未覆盖的引荐页面:通过
exclude_targets排除自身域名,发现链接到竞争对手但尚未链接到本网站的页面,支持外链差距分析。 - 优联系高质量引荐来源:结合
rank、domain_from_rank、page_from_rank和dofollow筛选高权重页面,提升外链建设效率。 - 识别失效外链机会:使用
is_broken、url_to_status_code和is_lost定位失效或丢失链接,为替换和链接修复提供线索。 - 分析页面级链接价值:结合锚文本、语义位置、页面标题、语言及外部链接数量,评估引荐页面的主题性和拓展价值。