> ## Documentation Index
> Fetch the complete documentation index at: https://aisa.one/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# 链接

> 此端点将提供在目标网站上检测到的内部和外部链接列表。



## OpenAPI

````yaml openapi/zh/dataforseo.json POST /dataforseo/on_page/links
openapi: 3.0.3
info:
  title: DataForSEO API
  version: 1.0.0
  description: 通过 AIsa 统一网关提供的 DataForSEO API 端点。
servers:
  - url: https://api.aisa.one/apis/v1
security:
  - BearerAuth: []
paths:
  /dataforseo/on_page/links:
    post:
      summary: 链接
      description: 此端点将提供在目标网站上检测到的内部和外部链接列表。
      operationId: post_dataforseo_on_page_links
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: string
                  description: >-
                    任务 ID，必填字段；您可以从 Task POST 端点的响应中获取此
                    ID。示例：“07131248-1535-0216-1000-17384017ad04”
                page_from:
                  type: string
                  description: 相对页面 URL。可选字段；如果使用此字段，API 响应将仅包含指定页面中的链接。请注意，此字段只能指定相对 URL。
                page_to:
                  type: string
                  description: >-
                    相对页面 URL，可选字段。如果使用此字段，API 响应将仅包含指向指定页面的内部链接。请注意，此字段中只能指定相对
                    URL
                limit:
                  type: integer
                  description: 返回链接的最大数量，可选字段，默认值：100，最大值：1000
                offset:
                  type: integer
                  description: >-
                    返回链接的 results 数组中的偏移量。可选字段，默认值：0。如果指定值 10，results
                    数组中的前十个链接将被省略，并提供后续链接的数据
                filters:
                  type: array
                  items:
                    type: string
                  description: >-
                    结果过滤参数数组，可选字段。你可以同时添加多个过滤条件（最多 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%"]]]
                    可通过此链接查看所有可用过滤条件。
                search_after_token:
                  type: string
                  description: >-
                    用于后续请求的 token；可选字段；每个请求的响应中都会在同名字段中提供；尝试通过单次请求获取超过 20,000
                    条结果时，请使用此参数以避免超时；通过指定响应数组中的唯一 search_after_token
                    值，您将获得初始任务的后续结果；每个后续任务的 search_after_token
                    值都是唯一的；注意：如果请求中指定了 search_after_token，则所有其他参数都应与上一个请求保持一致
                tag:
                  type: string
                  description: >-
                    用户定义的任务标识符。可选字段。字符数限制为 255。您可以使用此参数标识任务并将其与结果匹配；您将在响应的 data
                    对象中找到指定的 tag 值
              required:
                - id
      responses:
        '200':
          description: 成功响应
          content:
            application/json:
              schema:
                type: object
                properties:
                  version:
                    type: string
                    description: API 的当前版本
                  status_code:
                    type: integer
                    description: 通用状态码；您可以在此处查看完整的响应码列表。注意：我们强烈建议设计必要的系统来处理相关异常或错误情况
                  status_message:
                    type: string
                    description: 常规信息消息；可在此处查看常规信息消息的完整列表
                  time:
                    type: string
                    description: 执行时间（秒）
                  cost:
                    type: number
                    description: 任务总成本（美元）
                  tasks_count:
                    type: integer
                    description: tasks 数组中的任务数量
                  tasks_error:
                    type: integer
                    description: 返回错误的 tasks 数组中的任务数量
                  tasks:
                    type: array
                    items:
                      type: string
                    description: 任务数组
                  tasks.id:
                    type: string
                    description: 任务标识符，系统中采用 UUID 格式的唯一任务标识符
                  tasks.status_code:
                    type: integer
                    description: DataForSEO 生成的任务状态码；范围为：10000-60000；完整响应代码列表可在此处查看
                  tasks.status_message:
                    type: string
                    description: 任务的信息性消息，你可以在此处查看通用信息性消息的完整列表
                  tasks.time:
                    type: string
                    description: 执行时间（秒）
                  tasks.cost:
                    type: number
                    description: 任务成本（美元）
                  tasks.result_count:
                    type: integer
                    description: 结果数组中的元素数量
                  tasks.path:
                    type: array
                    items:
                      type: string
                    description: URL 路径
                  tasks.data:
                    type: object
                    description: 包含您在 POST 请求中指定的相同参数
                  tasks.result:
                    type: array
                    items:
                      type: string
                    description: 结果数组
                  tasks.result.crawl_progress:
                    type: string
                    description: 抓取会话的状态，可能的值：in_progress、finished
                  tasks.result.crawl_status:
                    type: object
                    description: 抓取会话的详细信息
                  tasks.result.crawl_status.max_crawl_pages:
                    type: integer
                    description: 最大抓取页面数，表示设置任务时指定的 max_crawl_pages 限制
                  tasks.result.crawl_status.pages_in_queue:
                    type: integer
                    description: 当前位于抓取队列中的页面数量
                  tasks.result.crawl_status.pages_crawled:
                    type: integer
                    description: 已抓取页面数
                  tasks.result.total_items_count:
                    type: integer
                    description: 数据库中相关项目的总数
                  tasks.result.items_count:
                    type: integer
                    description: results 数组中的项目数量
                  tasks.result.items:
                    type: array
                    items:
                      type: string
                    description: items 数组
                  tasks.result.items.type:
                    type: string
                    description: 链接类型 = ‘redirect’，状态码为 3xx 的 HTTP 重定向
                  tasks.result.items.domain_from:
                    type: string
                    description: 在此域名上发现该链接的引用域名
                  tasks.result.items.domain_to:
                    type: string
                    description: 链接所指向的引用域名
                  tasks.result.items.page_from:
                    type: string
                    description: 发现该链接的引用页面的相对 URL
                  tasks.result.items.page_to:
                    type: string
                    description: 链接所指向页面的相对 URL
                  tasks.result.items.link_from:
                    type: string
                    description: 发现该链接的引用页面的绝对 URL
                  tasks.result.items.link_to:
                    type: string
                    description: 引用页面，即链接所指向页面的绝对 URL
                  tasks.result.items.link_attribute:
                    type: array
                    items:
                      type: string
                    description: >-
                      添加到外部链接的链接属性，表示在 page_from 页面上添加到 link_to 的链接属性
                      ["ugc","noopener"]
                  tasks.result.items.dofollow:
                    type: boolean
                    description: 指示链接是否为 dofollow；如果值为 true，则链接没有 rel="nofollow" 属性
                  tasks.result.items.page_from_scheme:
                    type: string
                    description: 引用页面的 URL 协议
                  tasks.result.items.page_to_scheme:
                    type: string
                    description: 引用页面的 URL 协议
                  tasks.result.items.direction:
                    type: string
                    description: 链接方向，可选值：internal、external
                  tasks.result.items.is_broken:
                    type: boolean
                    description: 链接是否失效，表示链接是否指向已损坏的页面或资源
                  tasks.result.items.text:
                    type: string
                    description: 图片文本
                  tasks.result.items.is_link_relation_conflict:
                    type: boolean
                    description: >-
                      表示该链接是否可能与其他链接存在冲突。如果为 true，则至少有一个指向 link_to 的链接具有
                      rel="nofollow" 属性，并且至少有一个是 dofollow
                  tasks.result.items.page_to_status_code:
                    type: integer
                    description: 引用页面的状态码，即链接所指向页面的状态码
                  tasks.result.items.image_alt:
                    type: string
                    description: 图像的替代文本
                  tasks.result.items.image_src:
                    type: string
                    description: 图片的 URL
                  tasks.result.items.is_valid_hreflang:
                    type: boolean
                    description: hreflang 有效性状态表示 hreflang 属性是否正确实现
                  tasks.result.items.hreflang:
                    type: string
                    description: hreflang 属性值，即 hreflang 属性中指定的语言和可选国家/地区代码，示例："en-US"、"fr"
        '400':
          description: 错误请求
        '401':
          description: 未授权
        '429':
          description: 超出速率限制
        '500':
          description: 内部服务器错误
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````