> ## 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.

> ## Agent Instructions
> - Base URLs: models `https://api.aisa.one/v1` (Gemini GenerateContent: `https://api.aisa.one/v1beta`); data APIs `https://api.aisa.one/apis/v1`. The `servers` of each operation in https://aisa.one/openapi.yaml is authoritative.
> - Auth: `Authorization: Bearer $AISA_API_KEY`. Never print, log, or commit the key.
> - MCP (preferred for agents): `https://mcp.aisa.one/mcp`, signed in with OAuth, so there is no key to paste.
> - Agent Skill: `npx skills add AIsa-team/agent-skills --skill aisa`. Fallback with the AIsa CLI: `aisa skills install aisa`.
> - Spending: docs, https://aisa.one/models, https://aisa.one/api, `/v1/models`, and MCP `search`, `list_categories`, `get_details`, `batch_quote`, and the `account` operation are free. Quote the exact calls before running them (MCP `batch_quote`, CLI `aisa quote --json`). If the quote reports `auto_execute_eligible: true`, run it unless the user set a tighter limit or asked only for a quote. Otherwise, tell the user in one message the planned calls, the quoted price, and a total USD budget for the task, then wait for approval. Direct HTTP calls follow the stricter rule at https://aisa.one/docs/get-started/cli.md#direct-http-fallback. Do not make paid calls to test availability. Full rule: https://aisa.one/llms.txt

# Extract Data

> 取回你已经拿到的 URL 的干净正文 —— 来自搜索结果、站点地图或用户输入。

取回你已经拿到的 URL 的干净正文 —— 来自搜索结果、站点地图或用户输入。`urls` 必填，可一次传多个。返回 `results[]`，含 `url`、`title`、`raw_content` 和 `images`，另有一个 `failed_results[]` 数组 —— **这个一定要读**，取不到的页面会被记在那里，而不是抛错。可选 `format`（markdown 或 text）与 `extract_depth`。实测取 1 个页面约 1 秒。只要页面能点得出名字，就用它而不是 [`post_tavily_search`](https://aisa.one/docs/zh/api-reference/search/post_tavily-search) —— 为已知页面去搜索既贵又未必搜得到。如果是一长串 URL 且不急，`post_firecrawl_batch_scrape` 会作为后台任务跑完。想先摸清整站有哪些 URL，用 [`post_tavily_map`](https://aisa.one/docs/zh/api-reference/search/post_tavily-map)。

> [!NOTE]
>
> **第一次用？** 把任意 MCP 客户端指向 `https://mcp.aisa.one/mcp` —— Claude Code、
> Codex、Cursor、VS Code 都可以。鉴权走 OAuth：客户端打开浏览器，你点一次
> Allow，不需要粘贴任何 key。之后智能体通过几个元工具调用所有端点：
> `search`、`list_categories`、`get_details` 和 `batch_quote` 免费，`batch_use`
> 按次计费。各客户端的接入步骤见[通过 MCP 连接](https://aisa.one/docs/zh/agent-quickstart.md)；实时工具列表和
> 每次调用的价格见 [aisa.one/zh-cn/mcp](https://aisa.one/zh-cn/mcp#connect)。

[在你的 agent 里把这个端点跑起来 →](https://aisa.one/mcp?from=/zh/api-reference/search/post_tavily-extract)

## 请求规范

* **方法与路径:** POST /apis/v1/tavily/extract
* **可用状态:** enabled
* **请求 URL 模板:** `https://api.aisa.one/apis/v1/tavily/extract`

[完整 OpenAPI 定义](https://aisa.one/docs/openapi/zh/tavily.json)

有效请求声明（包括认证和引用的 schema）：

```json theme={null}
{
  "operationId": "post_tavily_extract",
  "method": "POST",
  "path": "/apis/v1/tavily/extract",
  "servers": [
    {
      "url": "https://api.aisa.one"
    }
  ],
  "parameters": [],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "properties": {
            "chunks_per_source": {
              "default": 3,
              "description": "Maximum number of relevant chunks returned per source. Available only when query is provided.",
              "maximum": 5,
              "minimum": 1,
              "type": "integer"
            },
            "extract_depth": {
              "default": "basic",
              "description": "Depth of the extraction process.",
              "enum": [
                "basic",
                "advanced"
              ],
              "type": "string"
            },
            "format": {
              "default": "markdown",
              "description": "Format of the extracted web page content.",
              "enum": [
                "markdown",
                "text"
              ],
              "type": "string"
            },
            "include_favicon": {
              "default": false,
              "description": "Include the favicon URL for each result.",
              "type": "boolean"
            },
            "include_images": {
              "default": false,
              "description": "Include a list of images extracted from the URLs.",
              "type": "boolean"
            },
            "include_usage": {
              "default": false,
              "description": "Include credit usage information in the response.",
              "type": "boolean"
            },
            "query": {
              "description": "User intent for reranking extracted content chunks.",
              "type": "string"
            },
            "timeout": {
              "description": "Maximum time in seconds to wait for URL extraction. If omitted, default timeouts depend on extract_depth: 10 seconds for basic and 30 seconds for advanced.",
              "format": "float",
              "maximum": 60,
              "minimum": 1,
              "type": "number"
            },
            "urls": {
              "description": "The URL or URLs to extract content from. A single URL string and an array of URL strings are both accepted.",
              "example": [
                "https://en.wikipedia.org/wiki/Artificial_intelligence"
              ],
              "oneOf": [
                {
                  "type": "string"
                },
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                }
              ]
            }
          },
          "required": [
            "urls"
          ],
          "type": "object"
        }
      }
    },
    "required": true
  },
  "x-aisa-status": "enabled",
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  }
}
```

## 费用与请求规则

按实际用量收费。 默认请求预估费用：\$0.024 USD。 最终费用以实际用量为准。 账户适用价格可能不同；支持报价的接口可按实际请求获取报价。


## OpenAPI

````yaml openapi/zh/tavily.json POST /apis/v1/tavily/extract
openapi: 3.1.0
info:
  description: ''
  title: Tavily
  version: '1'
  x-aisa-capabilities:
    idempotency: Idempotency-Key
    max_price: X-AISA-Max-Price-USD
    quote:
      header: X-AISA-Cost-Mode
      value: quote
  x-aisa-catalogs:
    tavily:
      description: ''
      title: Tavily
      x-aisa-capabilities:
        idempotency: Idempotency-Key
        max_price: X-AISA-Max-Price-USD
        quote:
          header: X-AISA-Cost-Mode
          value: quote
      x-aisa-document:
        facts_hash: ea2301436db90d0b30e55885326cd5057bea93ff7d26d9bced8e1ae7f1911ef4
        generator_version: '3'
        protocol_version: '1'
        schema_version: '1'
      x-aisa-plans:
        builder: 1
        display_plan: payg
        payg: 1
        similarweb_payg: 1
        team: 1
        version: e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb
  x-aisa-configured-paths:
    - /apis/v1/tavily/crawl
    - /apis/v1/tavily/extract
    - /apis/v1/tavily/map
    - /apis/v1/tavily/search
  x-aisa-document:
    composer_version: '31'
    document_hash: sha256:4bd4522d1b78a17cc2adcba4cad6fcff2461b0cb414f27db5e5a7cdcb93466cb
    facts_hash: ea2301436db90d0b30e55885326cd5057bea93ff7d26d9bced8e1ae7f1911ef4
    generator_version: '3'
    protocol_version: '1'
    response_pending: []
    schema_version: '1'
  x-aisa-plans:
    builder: 1
    display_plan: payg
    payg: 1
    similarweb_payg: 1
    team: 1
    version: e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb
  x-aisa-provider: tavily
servers:
  - url: https://api.aisa.one
security:
  - bearerAuth: []
paths:
  /apis/v1/tavily/extract:
    post:
      tags:
        - default
      summary: Extract Data
      description: >-
        Fetch clean, parsed content for URLs you already have — from a search
        result, a sitemap, or a user. `urls` is required and takes several at
        once. Returns `results[]` with `url`, `title`, `raw_content` and
        `images`, plus a `failed_results[]` array — **read that one**, because a
        page that could not be fetched is reported there rather than raising an
        error. Choose `format` (markdown or text) and `extract_depth`. Measured
        at about 1 second for one page. Use this instead of `post_tavily_search`
        whenever you can already name the pages; searching for pages you can
        name costs more and may not return them. For a long list that can wait,
        `post_firecrawl_batch_scrape` runs it as a background job. To discover
        the URLs of a whole site first, use `post_tavily_map`.
      operationId: post_tavily_extract
      requestBody:
        content:
          application/json:
            schema:
              properties:
                chunks_per_source:
                  default: 3
                  description: 每个来源返回的相关内容块的最大数量。仅在提供 query 时可用。
                  maximum: 5
                  minimum: 1
                  type: integer
                extract_depth:
                  default: basic
                  description: 提取过程的深度。
                  enum:
                    - basic
                    - advanced
                  type: string
                format:
                  default: markdown
                  description: 提取的网页内容格式。
                  enum:
                    - markdown
                    - text
                  type: string
                include_favicon:
                  default: false
                  description: 为每个结果包含 favicon URL。
                  type: boolean
                include_images:
                  default: false
                  description: 包含从 URL 中提取的图片列表。
                  type: boolean
                include_usage:
                  default: false
                  description: 在响应中包含信用额度用量信息。
                  type: boolean
                query:
                  description: 用于对提取的内容块进行重新排序的用户意图。
                  type: string
                timeout:
                  description: >-
                    等待 URL 提取的最长时间（秒）。如果省略，默认超时时间取决于 extract_depth：basic 为 10
                    秒，advanced 为 30 秒。
                  format: float
                  maximum: 60
                  minimum: 1
                  type: number
                urls:
                  description: 要从中提取内容的 URL。支持单个 URL 字符串和 URL 字符串数组。
                  example:
                    - https://en.wikipedia.org/wiki/Artificial_intelligence
                  oneOf:
                    - type: string
                    - items:
                        type: string
                      type: array
              required:
                - urls
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  failed_results:
                    description: 无法处理的 URL 列表。
                    items:
                      type: string
                    type: array
                  request_id:
                    description: 唯一请求标识符。
                    type: string
                  response_time:
                    description: 完成请求所用的时间（秒）。
                    format: float
                    type: number
                  results:
                    items:
                      properties:
                        favicon:
                          description: 所提取内容的 Favicon URL。
                          type:
                            - string
                            - 'null'
                        images:
                          description: 当 include_images 为 true 时从 URL 中提取的图片。
                          items:
                            type: string
                          type: array
                        raw_content:
                          description: 从 URL 提取的原始内容。
                          type: string
                        title:
                          description: 所提取页面的标题。
                          type: string
                        url:
                          description: 已提取内容的 URL。
                          type: string
                      type: object
                    type: array
                  usage:
                    properties:
                      credits:
                        description: 请求的额度使用详情。
                        type: integer
                    type: object
                type: object
          description: 已成功返回提取结果。
        default:
          content:
            application/json:
              schema: {}
          description: >-
            Error response; upstream passthrough responses may use provider
            formats
      x-codeSamples:
        - label: Reference example
          lang: text
          source: >-
            # Fixed reference example. Playground inputs do not update this
            sample.

            curl --request POST \
              --url https://api.aisa.one/apis/v1/tavily/extract \
              --header 'Authorization: Bearer <token>' \
              --header 'Content-Type: application/json' \
              --data '{
              "urls": [
                "https://en.wikipedia.org/wiki/Artificial_intelligence"
              ]
            }'
components:
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.