主题
OnPage 即时页面分析
接口说明
通过本接口,你可以获取指定页面的页面级 SEO 数据,并评估该页面对自然搜索的优化。
这是一个 Live 实时接口:提交请求后会直接返回结果,无需再发起单独的 GET 请求查询任务结果。
- 请求方法:
POST - 接口地址:
https://api.seermartech.cn/v3/on_page/instant_pages
计费说明
该接口按请求计费。
原文未提供固定单价,因此无法直接换算人民币参考价。扣费以响应头 X-SeerMarTech-Charge-CNY 为准。
如果启用了以下参数,通常会产生额外费用:
load_resourcesenable_javascriptenable_browser_renderingcustom_js
请求限制
- 每分钟最多可发送 2000 次 API 请求
- 每个请求最多 20 个任务
- 最大并发请求数为 30
- 单次请求中最多可提交 20 个 URL
- 但这些 URL 中,相同域名最多不能 5 个
注意:如果任务中重复的抓取主机(crawl host),接口会返回
40501错误。 为该错误,请不要在前一个同域名任务仍处于抓取队列时,再次提交同域名页面任务。
请求体格式
所有 POST 数据使用 UTF-8 编码的 JSON 格式提交。 请求体为 JSON 数组:
json
[
{
"url": "https://example.com/page"
}
]请求参数
| 字段名 | 类型 | 说明 |
|---|---|---|
url | string | 填。目标页面的绝对 URL。返回该 URL 对应页面的结果。 |
custom_user_agent | string | 可选。自定义抓取 User-Agent。默认值:Mozilla/5.0 (compatible; RSiteAuditor) |
browser_preset | string | 可选。浏览器屏幕参数预设,可选值:desktop、mobile、tablet。使用该字段时无需再传 browser_screen_width、browser_screen_height、browser_screen_scale_factor。需将 enable_javascript 或 enable_browser_rendering 设为 true。 |
browser_screen_width | integer | 可选。自定义浏览器宽度,范围 240–9999 像素。设置后 browser_preset 会被忽略。需启用 enable_javascript 或 enable_browser_rendering。 |
browser_screen_height | integer | 可选。自定义浏览器高度,范围 240–9999 像素。设置后 browser_preset 会被忽略。需启用 enable_javascript 或 enable_browser_rendering。 |
browser_screen_scale_factor | float | 可选。自定义屏幕缩放比例,范围 0.5–3。设置后 browser_preset 会被忽略。需启用 enable_javascript 或 enable_browser_rendering。 |
store_raw_html | boolean | 可选。是否保存抓取到的 HTML,以便通过 /v3/on_page/raw_html/ 获取页面 HTML。默认 false。 |
accept_language | string | 可选。访问网站时使用的语言头,支持 xx、xx-XX、xxx-XX 等格式。未设置时,部分网站可能拒绝访问,返回结果中页面类型可能为 "broken"。 |
load_resources | boolean | 可选。是否加载图片、样式表、脚本及损坏资源。默认 false。启用后通常会产生额外费用。 |
enable_javascript | boolean | 可选。是否执行页面中的 JavaScript。默认 false。启用后通常会产生额外费用。 |
enable_browser_rendering | boolean | 可选。是否模拟浏览器渲染并测量 Core Web Vitals。默认 false。启用后会自动开启 enable_javascript 和 load_resources。设置为 true 后,可在响应中获得 FID、CLS、LCP 等指标。通常会产生额外费用。 |
disable_cookie_popup | boolean | 可选。是否禁用 Cookie 同意弹窗。默认 false。 |
return_despite_timeout | boolean | 可选。若页面在 120 秒未加载完成并时,是否仍返回已获取的数据。默认 false。 |
enable_xhr | boolean | 可选。是否页面发起 XMLHttpRequest 请求。默认 false。若启用,同时将 enable_javascript 设为 true。 |
custom_js | string | 可选。自定义 JavaScript 脚本。脚本执行时间上限为 700 ms。返回值会出现在响应中的 custom_js_response 字段。启用后通常会产生额外费用。 |
validate_micromarkup | boolean | 可选。是否启用微数据校验。设为 true 后,可结合任务 id 调用 /v3/on_page/microdata/。默认 false。 |
check_spell | boolean | 可选。是否基于 Hunspell 执行拼写检查。默认 false。 |
checks_threshold | array | 可选。自定义 checks 数组中的阈值。支持修改整数型阈值。 |
switch_pool | boolean | 可选。是否切换到额外代理池获取数据。适用于批量创建任务时,偶发 rate-limit 或 site_unreachable 错误的场景。 |
ip_pool_for_scan | string | 可选。选择用于抓取的代理池地区。可选值:us、de。适用于某些地区无法访问页面、导致 site_unreachable 的。 |
browser_preset 预设值说明
当启用 browser_preset 时,各预设对应参数如下:
desktopbrowser_screen_width: 1920browser_screen_height: 1080browser_screen_scale_factor: 1mobilebrowser_screen_width: 390browser_screen_height: 844browser_screen_scale_factor: 3tabletbrowser_screen_width: 1024browser_screen_height: 1366browser_screen_scale_factor: 2
custom_js 使用说明
你可以通过 custom_js 执行一段自定义脚本,并在响应中通过 custom_js_response 获取返回结果。
示例:
js
meta = {};
meta.url = document.URL;
meta.test = 'test';
meta;返回结果示例:
json
"custom_js_response": {
"url": "https://example.com/",
"test": "test"
}另一个检测埋点脚本的示例:
js
let meta = { haveGoogleAnalytics: false, haveTagManager: false };
for (var i = 0; i < document.scripts.length; i++) {
let src = document.scripts[i].getAttribute("src");
if (src != undefined) {
if (src.indexOf("analytics.js") >= 0)
meta.haveGoogleAnalytics = true;
if (src.indexOf("gtm.js") >= 0)
meta.haveTagManager = true;
}
}
meta;响应结构
接口返回 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 | 任务结果数组 |
建议你在系统中完善异常与错误处理逻辑。完整错误码体系可参考
/v3/appendix/errors。
tasks 数组字段
| 字段名 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一标识,UUID 格式 |
status_code | integer | 任务状态码,范围通常在 10000-60000 |
status_message | string | 任务状态说明 |
time | string | 任务执行耗时 |
cost | float | 单任务费用,单位 USD |
result_count | integer | result 数组数量 |
path | array | URL 路径 |
data | object | 与请求中提交的参数一致 |
result | array | 结果数组 |
result 层通用字段
| 字段名 | 类型 | 说明 |
|---|---|---|
crawl_progress | string | 抓取进度,可能值:in_progress、finished |
crawl_status | object | 抓取状态,此接口中通常为 null |
crawl_gateway_address | string | 本次抓取使用的爬虫 IP |
total_items_count | integer | 数据库中项目总数 |
items_count | integer | items 数组中的数 |
items | array | 页面或资源结果项 |
items 结果类型说明
items 中的每个会根据资源类型返回不同字段。常见 resource_type括:
htmlbrokenredirectscriptimagestylesheet
下面按类型说明。
HTML 页面结果字段(resource_type: "html")
基础字段
| 字段名 | 类型 | 说明 |
|---|---|---|
resource_type | string | 资源类型,固定为 html |
status_code | integer | 页面状态码 |
location | string | 跳转目标 URL |
url | string | 页面 URL |
title | string | 页面标题 |
charset | integer | 代码页,例如 65001 |
follow | boolean | 是否搜索引擎跟踪页面链接;若为 false,通常表示 meta robots 含 nofollow |
generator | string | meta generator 标签 |
description | string | meta description |
favicon | string | 页面 favicon 地址 |
meta_keywords | string | keywords标签 |
canonical | string | 规范页 URL |
meta_title | string | 页面 meta title |
content_encoding | string | 编码类型 |
media_type | string | 媒体类型,如 text/html |
server | string | 服务器版本信息 |
is_resource | boolean | 是否为单一资源 |
url_length | integer | URL 总长度 |
relative_url_length | integer | 相对 URL 长度 |
页面结构与资源统计
| 字段名 | 类型 | 说明 |
|---|---|---|
meta | object | 页面属性对象,随 resource_type 变化 |
htags | object | 标题标签统计,如 h1、h2 等 |
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 | 样式表总大小,字节 |
render_blocking_scripts_count | integer | 阻塞渲染的脚本数量 |
render_blocking_stylesheets_count | integer | 阻塞渲染的样式表数量 |
total_dom_size | integer | 页面 DOM 总大小 |
标题与描述长度
| 字段名 | 类型 | 说明 |
|---|---|---|
title_length | integer | title 标签字符数 |
description_length | integer | description 标签字符数 |
Core Web Vitals 与性能指标
| 字段名 | 类型 | 说明 |
|---|---|---|
cumulative_layout_shift | float | CLS,页面布局稳定性指标 |
page_timing | object | 页面加载性能数据 |
page_timing.time_to_interactive | integer | TTI,可交互时间,毫秒 |
page_timing.dom_complete | integer | 页面及子资源下载完成时间,毫秒 |
page_timing.largest_contentful_paint | float | LCP,最大绘制时间,毫秒 |
page_timing.first_input_delay | float | FID,首次延迟,毫秒 |
page_timing.connection_time | integer | 建立连接耗时,毫秒 |
page_timing.time_to_secure_connection | integer | 建立连接耗时,毫秒 |
page_timing.request_sent_time | integer | 请求发送耗时,毫秒 |
page_timing.waiting_time | integer | 首字节时间(TTFB),毫秒 |
page_timing.download_time | integer | 下载响应耗时,毫秒 |
page_timing.duration_time | integer | 总耗时,毫秒 |
page_timing.fetch_start | integer | 开始下载 HTML 的时间 |
page_timing.fetch_end | integer | 完成下载 HTML 的时间 |
###分析字段
| 字段名 | 类型 | 说明 |
|---|---|---|
content | object | 页面概览 |
content.plain_text_size | integer | 页面纯文本总大小,字节 |
content.plain_text_rate | integer | 纯文本大小与页面总大小的比率 |
content.plain_text_word_count | float | 页面词数 |
content.automated_readability_index | float | Automated Readability Index |
content.coleman_liau_readability_index | float | Coleman–Liau Index |
content.dale_chall_readability_index | float | Dale–Chall Readability Index |
content.flesch_kincaid_readability_index | float | Flesch–Kincaid Readability Index |
content.smog_readability_index | float | SMOG 可读性指标 |
content.description_to_content_consistency | float | description 与正文一致性,范围 0-1 |
content.title_to_content_consistency | float | title 与正文一致性,范围 0-1 |
content.meta_keywords_to_content_consistency | float | keywords 与正文一致性,范围 0-1 |
拼写、社交标签与自定义脚本
| 字段名 | 类型 | 说明 |
|---|---|---|
spell | object | 拼写检查结果 |
spell.hunspell_language_code | string | 拼写检查语言代码 |
spell.misspelled | array | 拼错词数组 |
spell.misspelled[].word | string | 拼错的单词 |
social_media_tags | object | 页面中识别到的社交媒体标签,如 Open Graph、Twitter Card |
custom_js_response | string/object/integer | 自定义 JS 执行结果,类型取决于脚本返回值 |
custom_js_client_exception | string | 自定义 JS 执行时报错信息 |
质量、抓取与缓存信息
| 字段名 | 类型 | 说明 |
|---|---|---|
onpage_score | float | 页面 OnPage 优化得分,满分 100 |
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 格式 |
cache_control | object | 缓存信息 |
cache_control.cachable | boolean | 是否可缓存 |
cache_control.ttl | integer | 缓存 TTL |
last_modified | object | 页面变更时间信息 |
last_modified.header | string | Header 中记录的最后修改时间 |
last_modified.sitemap | string | Sitemap 中记录的最后修改时间 |
last_modified.meta_tag | string | 页面 meta 标签中的最后修改时间 |
错误与警告
| 字段名 | 类型 | 说明 |
|---|---|---|
resource_errors | object | 资源错误与警告 |
resource_errors.errors | array | 错误列表 |
resource_errors.errors[].line | integer | 错误所在行 |
resource_errors.errors[].column | integer | 错误所在列 |
resource_errors.errors[].message | string | 错误信息 |
resource_errors.errors[].status_code | integer | 错误状态码 |
resource_errors.warnings | array | 警告列表 |
resource_errors.warnings[].line | integer | 警告行;0 表示整页 |
resource_errors.warnings[].column | integer | 警告列;0 表示整页 |
resource_errors.warnings[].message | string | 警告信息 |
resource_errors.warnings[].status_code | integer | 警告状态码 |
resource_errors.errors[].status_code 可选值
0— 未识别错误501— HTML 解析错误1501— JS 解析错误2501— CSS 解析错误3501— 图片解析错误3502— 图片缩放值为 03503— 图片大小为 03504— 图片格式无效
resource_errors.warnings[].status_code 可选值
0— 未识别警告1— 存在 60 个同级子节点的节点2— DOM 树节点数 15003— HTML 深度 32 层
常见警告信息
"Has node with more than 60 childs.""Has more that 1500 nodes.""HTML depth more than 32 tags."
checks 检查项
checks 对象用于标记页面是否触发了各类 OnPage 检查规则。
常见字段:
| 字段名 | 类型 | 说明 |
|---|---|---|
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 秒 |
has_micromarkup | boolean | 页面微数据标记 |
has_micromarkup_errors | boolean | 页面存在微数据错误 |
no_doctype | boolean | 页面缺少 <!DOCTYPE HTML> |
has_html_doctype | boolean | 页面存在 HTML DOCTYPE |
canonical | boolean | 页面是否为规范页 |
no_encoding_meta_tag | boolean | 缺少编码 meta 标签 |
no_h1_tag | boolean | 缺少或为空的 H1 |
https_to_http_links | boolean | HTTPS 页面 HTTP 链接 |
size_greater_than_3mb | boolean | 页面大小 3MB |
meta_charset_consistency | boolean | 页面编码声明与编码一致性检查 |
has_meta_refresh_redirect | boolean | 存在 Meta Refresh 跳转 |
has_render_blocking_resources | 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 | Flesch–Kincaid 可读性得分低于 15 |
irrelevant_description | boolean | description 与正文性低于 0.2 |
irrelevant_title | boolean | title 与正文性低于 0.3 |
irrelevant_meta_keywords | boolean | keywords 与正文性低于 0.6 |
title_too_long | boolean | 标题 65 个字符 |
has_meta_title | boolean | 页面存在 meta_title |
title_too_short | boolean | 标题少于 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 | 页面 Lorem Ipsum |
has_misspelling | boolean | 存在拼写错误在 check_spell=true 时有效 |
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 长度检查 |
说明:部分检查项在
canonical = true时才会返回有效值。
损坏页面结果字段(resource_type: "broken")
当页面无法正常访问或被识别为损坏页面时,返回该类型。
主要字段:
resource_typestatus_codelocationurlsizeencoded_sizetotal_transfer_sizefetch_timefetch_timingduration_timefetch_startfetch_endcache_controlchecksresource_errorscontent_encodingmedia_typeserveris_resourcelast_modified
说明:
checks含基础可用性与状态类检查项,如is_redirect、is_4xx_code、is_5xx_code、is_broken等resource_errors的结构与html类型相同
跳转页面结果字段(resource_type: "redirect")
当目标 URL 返回跳转时,返回该类型。
说明:
location:跳转目标 URLurl:源 URLsize:对于redirect资源固定为0encoded_size:对于redirect资源固定为0
常见字段:
fetch_timefetch_timingresource_errorscache_controlcheckscontent_encodingmedia_typeserveris_resourcelast_modified
资源类结果字段(script / image / stylesheet)
当首个抓取 URL 本身是脚本、图片或样式表时,才会显示以下类型的资源结果。
通用字段
| 字段名 | 类型 | 说明 |
|---|---|---|
resource_type | string | 资源类型:script、image、stylesheet |
status_code | integer | 资源所在页面状态码 |
location | string | 跳转地址 |
url | string | 资源 URL |
size | integer | 资源大小,字节 |
encoded_size | integer | 编码后大小,字节 |
total_transfer_size | integer | 压缩传输大小,字节 |
fetch_time | string | 抓取时间 |
fetch_timing | object | 抓取耗时信息 |
cache_control | object | 缓存信息 |
checks | object | 资源检查结果 |
resource_errors | object | 资源错误与警告 |
content_encoding | string | 编码类型 |
media_type | string | 媒体类型 |
accept_type | string | 期望资源类型 |
server | string | 服务器版本 |
last_modified | object | 最后修改信息 |
图片资源特有字段
meta 对象在 resource_type = image 时可用,:
alternative_text:图片alt文本title:图片标题original_width:原始宽度original_height:原始高度width:显示宽度height:显示高度
资源检查字段示例
| 字段名 | 类型 | 说明 |
|---|---|---|
is_minified | boolean | 资源是否已压缩,适用于 stylesheet、script |
has_redirect | boolean | 资源是否存在重定向,适用于 script、image |
has_subrequests | boolean | 资源是否子请求,适用于 stylesheet、script |
original_size_displayed | boolean | 图片是否以原始尺寸展示适用于 image |
accept_type 可选值
anynoneimagesitemaprobotsscriptstylesheetredirecthtmltextotherfont
请求示例
cURL
bash
curl --location --request POST "https://api.seermartech.cn/v3/on_page/instant_pages" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json" \
--data-raw '[
{
"url": "https://example.com/blog",
"enable_javascript": true,
"custom_js": "meta = {}; meta.url = document.URL; meta;"
}
]'Python
python
import requests
url = "https://api.seermartech.cn/v3/on_page/instant_pages"
headers = {
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json"
}
data = [
{
"url": "https://example.com/apis/on-page-api"
},
{
"url": "https://example.com/blog",
"enable_javascript": True,
"custom_js": "meta = {}; meta.url = document.URL; meta;"
}
]
response = requests.post(url, headers=headers, json=data)
print(response.json)TypeScript
typescript
import axios from "axios";
const postData = [
{
url: "https://example.com/blog",
enable_javascript: true,
custom_js: "meta = {}; meta.url = document.URL; meta;"
}
];
axios({
method: "post",
url: "https://api.seermartech.cn/v3/on_page/instant_pages",
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.20220627",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.9929 sec.",
"cost": 0.00025,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"data": {
"api": "on_page",
"function": "instant_pages",
"url": "https://example.com/blog",
"custom_js": "meta = {}; meta.url = document.URL; meta;"
},
"result": [
{
"items": [
{
"description": "示例博客页面描述",
"favicon": "https://example.com/favicon.png",
"meta_keywords": null,
"canonical": "https://example.com/blog",
"internal_links_count": 98,
"external_links_count": 7,
"inbound_links_count": 0,
"images_count": 11,
"images_size": 0,
"scripts_count": 43,
"scripts_size": 0,
"stylesheets_count": 0,
"stylesheets_size": 0,
"title_length": 49,
"description_length": 128,
"render_blocking_scripts_count": 23,
"render_blocking_stylesheets_count": 0,
"cumulative_layout_shift": 0,
"meta_title": null,
"content": {
"plain_text_size": 2480,
"plain_text_rate": 0.016461342395921834,
"plain_text_word_count": 432,
"automated_readability_index": 7.008611111111112,
"coleman_liau_readability_index": 8.658888888888892,
"dale_chall_readability_index": 7.147202962962964,
"flesch_kincaid_readability_index": 57.98100000000002,
"smog_readability_index": 16.966058625362727,
"description_to_content_consistency": 0.4736842215061188,
"title_to_content_consistency": 0.7142857313156128,
"meta_keywords_to_content_consistency": null
},
"deprecated_tags": null,
"spell": null,
"social_media_tags": {
"og:locale": "en_US",
"og:type": "article",
"og:title": "示例博客标题",
"og:description": "示例博客页面描述",
"og:url": "https://example.com/blog",
"twitter:card": "summary_large_image"
},
"page_timing": {
"time_to_interactive": 38,
"dom_complete": 38,
"largest_contentful_paint": 0,
"first_input_delay": 0,
"connection_time": 15,
"time_to_secure_connection": 21,
"request_sent_time": 0,
"waiting_time": 0,
"download_time": 2,
"duration_time": 38,
"fetch_start": 0,
"fetch_end": 38
},
"onpage_score": 98.17,
"total_dom_size": 150673,
"custom_js_response": {
"url": "https://example.com/blog"
},
"custom_js_client_exception": null,
"resource_errors": {
"errors": null,
"warnings": []
},
"broken_resources": false,
"broken_links": false,
"duplicate_title": false,
"duplicate_description": false,
"duplicate_content": false,
"click_depth": 0,
"size": 150673,
"encoded_size": 0,
"total_transfer_size": 0,
"fetch_time": "2022-07-20 14:59:26 +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": false,
"is_https": true,
"is_http": false,
"high_waiting_time": false,
"no_doctype": false,
"has_html_doctype": true,
"canonical": true,
"no_encoding_meta_tag": false,
"no_h1_tag": false,
"https_to_http_links": false,
"size_greater_than_3mb": false,
"meta_charset_consistency": true,
"has_meta_refresh_redirect": false,
"has_render_blocking_resources": 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": false,
"irrelevant_description": false,
"irrelevant_title": false,
"irrelevant_meta_keywords": false,
"title_too_long": false,
"has_meta_title": false,
"title_too_short": false,
"deprecated_html_tags": false,
"duplicate_meta_tags": true,
"duplicate_title_tag": false,
"no_image_alt": false,
"no_image_title": true,
"no_description": false,
"no_title": false,
"no_favicon": false,
"seo_friendly_url": true,
"flash": false,
"frame": false,
"lorem_ipsum": false,
"seo_friendly_url_characters_check": true,
"seo_friendly_url_dynamic_check": true,
"seo_friendly_url_keywords_check": true,
"seo_friendly_url_relative_length_check": true
},
"content_encoding": "br",
"media_type": "text/html",
"server": "cloudflare",
"is_resource": false,
"last_modified": {
"header": null,
"sitemap": null,
"meta_tag": "2021-12-10 10:19:44 +00:00"
}
}
]
}
]
}
]
}错误处理建议
- 顶层
status_code用于判断整次请求状态 tasks[].status_code用于判断单个任务执行状态- 若同一批任务中某个域名正在队列中重复抓取,可能返回
40501 - 如站点限制访问、时、地区不可达,可能出现
broken类型结果,或触发site_unreachable/rate-limit类错误 - 建议同时记录:
- 请求参数
- 顶层
status_code - 任务级
status_code resource_errorschecks
实用场景
- 审核落地页 SEO 基础健康度:快速获取标题、描述、H 标签、canonical、外链等信息,用于批量发现页面优化缺口。
- 监控页面性能与 Core Web Vitals:启用浏览器渲染后采集 LCP、FID、CLS、TTI 等指标,帮助定位影响收录与体验的性能瓶颈。
- 排查页面可抓取与可访问问题:识别
broken、redirect、4xx/5xx、时、无编码压缩等问题,降低页面抓取失败和索引异常风险。 - 检查质量与性:分析正文占比、词数、可读性,以及标题/描述与正文的一致性,团队优化页面质量。
- 验证前端埋点与动态加载:借助
enable_javascript、enable_xhr和custom_js检测页面脚本执行结果、标签管理器或分析代码是否正常加载。