主题
页面重复检测
接口说明
/v3/on_page/duplicate_content 用于返回与指定页面相似的页面列表。响应中除了重复候选页外,还会返回页面性能、页面质量以及相似度等信息。
本接口使用 SimHash 算法计算相似度,取值范围为 0 到 10:
0:两段不相似10:两段一致
请求方式
POST https://api.seermartech.cn/v3/on_page/duplicate_content
计费说明
使用该功能本身不额外收费。任务结果在后续 30 天可获取。
扣费以响应头 X-SeerMarTech-Charge-CNY 为准。 参考价约 ¥0.0000 / 次。
请求格式
所有 POST 数据需使用 JSON(UTF-8 编码),请求体格式为 JSON 数组:
json
[
{
"id": "07131248-1535-0216-1000-17384017ad04",
"url": "https://www.example.com/"
}
]说明:
id需要通过/v3/on_page/task_post/提交抓取任务后,从返回结果中获取。
请求参数
| 字段 | 类型 | 是否填 | 说明 |
|---|---|---|---|
id | string | 是 | 任务 ID。可从 /v3/on_page/task_post/ 的响应中获取。示例:07131248-1535-0216-1000-17384017ad04 |
url | string | 是 | 页面 URL。指定要检测重复的起始页面。 |
similarity | integer | 否 | 相似度阈值,范围 0-10。默认当值大于等于 6 时视为重复。 |
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,完整列表见 /v3/appendix/errors |
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 | 已抓取页面数 |
items_count | integer | 结果项数量 |
items | array | 重复结果列表 |
items[] 字段
| 字段 | 类型 | 说明 |
|---|---|---|
url | string | 指定页面 URL |
total_count | integer | 重复页面总数 |
pages | array | 重复页面列表 |
pages[] 字段
| 字段 | 类型 | 说明 |
|---|---|---|
similarity | integer | 相似度,范围 0-10;默认 >= 6 视为重复 |
page | object | 重复页面 |
page 对象说明
以下字段为重复页面的详细信息,通常对应 resource_type = html 的页面。
基础字段
| 字段 | 类型 | 说明 |
|---|---|---|
resource_type | string | 返回资源类型,固定为 html |
status_code | integer | 页面状态码 |
location | string | 重定向目标 URL,对应响应头 Location |
url | string | 页面 URL |
meta | object | 页面属性信息,取决于 resource_type |
meta 对象常用字段
| 字段 | 类型 | 说明 |
|---|---|---|
title | string | 页面标题 |
charset | integer | 字符编码页码,例如 65001 |
follow | boolean | 是否爬虫跟踪页面链接;若为 false,通常表示 meta robots 中 nofollow |
generator | string | meta generator |
htags | object | HTML 标题标签数据 |
description | string | meta description |
favicon | string | 页面 favicon 地址 |
meta_keywords | string | keywords标签 |
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 | Core Web Vitals 中的 CLS,衡量布局稳定性 |
content 对象
| 字段 | 类型 | 说明 |
|---|---|---|
plain_text_size | integer | 页面纯文本总大小,单位字节 |
plain_text_rate | float | 纯文本占比,即 plain_text_size / size |
plain_text_word_count | float | 页面词数 |
automated_readability_index | float | Automated Readability Index |
coleman_liau_readability_index | float | Coleman–Liau Index |
dale_chall_readability_index | float | Dale–Chall Readability Index |
flesch_kincaid_readability_index | float | Flesch–Kincaid Readability Index |
smog_readability_index | float | SMOG Readability Index |
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 | 页面中使用的过时标签 |
duplicate_meta_tags | array | 页面中的重复 meta 标签 |
spell | object | 拼写检查结果 |
resource_errors | object | 资源错误与警告 |
social_media_tags | object | 页面中的社交媒体标签,如 Open Graph、Twitter Card |
spell 对象
| 字段 | 类型 | 说明 |
|---|---|---|
hunspell_language_code | string | 拼写检查语言代码 |
misspelled | array | 拼写错误词列表 |
misspelled[]
| 字段 | 类型 | 说明 |
|---|---|---|
word | string | 拼写错误的单词 |
resource_errors 对象
| 字段 | 类型 | 说明 |
|---|---|---|
errors | array | HTML 资源错误 |
warnings | array | HTML 资源警告 |
errors[]
| 字段 | 类型 | 说明 |
|---|---|---|
line | integer | 发现错误的行号 |
message | string | 错误信息 |
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 层
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 资源的时间 |
质量与状态字段
| 字段 | 类型 | 说明 |
|---|---|---|
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 | 是否存在重复标题 |
duplicate_description | boolean | 是否存在重复描述 |
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 对象
| 字段 | 类型 | 说明 |
|---|---|---|
cachable | boolean | 页面是否可缓存 |
ttl | integer | 缓存时长 |
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 标签;在 canonical = true 时有意义 |
no_h1_tag | boolean | 是否缺少或为空的 H1;在 canonical = true 时可用 |
https_to_http_links | boolean | HTTPS 页面是否链接到 HTTP 页面;在 canonical = true 时可用 |
has_html_doctype | boolean | 是否存在 HTML DOCTYPE 声明 |
size_greater_than_3mb | boolean | 页面大小是否 3MB;在 canonical = true 时可用 |
meta_charset_consistency | boolean | 字符集声明与编码是否不一致;在 canonical = true 时可用 |
has_meta_refresh_redirect | boolean | 是否存在 meta refresh 跳转;在 canonical = true 时可用 |
has_render_blocking_resources | boolean | 是否存在阻塞渲染的 CSS 或 JS;在 canonical = true 时可用 |
redirect_chain | boolean | 抓取前是否经历了至少两次重定向 |
low_content_rate | boolean | 文本占比是否低于 0.1;在 canonical = true 时可用 |
high_content_rate | boolean | 文本占比是否高于 0.9;在 canonical = true 时可用 |
low_character_count | boolean | 字符数是否少于 1024;在 canonical = true 时可用 |
high_character_count | boolean | 字符数是否 256000;在 canonical = true 时可用 |
small_page_size | boolean | 页面是否过小,小于 1024 字节;在 canonical = true 时可用 |
large_page_size | boolean | 页面是否过大, 1MB;在 canonical = true 时可用 |
low_readability_rate | boolean | Flesch–Kincaid 可读性得分是否低于 15;在 canonical = true 时可用 |
irrelevant_description | boolean | description 与正文是否不,阈值 0.2;在 canonical = true 时可用 |
irrelevant_title | boolean | title 与正文是否不,阈值 0.3;在 canonical = true 时可用 |
irrelevant_meta_keywords | boolean | keywords 与正文是否不,阈值 0.6;在 canonical = true 时可用 |
title_too_long | boolean | 标题是否 65 个字符;在 canonical = true 时可用 |
title_too_short | boolean | 标题是否少于 30 个字符;在 canonical = true 时可用 |
deprecated_html_tags | boolean | 是否过时 HTML 标签;在 canonical = true 时可用 |
duplicate_meta_tags | boolean | 是否存在同类型重复 meta 标签;在 canonical = true 时可用 |
duplicate_title_tag | boolean | 是否存在多个 title 标签;在 canonical = true 时可用 |
no_image_alt | boolean | 是否存在缺少 alt 的图片;在 canonical = true 时可用 |
no_image_title | boolean | 是否存在缺少 title 的图片;在 canonical = true 时可用 |
no_description | boolean | 是否缺少或为空的 description;在 canonical = true 时可用 |
no_title | boolean | 是否缺少或为空的 title;在 canonical = true 时可用 |
no_favicon | boolean | 是否缺少 favicon;在 canonical = true 时可用 |
seo_friendly_url | boolean | URL 是否符合 SEO 友好规范 |
flash | boolean | 是否 Flash素 |
frame | boolean | 是否 frame、iframe、frameset |
lorem_ipsum | boolean | 是否存在占位文本 lorem ipsum;在 canonical = true 时可用 |
has_misspelling | boolean | 页面是否拼写错误 |
seo_friendly_url_characters_check | boolean | URL 是否大小写拉丁字母、数字和连字符 |
seo_friendly_url_dynamic_check | boolean | URL 是否不含动态参数 |
seo_friendly_url_keywords_check | boolean | URL 是否与 title 语义一致 |
seo_friendly_url_relative_length_check | boolean | URL 长度是否不 120 个字符 |
is_orphan_page | boolean | 是否为孤立页,即没有站页面链接到该页 |
is_link_relation_conflict | boolean | 指向该页的站链接是否同时存在 dofollow 与 nofollow |
has_links_to_redirects | boolean | 页面是否链接到会继续发生重定向的 URL |
recursive_canonical | boolean | 是否存在递归 canonical 错误 |
canonical_chain | boolean | canonical 是否指向一个又 canonical 到页面的页面 |
canonical_to_redirect | boolean | canonical 是否指向一个发生 3XX 跳转的页面 |
canonical_to_broken | boolean | canonical 是否指向一个返回 4xx 或 5xx 的页面 |
页面字段
| 字段 | 类型 | 说明 |
|---|---|---|
content_encoding | string | 编码类型 |
media_type | string | 页面媒体类型 |
server | string | 服务器版本信息 |
is_resource | boolean | 是否为单一资源 |
last_modified | object | 资源更新时间信息;无数据时为 null |
last_modified 对象
| 字段 | 类型 | 说明 |
|---|---|---|
header | string | 响应头中的最后修改时间,UTC 格式 |
sitemap | string | sitemap 中记录的最后修改时间,UTC 格式 |
meta_tag | string | meta 标签中的最后修改时间,UTC 格式 |
请求示例
cURL
bash
curl --location --request POST "https://api.seermartech.cn/v3/on_page/duplicate_content" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json" \
--data-raw '[
{
"id": "07281559-0695-0216-0000-c269be8b7592",
"url": "https://www.etsy.com/"
}
]'Python
python
import requests
url = "https://api.seermartech.cn/v3/on_page/duplicate_content"
headers = {
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json"
}
data = [
{
"id": "07281559-0695-0216-0000-c269be8b7592",
"url": "https://www.etsy.com/"
}
]
response = requests.post(url, headers=headers, json=data)
print(response.json)TypeScript
typescript
import axios from "axios";
const postArray = [
{
id: "07281559-0695-0216-0000-c269be8b7592",
url: "https://www.etsy.com/"
}
];
axios({
method: "post",
url: "https://api.seermartech.cn/v3/on_page/duplicate_content",
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.3879 sec.",
"cost": 0,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"data": {
"api": "on_page",
"function": "duplicate_content",
"url": "https://www.etsy.com/"
},
"result": [
{
"items": [
{
"pages": [
{
"similarity": 10,
"page": {
"meta": {
"description": "Finde das perfekte handgemachte Geschenk, trendige und Vintage-Kleidung, ganz besonderen Schmuck und mehr… vieles mehr.",
"favicon": "https://www.etsy.com/images/favicon.ico",
"meta_keywords": null,
"canonical": "https://www.etsy.com/de/",
"internal_links_count": 99,
"external_links_count": 8,
"inbound_links_count": 28,
"images_count": 30,
"images_size": 758551,
"scripts_count": 7,
"scripts_size": 282064,
"stylesheets_count": 3,
"stylesheets_size": 97246,
"title_length": 107,
"description_length": 119,
"render_blocking_scripts_count": 4,
"render_blocking_stylesheets_count": 31,
"cumulative_layout_shift": 0.10156329069412295,
"content": {
"plain_text_size": 9667,
"plain_text_rate": 0.038021482708032614,
"plain_text_word_count": 1226,
"automated_readability_index": 21.083439863562212,
"coleman_liau_readability_index": 9.494734111543448,
"dale_chall_readability_index": 11.653761227940086,
"flesch_kincaid_readability_index": -4.964475900934303,
"smog_readability_index": 25.173868470299045,
"description_to_content_consistency": 0.2142857164144516,
"title_to_content_consistency": 0.5,
"meta_keywords_to_content_consistency": null
},
"deprecated_tags": null,
"duplicate_meta_tags": [],
"spell": null,
"resource_errors": {
"errors": [],
"warnings": []
},
"social_media_tags": {
"fb:app_id": "89186614300",
"og:site_name": "Etsy",
"og:locale": "de_DE",
"og:title": "Etsy - Kaufe Handgefertigtes, Vintage-Sachen, Spezialanfertigungen und einzigartige Geschenke für alle ein.",
"og:description": "Finde das perfekte handgemachte Geschenk, trendige und Vintage-Kleidung, ganz besonderen Schmuck und mehr… vieles mehr."
}
},
"page_timing": {
"time_to_interactive": 1142,
"dom_complete": 1845,
"largest_contentful_paint": 1648.4750006347895,
"first_input_delay": 0.0550001859664917,
"connection_time": 9,
"time_to_secure_connection": 21,
"request_sent_time": 0,
"waiting_time": 632,
"download_time": 6,
"duration_time": 668,
"fetch_start": 0,
"fetch_end": 668
},
"onpage_score": 88.36,
"total_dom_size": 2992954,
"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": 254576,
"encoded_size": 44751,
"total_transfer_size": 46552,
"fetch_time": "2021-02-24 17:02:10 +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[].status_code/tasks[].status_message- 页面级抓取状态,如
crawl_progress - 自定义脚本执行异常字段
custom_js_client_exception
完整错误码与说明请参考 /v3/appendix/errors。
常见判断方式:
20000:请求成功- 状态码:表示参数错误、认证失败、任务异常或系统错误,应根据返回信息重试或修正请求
使用说明与注意事项
- 本接口依赖已创建的 On-Page 抓取任务,因此通过
/v3/on_page/task_post/获取id。 similarity默认阈值为6,适合常见重复识别;如需更严格或更宽松的匹,可自行调整。- 若
crawl_progress = in_progress,说明站点抓取尚未完成,此时返回结果可能不是最终完整数据。 checks中大量字段在canonical = true时可用,解析时应容字段为空或缺失的。custom_js_response在任务创建阶段了custom_js时返回。
实用场景
- 定位站重复页面:识别同一站点中高度相似的 URL,减少耗与索引浪费。
- 筛查模板页重复问题:发现分类页、筛选页、参数页之间的正文重复,规范 canonical 与索引策略。
- 评估采集或多语言页面质量:结合
similarity、title、description与正文一致性,判断页面是否存在低质量改写或机械复制。 - 排查 SEO 技术问题:同步获取重复页的标题、描述、canonical、重定向与渲染阻塞问题,便于一次性制定修复方案。
- 构建治理报表:基于
duplicate_content、onpage_score、checks等字段建立重复监控与优级处理列表。