Skip to content

页面重复检测

接口说明

/v3/on_page/duplicate_content 用于返回与指定页面相似的页面列表。响应中除了重复候选页外,还会返回页面性能、页面质量以及相似度等信息。

本接口使用 SimHash 算法计算相似度,取值范围为 010

  • 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/ 提交抓取任务后,从返回结果中获取。


请求参数

字段类型是否填说明
idstring任务 ID。可从 /v3/on_page/task_post/ 的响应中获取。示例:07131248-1535-0216-1000-17384017ad04
urlstring页面 URL。指定要检测重复的起始页面。
similarityinteger相似度阈值,范围 0-10。默认当值大于等于 6 时视为重复。
limitinteger返回页面数量上限。默认 100,最大 1000
offsetinteger结果偏移量。默认 0,最大 2000000。例如设置为 10 时,会跳过前 10 条结果。
tagstring自定义任务标识,最长 255 个字符。便于请求与结果对应,响应 data 中会回传该值。

返回结构

接口返回 JSON 数据,顶层 tasks 数组。

顶层字段

字段类型说明
versionstring当前 API 版本
status_codeinteger通用状态码,完整列表见 /v3/appendix/errors
status_messagestring通用状态信息,完整列表见 /v3/appendix/errors
timestring执行耗时,单位秒
costfloat所有任务总费用
tasks_countintegertasks 数组中的任务数
tasks_errorinteger返回错误的任务数
tasksarray任务结果数组

tasks[] 字段

字段类型说明
idstring本平台任务唯一标识,UUID 格式
status_codeinteger任务状态码,范围通常为 10000-60000,完整列表见 /v3/appendix/errors
status_messagestring任务状态说明
timestring任务执行耗时
costfloat单任务费用
result_countintegerresult 数组数量
patharrayURL 路径
dataobject与请求中提交参数一致
resultarray结果数组

result[] 字段说明

字段类型说明
crawl_progressstring抓取进度,可能值:in_progressfinished
crawl_statusobject抓取会话
max_crawl_pagesinteger抓取页面上限,对应建任务时设置的 max_crawl_pages
pages_in_queueinteger当前抓取队列中的页面数
pages_crawledinteger已抓取页面数
items_countinteger结果项数量
itemsarray重复结果列表

items[] 字段

字段类型说明
urlstring指定页面 URL
total_countinteger重复页面总数
pagesarray重复页面列表

pages[] 字段

字段类型说明
similarityinteger相似度,范围 0-10;默认 >= 6 视为重复
pageobject重复页面

page 对象说明

以下字段为重复页面的详细信息,通常对应 resource_type = html 的页面。

基础字段

字段类型说明
resource_typestring返回资源类型,固定为 html
status_codeinteger页面状态码
locationstring重定向目标 URL,对应响应头 Location
urlstring页面 URL
metaobject页面属性信息,取决于 resource_type

meta 对象常用字段

字段类型说明
titlestring页面标题
charsetinteger字符编码页码,例如 65001
followboolean是否爬虫跟踪页面链接;若为 false,通常表示 meta robotsnofollow
generatorstringmeta generator
htagsobjectHTML 标题标签数据
descriptionstringmeta description
faviconstring页面 favicon 地址
meta_keywordsstringkeywords标签
canonicalstringcanonical 页面地址
internal_links_countinteger页面链接数量
external_links_countinteger页面外部链接数量
inbound_links_countinteger指向该页的站链接数量
images_countinteger图片数量
images_sizeinteger图片总大小,单位字节
scripts_countinteger脚本数量
scripts_sizeinteger脚本总大小,单位字节
stylesheets_countinteger样式表数量
stylesheets_sizeinteger样式表总大小,单位字节
title_lengthintegertitle 字符长度
description_lengthintegerdescription 字符长度
render_blocking_scripts_countinteger阻塞渲染的脚本数量
render_blocking_stylesheets_countinteger阻塞渲染的样式表数量
cumulative_layout_shiftfloatCore Web Vitals 中的 CLS,衡量布局稳定性

content 对象

字段类型说明
plain_text_sizeinteger页面纯文本总大小,单位字节
plain_text_ratefloat纯文本占比,即 plain_text_size / size
plain_text_word_countfloat页面词数
automated_readability_indexfloatAutomated Readability Index
coleman_liau_readability_indexfloatColeman–Liau Index
dale_chall_readability_indexfloatDale–Chall Readability Index
flesch_kincaid_readability_indexfloatFlesch–Kincaid Readability Index
smog_readability_indexfloatSMOG Readability Index
description_to_content_consistencyfloatdescription 与正文一致性,范围 0-1
title_to_content_consistencyfloattitle 与正文一致性,范围 0-1
meta_keywords_to_content_consistencyfloatkeywords 与正文一致性,范围 0-1

###与结构问题

字段类型说明
deprecated_tagsarray页面中使用的过时标签
duplicate_meta_tagsarray页面中的重复 meta 标签
spellobject拼写检查结果
resource_errorsobject资源错误与警告
social_media_tagsobject页面中的社交媒体标签,如 Open Graph、Twitter Card

spell 对象

字段类型说明
hunspell_language_codestring拼写检查语言代码
misspelledarray拼写错误词列表

misspelled[]

字段类型说明
wordstring拼写错误的单词

resource_errors 对象

字段类型说明
errorsarrayHTML 资源错误
warningsarrayHTML 资源警告

errors[]

字段类型说明
lineinteger发现错误的行号
messagestring错误信息

warnings[]

字段类型说明
lineinteger对应警告的行号;若为 0,表示整页级别警告
messagestring警告信息

可能出现的警告:

  • "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_interactiveintegerTTI,可交互时间,单位毫秒
dom_completeinteger页面及子资源下载完成时间,单位毫秒
largest_contentful_paintfloatLCP,最大绘制时间,单位毫秒
first_input_delayfloatFID,首次延迟,单位毫秒
connection_timeinteger建立服务器连接耗时,单位毫秒
time_to_secure_connectioninteger建立连接耗时,单位毫秒
request_sent_timeinteger请求发送耗时,单位毫秒
waiting_timeinteger首字节时间 TTFB,单位毫秒
download_timeinteger浏览器接收响应耗时,单位毫秒
duration_timeinteger浏览器完成接收完整响应总耗时,单位毫秒
fetch_startinteger开始下载 HTML 资源的时间
fetch_endinteger完成下载 HTML 资源的时间

质量与状态字段

字段类型说明
onpage_scorefloat页面 On-Page 优化评分,满分 100
total_dom_sizeinteger页面 DOM 总大小
custom_js_responsestring/object/integer自定义 JS 执行结果。需在 /v3/on_page/task_post/ 中设置 custom_js 才会返回
custom_js_client_exceptionstring自定义 JS 执行错误信息
broken_resourcesboolean页面是否损坏资源
broken_linksboolean页面是否失效链接
duplicate_titleboolean是否存在重复标题
duplicate_descriptionboolean是否存在重复描述
duplicate_contentboolean是否存在重复
click_depthinteger从首页到达该页所需点击次数
sizeinteger资源大小,字节
encoded_sizeinteger编码后页面大小,字节
total_transfer_sizeinteger压缩传输大小
fetch_timestring抓取时间,UTC 格式:yyyy-mm-dd hh-mm-ss +00:00

cache_control 对象

字段类型说明
cachableboolean页面是否可缓存
ttlinteger缓存时长

checks 对象说明

checks 返回一组页面检查项布尔值,用于识别 SEO、可访问性、结构与性能问题。

基础检查项

字段类型说明
no_content_encodingboolean页面是否未启用压缩
high_loading_timeboolean页面加载时间是否 3 秒
is_redirectboolean页面是否发生 3XX 重定向
is_4xx_codeboolean页面是否返回 4xx
is_5xx_codeboolean页面是否返回 5xx
is_brokenboolean页面是否损坏;响应码小于 200 或大于 400
is_wwwboolean是否位于 www 子域
is_httpsboolean是否使用 HTTPS
is_httpboolean是否使用 HTTP
high_waiting_timebooleanTTFB 是否 1.5 秒
no_doctypeboolean是否缺少 <!DOCTYPE HTML>
canonicalboolean页面是否为 canonical
no_encoding_meta_tagboolean是否缺少编码声明 meta 标签;在 canonical = true 时有意义
no_h1_tagboolean是否缺少或为空的 H1;在 canonical = true 时可用
https_to_http_linksbooleanHTTPS 页面是否链接到 HTTP 页面;在 canonical = true 时可用
has_html_doctypeboolean是否存在 HTML DOCTYPE 声明
size_greater_than_3mbboolean页面大小是否 3MB;在 canonical = true 时可用
meta_charset_consistencyboolean字符集声明与编码是否不一致;在 canonical = true 时可用
has_meta_refresh_redirectboolean是否存在 meta refresh 跳转;在 canonical = true 时可用
has_render_blocking_resourcesboolean是否存在阻塞渲染的 CSS 或 JS;在 canonical = true 时可用
redirect_chainboolean抓取前是否经历了至少两次重定向
low_content_rateboolean文本占比是否低于 0.1;在 canonical = true 时可用
high_content_rateboolean文本占比是否高于 0.9;在 canonical = true 时可用
low_character_countboolean字符数是否少于 1024;在 canonical = true 时可用
high_character_countboolean字符数是否 256000;在 canonical = true 时可用
small_page_sizeboolean页面是否过小,小于 1024 字节;在 canonical = true 时可用
large_page_sizeboolean页面是否过大, 1MB;在 canonical = true 时可用
low_readability_ratebooleanFlesch–Kincaid 可读性得分是否低于 15;在 canonical = true 时可用
irrelevant_descriptionbooleandescription 与正文是否不,阈值 0.2;在 canonical = true 时可用
irrelevant_titlebooleantitle 与正文是否不,阈值 0.3;在 canonical = true 时可用
irrelevant_meta_keywordsbooleankeywords 与正文是否不,阈值 0.6;在 canonical = true 时可用
title_too_longboolean标题是否 65 个字符;在 canonical = true 时可用
title_too_shortboolean标题是否少于 30 个字符;在 canonical = true 时可用
deprecated_html_tagsboolean是否过时 HTML 标签;在 canonical = true 时可用
duplicate_meta_tagsboolean是否存在同类型重复 meta 标签;在 canonical = true 时可用
duplicate_title_tagboolean是否存在多个 title 标签;在 canonical = true 时可用
no_image_altboolean是否存在缺少 alt 的图片;在 canonical = true 时可用
no_image_titleboolean是否存在缺少 title 的图片;在 canonical = true 时可用
no_descriptionboolean是否缺少或为空的 description;在 canonical = true 时可用
no_titleboolean是否缺少或为空的 title;在 canonical = true 时可用
no_faviconboolean是否缺少 favicon;在 canonical = true 时可用
seo_friendly_urlbooleanURL 是否符合 SEO 友好规范
flashboolean是否 Flash素
frameboolean是否 frameiframeframeset
lorem_ipsumboolean是否存在占位文本 lorem ipsum;在 canonical = true 时可用
has_misspellingboolean页面是否拼写错误
seo_friendly_url_characters_checkbooleanURL 是否大小写拉丁字母、数字和连字符
seo_friendly_url_dynamic_checkbooleanURL 是否不含动态参数
seo_friendly_url_keywords_checkbooleanURL 是否与 title 语义一致
seo_friendly_url_relative_length_checkbooleanURL 长度是否不 120 个字符
is_orphan_pageboolean是否为孤立页,即没有站页面链接到该页
is_link_relation_conflictboolean指向该页的站链接是否同时存在 dofollow 与 nofollow
has_links_to_redirectsboolean页面是否链接到会继续发生重定向的 URL
recursive_canonicalboolean是否存在递归 canonical 错误
canonical_chainbooleancanonical 是否指向一个又 canonical 到页面的页面
canonical_to_redirectbooleancanonical 是否指向一个发生 3XX 跳转的页面
canonical_to_brokenbooleancanonical 是否指向一个返回 4xx5xx 的页面

页面字段

字段类型说明
content_encodingstring编码类型
media_typestring页面媒体类型
serverstring服务器版本信息
is_resourceboolean是否为单一资源
last_modifiedobject资源更新时间信息;无数据时为 null

last_modified 对象

字段类型说明
headerstring响应头中的最后修改时间,UTC 格式
sitemapstringsitemap 中记录的最后修改时间,UTC 格式
meta_tagstringmeta 标签中的最后修改时间,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:请求成功
  • 状态码:表示参数错误、认证失败、任务异常或系统错误,应根据返回信息重试或修正请求

使用说明与注意事项

  1. 本接口依赖已创建的 On-Page 抓取任务,因此通过 /v3/on_page/task_post/ 获取 id
  2. similarity 默认阈值为 6,适合常见重复识别;如需更严格或更宽松的匹,可自行调整。
  3. crawl_progress = in_progress,说明站点抓取尚未完成,此时返回结果可能不是最终完整数据。
  4. checks 中大量字段在 canonical = true 时可用,解析时应容字段为空或缺失的。
  5. custom_js_response 在任务创建阶段了 custom_js 时返回。

实用场景

  • 定位站重复页面:识别同一站点中高度相似的 URL,减少耗与索引浪费。
  • 筛查模板页重复问题:发现分类页、筛选页、参数页之间的正文重复,规范 canonical 与索引策略。
  • 评估采集或多语言页面质量:结合 similaritytitledescription 与正文一致性,判断页面是否存在低质量改写或机械复制。
  • 排查 SEO 技术问题:同步获取重复页的标题、描述、canonical、重定向与渲染阻塞问题,便于一次性制定修复方案。
  • 构建治理报表:基于 duplicate_contentonpage_scorechecks 等字段建立重复监控与优级处理列表。

统一入口:官网 · LLM API · 控制台