主题
反向链接竞争对手(实时)
接口说明
该接口用于返回与目标网站存在部分反向链接画像重合的竞争网站列表,并提供:
- 与目标网站的反链交集数量
- 每个竞争网站的域名排名
请求方式
POST https://api.seermartech.cn/v3/backlinks/competitors/live
计费说明
该接口按请求计费。原文未提供固定单价,因此无法直接换算参考人民币价格。 扣费以响应头 X-SeerMarTech-Charge-CNY 为准。
请求格式
所有 POST 数据使用 JSON(UTF-8 编码)提交。
请求体需为 JSON 数组,格式如下:
json
[
{
"target": "example.com"
}
]请求参数
| 字段名 | 类型 | 说明 |
|---|---|---|
target | string | 填。用于查询竞争对手域名的目标对象,可填写域名、子域名或网页 URL。域名/子域名请不要 https:// 和 www.;网页使用完整绝对地址( http:// 或 https://)。 |
limit | integer | 可选。返回域名的最大数量。默认值:100;最大值:1000。 |
offset | integer | 可选。结果偏移量,默认值:0。例如设置为 10 时,将跳过结果中的前 10 个域名,返回后续数据,适合分页获取。 |
filters | array | 可选。结果过滤条件数组。最多支持 8 个过滤条件,条件之间需使用逻辑运算符 and 或 or 连接。 |
order_by | array | 可选。结果排序规则。可使用与 filters 相同的字段进行排序。单次请求最多支持 3 条排序规则。 |
main_domain | boolean | 可选。是否基于 target 的主域名进行搜索。设为 true 时使用主域名;默认值:true。 |
exclude_large_domains | boolean | 可选。是否排除大型网站域名。设为 true 时,将忽略如 google.com、amazon.com 等大型域名;默认值:true。 |
exclude_internal_backlinks | boolean | 可选。是否排除来自同一主域下子域名指向 target 的反链。设为 true 时不此类反链;设为 false 时。默认值:true。 |
rank_scale | string | 可选。定义 rank、domain_from_rank、page_from_rank 的显示刻度。可选值:one_hundred(0–100)或 one_thousand(0–1000)。默认值:one_thousand。 |
tag | string | 可选。用户自定义任务标识,最长 255 个字符。可用于在响应结果中识别和任务。 |
filters 参数说明
filters 支持一次设置多个过滤条件,最多 8 个。
支持的运算符:
regexnot_regex=<>innot_inlikenot_likeilikenot_ilikematchnot_match
说明:
like和not_like支持使用%作为通符,匹任意长度字符串。- 多个条件之间需显式
and/or。
示例:
json
[
["rank", ">", 100],
"and",
["intersections", ">", 50]
]可用过滤字段请参考 /v3/backlinks/filters/。
order_by 参数说明
order_by 用于定义返回结果的排序方式。
排序格式:
json
["rank,desc"]可选排序方向:
asc:升序desc:降序
多个排序规则示例:
json
["rank,desc", "intersections,desc"]注意:
- 单次请求最多设置 3 条排序规则。
- 排序字段通常与
filters中可用字段一致。
响应结构
接口返回 JSON 数据,顶层 tasks 数组。
顶层字段
| 字段名 | 类型 | 说明 |
|---|---|---|
version | string | 当前 API 版本。 |
status_code | integer | 通用状态码。 |
status_message | string | 通用状态信息。 |
time | string | 接口执行时间,单位秒。 |
cost | float | 本次请求总费用,单位 USD。 |
tasks_count | integer | tasks 数组中的任务数量。 |
tasks_error | integer | 返回错误的任务数量。 |
tasks | array | 任务结果数组。 |
tasks 数组中的字段
| 字段名 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一标识,UUID 格式。 |
status_code | integer | 任务状态码。 |
status_message | string | 任务状态说明。 |
time | string | 任务执行时间,单位秒。 |
cost | float | 该任务费用,单位 USD。 |
result_count | integer | result 数组中的数量。 |
path | array | 请求路径。 |
data | object | 回显请求时提交的参数。 |
result | array | 结果数组。 |
result 数组中的字段
| 字段名 | 类型 | 说明 |
|---|---|---|
total_count | integer | 数据库中符合条件的总条目数。 |
items_count | integer | items 数组中的结果数量。 |
items | array | 实返回的数据项。 |
items 数组中的字段
| 字段名 | 类型 | 说明 |
|---|---|---|
type | string | 素类型,固定为 backlinks_competitors。 |
target | string | 竞争对手域名。 |
rank | integer | 域名排名,表示该域在库中的综合权重。该值基于链接数据库中的节点排序方法计算,原理类似早期 PageRank。 |
intersections | integer | 与请求中 target 的反向链接交集数量。 |
请求示例
cURL
bash
curl --location --request POST "https://api.seermartech.cn/v3/backlinks/competitors/live" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json" \
--data-raw '[
{
"target": "example.com",
"filters": [
["rank", ">", 100]
],
"order_by": [
"rank,desc"
],
"limit": 5
}
]'Python
python
import requests
url = "https://api.seermartech.cn/v3/backlinks/competitors/live"
headers = {
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json"
}
payload = [
{
"target": "example.com",
"filters": [
["rank", ">", 100]
],
"order_by": [
"rank,desc"
],
"limit": 5
}
]
response = requests.post(url, json=payload, headers=headers)
print(response.json)TypeScript
typescript
import axios from "axios";
const payload = [
{
target: "example.com",
filters: [
["rank", ">", 100]
],
order_by: [
"rank,desc"
],
limit: 5
}
];
axios.post(
"https://api.seermartech.cn/v3/backlinks/competitors/live",
payload,
{
headers: {
Authorization: "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json"
}
}
).then((response) => {
console.log(response.data);
}).catch((error) => {
console.error(error);
});响应示例
json
{
"version": "0.1.20220720",
"status_code": 20000,
"status_message": "Ok.",
"time": "4.9002 sec.",
"cost": 0.0203,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status_code": 20000,
"status_message": "Ok.",
"time": "4.8123 sec.",
"cost": 0.0203,
"result_count": 1,
"path": [
"v3",
"backlinks",
"competitors",
"live"
],
"data": {
"api": "backlinks",
"function": "competitors",
"target": "example.com",
"main_domain": true,
"exclude_large_domains": true,
"order_by": [
"rank,desc"
],
"filters": [
["rank", ">", 100]
],
"limit": 10
},
"result": [
{
"total_count": 123,
"items_count": 10,
"items": [
{
"type": "backlinks_competitors",
"target": "competitor1.com",
"rank": 856,
"intersections": 342
},
{
"type": "backlinks_competitors",
"target": "competitor2.com",
"rank": 801,
"intersections": 275
}
]
}
]
}
]
}状态码与错误处理
status_code表示接口或任务执行状态。- 建议在接时同时处理:
- 顶层
status_code tasks[].status_codetasks_error
当请求成功时,通常返回:
20000:成功
完整错误码体系请参考 /v3/appendix/errors。 建议为网络异常、参数错误、额度不足、任务级失败等设计统一的重试与告警机制。
使用建议
优使用主域分析 如果你的目标是评估品牌级竞争格局,建议保持
main_domain=true。排除大型站点干扰 在大多数 SEO 竞争分析场景下,建议保留
exclude_large_domains=true,结果被大型平台站点稀释。结合交集量与排名筛选 可以同时使用
intersections和rank排序/过滤,优找出既有较多反链、又备较高链接权重的竞争。分页拉取更多结果 当
total_count大于limit时,可通过offset分页获取完整竞争对手集合。
实用场景
- 识别外链竞争对手:找出与目标站大量外链来源的网站,快速建立更贴近真实外链生态的竞争集合。
- 筛选高价值竞品:结合
rank与intersections过滤结果,优定位链接权重高且重合度高的核心竞品。 - 发现外链拓展机会:基于引用目标站与竞品的站点,反向推导潜在可拓展的外链来源。
- 评估细分市场竞争强度:对不同子域名或页面分别查询,识别不同业务线在反链层面的竞争格局差异。
- 监控竞品变化趋势:定期拉取竞争对手列表,观察反链交集和排名变化,判断行业链接生态演变。