主题
页面重复标签查询
POST /v3/on_page/duplicate_tags
接口概述
/v3/on_page/duplicate_tags 用于返回目标站点中存在重复 title 或 description 标签的页面列表,响应中还会附带页面性能、质量、技术检查项等 On-Page 数据。
- 请求方式:
POST - 接口地址:
https://api.seermartech.cn/v3/on_page/duplicate_tags
计费说明
该接口本身不额外收费。对于已创建的 On-Page 抓取任务,可在接下来 30 天获取结果。
扣费以响应头 X-SeerMarTech-Charge-CNY 为准。
请求格式
所有 POST 数据均需使用 UTF-8 编码的 JSON 格式提交。 请求体为 JSON 数组格式:
json
[
{
"id": "07131248-1535-0216-1000-17384017ad04",
"type": "duplicate_title"
}
]请求参数
| 字段名 | 类型 | 填 | 说明 |
|---|---|---|---|
id | string | 是 | 任务 ID。可从 /v3/on_page/task_post/ 的响应中获取。示例:07131248-1535-0216-1000-17384017ad04 |
type | string | 是 | 重复标签类型。不同取值会返回对应重复的数据。可选值:duplicate_title、duplicate_description |
accumulator | string | 否 | 标签值过滤条件。填写某个的 title 或 description 后返回该重复标签值的页面列表 |
limit | integer | 否 | 返回页面的最大数量。默认 100,最大 1000 |
offset | integer | 否 | 结果偏移量。默认 0,最大 2000000。例如设为 10 时,会跳过前 10 条结果并返回后续页面 |
tag | string | 否 | 自定义任务标识,最长 255 个字符。可用于请求结果匹;响应中的 data 对象会回传该值 |
响应结构
接口返回 JSON 数据,顶层 tasks 数组。
顶层字段
| 字段名 | 类型 | 说明 |
|---|---|---|
version | string | 当前 API 版本 |
status_code | integer | 通用状态码。完整列表参考 /v3/appendix/errors |
status_message | string | 通用状态信息。完整列表参考 /v3/appendix/errors |
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 | 创建任务时设置的最大抓取页数 |
pages_in_queue | integer | 当前抓取队列中的页面数 |
pages_crawled | integer | 已抓取页面数 |
total_pages_count | integer | 目标站点中存在重复标签的页面总数 |
pages_count | integer | 本次响应中返回的重复标签页面数 |
items_count | integer | items 数组数 |
items | array | 重复标签分组结果 |
items[] 字段
| 字段名 | 类型 | 说明 |
|---|---|---|
accumulator | string | 重复标签的值 |
total_count | integer | 使用该重复标签的页面总数 |
pages | array | 含有该重复标签的页面列表 |
页面对象说明
pages[] 中每个代表一个页面。以下为核心字段说明。
基础字段
| 字段名 | 类型 | 说明 |
|---|---|---|
resource_type | string | 返回资源类型,固定为 html |
status_code | integer | 页面 HTTP 状态码 |
location | string | Location 响应头,表示重定向目标 URL |
url | string | 页面地址 |
meta 页面信息
| 字段名 | 类型 | 说明 |
|---|---|---|
title | string | 页面标题 |
charset | integer | 编码页,例如 65001 |
follow | boolean | 页面 meta robots 是否爬虫跟踪页面链接 |
generator | string | generator meta 标签 |
htags | object | 页面 H 标签信息 |
description | string | meta description |
favicon | string | 页面 favicon 地址 |
meta_keywords | string | keywords meta 标签 |
canonical | string | canonical 地址 |
internal_links_count | integer | 页面链接数 |
external_links_count | integer | 页面外部链接数 |
inbound_links_count | integer | 指向该页面的站链接数 |
images_count | integer | 图片数量 |
images_size | integer | 图片总大小,单位字节 |
scripts_count | integer | 脚本数量 |
scripts_size | integer | 脚本总大小,单位字节 |
stylesheets_count | integer | 样式表数量 |
stylesheets_size | integer | 样式表总大小,单位字节 |
title_length | integer | title 字符长度 |
description_length | integer | description 字符长度 |
render_blocking_scripts_count | integer | 阻塞渲染的脚本数 |
render_blocking_stylesheets_count | integer | 阻塞渲染的样式数 |
cumulative_layout_shift | float | CLS 指标,衡量页面布局稳定性 |
content 页面信息
| 字段名 | 类型 | 说明 |
|---|---|---|
plain_text_size | integer | 页面纯文本总大小,单位字节 |
plain_text_rate | integer/float | 纯文本占比,等于 plain_text_size / size |
plain_text_word_count | float | 页面词数 |
automated_readability_index | float | ARI 可读性指标 |
coleman_liau_readability_index | float | Coleman-Liau 可读性指标 |
dale_chall_readability_index | float | Dale-Chall 可读性指标 |
flesch_kincaid_readability_index | float | Flesch-Kincaid 可读性指标 |
smog_readability_index | float | SMOG 可读性指标 |
description_to_content_consistency | float | description 与正文一致性,范围 0-1 |
title_to_content_consistency | float | title 与正文一致性,范围 0-1 |
meta_keywords_to_content_consistency | float | keywords 与正文一致性,范围 0-1 |
页面分析字段
| 字段名 | 类型 | 说明 |
|---|---|---|
deprecated_tags | array | 页面中的废弃 HTML 标签 |
duplicate_meta_tags | array | 页面中的重复 meta 标签 |
spell | object | 拼写检查结果 |
resource_errors | object | HTML 资源错误和警告 |
social_media_tags | object | 页面中的社交媒体标签,如 Open Graph、Twitter Card |
page_timing | object | 页面加载性能指标 |
onpage_score | float | 页面 On-Page 优化评分,满分 100 |
total_dom_size | integer | 页面 DOM 总大小 |
custom_js_response | string/object/integer | 自定义 JS 执行结果;需在 /v3/on_page/task_post/ 中设置 custom_js |
custom_js_client_exception | string | 自定义 JS 执行报错信息 |
broken_resources | boolean | 页面是否含有损坏资源 |
broken_links | boolean | 页面是否含有损坏链接 |
duplicate_title | boolean | 页面是否存在重复 title |
duplicate_description | boolean | 页面是否存在重复 description |
duplicate_content | boolean | 页面是否存在重复 |
click_depth | integer | 从首页访问该页面所需点击层级 |
size | integer | 页面资源大小,单位字节 |
encoded_size | integer | 编码后的页面大小 |
total_transfer_size | integer | 压缩传输大小 |
fetch_time | string | 抓取时间,UTC 格式:yyyy-mm-dd hh-mm-ss +00:00 |
cache_control | object | 缓存控制信息 |
content_encoding | string | 编码类型 |
media_type | string | 页面媒体类型 |
server | string | 服务器类型/版本 |
is_resource | boolean | 是否为单一资源而非标准 HTML 页面 |
last_modified | object | 页面最近修改信息 |
page_timing 性能字段
| 字段名 | 类型 | 说明 |
|---|---|---|
time_to_interactive | integer | TTI,可交互时间,毫秒 |
dom_complete | integer | 页面及子资源加载完成时间,毫秒 |
largest_contentful_paint | float | LCP 指标,毫秒 |
first_input_delay | float | FID 指标,毫秒 |
connection_time | integer | 建立连接时间,毫秒 |
time_to_secure_connection | integer | 建立连接时间,毫秒 |
request_sent_time | integer | 请求发送耗时,毫秒 |
waiting_time | integer | 首字节时间 TTFB,毫秒 |
download_time | integer | 下载响应耗时,毫秒 |
duration_time | integer | 总响应耗时,毫秒 |
fetch_start | integer | 开始下载 HTML 的时间 |
fetch_end | integer | 完成下载 HTML 的时间 |
cache_control 字段
| 字段名 | 类型 | 说明 |
|---|---|---|
cachable | boolean | 页面是否可缓存 |
ttl | integer | 缓存有效期 |
last_modified 字段
| 字段名 | 类型 | 说明 |
|---|---|---|
header | string | HTTP 头中的最近修改时间,UTC 格式 |
sitemap | string | sitemap 中记录的最近修改时间,UTC 格式 |
meta_tag | string | 页面 meta 标签中的最近修改时间,UTC 格式 |
checks 检查项说明
checks 对象页面的技术和 SEO 检查结果。以下为主要字段:
| 字段名 | 类型 | 说明 |
|---|---|---|
no_content_encoding | boolean | 页面未启用压缩 |
high_loading_time | boolean | 页面加载时间是否 3 秒 |
is_redirect | boolean | 页面是否发生 3XX 重定向 |
is_4xx_code | boolean | 页面是否返回 4xx |
is_5xx_code | boolean | 页面是否返回 5xx |
is_broken | boolean | 页面是否损坏(响应码小于 200 或大于 400) |
is_www | boolean | 是否使用 www 子域 |
is_https | boolean | 是否使用 HTTPS |
is_http | boolean | 是否使用 HTTP |
high_waiting_time | boolean | TTFB 是否 1.5 秒 |
no_doctype | boolean | 页面是否缺少 <!DOCTYPE HTML> |
canonical | boolean | 页面是否为 canonical 页面 |
no_encoding_meta_tag | boolean | 是否缺少编码声明 meta 标签 |
no_h1_tag | boolean | 是否缺少 H1 或 H1 为空 |
https_to_http_links | boolean | HTTPS 页面是否链接到 HTTP 页面 |
has_html_doctype | boolean | 是否 HTML DOCTYPE 声明 |
size_greater_than_3mb | boolean | 页面是否 3MB |
meta_charset_consistency | boolean | 页面编码与声明编码是否不一致 |
has_meta_refresh_redirect | boolean | 是否存在 meta refresh 跳转 |
has_render_blocking_resources | boolean | 是否存在阻塞渲染资源 |
redirect_chain | boolean | 是否存在多跳重定向 |
low_content_rate | boolean | 文本占比是否低于 0.1 |
high_content_rate | boolean | 文本占比是否高于 0.9 |
low_character_count | boolean | 页面字符数是否少于 1024 |
high_character_count | boolean | 页面字符数是否 256000 |
small_page_size | boolean | 页面是否小于 1024 字节 |
large_page_size | boolean | 页面是否 1MB |
low_readability_rate | boolean | 页面可读性是否过低 |
irrelevant_description | boolean | description 与正文是否性不足,阈值 0.2 |
irrelevant_title | boolean | title 与正文是否性不足,阈值 0.3 |
irrelevant_meta_keywords | boolean | keywords 与正文是否性不足,阈值 0.6 |
title_too_long | boolean | title 是否 65 字符 |
title_too_short | boolean | title 是否少于 30 字符 |
deprecated_html_tags | boolean | 是否使用废弃 HTML 标签 |
duplicate_meta_tags | boolean | 是否存在同类型重复 meta 标签 |
duplicate_title_tag | boolean | 是否存在多个 title 标签 |
no_image_alt | boolean | 是否存在无 alt 的图片 |
no_image_title | boolean | 是否存在无 title 的图片 |
no_description | boolean | 是否缺少或空 description |
no_title | boolean | 是否缺少或空 title |
no_favicon | boolean | 是否缺少 favicon |
seo_friendly_url | boolean | URL 是否符合 SEO 友好标准 |
flash | boolean | 是否 Flash素 |
frame | boolean | 是否 frame/iframe/frameset |
lorem_ipsum | boolean | 是否存在占位文本 |
has_misspelling | boolean | 是否存在拼写错误 |
seo_friendly_url_characters_check | boolean | URL 字符是否大小写拉丁字母、数字和短横线 |
seo_friendly_url_dynamic_check | boolean | URL 是否不含动态参数 |
seo_friendly_url_keywords_check | boolean | URL 是否与标题语义一致 |
seo_friendly_url_relative_length_check | boolean | URL 相对路径长度是否不 120 |
is_orphan_page | boolean | 是否为孤立页,即没有来自站页面的链接 |
is_link_relation_conflict | boolean | 是否同时接收到 nofollow 和 dofollow 的站链接 |
has_links_to_redirects | boolean | 页面是否指向会再次跳转的链接 |
recursive_canonical | boolean | 是否存在循环 canonical |
canonical_chain | boolean | 是否存在 canonical 链 |
canonical_to_redirect | boolean | canonical 是否指向重定向页 |
canonical_to_broken | boolean | canonical 是否指向损坏页 |
说明:部分检查项在
canonical检查为true的页面中提供。
资源错误字段
resource_errors.errors[]
| 字段名 | 类型 | 说明 |
|---|---|---|
line | integer | 错误所在行号 |
message | string | 错误信息 |
resource_errors.warnings[]
| 字段名 | 类型 | 说明 |
|---|---|---|
line | integer | 警告的行号;若为 0,表示针对整个页面 |
message | string | 警告信息 |
可能的警告信息:
"Has node with more than 60 childs.":至少存在一个层级中,同级嵌套 60 个标签"Has more that 1500 nodes.":DOM 树数 1500"HTML depth more than 32 tags.":DOM 深度 32 层
请求示例
cURL
bash
curl --location --request POST "https://api.seermartech.cn/v3/on_page/duplicate_tags" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json" \
--data-raw '[
{
"id": "07281559-0695-0216-0000-c269be8b7592",
"type": "duplicate_description",
"limit": 10
}
]'Python
python
import requests
url = "https://api.seermartech.cn/v3/on_page/duplicate_tags"
payload = [
{
"id": "07281559-0695-0216-0000-c269be8b7592",
"type": "duplicate_description",
"limit": 10
}
]
headers = {
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json)TypeScript
typescript
import axios from "axios";
const postArray = [
{
id: "07281559-0695-0216-0000-c269be8b7592",
type: "duplicate_description",
limit: 10
}
];
axios({
method: "post",
url: "https://api.seermartech.cn/v3/on_page/duplicate_tags",
headers: {
Authorization: "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json"
},
data: postArray
})
.then((response) => {
// 返回结果
console.log(response.data);
})
.catch((error) => {
console.error(error);
});响应示例
json
{
"version": "0.1.20210129",
"status_code": 20000,
"status_message": "Ok.",
"time": "1.4464 sec.",
"cost": 0,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"data": {
"api": "on_page",
"function": "duplicate_tags",
"type": "duplicate_description",
"limit": 10
},
"result": [
{
"items": [
{
"pages": [
{
"meta": {
"description": "Encuentra el regalo hecho a mano perfecto, prendas vintage y de tendencia, joyería única y más... muchísimo más.",
"favicon": "https://www.etsy.com/images/favicon.ico",
"meta_keywords": null,
"canonical": "https://www.etsy.com/mx/",
"internal_links_count": 73,
"external_links_count": 3,
"inbound_links_count": 24,
"images_count": 12,
"images_size": 209895,
"scripts_count": 7,
"scripts_size": 281845,
"stylesheets_count": 3,
"stylesheets_size": 95776,
"title_length": 88,
"description_length": 112,
"render_blocking_scripts_count": 4,
"render_blocking_stylesheets_count": 31,
"cumulative_layout_shift": 0.10156329069412295,
"content": {
"plain_text_size": 8077,
"plain_text_rate": 0.05434775294885511,
"plain_text_word_count": 1155,
"automated_readability_index": 20.769094905094903,
"coleman_liau_readability_index": 9.494734111543448,
"dale_chall_readability_index": 11.57178887778888,
"flesch_kincaid_readability_index": 6.1773626373626485,
"smog_readability_index": 27.996756024520007,
"description_to_content_consistency": 0.5625,
"title_to_content_consistency": 0.7142857313156128,
"meta_keywords_to_content_consistency": null
},
"deprecated_tags": null,
"spell": null,
"resource_errors": {
"errors": [],
"warnings": []
},
"social_media_tags": {
"fb:app_id": "89186614300",
"og:site_name": "Etsy",
"og:locale": "es_ES",
"og:title": "Etsy - Compra regalos hechos a mano, vintage, personalizados y únicos para todo el mundo",
"og:description": "Encuentra el regalo hecho a mano perfecto, prendas vintage y de tendencia, joyería única y más... muchísimo más."
}
},
"page_timing": {
"time_to_interactive": 872,
"dom_complete": 1007,
"largest_contentful_paint": 1648.4750006347895,
"first_input_delay": 0.0550001859664917,
"connection_time": 10,
"time_to_secure_connection": 22,
"request_sent_time": 0,
"waiting_time": 406,
"download_time": 1,
"duration_time": 439,
"fetch_start": 0,
"fetch_end": 439
},
"onpage_score": 88.36,
"total_dom_size": 2312840,
"custom_js_response": null,
"custom_js_client_exception": null,
"broken_resources": false,
"broken_links": false,
"duplicate_title": true,
"duplicate_description": true,
"duplicate_content": true,
"click_depth": 1,
"size": 148870,
"encoded_size": 33167,
"total_transfer_size": 34974,
"fetch_time": "2021-02-24 17:02:22 +00:00",
"cache_control": {
"cachable": false,
"ttl": 0
},
"checks": {
"no_content_encoding": false,
"high_loading_time": false,
"is_redirect": false,
"is_4xx_code": false,
"is_5xx_code": false,
"is_broken": false,
"is_www": true,
"is_https": true,
"is_http": false,
"high_waiting_time": false,
"no_doctype": false,
"canonical": true,
"no_encoding_meta_tag": true,
"no_h1_tag": false,
"https_to_http_links": false,
"has_html_doctype": true,
"size_greater_than_3mb": false,
"meta_charset_consistency": true,
"has_meta_refresh_redirect": false,
"has_render_blocking_resources": true,
"redirect_chain": false,
"low_content_rate": true,
"high_content_rate": false,
"low_character_count": false,
"high_character_count": false,
"small_page_size": false,
"large_page_size": false,
"low_readability_rate": true,
"irrelevant_description": false,
"irrelevant_title": false,
"irrelevant_meta_keywords": false,
"title_too_long": true,
"title_too_short": false,
"deprecated_html_tags": false,
"duplicate_meta_tags": true,
"duplicate_title_tag": false,
"no_image_alt": true,
"no_image_title": true,
"no_description": false,
"no_title": false,
"no_favicon": false,
"seo_friendly_url": false,
"flash": false,
"frame": false,
"lorem_ipsum": false,
"seo_friendly_url_characters_check": true,
"seo_friendly_url_dynamic_check": true,
"seo_friendly_url_keywords_check": false,
"seo_friendly_url_relative_length_check": true,
"is_orphan_page": false,
"is_link_relation_conflict": false,
"has_links_to_redirects": false,
"recursive_canonical": false,
"canonical_chain": false,
"canonical_to_redirect": false,
"canonical_to_broken": false
},
"content_encoding": "gzip",
"media_type": "text/html",
"server": "Apache",
"is_resource": false,
"last_modified": {
"header": "2021-10-21 14:11:10 +00:00",
"sitemap": null,
"meta_tag": "2021-03-15 00:00:00 +00:00"
}
}
]
}
]
}
]
}
]
}错误处理
请基于 status_code 与 status_message 实现统一错误处理机制,重点:
- 顶层请求是否成功
tasks[]中是否存在单任务失败- 抓取是否仍处于
in_progress - 分页参数
limit、offset是否出范围
错误码完整列表参考 /v3/appendix/errors。
使用说明
- 通过
/v3/on_page/task_post/创建 On-Page 任务并获取任务id - 调用
/v3/on_page/duplicate_tags,传该任务id和目标重复标签类型 - 如需只查看某个重复标签文本对应的页面,可使用
accumulator - 使用
limit与offset进行分页获取 - 结合
duplicate_title、duplicate_description、onpage_score、checks等字段进行批量修复优级排序
实用场景
- 定位重复标题页:批量找出同一
title的页面,快速修复站标题同质化问题,提升搜索结果区分度。 - 筛查重复描述页:识别复用同一
meta description的页面,便于统一改写摘要文案,提升点击率表现。 - 按标签值回查问题页面:通过
accumulator精确查询某个标题或描述被哪些页面重复使用,适合排查模板误或批量发布异常。 - 结合页面质量指标排序修复:将重复标签结果与
onpage_score、page_timing、checks联合使用,优处理流量价值高且问题严重的页面。 - 识别模板型 SEO 问题:根据重复标签页面的 URL、点击层级、canonical、一致性等信息,判断问题是否来自栏目模板、分页页或多地区页面生成逻辑。