curl --request POST \
--url https://api.aisa.one/apis/v1/dataforseo/on_page/waterfall \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"id": "<string>",
"url": "<string>",
"tag": "<string>"
}
]
'import requests
url = "https://api.aisa.one/apis/v1/dataforseo/on_page/waterfall"
payload = [
{
"id": "<string>",
"url": "<string>",
"tag": "<string>"
}
]
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify([{id: '<string>', url: '<string>', tag: '<string>'}])
};
fetch('https://api.aisa.one/apis/v1/dataforseo/on_page/waterfall', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/dataforseo/on_page/waterfall",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
[
'id' => '<string>',
'url' => '<string>',
'tag' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/dataforseo/on_page/waterfall"
payload := strings.NewReader("[\n {\n \"id\": \"<string>\",\n \"url\": \"<string>\",\n \"tag\": \"<string>\"\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/dataforseo/on_page/waterfall")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"id\": \"<string>\",\n \"url\": \"<string>\",\n \"tag\": \"<string>\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/dataforseo/on_page/waterfall")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"id\": \"<string>\",\n \"url\": \"<string>\",\n \"tag\": \"<string>\"\n }\n]"
response = http.request(request)
puts response.read_body{
"version": "<string>",
"status_code": 123,
"status_message": "<string>",
"time": "<string>",
"cost": 123,
"tasks_count": 123,
"tasks_error": 123,
"tasks": [
"<string>"
],
"tasks.id": "<string>",
"tasks.status_code": 123,
"tasks.status_message": "<string>",
"tasks.time": "<string>",
"tasks.cost": 123,
"tasks.result_count": 123,
"tasks.path": [
"<string>"
],
"tasks.data": {},
"tasks.result": [
"<string>"
],
"tasks.result.crawl_progress": "<string>",
"tasks.result.crawl_status": {},
"tasks.result.crawl_status.max_crawl_pages": 123,
"tasks.result.crawl_status.pages_in_queue": 123,
"tasks.result.crawl_status.pages_crawled": 123,
"tasks.result.items_count": 123,
"tasks.result.items": [
"<string>"
],
"tasks.result.items.page_url": "<string>",
"tasks.result.items.time_to_interactive": 123,
"tasks.result.items.dom_complete": 123,
"tasks.result.items.connection_time": 123,
"tasks.result.items.time_to_secure_connection": 123,
"tasks.result.items.request_sent_time": 123,
"tasks.result.items.waiting_time": 123,
"tasks.result.items.download_time": 123,
"tasks.result.items.duration_time": 123,
"tasks.result.items.fetch_start": 123,
"tasks.result.items.fetch_end": 123,
"tasks.result.items.resources": [
"<string>"
],
"tasks.result.items.resources.resource_type": "<string>",
"tasks.result.items.resources.url": "<string>",
"tasks.result.items.resources.initiator": "<string>",
"tasks.result.items.resources.duration_time": 123,
"tasks.result.items.resources.fetch_start": 123,
"tasks.result.items.resources.fetch_end": 123,
"tasks.result.items.resources.location": {},
"tasks.result.items.resources.location.line": 123,
"tasks.result.items.resources.location.offset_left": 123,
"tasks.result.items.resources.location.offset_top": 123,
"tasks.result.items.resources.is_render_blocking": true
}OnPage API 瀑布图
某个已爬取 url 的加载时间线——请求了什么、按什么顺序、各花多久。
curl --request POST \
--url https://api.aisa.one/apis/v1/dataforseo/on_page/waterfall \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"id": "<string>",
"url": "<string>",
"tag": "<string>"
}
]
'import requests
url = "https://api.aisa.one/apis/v1/dataforseo/on_page/waterfall"
payload = [
{
"id": "<string>",
"url": "<string>",
"tag": "<string>"
}
]
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify([{id: '<string>', url: '<string>', tag: '<string>'}])
};
fetch('https://api.aisa.one/apis/v1/dataforseo/on_page/waterfall', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/dataforseo/on_page/waterfall",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
[
'id' => '<string>',
'url' => '<string>',
'tag' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/dataforseo/on_page/waterfall"
payload := strings.NewReader("[\n {\n \"id\": \"<string>\",\n \"url\": \"<string>\",\n \"tag\": \"<string>\"\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/dataforseo/on_page/waterfall")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"id\": \"<string>\",\n \"url\": \"<string>\",\n \"tag\": \"<string>\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/dataforseo/on_page/waterfall")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"id\": \"<string>\",\n \"url\": \"<string>\",\n \"tag\": \"<string>\"\n }\n]"
response = http.request(request)
puts response.read_body{
"version": "<string>",
"status_code": 123,
"status_message": "<string>",
"time": "<string>",
"cost": 123,
"tasks_count": 123,
"tasks_error": 123,
"tasks": [
"<string>"
],
"tasks.id": "<string>",
"tasks.status_code": 123,
"tasks.status_message": "<string>",
"tasks.time": "<string>",
"tasks.cost": 123,
"tasks.result_count": 123,
"tasks.path": [
"<string>"
],
"tasks.data": {},
"tasks.result": [
"<string>"
],
"tasks.result.crawl_progress": "<string>",
"tasks.result.crawl_status": {},
"tasks.result.crawl_status.max_crawl_pages": 123,
"tasks.result.crawl_status.pages_in_queue": 123,
"tasks.result.crawl_status.pages_crawled": 123,
"tasks.result.items_count": 123,
"tasks.result.items": [
"<string>"
],
"tasks.result.items.page_url": "<string>",
"tasks.result.items.time_to_interactive": 123,
"tasks.result.items.dom_complete": 123,
"tasks.result.items.connection_time": 123,
"tasks.result.items.time_to_secure_connection": 123,
"tasks.result.items.request_sent_time": 123,
"tasks.result.items.waiting_time": 123,
"tasks.result.items.download_time": 123,
"tasks.result.items.duration_time": 123,
"tasks.result.items.fetch_start": 123,
"tasks.result.items.fetch_end": 123,
"tasks.result.items.resources": [
"<string>"
],
"tasks.result.items.resources.resource_type": "<string>",
"tasks.result.items.resources.url": "<string>",
"tasks.result.items.resources.initiator": "<string>",
"tasks.result.items.resources.duration_time": 123,
"tasks.result.items.resources.fetch_start": 123,
"tasks.result.items.resources.fetch_end": 123,
"tasks.result.items.resources.location": {},
"tasks.result.items.resources.location.line": 123,
"tasks.result.items.resources.location.offset_left": 123,
"tasks.result.items.resources.location.offset_top": 123,
"tasks.result.items.resources.is_render_blocking": true
}url 的加载时间线——请求了什么、按什么顺序、各花多久。实测 835 字节。读的是一次已完成的爬取,因此需要 post_dataforseo_on_page_submit 返回的 id,并会带回 crawl_progress 和 crawl_status(max_crawl_pages、pages_in_queue、pages_crawled)——结果偏少时先看这几个字段,爬取还在跑就是本来没那么多。 用它解释页面为什么慢;要带评分的性能审计改用 post_dataforseo_on_page_lighthouse_live_json。## 示例
curl -X POST "https://api.aisa.one/apis/v1/dataforseo/on_page/waterfall" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '[{"id": "...", "url": "...", "tag": "..."}]'
// 把整段复制给 Claude Code、Codex、Cursor 或任意 coding agent。
// 连接、授权、跑通这个例子需要的东西都在里面 ——
// 不用粘贴任何 key,浏览器里点一次 Allow 就好。
{
"operation_id": "post_dataforseo_on_page_waterfall",
"arguments": {},
"max_price_usd": 0.05
}
// ── for the agent ─────────────────────────────────────────────────────────
// Register the AIsa MCP server, then call its `use` tool with the JSON above.
// name aisa
// endpoint https://mcp.aisa.one/mcp
// transport streamable-http
// auth OAuth. The server publishes RFC 9728 metadata, so open a
// browser and the user clicks Allow once — nothing to paste.
// If AISA_API_KEY is set, send it as a bearer header instead.
// Use your own MCP mechanism, not a hand-edited config file:
// Codex codex mcp add aisa --url https://mcp.aisa.one/mcp
// Claude Code claude mcp add --transport http -s user aisa https://mcp.aisa.one/mcp
// Cursor / VS Code a "url" entry for https://mcp.aisa.one/mcp in the MCP config
// The server lists five tools over https://mcp.aisa.one/servers worth of APIs:
// search, get_details, use, batch_use, list_categories. search and
// get_details are free; use is billed per call and max_price_usd refuses
// anything above the cap before spending. This operation's full contract —
// every argument, the response shape, the price and the pitfalls — is at
// https://aisa.one/docs/zh/api-reference/dataforseo/post_dataforseo-on-page-waterfall.md
// Then run the call and show me the result.
https://mcp.aisa.one/mcp —— Claude Code、
Codex、Cursor、VS Code 都可以。鉴权走 OAuth:客户端打开浏览器,你点一次
Allow,不需要粘贴任何 key。各客户端的具体命令和每次调用的价格见
aisa.one/zh-cn/mcp。授权
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
请求体
响应
成功响应
API 的当前版本
通用状态码;您可以在此处查看完整的响应码列表。注意:我们强烈建议设计必要的系统来处理相关异常或错误情况
常规信息消息;可在此处查看常规信息消息的完整列表
执行时间(秒)
任务总成本(美元)
tasks 数组中的任务数量
返回错误的 tasks 数组中的任务数量
任务数组
任务标识符,系统中采用 UUID 格式的唯一任务标识符
DataForSEO 生成的任务状态码;范围为:10000-60000;完整响应代码列表可在此处查看
任务的信息性消息,你可以在此处查看通用信息性消息的完整列表
执行时间(秒)
任务成本(美元)
结果数组中的元素数量
URL 路径
包含您在 POST 请求中指定的相同参数
结果数组
抓取会话的状态,可能的值:in_progress、finished
抓取会话的详细信息
最大抓取页面数,表示设置任务时指定的 max_crawl_pages 限制
当前位于抓取队列中的页面数量
已抓取页面数
results 数组中的项目数量
items 数组
页面的 URL
可交互时间(TTI)指标,即用户能够与页面交互所需的时间(以毫秒为单位)
资源加载时间;下载页面及其所有子资源所需的时间(以毫秒为单位)
连接服务器的时间,即与服务器建立连接所需的时间(以毫秒为单位)
建立安全连接的耗时,即与服务器建立安全连接所需的时间(以毫秒为单位)
向服务器发送请求的时间,即请求发送至服务器所需的时间(以毫秒为单位)
首字节时间(TTFB),单位为毫秒
浏览器接收响应所需的时间(以毫秒为单位)
浏览器从服务器接收到完整响应所需的总时间(以毫秒为单位)
开始下载 HTML 资源的时间,即浏览器开始下载页面所需的时间
完成 HTML 资源下载所需的时间,即浏览器完成页面下载所需的时间
特定于资源的计时信息,包含多个独立数组,分别记录页面上找到的每项资源的计时数据
返回资源的类型
资源 URL
资源发起方
浏览器从服务器接收到完整响应所需的总时间(以毫秒为单位)
开始下载资源的时间,即浏览器开始下载资源所需的时间
资源下载完成时间,即浏览器完成资源下载所需的时间
资源在文档中的位置,用于定义特定资源在文档 HTML 中位置的参数
行号,即资源所在的行编号
行内位置,即资源之前的行内字符数;有时也称为列;注意:从 1 开始计数,即如果资源左侧没有任何字符,该值将为 1
文档中的位置,即资源与 HTML 顶部之间的字符总数
指示资源是否会阻塞渲染