主题
批量查询引用域名(实时)
POST /v3/backlinks/bulk_referring_domains/live
本接口使用 POST 方法,路径为:
/v3/backlinks/bulk_referring_domains/live
用于批量查询指定域名、子域名或网页的引用域名数量。返回数据基于最近一次检测到的实时引用域名带有 nofollow、noreferrer、ugc、sponsored 等类型反向链接的域名。
当目标为域名时,系统将统计该根域名及所有子域名的整体数据。例如,提交 example.com 后,返回结果将覆盖 example.com 及子域名。
计费与请求限制
- 每次请求均会产生费用。
- 实扣费以响应头
X-SeerMarTech-Charge-CNY为准。 - 所有 POST 数据使用 UTF-8 编码的 JSON 格式。
- 每个实时接口请求最多 1 个任务。 平台限流以认证说明中的 30/60/120 次/分钟规则为准。
- 同时进行的请求数量最多为 30 个。
- 单个任务的
targets最多支持 1000 个域名、子域名或网页。
请求参数
请求体是 JSON 数组,数组中的每个对象代表一个任务。
| 参数 | 类型 | 填 | 说明 |
|---|---|---|---|
targets | array | 是 | 要查询引用域名数量的域名、子域名或网页列表,最多 1000 个。域名或子域名不得 https:// 和 www.;网页使用 http:// 或 https:// 的完整 URL。 |
tag | string | 否 | 用户自定义的任务标识,用于识别任务并与结果匹,最长 255 个字符。提交后可在响应的 data 对象中获取。 |
targets 格式示例
json
[
{
"targets": [
"example.com",
"blog.example.com",
"https://www.example.com/products/"
],
"tag": "competitor-backlink-check"
}
]响应字段
接口返回 JSON 对象 tasks 任务数组。
顶层响应字段
| 字段 | 类型 | 说明 |
|---|---|---|
version | string | 当前 API 版本。 |
status_code | integer | 请求的通用状态码。成功通常为 20000。 |
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 | 请求中提交的目标域名、子域名或网页。 |
referring_domains | integer | 指向目标的引用域名总数。根域名和子域名将分别计数。例如,example.com 与 blog.example.com 会作为不同域名统计。 |
referring_domains_nofollow | integer | 至少一个 nofollow 链接指向目标的域名数量。 |
referring_main_domains | integer | 指向目标的根域名数量。 |
referring_main_domains_nofollow | integer | 至少一个 nofollow 链接指向目标的根域名数量。 |
cURL 示例
bash
curl --location --request POST \
"https://api.seermartech.cn/v3/backlinks/bulk_referring_domains/live" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json" \
--data-raw '[
{
"targets": [
"forbes.com",
"cnn.com",
"bbc.com",
"yelp.com",
"https://www.apple.com/iphone/",
"https://ahrefs.com/blog/",
"ibm.com",
"https://variety.com/",
"https://stackoverflow.com/",
"trustpilot.com"
],
"tag": "competitor-domain-analysis"
}
]'Python 示例
python
import requests
url = "https://api.seermartech.cn/v3/backlinks/bulk_referring_domains/live"
headers = {
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
}
payload = [
{
"targets": [
"forbes.com",
"cnn.com",
"bbc.com",
"yelp.com",
"https://www.apple.com/iphone/",
"https://ahrefs.com/blog/",
"ibm.com",
"https://variety.com/",
"https://stackoverflow.com/",
"trustpilot.com",
],
"tag": "competitor-domain-analysis",
}
]
response = requests.post(url, headers=headers, json=payload)
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 url =
"https://api.seermartech.cn/v3/backlinks/bulk_referring_domains/live";
const payload = [
{
targets: [
"forbes.com",
"cnn.com",
"bbc.com",
"yelp.com",
"https://www.apple.com/iphone/",
"https://ahrefs.com/blog/",
"ibm.com",
"https://variety.com/",
"https://stackoverflow.com/",
"trustpilot.com",
],
tag: "competitor-domain-analysis",
},
];
axios
.post(url, payload, {
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.20230825",
"status_code": 20000,
"status_message": "Ok.",
"time": "2.5806 sec.",
"cost": 0.0203,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"id": "01234567-89ab-cdef-0123-456789abcdef",
"status_code": 20000,
"status_message": "Ok.",
"time": "2.4102 sec.",
"cost": 0.0203,
"result_count": 1,
"path": [
"v3",
"backlinks",
"bulk_referring_domains",
"live"
],
"data": {
"api": "backlinks",
"function": "bulk_referring_domains",
"targets": [
"example.com",
"https://www.example.com/products/"
],
"tag": "competitor-domain-analysis"
},
"result": [
{
"items_count": 2,
"items": [
{
"target": "example.com",
"referring_domains": 1250,
"referring_domains_nofollow": 420,
"referring_main_domains": 980,
"referring_main_domains_nofollow": 350
},
{
"target": "https://www.example.com/products/",
"referring_domains": 86,
"referring_domains_nofollow": 21,
"referring_main_domains": 73,
"referring_main_domains_nofollow": 18
}
]
}
]
}
]
}状态码与异常处理
请根据响应中的 status_code 和 status_message 判断请求及任务是否成功:
- 顶层
status_code用于判断整个 API 请求的处理状态。 tasks[].status_code用于判断任务的处理状态。- 当
tasks_error大于0时,表示至少有一个任务处理失败。 - 建议在客户端实现异常重试、时处理、限流控制和错误日志记录。
实用场景
- 对比竞争对手的引用域名数量,评估竞争网站的外链覆盖规模,为外链建设目标设定基准。
- 批量监测多个品牌或业务域名的引荐来源,快速识别各站点的域名级外链差异,支持 SEO 资产盘点。
- 区分根域名与子域名的引用,判断外链主要集中在主站、博客、商城或业务子域名。
- 统计
nofollow引用域名占比,评估外链类型结构,优化外链获取与推广策略。 - 批量检查重点落地页的引用域名数量,发现外链较少但业务价值的页面,为页面推广和更新提供依据。