Skip to content

OnPage 即时页面分析

接口说明

通过本接口,你可以获取指定页面的页面级 SEO 数据,并评估该页面对自然搜索的优化。

这是一个 Live 实时接口:提交请求后会直接返回结果,无需再发起单独的 GET 请求查询任务结果。

  • 请求方法:POST
  • 接口地址:https://api.seermartech.cn/v3/on_page/instant_pages

计费说明

该接口按请求计费。

原文未提供固定单价,因此无法直接换算人民币参考价。扣费以响应头 X-SeerMarTech-Charge-CNY 为准

如果启用了以下参数,通常会产生额外费用:

  • load_resources
  • enable_javascript
  • enable_browser_rendering
  • custom_js

请求限制

  • 每分钟最多可发送 2000 次 API 请求
  • 每个请求最多 20 个任务
  • 最大并发请求数为 30
  • 单次请求中最多可提交 20 个 URL
  • 但这些 URL 中,相同域名最多不能 5 个

注意:如果任务中重复的抓取主机(crawl host),接口会返回 40501 错误。 为该错误,请不要在前一个同域名任务仍处于抓取队列时,再次提交同域名页面任务。

请求体格式

所有 POST 数据使用 UTF-8 编码的 JSON 格式提交。 请求体为 JSON 数组

json
[
 {
 "url": "https://example.com/page"
 }
]

请求参数

字段名类型说明
urlstring。目标页面的绝对 URL。返回该 URL 对应页面的结果。
custom_user_agentstring可选。自定义抓取 User-Agent。默认值:Mozilla/5.0 (compatible; RSiteAuditor)
browser_presetstring可选。浏览器屏幕参数预设,可选值:desktopmobiletablet。使用该字段时无需再传 browser_screen_widthbrowser_screen_heightbrowser_screen_scale_factor需将 enable_javascriptenable_browser_rendering 设为 true
browser_screen_widthinteger可选。自定义浏览器宽度,范围 2409999 像素。设置后 browser_preset 会被忽略。需启用 enable_javascriptenable_browser_rendering
browser_screen_heightinteger可选。自定义浏览器高度,范围 2409999 像素。设置后 browser_preset 会被忽略。需启用 enable_javascriptenable_browser_rendering
browser_screen_scale_factorfloat可选。自定义屏幕缩放比例,范围 0.53。设置后 browser_preset 会被忽略。需启用 enable_javascriptenable_browser_rendering
store_raw_htmlboolean可选。是否保存抓取到的 HTML,以便通过 /v3/on_page/raw_html/ 获取页面 HTML。默认 false
accept_languagestring可选。访问网站时使用的语言头,支持 xxxx-XXxxx-XX 等格式。未设置时,部分网站可能拒绝访问,返回结果中页面类型可能为 "broken"
load_resourcesboolean可选。是否加载图片、样式表、脚本及损坏资源。默认 false。启用后通常会产生额外费用。
enable_javascriptboolean可选。是否执行页面中的 JavaScript。默认 false。启用后通常会产生额外费用。
enable_browser_renderingboolean可选。是否模拟浏览器渲染并测量 Core Web Vitals。默认 false。启用后会自动开启 enable_javascriptload_resources。设置为 true 后,可在响应中获得 FIDCLSLCP 等指标。通常会产生额外费用。
disable_cookie_popupboolean可选。是否禁用 Cookie 同意弹窗。默认 false
return_despite_timeoutboolean可选。若页面在 120 秒未加载完成并时,是否仍返回已获取的数据。默认 false
enable_xhrboolean可选。是否页面发起 XMLHttpRequest 请求。默认 false。若启用,同时将 enable_javascript 设为 true
custom_jsstring可选。自定义 JavaScript 脚本。脚本执行时间上限为 700 ms。返回值会出现在响应中的 custom_js_response 字段。启用后通常会产生额外费用。
validate_micromarkupboolean可选。是否启用微数据校验。设为 true 后,可结合任务 id 调用 /v3/on_page/microdata/。默认 false
check_spellboolean可选。是否基于 Hunspell 执行拼写检查。默认 false
checks_thresholdarray可选。自定义 checks 数组中的阈值。支持修改整数型阈值
switch_poolboolean可选。是否切换到额外代理池获取数据。适用于批量创建任务时,偶发 rate-limitsite_unreachable 错误的场景。
ip_pool_for_scanstring可选。选择用于抓取的代理池地区。可选值:usde。适用于某些地区无法访问页面、导致 site_unreachable 的。

browser_preset 预设值说明

当启用 browser_preset 时,各预设对应参数如下:

  • desktop

  • browser_screen_width: 1920

  • browser_screen_height: 1080

  • browser_screen_scale_factor: 1

  • mobile

  • browser_screen_width: 390

  • browser_screen_height: 844

  • browser_screen_scale_factor: 3

  • tablet

  • browser_screen_width: 1024

  • browser_screen_height: 1366

  • browser_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 数组。

顶层响应字段

字段名类型说明
versionstring当前 API 版本
status_codeinteger通用状态码
status_messagestring通用状态信息
timestring执行耗时,单位秒
costfloat本次请求总费用,单位 USD
tasks_countintegertasks 数组中的任务数量
tasks_errorinteger返回错误的任务数量
tasksarray任务结果数组

建议你在系统中完善异常与错误处理逻辑。完整错误码体系可参考 /v3/appendix/errors

tasks 数组字段

字段名类型说明
idstring任务唯一标识,UUID 格式
status_codeinteger任务状态码,范围通常在 10000-60000
status_messagestring任务状态说明
timestring任务执行耗时
costfloat单任务费用,单位 USD
result_countintegerresult 数组数量
patharrayURL 路径
dataobject与请求中提交的参数一致
resultarray结果数组

result 层通用字段

字段名类型说明
crawl_progressstring抓取进度,可能值:in_progressfinished
crawl_statusobject抓取状态,此接口中通常为 null
crawl_gateway_addressstring本次抓取使用的爬虫 IP
total_items_countinteger数据库中项目总数
items_countintegeritems 数组中的数
itemsarray页面或资源结果项

items 结果类型说明

items 中的每个会根据资源类型返回不同字段。常见 resource_type括:

  • html
  • broken
  • redirect
  • script
  • image
  • stylesheet

下面按类型说明。

HTML 页面结果字段(resource_type: "html"

基础字段

字段名类型说明
resource_typestring资源类型,固定为 html
status_codeinteger页面状态码
locationstring跳转目标 URL
urlstring页面 URL
titlestring页面标题
charsetinteger代码页,例如 65001
followboolean是否搜索引擎跟踪页面链接;若为 false,通常表示 meta robotsnofollow
generatorstringmeta generator 标签
descriptionstringmeta description
faviconstring页面 favicon 地址
meta_keywordsstringkeywords标签
canonicalstring规范页 URL
meta_titlestring页面 meta title
content_encodingstring编码类型
media_typestring媒体类型,如 text/html
serverstring服务器版本信息
is_resourceboolean是否为单一资源
url_lengthintegerURL 总长度
relative_url_lengthinteger相对 URL 长度

页面结构与资源统计

字段名类型说明
metaobject页面属性对象,随 resource_type 变化
htagsobject标题标签统计,如 h1h2
internal_links_countinteger部链接数量
external_links_countinteger外部链接数量
inbound_links_countinteger指向该页的站链接数量
images_countinteger图片数量
images_sizeinteger图片总大小,字节
scripts_countinteger脚本数量
scripts_sizeinteger脚本总大小,字节
stylesheets_countinteger样式表数量
stylesheets_sizeinteger样式表总大小,字节
render_blocking_scripts_countinteger阻塞渲染的脚本数量
render_blocking_stylesheets_countinteger阻塞渲染的样式表数量
total_dom_sizeinteger页面 DOM 总大小

标题与描述长度

字段名类型说明
title_lengthintegertitle 标签字符数
description_lengthintegerdescription 标签字符数

Core Web Vitals 与性能指标

字段名类型说明
cumulative_layout_shiftfloatCLS,页面布局稳定性指标
page_timingobject页面加载性能数据
page_timing.time_to_interactiveintegerTTI,可交互时间,毫秒
page_timing.dom_completeinteger页面及子资源下载完成时间,毫秒
page_timing.largest_contentful_paintfloatLCP,最大绘制时间,毫秒
page_timing.first_input_delayfloatFID,首次延迟,毫秒
page_timing.connection_timeinteger建立连接耗时,毫秒
page_timing.time_to_secure_connectioninteger建立连接耗时,毫秒
page_timing.request_sent_timeinteger请求发送耗时,毫秒
page_timing.waiting_timeinteger首字节时间(TTFB),毫秒
page_timing.download_timeinteger下载响应耗时,毫秒
page_timing.duration_timeinteger总耗时,毫秒
page_timing.fetch_startinteger开始下载 HTML 的时间
page_timing.fetch_endinteger完成下载 HTML 的时间

###分析字段

字段名类型说明
contentobject页面概览
content.plain_text_sizeinteger页面纯文本总大小,字节
content.plain_text_rateinteger纯文本大小与页面总大小的比率
content.plain_text_word_countfloat页面词数
content.automated_readability_indexfloatAutomated Readability Index
content.coleman_liau_readability_indexfloatColeman–Liau Index
content.dale_chall_readability_indexfloatDale–Chall Readability Index
content.flesch_kincaid_readability_indexfloatFlesch–Kincaid Readability Index
content.smog_readability_indexfloatSMOG 可读性指标
content.description_to_content_consistencyfloatdescription 与正文一致性,范围 0-1
content.title_to_content_consistencyfloattitle 与正文一致性,范围 0-1
content.meta_keywords_to_content_consistencyfloatkeywords 与正文一致性,范围 0-1

拼写、社交标签与自定义脚本

字段名类型说明
spellobject拼写检查结果
spell.hunspell_language_codestring拼写检查语言代码
spell.misspelledarray拼错词数组
spell.misspelled[].wordstring拼错的单词
social_media_tagsobject页面中识别到的社交媒体标签,如 Open Graph、Twitter Card
custom_js_responsestring/object/integer自定义 JS 执行结果,类型取决于脚本返回值
custom_js_client_exceptionstring自定义 JS 执行时报错信息

质量、抓取与缓存信息

字段名类型说明
onpage_scorefloat页面 OnPage 优化得分,满分 100
broken_resourcesboolean是否存在损坏资源
broken_linksboolean是否存在损坏链接
duplicate_titleboolean是否存在重复标题
duplicate_descriptionboolean是否存在重复描述
duplicate_contentboolean是否存在重复
click_depthinteger从首页到该页所需点击层级
sizeinteger页面大小,字节
encoded_sizeinteger编码后页面大小,字节
total_transfer_sizeinteger压缩传输大小
fetch_timestring抓取时间,UTC 格式
cache_controlobject缓存信息
cache_control.cachableboolean是否可缓存
cache_control.ttlinteger缓存 TTL
last_modifiedobject页面变更时间信息
last_modified.headerstringHeader 中记录的最后修改时间
last_modified.sitemapstringSitemap 中记录的最后修改时间
last_modified.meta_tagstring页面 meta 标签中的最后修改时间

错误与警告

字段名类型说明
resource_errorsobject资源错误与警告
resource_errors.errorsarray错误列表
resource_errors.errors[].lineinteger错误所在行
resource_errors.errors[].columninteger错误所在列
resource_errors.errors[].messagestring错误信息
resource_errors.errors[].status_codeinteger错误状态码
resource_errors.warningsarray警告列表
resource_errors.warnings[].lineinteger警告行;0 表示整页
resource_errors.warnings[].columninteger警告列;0 表示整页
resource_errors.warnings[].messagestring警告信息
resource_errors.warnings[].status_codeinteger警告状态码

resource_errors.errors[].status_code 可选值

  • 0 — 未识别错误
  • 501 — HTML 解析错误
  • 1501 — JS 解析错误
  • 2501 — CSS 解析错误
  • 3501 — 图片解析错误
  • 3502 — 图片缩放值为 0
  • 3503 — 图片大小为 0
  • 3504 — 图片格式无效

resource_errors.warnings[].status_code 可选值

  • 0 — 未识别警告
  • 1 — 存在 60 个同级子节点的节点
  • 2 — DOM 树节点数 1500
  • 3 — 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_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 秒
has_micromarkupboolean页面微数据标记
has_micromarkup_errorsboolean页面存在微数据错误
no_doctypeboolean页面缺少 <!DOCTYPE HTML>
has_html_doctypeboolean页面存在 HTML DOCTYPE
canonicalboolean页面是否为规范页
no_encoding_meta_tagboolean缺少编码 meta 标签
no_h1_tagboolean缺少或为空的 H1
https_to_http_linksbooleanHTTPS 页面 HTTP 链接
size_greater_than_3mbboolean页面大小 3MB
meta_charset_consistencyboolean页面编码声明与编码一致性检查
has_meta_refresh_redirectboolean存在 Meta Refresh 跳转
has_render_blocking_resourcesboolean存在阻塞渲染资源
low_content_rateboolean正文占比低于 0.1
high_content_rateboolean正文占比高于 0.9
low_character_countboolean字符数少于 1024
high_character_countboolean字符数 256000
small_page_sizeboolean页面小于 1024 字节
large_page_sizeboolean页面 1MB
low_readability_ratebooleanFlesch–Kincaid 可读性得分低于 15
irrelevant_descriptionbooleandescription 与正文性低于 0.2
irrelevant_titlebooleantitle 与正文性低于 0.3
irrelevant_meta_keywordsbooleankeywords 与正文性低于 0.6
title_too_longboolean标题 65 个字符
has_meta_titleboolean页面存在 meta_title
title_too_shortboolean标题少于 30 个字符
deprecated_html_tagsboolean存在废弃 HTML 标签
duplicate_meta_tagsboolean存在重复 meta 标签
duplicate_title_tagboolean存在多个 title 标签
no_image_altboolean存在缺少 alt 的图片
no_image_titleboolean存在缺少 title 的图片
no_descriptionboolean缺少 description
no_titleboolean缺少 title
no_faviconboolean缺少 favicon
seo_friendly_urlbooleanURL 是否符合 SEO 友好规则
flashboolean页面 Flash
frameboolean页面 frame / iframe / frameset
lorem_ipsumboolean页面 Lorem Ipsum
has_misspellingboolean存在拼写错误在 check_spell=true 时有效
seo_friendly_url_characters_checkbooleanURL 字符规则检查
seo_friendly_url_dynamic_checkbooleanURL 动态参数检查
seo_friendly_url_keywords_checkbooleanURL 与标题一致性检查
seo_friendly_url_relative_length_checkbooleanURL 长度检查

说明:部分检查项在 canonical = true 时才会返回有效值。


损坏页面结果字段(resource_type: "broken"

当页面无法正常访问或被识别为损坏页面时,返回该类型。

主要字段:

  • resource_type
  • status_code
  • location
  • url
  • size
  • encoded_size
  • total_transfer_size
  • fetch_time
  • fetch_timing
  • duration_time
  • fetch_start
  • fetch_end
  • cache_control
  • checks
  • resource_errors
  • content_encoding
  • media_type
  • server
  • is_resource
  • last_modified

说明:

  • checks含基础可用性与状态类检查项,如 is_redirectis_4xx_codeis_5xx_codeis_broken
  • resource_errors 的结构与 html 类型相同

跳转页面结果字段(resource_type: "redirect"

当目标 URL 返回跳转时,返回该类型。

说明:

  • location:跳转目标 URL
  • url:源 URL
  • size:对于 redirect 资源固定为 0
  • encoded_size:对于 redirect 资源固定为 0

常见字段:

  • fetch_time
  • fetch_timing
  • resource_errors
  • cache_control
  • checks
  • content_encoding
  • media_type
  • server
  • is_resource
  • last_modified

资源类结果字段(script / image / stylesheet

当首个抓取 URL 本身是脚本、图片或样式表时,才会显示以下类型的资源结果。

通用字段

字段名类型说明
resource_typestring资源类型:scriptimagestylesheet
status_codeinteger资源所在页面状态码
locationstring跳转地址
urlstring资源 URL
sizeinteger资源大小,字节
encoded_sizeinteger编码后大小,字节
total_transfer_sizeinteger压缩传输大小,字节
fetch_timestring抓取时间
fetch_timingobject抓取耗时信息
cache_controlobject缓存信息
checksobject资源检查结果
resource_errorsobject资源错误与警告
content_encodingstring编码类型
media_typestring媒体类型
accept_typestring期望资源类型
serverstring服务器版本
last_modifiedobject最后修改信息

图片资源特有字段

meta 对象在 resource_type = image 时可用,:

  • alternative_text:图片 alt 文本
  • title:图片标题
  • original_width:原始宽度
  • original_height:原始高度
  • width:显示宽度
  • height:显示高度

资源检查字段示例

字段名类型说明
is_minifiedboolean资源是否已压缩,适用于 stylesheetscript
has_redirectboolean资源是否存在重定向,适用于 scriptimage
has_subrequestsboolean资源是否子请求,适用于 stylesheetscript
original_size_displayedboolean图片是否以原始尺寸展示适用于 image

accept_type 可选值

  • any
  • none
  • image
  • sitemap
  • robots
  • script
  • stylesheet
  • redirect
  • html
  • text
  • other
  • font

请求示例

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_errors
  • checks

实用场景

  • 审核落地页 SEO 基础健康度:快速获取标题、描述、H 标签、canonical、外链等信息,用于批量发现页面优化缺口。
  • 监控页面性能与 Core Web Vitals:启用浏览器渲染后采集 LCP、FID、CLS、TTI 等指标,帮助定位影响收录与体验的性能瓶颈。
  • 排查页面可抓取与可访问问题:识别 brokenredirect4xx/5xx、时、无编码压缩等问题,降低页面抓取失败和索引异常风险。
  • 检查质量与性:分析正文占比、词数、可读性,以及标题/描述与正文的一致性,团队优化页面质量。
  • 验证前端埋点与动态加载:借助 enable_javascriptenable_xhrcustom_js 检测页面脚本执行结果、标签管理器或分析代码是否正常加载。

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