主题
不可索引页面查询
接口说明
该接口用于返回站点中被搜索引擎禁止索引的页面列表。不可索引的原因可能来自:
robots.txt- HTTP 响应头
- 页面
meta标签 - 页面属性设置
- 重定向次数过多
接口路径:
POST /v3/on_page/non_indexable
完整请求地址:
https://api.seermartech.cn/v3/on_page/non_indexable
计费说明
调用该接口不额外收费。 已获取的任务结果可在 30 天读取。
参考价约 ¥0.0000 / 次 扣费以响应头 X-SeerMarTech-Charge-CNY 为准。
请求格式
所有 POST 数据均需使用 JSON(UTF-8 编码)提交。 请求体为 JSON 数组,格式如下:
json
[
{
"id": "任务ID",
"limit": 10
}
]请求参数
| 字段名 | 类型 | 说明 |
|---|---|---|
id | string | 填。任务 ID。可通过 /v3/on_page/task_post/ 接口返回结果获取。示例:07131248-1535-0216-1000-17384017ad04 |
limit | integer | 可选。返回页面数量上限。默认值:100;最大值:1000 |
offset | integer | 可选。结果偏移量。默认值:0;最大值:2000000。例如设置为 10 时,将跳过前 10 条结果并返回后续页面 |
filters | array | 可选。结果过滤条件数组,最多支持 8 个过滤条件。多个条件之间需使用逻辑运算符 and 或 or 连接 |
filters 支持的运算符
支持以下过滤运算符:
regexnot_regex<<=>>==<>innot_inlikenot_like
说明:
like和not_like支持使用%作为通符,匹任意长度字符串
filters 示例
下面的过滤条件表示:
reason = robots_txt- 且
url中go
json
[
{
"id": "07281559-0695-0216-0000-c269be8b7592",
"filters": [
["reason", "=", "robots_txt"],
"and",
["url", "like", "%go%"]
],
"limit": 10
}
]可用过滤字段的完整范围请参考过滤器说明文档。
响应结构
接口返回 JSON 数据,顶层 tasks 数组。
顶层字段
| 字段名 | 类型 | 说明 |
|---|---|---|
version | string | 当前 API 版本 |
status_code | integer | 通用状态码。完整错误码说明见参考文档。建议在接时做好异常与错误处理 |
status_message | string | 通用状态信息 |
time | string | 执行耗时,单位:秒 |
cost | float | 本次请求总成本 |
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 | 当前任务成本 |
result_count | integer | result 数组中的数量 |
path | array | URL 路径 |
data | object | 与请求中提交参数一致的数据对象 |
result | array | 结果数组 |
result[] 字段
| 字段名 | 类型 | 说明 |
|---|---|---|
crawl_progress | string | 抓取进度状态。可能值:in_progress、finished |
crawl_status | object | 抓取会话 |
max_crawl_pages | integer | 抓取页面上限,即创建任务时指定的 max_crawl_pages |
pages_in_queue | integer | 当前仍在抓取队列中的页面数 |
pages_crawled | integer | 已抓取页面数 |
total_items_count | integer | 数据库中符合条件的总记录数 |
items_count | integer | 当前结果数组中的记录数 |
items | array | 不可索引页面列表 |
items[] 字段
| 字段名 | 类型 | 说明 |
|---|---|---|
reason | string | 页面不可索引的原因 |
url | string | 不可索引页面的 URL |
reason 可能值
| 值 | 含义 |
|---|---|
robots_txt | 被 robots.txt 禁止抓取/索引 |
meta_tag | 被页面 meta 标签限制索引 |
http_header | 被 HTTP 响应头限制索引 |
attribute | 被页面属性设置限制索引 |
too_many_redirects | 重定向次数过多导致不可索引 |
请求示例
cURL
bash
curl --location --request POST "https://api.seermartech.cn/v3/on_page/non_indexable" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json" \
--data-raw '[
{
"id": "07281559-0695-0216-0000-c269be8b7592",
"filters": [
["reason", "=", "robots_txt"],
"and",
["url", "like", "%go%"]
],
"limit": 10
}
]'Python
python
import requests
url = "https://api.seermartech.cn/v3/on_page/non_indexable"
headers = {
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json"
}
data = [
{
"id": "07281559-0695-0216-0000-c269be8b7592",
"filters": [
["reason", "=", "robots_txt"],
"and",
["url", "like", "%go%"]
],
"limit": 10
}
]
response = requests.post(url, headers=headers, json=data)
print(response.json)TypeScript
typescript
import axios from "axios";
const postData = [
{
id: "07281559-0695-0216-0000-c269be8b7592",
filters: [
["reason", "=", "robots_txt"],
"and",
["url", "like", "%go%"]
],
limit: 10
}
];
axios({
method: "post",
url: "https://api.seermartech.cn/v3/on_page/non_indexable",
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.20200805",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.1075 sec.",
"cost": 0,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"id": "07281559-0695-0216-0000-c269be8b7592",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.0321 sec.",
"cost": 0,
"result_count": 1,
"path": [
"v3",
"on_page",
"non_indexable"
],
"data": {
"api": "on_page",
"function": "non_indexable"
},
"result": [
{
"crawl_progress": "finished",
"crawl_status": {
"max_crawl_pages": 100,
"pages_in_queue": 0,
"pages_crawled": 100
},
"total_items_count": 2,
"items_count": 2,
"items": [
{
"reason": "robots_txt",
"url": "https://example.com/go/"
},
{
"reason": "meta_tag",
"url": "https://example.com/private-page/"
}
]
}
]
}
]
}状态码说明
- 顶层
status_code表示整个请求的处理状态 tasks[].status_code表示单个任务的执行状态- 建议同时校验:
- HTTP 状态码
- 顶层
status_code - 任务级
tasks[].status_code
如需完整错误码列表,请参考 /v3/appendix/errors。
使用说明
- 通过
/v3/on_page/task_post/创建站点抓取任务 - 从任务创建响应中获取
id - 使用该
id调用/v3/on_page/non_indexable - 如抓取尚未完成,可根据
crawl_progress判断当前状态:
in_progress:抓取尚未完成finished:抓取已完成,可获取完整结果
实用场景
- 排查索引异常页面:快速找出被
robots.txt、meta noindex或响应头屏蔽的页面,缩短 SEO 技术排障时间。 - 识别误屏蔽目录:筛选指定 URL 目录下的不可索引页面,及时发现模板或规则误伤,减少自然流量损失。
- 核查改版后索引策略:在站点改版、迁移或 CMS 升级后,批量检查页面是否被错误设置为不可索引,保障收录恢复速度。
- 监控重定向异常:定位因重定向链过长而无法索引的页面,优化抓取效率并提升搜索引擎可访问性。
- 按原因分组治理问题:基于
reason字段分类统计不可索引页面来源,帮助团队按robots、标签、响应头等问题类型制定修复优级。