主题
批量获取反向链接排名分数
POST /v3/backlinks/bulk_ranks/live
本接口使用 POST 方法,路径为:
/v3/backlinks/bulk_ranks/live
接口根据目标域名、子域名或网页获得反向链接排名分数。排名分数基于指向目标的引用域名数量计算,反映请求日期的实时数据:
0:未检测到反向链接1000:最高排名- 默认采用
0–1000的评分范围,也可切换为0–100
每个请求只能提交一个任务,单个任务最多 1000 个目标。平台限流以认证说明中的 30/60/120 次/分钟规则为准,同时进行的请求数最多为 30 次。
计费说明
本接口按请求计费。扣费以响应头 X-SeerMarTech-Charge-CNY 为准。
请求参数
请求体使用 UTF-8 编码的 JSON 数组格式:
json
[
{
"targets": [
"example.com",
"blog.example.com",
"https://www.example.com/page/"
],
"rank_scale": "one_thousand",
"tag": "rank-check-202501"
}
]任务参数
| 参数 | 类型 | 填 | 说明 |
|---|---|---|---|
targets | array | 是 | 要获取排名分数的域名、子域名或网页。每个任务最多支持 1000 个目标。 |
rank_scale | string | 否 | 指定 rank 的评分范围,同时影响排名字段的展示范围。可选值:one_hundred:0–100;one_thousand:0–1000。默认值为 one_thousand。 |
tag | string | 否 | 用户自定义的任务标识,最多 255 个字符。该值会原样返回在响应的 data 对象中,可用于请求与结果。 |
targets 格式要求
- 域名或子域名不得
https://和www.。 - 网页使用完整 URL,并
http://或https://。 - 示例:
json
[
{
"targets": [
"example.com",
"blog.example.com",
"https://www.example.com/seo-guide/"
]
}
]响应字段
接口返回 JSON 数据 tasks 任务数组。
顶层字段
| 字段 | 类型 | 说明 |
|---|---|---|
version | string | 当前 API 版本。 |
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 数组中执行失败的任务数量。 |
tasks | array | 任务结果数组。 |
tasks 字段
| 字段 | 类型 | 说明 |
|---|---|---|
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 | 请求路径信息。 |
data | object | 请求中提交的任务参数。 |
result | array | 任务结果数组。 |
result 和 items 字段
| 字段 | 类型 | 说明 |
|---|---|---|
items_count | integer | items 数组中的结果数量。 |
items | array | 目标及排名数据。 |
target | string | 请求中提交的域名、子域名或网页。 |
rank | integer | 目标的排名分数。该分数基于请求日期的实时数据计算,范围取决于 rank_scale。 |
rank 采用链接数据库中的节点排名方法计算原理与传统 PageRank 类算法相似。分数主要反映指向目标的引用域名数量。
请求示例
cURL
bash
curl --location --request POST \
"https://api.seermartech.cn/v3/backlinks/bulk_ranks/live" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json" \
--data-raw '[
{
"targets": [
"forbes.com",
"cnn.com",
"bbc.com",
"https://www.apple.com/iphone/",
"https://ahrefs.com/blog/"
],
"rank_scale": "one_thousand",
"tag": "bulk-rank-demo"
}
]'Python
python
import requests
url = "https://api.seermartech.cn/v3/backlinks/bulk_ranks/live"
headers = {
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
}
post_data = [
{
"targets": [
"forbes.com",
"cnn.com",
"bbc.com",
"https://www.apple.com/iphone/",
"https://ahrefs.com/blog/",
],
"rank_scale": "one_thousand",
"tag": "bulk-rank-demo",
}
]
response = requests.post(url, headers=headers, json=post_data)
result = response.json()
if result.get("status_code") == 20000:
print(result)
else:
print(
"请求失败,状态码:%s,信息:%s"
% (result.get("status_code"), result.get("status_message"))
)TypeScript
typescript
import axios from "axios";
const postData = [
{
targets: [
"forbes.com",
"cnn.com",
"bbc.com",
"https://www.apple.com/iphone/",
"https://ahrefs.com/blog/",
],
rank_scale: "one_thousand",
tag: "bulk-rank-demo",
},
];
axios
.post(
"https://api.seermartech.cn/v3/backlinks/bulk_ranks/live",
postData,
{
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);
});PHP
php
<?php
$url = 'https://api.seermartech.cn/v3/backlinks/bulk_ranks/live';
$postData = [
[
'targets' => [
'forbes.com',
'cnn.com',
'bbc.com',
'https://www.apple.com/iphone/',
'https://ahrefs.com/blog/',
],
'rank_scale' => 'one_thousand',
'tag' => 'bulk-rank-demo',
],
];
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer smt_live_YOUR_KEY',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode($postData, JSON_UNESCAPED_SLASHES),
]);
$response = curl_exec($ch);
if ($response === false) {
throw new Exception(curl_error($ch));
}
curl_close($ch);
$result = json_decode($response, true);
if (($result['status_code'] ?? null) === 20000) {
print_r($result);
} else {
echo '请求失败:' . ($result['status_message'] ?? '未知错误');
}响应示例
json
{
"version": "0.1.20250101",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.5195 sec.",
"cost": 0.0203,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"id": "01234567-89ab-cdef-0123-456789abcdef",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.4801 sec.",
"cost": 0.0203,
"result_count": 1,
"path": [
"v3",
"backlinks",
"bulk_ranks",
"live"
],
"data": {
"api": "backlinks",
"function": "bulk_ranks",
"targets": [
"forbes.com",
"cnn.com",
"bbc.com"
],
"rank_scale": "one_thousand",
"tag": "bulk-rank-demo"
},
"result": [
{
"items_count": 3,
"items": [
{
"target": "forbes.com",
"rank": 842
},
{
"target": "cnn.com",
"rank": 865
},
{
"target": "bbc.com",
"rank": 801
}
]
}
]
}
]
}错误处理
建议根据顶层 status_code 和任务级 status_code 分别处理请求错误与任务错误:
- 顶层
status_code:表示整个 API 请求的处理状态。 tasks_error:表示任务数组中执行失败的任务数量。tasks[].status_code:表示单个任务的处理状态。status_message:提供对应的状态说明。
完整错误码列表请参考 /v3/appendix/errors。
实用场景
- 批量评估竞品域名的链接权重,快速比较多个竞争对手的反向链接排名,制定外链建设策略。
- 筛选高权威外链目标,对候选域名、子域名或页面进行排名打分,优资源获取高价值链接。
- 监测重点页面的链接资产变化,定期获取核心落地页的实时排名分数,识别外链增长或流失趋势。
- 构建 SEO 竞品分析报表,将多个目标的排名分数统一到
0–100或0–1000量表,便于跨项目横向对比。 - 批量生成客户 SEO 诊断数据,一次提交多个网站或页面并使用
tag标记项目,实现结果归属和自动化报告匹。