curl --request POST \
--url https://api.aisa.one/apis/v1/dataforseo/on_page/links \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"id": "<string>",
"page_from": "<string>",
"page_to": "<string>",
"limit": 123,
"offset": 123,
"filters": [
"<unknown>"
],
"search_after_token": "<string>",
"tag": "<string>"
}
]
'import requests
url = "https://api.aisa.one/apis/v1/dataforseo/on_page/links"
payload = [
{
"id": "<string>",
"page_from": "<string>",
"page_to": "<string>",
"limit": 123,
"offset": 123,
"filters": ["<unknown>"],
"search_after_token": "<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>',
page_from: '<string>',
page_to: '<string>',
limit: 123,
offset: 123,
filters: ['<unknown>'],
search_after_token: '<string>',
tag: '<string>'
}
])
};
fetch('https://api.aisa.one/apis/v1/dataforseo/on_page/links', 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/links",
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>',
'page_from' => '<string>',
'page_to' => '<string>',
'limit' => 123,
'offset' => 123,
'filters' => [
'<unknown>'
],
'search_after_token' => '<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/links"
payload := strings.NewReader("[\n {\n \"id\": \"<string>\",\n \"page_from\": \"<string>\",\n \"page_to\": \"<string>\",\n \"limit\": 123,\n \"offset\": 123,\n \"filters\": [\n \"<unknown>\"\n ],\n \"search_after_token\": \"<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/links")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"id\": \"<string>\",\n \"page_from\": \"<string>\",\n \"page_to\": \"<string>\",\n \"limit\": 123,\n \"offset\": 123,\n \"filters\": [\n \"<unknown>\"\n ],\n \"search_after_token\": \"<string>\",\n \"tag\": \"<string>\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/dataforseo/on_page/links")
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 \"page_from\": \"<string>\",\n \"page_to\": \"<string>\",\n \"limit\": 123,\n \"offset\": 123,\n \"filters\": [\n \"<unknown>\"\n ],\n \"search_after_token\": \"<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.total_items_count": 123,
"tasks.result.items_count": 123,
"tasks.result.items": [
"<string>"
],
"tasks.result.items.type": "<string>",
"tasks.result.items.domain_from": "<string>",
"tasks.result.items.domain_to": "<string>",
"tasks.result.items.page_from": "<string>",
"tasks.result.items.page_to": "<string>",
"tasks.result.items.link_from": "<string>",
"tasks.result.items.link_to": "<string>",
"tasks.result.items.link_attribute": [
"<string>"
],
"tasks.result.items.dofollow": true,
"tasks.result.items.page_from_scheme": "<string>",
"tasks.result.items.page_to_scheme": "<string>",
"tasks.result.items.direction": "<string>",
"tasks.result.items.is_broken": true,
"tasks.result.items.text": "<string>",
"tasks.result.items.is_link_relation_conflict": true,
"tasks.result.items.page_to_status_code": 123,
"tasks.result.items.image_alt": "<string>",
"tasks.result.items.image_src": "<string>",
"tasks.result.items.is_valid_hreflang": true,
"tasks.result.items.hreflang": "<string>"
}链接
一次爬取中发现的全部链接。
curl --request POST \
--url https://api.aisa.one/apis/v1/dataforseo/on_page/links \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"id": "<string>",
"page_from": "<string>",
"page_to": "<string>",
"limit": 123,
"offset": 123,
"filters": [
"<unknown>"
],
"search_after_token": "<string>",
"tag": "<string>"
}
]
'import requests
url = "https://api.aisa.one/apis/v1/dataforseo/on_page/links"
payload = [
{
"id": "<string>",
"page_from": "<string>",
"page_to": "<string>",
"limit": 123,
"offset": 123,
"filters": ["<unknown>"],
"search_after_token": "<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>',
page_from: '<string>',
page_to: '<string>',
limit: 123,
offset: 123,
filters: ['<unknown>'],
search_after_token: '<string>',
tag: '<string>'
}
])
};
fetch('https://api.aisa.one/apis/v1/dataforseo/on_page/links', 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/links",
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>',
'page_from' => '<string>',
'page_to' => '<string>',
'limit' => 123,
'offset' => 123,
'filters' => [
'<unknown>'
],
'search_after_token' => '<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/links"
payload := strings.NewReader("[\n {\n \"id\": \"<string>\",\n \"page_from\": \"<string>\",\n \"page_to\": \"<string>\",\n \"limit\": 123,\n \"offset\": 123,\n \"filters\": [\n \"<unknown>\"\n ],\n \"search_after_token\": \"<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/links")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"id\": \"<string>\",\n \"page_from\": \"<string>\",\n \"page_to\": \"<string>\",\n \"limit\": 123,\n \"offset\": 123,\n \"filters\": [\n \"<unknown>\"\n ],\n \"search_after_token\": \"<string>\",\n \"tag\": \"<string>\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/dataforseo/on_page/links")
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 \"page_from\": \"<string>\",\n \"page_to\": \"<string>\",\n \"limit\": 123,\n \"offset\": 123,\n \"filters\": [\n \"<unknown>\"\n ],\n \"search_after_token\": \"<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.total_items_count": 123,
"tasks.result.items_count": 123,
"tasks.result.items": [
"<string>"
],
"tasks.result.items.type": "<string>",
"tasks.result.items.domain_from": "<string>",
"tasks.result.items.domain_to": "<string>",
"tasks.result.items.page_from": "<string>",
"tasks.result.items.page_to": "<string>",
"tasks.result.items.link_from": "<string>",
"tasks.result.items.link_to": "<string>",
"tasks.result.items.link_attribute": [
"<string>"
],
"tasks.result.items.dofollow": true,
"tasks.result.items.page_from_scheme": "<string>",
"tasks.result.items.page_to_scheme": "<string>",
"tasks.result.items.direction": "<string>",
"tasks.result.items.is_broken": true,
"tasks.result.items.text": "<string>",
"tasks.result.items.is_link_relation_conflict": true,
"tasks.result.items.page_to_status_code": 123,
"tasks.result.items.image_alt": "<string>",
"tasks.result.items.image_src": "<string>",
"tasks.result.items.is_valid_hreflang": true,
"tasks.result.items.hreflang": "<string>"
}page_from / page_to 筛出某个页面的出链或入链。返回 total_items_count、items_count、items,以及用于翻页的 search_after_token——翻过前几页后请用它而不是 offset。单条实测 1.0 KB。读的是一次已完成的爬取,因此需要 post_dataforseo_on_page_submit 返回的 id,并会带回 crawl_progress 和 crawl_status(max_crawl_pages、pages_in_queue、pages_crawled)——结果偏少时先看这几个字段,爬取还在跑就是本来没那么多。 ## 示例
curl -X POST "https://api.aisa.one/apis/v1/dataforseo/on_page/links" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '[{"id": "...", "page_from": "...", "page_to": "..."}]'
// 把整段复制给 Claude Code、Codex、Cursor 或任意 coding agent。
// 连接、授权、跑通这个例子需要的东西都在里面 ——
// 不用粘贴任何 key,浏览器里点一次 Allow 就好。
{
"operation_id": "post_dataforseo_on_page_links",
"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-links.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.
请求体
任务 ID,必填字段;您可以从 Task POST 端点的响应中获取此 ID。示例:“07131248-1535-0216-1000-17384017ad04”
相对页面 URL。可选字段;如果使用此字段,API 响应将仅包含指定页面中的链接。请注意,此字段只能指定相对 URL。
相对页面 URL,可选字段。如果使用此字段,API 响应将仅包含指向指定页面的内部链接。请注意,此字段中只能指定相对 URL
返回链接的最大数量,可选字段,默认值:100,最大值:1000
返回链接的 results 数组中的偏移量。可选字段,默认值:0。如果指定值 10,results 数组中的前十个链接将被省略,并提供后续链接的数据
结果过滤参数数组,可选字段。你可以同时添加多个过滤条件(最多 8 个)。应在条件之间设置逻辑运算符 and、or。支持以下运算符:regex、not_regex、=、 、in、not_in、like、not_like。你可以将 % 运算符与 like 和 not_like 配合使用,以匹配包含零个或多个字符的任意字符串。示例:["direction","=","external"] [["domain_to","","example.com"], "and", ["link_from","not_like","%example.com/blog%"]] [["direction","=","external"], "and", [["link_from","like","%example.com/blog%"],"or",["link_from","like","%example.com/help%"]]] 可通过此链接查看所有可用过滤条件。
用于后续请求的 token;可选字段;每个请求的响应中都会在同名字段中提供;尝试通过单次请求获取超过 20,000 条结果时,请使用此参数以避免超时;通过指定响应数组中的唯一 search_after_token 值,您将获得初始任务的后续结果;每个后续任务的 search_after_token 值都是唯一的;注意:如果请求中指定了 search_after_token,则所有其他参数都应与上一个请求保持一致
用户定义的任务标识符。可选字段。字符数限制为 255。您可以使用此参数标识任务并将其与结果匹配;您将在响应的 data 对象中找到指定的 tag 值
响应
成功响应
API 的当前版本
通用状态码;您可以在此处查看完整的响应码列表。注意:我们强烈建议设计必要的系统来处理相关异常或错误情况
常规信息消息;可在此处查看常规信息消息的完整列表
执行时间(秒)
任务总成本(美元)
tasks 数组中的任务数量
返回错误的 tasks 数组中的任务数量
任务数组
任务标识符,系统中采用 UUID 格式的唯一任务标识符
DataForSEO 生成的任务状态码;范围为:10000-60000;完整响应代码列表可在此处查看
任务的信息性消息,你可以在此处查看通用信息性消息的完整列表
执行时间(秒)
任务成本(美元)
结果数组中的元素数量
URL 路径
包含您在 POST 请求中指定的相同参数
结果数组
抓取会话的状态,可能的值:in_progress、finished
抓取会话的详细信息
最大抓取页面数,表示设置任务时指定的 max_crawl_pages 限制
当前位于抓取队列中的页面数量
已抓取页面数
数据库中相关项目的总数
results 数组中的项目数量
items 数组
链接类型 = ‘redirect’,状态码为 3xx 的 HTTP 重定向
在此域名上发现该链接的引用域名
链接所指向的引用域名
发现该链接的引用页面的相对 URL
链接所指向页面的相对 URL
发现该链接的引用页面的绝对 URL
引用页面,即链接所指向页面的绝对 URL
添加到外部链接的链接属性,表示在 page_from 页面上添加到 link_to 的链接属性 ["ugc","noopener"]
指示链接是否为 dofollow;如果值为 true,则链接没有 rel="nofollow" 属性
引用页面的 URL 协议
引用页面的 URL 协议
链接方向,可选值:internal、external
链接是否失效,表示链接是否指向已损坏的页面或资源
图片文本
表示该链接是否可能与其他链接存在冲突。如果为 true,则至少有一个指向 link_to 的链接具有 rel="nofollow" 属性,并且至少有一个是 dofollow
引用页面的状态码,即链接所指向页面的状态码
图像的替代文本
图片的 URL
hreflang 有效性状态表示 hreflang 属性是否正确实现
hreflang 属性值,即 hreflang 属性中指定的语言和可选国家/地区代码,示例:"en-US"、"fr"