DataForSEO
SEO, search-engine results, keyword research, backlinks and AI visibility data.
实时 OnPage API 内容解析
立即将任意 url 解析为结构化内容,无需抓取——这是本系列中唯一可独立使用的工具。browser_preset、browser_screen_width、browser_screen_height 和 custom_user_agent 控制渲染,disable_cookie_popup 移除同意弹窗,store_raw_html 保留源文件。采用 DataForSEO 的信封结构:数据位于 tasks[0].result,结果状态位于 tasks[0].status_code——被拒绝的请求仍会返回 HTTP 200。对于已在抓取中的页面,请使用免费的 post_dataforseo_on_page_content_parsing。
计费参考
- 计量方式:按上报的响应成本计量。
- 参考请求估算:0.0001 美元。
- 参考客户倍率:1.0。不得对已结算的客户金额再次应用。
仅供参考的元数据,不是账户报价、保证价格或消费上限。资源额度不同于 Felo 额度。最终扣费以 Felo 计费记录为准。
- 类型: array (object | null)[]
- accept类型: string | null
_language 访问网站的语言标头
可选字段
支持所有语言区域格式(xx、xx-XX、xxx-XX 等)
注意:如果你不指定此参数,某些网站可能会拒绝访问;此时响应数组中的页面将带有"type":"broken - browser类型: string | null
_preset 浏览器屏幕参数预设
可选字段
如果使用此字段,则无需指定browser_screen_width、browser_screen_height、browser_screen_scale_factor可选值:
desktop、mobile、tabletdesktop预设将应用以下值:browser_screen_width: 1920browser_screen_height: 1080browser_screen_scale_factor: 1mobile预设将应用以下值:browser_screen_width: 390browser_screen_height: 844browser_screen_scale_factor: 3tablet预设将应用以下值:browser_screen_width: 1024browser_screen_height: 1366browser_screen_scale_factor: 2注意:要使用此参数,请将
enable_javascript或enable_browser_rendering设为true - browser类型: integer | null
_screen _height 浏览器屏幕高度
可选字段
你可以设置自定义的浏览器屏幕高度,以便针对特定设备进行审计;
如果使用此字段,则无需指定browser_preset,它将被忽略;注意:要使用此参数,请将
enable_javascript或enable_browser_rendering设为true最小值(像素):
240
最大值(像素):9999 - browser类型: number | null
_screen _scale _factor 浏览器屏幕缩放比例
可选字段
你可以设置自定义的浏览器屏幕分辨率比例,以便针对特定设备进行审计;
如果使用此字段,则无需指定browser_preset,它将被忽略;注意:要使用此参数,请将
enable_javascript或enable_browser_rendering设为true最小值:
0.5
最大值:3 - browser类型: integer | null 格式: int64
_screen _width 浏览器屏幕宽度
可选字段
你可以设置自定义的浏览器屏幕宽度,以便针对特定设备进行审计;
如果使用此字段,则无需指定browser_preset,它将被忽略;注意:要使用此参数,请将
enable_javascript或enable_browser_rendering设为true最小值(像素):
240
最大值(像素):9999 - custom类型: string | null
_user _agent 自定义用户代理
可选字段
用于抓取网站的自定义用户代理
示例:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36
默认值:Mozilla/5.0 (compatible; RSiteAuditor) - disable类型: boolean | null
_cookie _popup 禁用 Cookie 弹窗
可选字段
如果要禁用向用户请求 Cookie 同意的弹窗,请设为true;
默认值:false - enable类型: boolean | null
_browser _rendering - enable类型: boolean | null
_javascript - enable类型: boolean | null
_xhr 在页面上启用 XMLHttpRequest
可选字段
如果要让我们的爬虫使用 XMLHttpRequest 对象向 Web 服务器请求数据,请设为true
默认值:false如果使用此字段,
enable_javascript必须设为true; - ip类型: string | null
_pool _for _scan 代理池
可选字段
你可以选择用于获取所请求数据的代理池位置;
如果页面内容在某个位置无法访问,导致偶尔出现site_unreachable错误,可以使用此参数
可选值:us、de - markdown类型: boolean | null
_view 以 markdown 返回页面内容
可选字段
如果设为true,页面以 markdown 格式呈现的内容将在响应的page_as_markdown字段中返回;
默认值:false - store类型: boolean | null
_raw _html - switch类型: boolean | null
_pool 切换代理池
可选字段
如果为true,将使用其他代理池获取所请求的数据;
如果同时设置大量任务,导致偶尔出现rate-limit和/或site_unreachable错误,可以使用此参数 - url类型: string
要解析的内容 URL
必填字段
要解析的页面 URL
示例:https://www.fujielectric.com/
- 类型: object | null · Response36Afe1097B20_OnPageContentParsingLiveResponseInfo200
- 类型: number | null 格式: doublecost
任务总费用,美元
- 类型: integer | nullstatus
_code 通用状态码 完整响应码列表见此处
- 类型: string | nullstatus
_message 通用信息性消息 完整的一般信息性消息列表见此处
- 类型: array (object | null)[] | nulltasks
任务数组
- 类型: object | null · Response36Afe1097B20_OnPageContentParsingLiveTaskInfo
- cost类型: number | null 格式: double
任务总费用,美元
- data类型: object | null
包含你在 POST 请求中指定的相同参数
- property类型: object | null
Name
- id类型: string | null
任务标识符 我们系统中 UUID 格式的唯一任务标识符
- path类型: array (string | null)[] | null
URL 路径
- result类型: array (object | null)[] | null
结果数组
- crawl类型: string | null
_progress 抓取会话的状态
可能的值:in_progress、finished - crawl类型: object | null · Response36Afe1097B20_CrawlStatusInfo
_status 抓取会话的详细信息
- max类型: integer | null 格式: int64
_crawl _pages 爬取页面数上限 表示设置任务时指定的 max_crawl_pages 限制
- pages类型: integer | null 格式: int64
_crawled 已爬取的页面数量
- pages类型: integer | null 格式: int64
_in _queue 当前在爬取队列中的页面数量
- items类型: array (object | null)[] | null
条目数组
- fetch类型: string | null
_time 内容获取的日期和时间
示例:"2022-11-01 10:02:52 +00:00" - page类型: string | null
_as _markdown - page类型: object | null · Response36Afe1097B20_PageContentInfo
_content 页面的解析内容
- comments类型: array (object | null)[] | null
页面上显示的评论数组
包含与所显示产品相关评论信息的对象- author类型: string | null
评论作者
- have类型: boolean | null
_form - primary类型: array (object | null)[] | null
_content 页面上的主要内容 如需了解内容优先级计算的更多信息,请参阅此帮助中心文章
- text类型: string | null
页面上的次要内容 有关内容优先级计算的更多信息,请参阅这篇帮助中心文章
- url类型: string | null
页面 URL。 当文本为链接锚文本时显示
- urls类型: array (object | null)[] | null
包含在内容元素中找到的其他 URL 和锚文本
- anchor类型: string | null
_text URL 锚文本
- url类型: string | null
包含在内容元素中找到的其他 URL 和锚文本
- publish类型: string | null
_date 评论发布的日期
- rating类型: object | null · Response36Afe1097B20_ContententRatingInfo
商品评分 包含客户对该商品所给评分的信息
- max类型: number | null 格式: double
_rating _value 评分名称的最大值
- name类型: string | null
评分名称 此处可找到以下元素:Max5、Percents、CustomMax
- rating类型: integer | null 格式: int64
_count 投票数
- rating类型: number | null 格式: double
_value 评分的值
- relative类型: number | null 格式: double
_rating 相对评分
- title类型: string | null
客户评论的标题
- contacts类型: object | null · Response36Afe1097B20_Contacts
联系信息
包含页面上显示的联系信息- emails类型: array (string | null)[] | null
电子邮件地址数组
- telephones类型: array (string | null)[] | null
电话号码数组
- footer类型: object | null · Response36Afe1097B20_PageSectionContentInfo
表格页脚的内容
- primary类型: array (object | null)[] | null
_content - text类型: string | null
页面上的次要内容 有关内容优先级计算的更多信息,请参阅这篇帮助中心文章
- url类型: string | null
页面 URL。 当文本为链接锚文本时显示
- urls类型: array (object | null)[] | null
包含在内容元素中找到的其他 URL 和锚文本
- anchor类型: string | null
_text URL 锚文本
- url类型: string | null
包含在内容元素中找到的其他 URL 和锚文本
- secondary类型: array (object | null)[] | null
_content - text类型: string | null
页面上的次要内容 有关内容优先级计算的更多信息,请参阅这篇帮助中心文章
- url类型: string | null
页面 URL。 当文本为链接锚文本时显示
- urls类型: array (object | null)[] | null
包含在内容元素中找到的其他 URL 和锚文本
- anchor类型: string | null
_text URL 锚文本
- url类型: string | null
包含在内容元素中找到的其他 URL 和锚文本
- table类型: array (object | null)[] | null
_content 页面上表格的内容
- body类型: array (object | null)[] | null
表格主体的内容
- row类型: array (object | null)[] | null
_cells 表头各单元格的内容
- is类型: boolean | null
_header 表头各单元格的内容
- text类型: string | null
表头各单元格的内容
- urls类型: array (object | null)[] | null
包含在内容元素中找到的其他 URL 和锚文本
- anchor类型: string | null
_text URL 锚文本
- url类型: string | null
包含在内容元素中找到的其他 URL 和锚文本
- footer类型: array (object | null)[] | null
表格页脚的内容
- row类型: array (object | null)[] | null
_cells 表头各单元格的内容
- is类型: boolean | null
_header 表头各单元格的内容
- text类型: string | null
表头各单元格的内容
- urls类型: array (object | null)[] | null
包含在内容元素中找到的其他 URL 和锚文本
- anchor类型: string | null
_text URL 锚文本
- url类型: string | null
包含在内容元素中找到的其他 URL 和锚文本
- header类型: array (object | null)[] | null
解析后的表头内容
- row类型: array (object | null)[] | null
_cells 表头各单元格的内容
- is类型: boolean | null
_header 表头各单元格的内容
- text类型: string | null
表头各单元格的内容
- urls类型: array (object | null)[] | null
包含在内容元素中找到的其他 URL 和锚文本
- anchor类型: string | null
_text URL 锚文本
- url类型: string | null
包含在内容元素中找到的其他 URL 和锚文本
- header类型: object | null · Response36Afe1097B20_PageSectionContentInfo
表头的解析内容
- primary类型: array (object | null)[] | null
_content - text类型: string | null
页面上的次要内容 有关内容优先级计算的更多信息,请参阅这篇帮助中心文章
- url类型: string | null
页面 URL。 当文本为链接锚文本时显示
- urls类型: array (object | null)[] | null
包含在内容元素中找到的其他 URL 和锚文本
- anchor类型: string | null
_text URL 锚文本
- url类型: string | null
包含在内容元素中找到的其他 URL 和锚文本
- secondary类型: array (object | null)[] | null
_content - text类型: string | null
页面上的次要内容 有关内容优先级计算的更多信息,请参阅这篇帮助中心文章
- url类型: string | null
页面 URL。 当文本为链接锚文本时显示
- urls类型: array (object | null)[] | null
包含在内容元素中找到的其他 URL 和锚文本
- anchor类型: string | null
_text URL 锚文本
- url类型: string | null
包含在内容元素中找到的其他 URL 和锚文本
- table类型: array (object | null)[] | null
_content 页面上表格的内容
- body类型: array (object | null)[] | null
表格主体的内容
- row类型: array (object | null)[] | null
_cells 表头各单元格的内容
- is类型: boolean | null
_header 表头各单元格的内容
- text类型: string | null
表头各单元格的内容
- urls类型: array (object | null)[] | null
包含在内容元素中找到的其他 URL 和锚文本
- anchor类型: string | null
_text URL 锚文本
- url类型: string | null
包含在内容元素中找到的其他 URL 和锚文本
- footer类型: array (object | null)[] | null
表格页脚的内容
- row类型: array (object | null)[] | null
_cells 表头各单元格的内容
- is类型: boolean | null
_header 表头各单元格的内容
- text类型: string | null
表头各单元格的内容
- urls类型: array (object | null)[] | null
包含在内容元素中找到的其他 URL 和锚文本
- anchor类型: string | null
_text URL 锚文本
- url类型: string | null
包含在内容元素中找到的其他 URL 和锚文本
- header类型: array (object | null)[] | null
解析后的表头内容
- row类型: array (object | null)[] | null
_cells 表头各单元格的内容
- is类型: boolean | null
_header 表头各单元格的内容
- text类型: string | null
表头各单元格的内容
- urls类型: array (object | null)[] | null
包含在内容元素中找到的其他 URL 和锚文本
- anchor类型: string | null
_text URL 锚文本
- url类型: string | null
包含在内容元素中找到的其他 URL 和锚文本
- main类型: array (object | null)[] | null
_topic - author类型: string | null
内容作者姓名
- h类型: string | null
_title 元标题
- language类型: string | null
内容语言
- level类型: integer | null
HTML 层级
- main类型: string | null
_title 区块主标题
- primary类型: array (object | null)[] | null
_content - text类型: string | null
页面上的次要内容 有关内容优先级计算的更多信息,请参阅这篇帮助中心文章
- url类型: string | null
页面 URL。 当文本为链接锚文本时显示
- urls类型: array (object | null)[] | null
包含在内容元素中找到的其他 URL 和锚文本
- anchor类型: string | null
_text URL 锚文本
- url类型: string | null
包含在内容元素中找到的其他 URL 和锚文本
- secondary类型: array (object | null)[] | null
_content - text类型: string | null
页面上的次要内容 有关内容优先级计算的更多信息,请参阅这篇帮助中心文章
- url类型: string | null
页面 URL。 当文本为链接锚文本时显示
- urls类型: array (object | null)[] | null
包含在内容元素中找到的其他 URL 和锚文本
- anchor类型: string | null
_text URL 锚文本
- url类型: string | null
包含在内容元素中找到的其他 URL 和锚文本
- table类型: array (object | null)[] | null
_content 页面上表格的内容
- body类型: array (object | null)[] | null
表格主体的内容
- row类型: array (object | null)[] | null
_cells 表头各单元格的内容
- is类型: boolean | null
_header 表头各单元格的内容
- text类型: string | null
表头各单元格的内容
- urls类型: array (object | null)[] | null
包含在内容元素中找到的其他 URL 和锚文本
- anchor类型: string | null
_text URL 锚文本
- url类型: string | null
包含在内容元素中找到的其他 URL 和锚文本
- footer类型: array (object | null)[] | null
表格页脚的内容
- row类型: array (object | null)[] | null
_cells 表头各单元格的内容
- is类型: boolean | null
_header 表头各单元格的内容
- text类型: string | null
表头各单元格的内容
- urls类型: array (object | null)[] | null
包含在内容元素中找到的其他 URL 和锚文本
- anchor类型: string | null
_text URL 锚文本
- url类型: string | null
包含在内容元素中找到的其他 URL 和锚文本
- header类型: array (object | null)[] | null
解析后的表头内容
- row类型: array (object | null)[] | null
_cells 表头各单元格的内容
- is类型: boolean | null
_header 表头各单元格的内容
- text类型: string | null
表头各单元格的内容
- urls类型: array (object | null)[] | null
包含在内容元素中找到的其他 URL 和锚文本
- anchor类型: string | null
_text URL 锚文本
- url类型: string | null
包含在内容元素中找到的其他 URL 和锚文本
- offers类型: array (object | null)[] | null
页面上显示的产品数组
包含页面上所显示产品相关信息的对象- name类型: string | null
商品名称
- price类型: number | null 格式: double
商品价格
- price类型: string | null
_currency 价格货币
- price类型: string | null
_valid _until 显示价格有效期截止的日期和时间 采用 UTC 格式:“yyyy-mm-dd hh-mm-ss +00:00” 示例:"2022-11-01 10:02:52 +00:00"
- ratings类型: array (object | null)[] | null
包含页面上所显示产品的评分信息对象
- max类型: number | null 格式: double
_rating _value 评分名称的最大值
- name类型: string | null
评分名称 此处可找到以下元素:Max5、Percents、CustomMax
- rating类型: integer | null 格式: int64
_count 投票数
- rating类型: number | null 格式: double
_value 评分的值
- relative类型: number | null 格式: double
_rating 相对评分
- secondary类型: array (object | null)[] | null
_topic - author类型: string | null
内容作者姓名
- h类型: string | null
_title 元标题
- language类型: string | null
内容语言
- level类型: integer | null
HTML 层级
- main类型: string | null
_title 区块主标题
- primary类型: array (object | null)[] | null
_content - text类型: string | null
页面上的次要内容 有关内容优先级计算的更多信息,请参阅这篇帮助中心文章
- url类型: string | null
页面 URL。 当文本为链接锚文本时显示
- urls类型: array (object | null)[] | null
包含在内容元素中找到的其他 URL 和锚文本
- anchor类型: string | null
_text URL 锚文本
- url类型: string | null
包含在内容元素中找到的其他 URL 和锚文本
- secondary类型: array (object | null)[] | null
_content - text类型: string | null
页面上的次要内容 有关内容优先级计算的更多信息,请参阅这篇帮助中心文章
- url类型: string | null
页面 URL。 当文本为链接锚文本时显示
- urls类型: array (object | null)[] | null
包含在内容元素中找到的其他 URL 和锚文本
- anchor类型: string | null
_text URL 锚文本
- url类型: string | null
包含在内容元素中找到的其他 URL 和锚文本
- table类型: array (object | null)[] | null
_content 页面上表格的内容
- body类型: array (object | null)[] | null
表格主体的内容
- row类型: array (object | null)[] | null
_cells 表头各单元格的内容
- is类型: boolean | null
_header 表头各单元格的内容
- text类型: string | null
表头各单元格的内容
- urls类型: array (object | null)[] | null
包含在内容元素中找到的其他 URL 和锚文本
- anchor类型: string | null
_text URL 锚文本
- url类型: string | null
包含在内容元素中找到的其他 URL 和锚文本
- footer类型: array (object | null)[] | null
表格页脚的内容
- row类型: array (object | null)[] | null
_cells 表头各单元格的内容
- is类型: boolean | null
_header 表头各单元格的内容
- text类型: string | null
表头各单元格的内容
- urls类型: array (object | null)[] | null
包含在内容元素中找到的其他 URL 和锚文本
- anchor类型: string | null
_text URL 锚文本
- url类型: string | null
包含在内容元素中找到的其他 URL 和锚文本
- header类型: array (object | null)[] | null
解析后的表头内容
- row类型: array (object | null)[] | null
_cells 表头各单元格的内容
- is类型: boolean | null
_header 表头各单元格的内容
- text类型: string | null
表头各单元格的内容
- urls类型: array (object | null)[] | null
包含在内容元素中找到的其他 URL 和锚文本
- anchor类型: string | null
_text URL 锚文本
- url类型: string | null
包含在内容元素中找到的其他 URL 和锚文本
- status类型: integer | null
_code 通用状态码
完整响应码列表见此处
注意:我们强烈建议设计必要的系统来处理相关的异常或错误情况 - type类型: string | null
元素类型
- items类型: integer | null 格式: int64
_count 结果数组中的条目数
- result类型: integer | null 格式: int64
_count result 数组中的元素数
- status类型: integer | null
_code 任务的状态码 由 DataForSEO 生成,范围如下:10000-60000 完整响应码列表见此处
- status类型: string | null
_message 任务的信息性消息 完整的一般信息性消息列表见此处
- time类型: string | null
执行时间,秒
- 类型: integer | null 格式: int64tasks
_count tasks 数组中的任务数
- 类型: integer | null 格式: int64tasks
_error tasks 数组中返回错误的任务数
- 类型: string | nulltime
总执行时间,秒
- 类型: string | nullversion
API 的当前版本
application/json - 400
无法处理该请求。请检查请求参数。
- 401
需要有效的 Felo API 密钥。
- 402
由于未满足计费要求,请求无法继续。
- 403
该账户无权执行此操作。
- 429
已达到请求或支出限额。
- 502
服务无法完成该请求。
- 503
API 或计费服务暂时不可用。
- 504
服务在处理请求时超时。
- default
错误响应;上游透传响应可能采用提供方格式
application/json
curl https://openapi.felo.ai/v1/beta/dataforseo/on_page/content_parsing/live \
--request POST \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '[
{
"url": "https://dataforseo.com/blog/a-versatile-alternative-to-google-trends-exploring-the-power-of-dataforseo-trends-api"
}
]'
{
"version": null,
"status_code": null,
"status_message": null,
"time": null,
"cost": null,
"tasks_count": null,
"tasks_error": null,
"tasks": [
{
"id": null,
"status_code": null,
"status_message": null,
"time": null,
"cost": null,
"result_count": null,
"path": [
null
],
"data": null,
"result": [
{
"crawl_progress": null,
"crawl_status": {
"max_crawl_pages": null,
"pages_in_queue": null,
"pages_crawled": null
},
"items_count": null,
"items": [
{
"type": null,
"fetch_time": null,
"status_code": null,
"page_content": "[Max Depth Exceeded]",
"page_as_markdown": null
}
]
}
]
}
]
}