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

# Search Tavily Data

> 搜索网页，返回的排序结果里已经带好页面正文，不需要再调一次抓取。

搜索网页，返回的排序结果里已经带好页面正文，不需要再调一次抓取。`query` 必填。返回 `results[]`，每条含 `url`、`title`、`content`（提取出的正文片段）、`score`，以及可选的 `raw_content`；顶层还有 `query`、`images`、`response_time` 和 `request_id`。设 `include_answer` 可以额外拿到一段 `answer`。可用 `topic`（general/news/finance）、`time_range` 或明确的 `start_date`/`end_date` 过滤，用 `search_depth` 在成本与深度之间取舍。实测取 2 条结果约 6 秒。开放网页检索优先选它，也是这里唯一在一次调用里同时给出排序结果和页面正文的搜索。什么时候该换：已经知道 URL —— [`post_tavily_extract`](https://aisa.one/docs/zh/api-reference/search/post_tavily-extract) 更便宜也更准确；查询是一段描述而不是关键词 —— `post_exa_search` 按语义匹配；想要一段带引用的答案而不是可遍历的列表 —— [`post_perplexity_sonar`](https://aisa.one/docs/zh/api-reference/perplexity/post_perplexity-sonar)；要的是同行评审论文 —— [`post_scholar_search_scholar`](https://aisa.one/docs/zh/api-reference/scholar/post_scholar-search-scholar)。

> [!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-search)

## 请求规范

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

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

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

```json theme={null}
{
  "operationId": "post_tavily_search",
  "method": "POST",
  "path": "/apis/v1/tavily/search",
  "servers": [
    {
      "url": "https://api.aisa.one"
    }
  ],
  "parameters": [],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "properties": {
            "auto_parameters": {
              "default": false,
              "description": "Automatically configure search parameters based on query content.",
              "type": "boolean"
            },
            "chunks_per_source": {
              "default": 3,
              "description": "Maximum number of relevant chunks returned per source.",
              "maximum": 3,
              "minimum": 1,
              "type": "integer"
            },
            "country": {
              "description": "Boost search results from a specific country. Available only when topic is general.",
              "enum": [
                "afghanistan",
                "albania",
                "algeria",
                "andorra",
                "angola",
                "argentina",
                "armenia",
                "australia",
                "austria",
                "azerbaijan",
                "bahamas",
                "bahrain",
                "bangladesh",
                "barbados",
                "belarus",
                "belgium",
                "belize",
                "benin",
                "bhutan",
                "bolivia",
                "bosnia and herzegovina",
                "botswana",
                "brazil",
                "brunei",
                "bulgaria",
                "burkina faso",
                "burundi",
                "cambodia",
                "cameroon",
                "canada",
                "cape verde",
                "central african republic",
                "chad",
                "chile",
                "china",
                "colombia",
                "comoros",
                "congo",
                "costa rica",
                "croatia",
                "cuba",
                "cyprus",
                "czech republic",
                "denmark",
                "djibouti",
                "dominican republic",
                "ecuador",
                "egypt",
                "el salvador",
                "equatorial guinea",
                "eritrea",
                "estonia",
                "ethiopia",
                "fiji",
                "finland",
                "france",
                "gabon",
                "gambia",
                "georgia",
                "germany",
                "ghana",
                "greece",
                "guatemala",
                "guinea",
                "haiti",
                "honduras",
                "hungary",
                "iceland",
                "india",
                "indonesia",
                "iran",
                "iraq",
                "ireland",
                "israel",
                "italy",
                "jamaica",
                "japan",
                "jordan",
                "kazakhstan",
                "kenya",
                "kuwait",
                "kyrgyzstan",
                "latvia",
                "lebanon",
                "lesotho",
                "liberia",
                "libya",
                "liechtenstein",
                "lithuania",
                "luxembourg",
                "madagascar",
                "malawi",
                "malaysia",
                "maldives",
                "mali",
                "malta",
                "mauritania",
                "mauritius",
                "mexico",
                "moldova",
                "monaco",
                "mongolia",
                "montenegro",
                "morocco",
                "mozambique",
                "myanmar",
                "namibia",
                "nepal",
                "netherlands",
                "new zealand",
                "nicaragua",
                "niger",
                "nigeria",
                "north korea",
                "north macedonia",
                "norway",
                "oman",
                "pakistan",
                "panama",
                "papua new guinea",
                "paraguay",
                "peru",
                "philippines",
                "poland",
                "portugal",
                "qatar",
                "romania",
                "russia",
                "rwanda",
                "saudi arabia",
                "senegal",
                "serbia",
                "singapore",
                "slovakia",
                "slovenia",
                "somalia",
                "south africa",
                "south korea",
                "south sudan",
                "spain",
                "sri lanka",
                "sudan",
                "sweden",
                "switzerland",
                "syria",
                "taiwan",
                "tajikistan",
                "tanzania",
                "thailand",
                "togo",
                "trinidad and tobago",
                "tunisia",
                "turkey",
                "turkmenistan",
                "uganda",
                "ukraine",
                "united arab emirates",
                "united kingdom",
                "united states",
                "uruguay",
                "uzbekistan",
                "venezuela",
                "vietnam",
                "yemen",
                "zambia",
                "zimbabwe"
              ],
              "type": "string"
            },
            "end_date": {
              "description": "Return results before the specified end date.",
              "example": "2025-12-29",
              "format": "date",
              "type": "string"
            },
            "exclude_domains": {
              "description": "List of domains to specifically exclude from the search results.",
              "items": {
                "type": "string"
              },
              "maxItems": 150,
              "type": "array"
            },
            "include_answer": {
              "default": false,
              "description": "Include an LLM-generated answer. true uses the default answer mode; basic or advanced selects the answer generation mode.",
              "oneOf": [
                {
                  "type": "boolean"
                },
                {
                  "enum": [
                    "basic",
                    "advanced"
                  ],
                  "type": "string"
                }
              ]
            },
            "include_domains": {
              "description": "List of domains to specifically include in the search results.",
              "items": {
                "type": "string"
              },
              "maxItems": 300,
              "type": "array"
            },
            "include_favicon": {
              "default": false,
              "description": "Include the favicon URL for each result.",
              "type": "boolean"
            },
            "include_image_descriptions": {
              "default": false,
              "description": "Add descriptive text for each image when include_images is true.",
              "type": "boolean"
            },
            "include_images": {
              "default": false,
              "description": "Perform an image search and include results.",
              "type": "boolean"
            },
            "include_raw_content": {
              "default": false,
              "description": "Include cleaned and parsed content for each search result. true or markdown returns markdown; text returns plain text and may increase latency.",
              "oneOf": [
                {
                  "type": "boolean"
                },
                {
                  "enum": [
                    "markdown",
                    "text"
                  ],
                  "type": "string"
                }
              ]
            },
            "include_usage": {
              "default": false,
              "description": "Include credit usage information in the response.",
              "type": "boolean"
            },
            "max_results": {
              "default": 5,
              "description": "Maximum number of search results to return.",
              "maximum": 20,
              "minimum": 0,
              "type": "integer"
            },
            "query": {
              "description": "The search query to execute with Tavily.",
              "example": "Who is Leo Messi?",
              "type": "string"
            },
            "safe_search": {
              "default": false,
              "description": "Filter out adult or unsafe content from search results. Enterprise only; not supported when search_depth is fast or ultra-fast.",
              "type": "boolean"
            },
            "search_depth": {
              "default": "basic",
              "description": "Controls the latency vs. relevance tradeoff. advanced gives the highest relevance with higher latency and cost; basic is balanced; fast and ultra-fast optimize for lower latency.",
              "enum": [
                "advanced",
                "basic",
                "fast",
                "ultra-fast"
              ],
              "type": "string"
            },
            "start_date": {
              "description": "Return results after the specified start date.",
              "example": "2025-02-09",
              "format": "date",
              "type": "string"
            },
            "time_range": {
              "description": "Time range to filter results based on publish date.",
              "enum": [
                "day",
                "week",
                "month",
                "year",
                "d",
                "w",
                "m",
                "y"
              ],
              "type": "string"
            },
            "topic": {
              "default": "general",
              "description": "Category of the search.",
              "enum": [
                "general",
                "news",
                "finance"
              ],
              "type": "string"
            }
          },
          "required": [
            "query"
          ],
          "type": "object"
        }
      }
    },
    "required": true
  },
  "x-aisa-status": "enabled",
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  }
}
```

## 费用与请求规则

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


## OpenAPI

````yaml openapi/zh/tavily.json POST /apis/v1/tavily/search
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/search:
    post:
      tags:
        - default
      summary: Search Tavily Data
      description: >-
        Search the web and get back ranked results with the page text already
        extracted, so there is no second call to fetch content. `query` is
        required. Returns `results[]` with `url`, `title`, `content` (the
        extracted excerpt), `score` and optionally `raw_content`, alongside
        `query`, `images`, `response_time` and `request_id`; set
        `include_answer` to also get a one-paragraph `answer`. Filter with
        `topic` (general/news/finance), `time_range` or explicit
        `start_date`/`end_date`, and trade cost against depth with
        `search_depth`. Measured at roughly 6 seconds for 2 results. This is the
        default choice for open-web research, and the only search here that
        returns ranked results and page text in one call. Reach past it when:
        you already know the URLs — `post_tavily_extract` is cheaper and exact;
        the query is a description rather than keywords — `post_exa_search`
        matches on meaning; you want a written answer rather than a list to
        iterate — `post_perplexity_sonar`; you want peer-reviewed papers —
        `post_scholar_search_scholar`.
      operationId: post_tavily_search
      requestBody:
        content:
          application/json:
            schema:
              properties:
                auto_parameters:
                  default: false
                  description: 根据查询内容自动配置搜索参数。
                  type: boolean
                chunks_per_source:
                  default: 3
                  description: 每个来源返回的相关文本块的最大数量。
                  maximum: 3
                  minimum: 1
                  type: integer
                country:
                  description: 提升特定国家/地区的搜索结果。仅当 topic 为 general 时可用。
                  enum:
                    - afghanistan
                    - albania
                    - algeria
                    - andorra
                    - angola
                    - argentina
                    - armenia
                    - australia
                    - austria
                    - azerbaijan
                    - bahamas
                    - bahrain
                    - bangladesh
                    - barbados
                    - belarus
                    - belgium
                    - belize
                    - benin
                    - bhutan
                    - bolivia
                    - bosnia and herzegovina
                    - botswana
                    - brazil
                    - brunei
                    - bulgaria
                    - burkina faso
                    - burundi
                    - cambodia
                    - cameroon
                    - canada
                    - cape verde
                    - central african republic
                    - chad
                    - chile
                    - china
                    - colombia
                    - comoros
                    - congo
                    - costa rica
                    - croatia
                    - cuba
                    - cyprus
                    - czech republic
                    - denmark
                    - djibouti
                    - dominican republic
                    - ecuador
                    - egypt
                    - el salvador
                    - equatorial guinea
                    - eritrea
                    - estonia
                    - ethiopia
                    - fiji
                    - finland
                    - france
                    - gabon
                    - gambia
                    - georgia
                    - germany
                    - ghana
                    - greece
                    - guatemala
                    - guinea
                    - haiti
                    - honduras
                    - hungary
                    - iceland
                    - india
                    - indonesia
                    - iran
                    - iraq
                    - ireland
                    - israel
                    - italy
                    - jamaica
                    - japan
                    - jordan
                    - kazakhstan
                    - kenya
                    - kuwait
                    - kyrgyzstan
                    - latvia
                    - lebanon
                    - lesotho
                    - liberia
                    - libya
                    - liechtenstein
                    - lithuania
                    - luxembourg
                    - madagascar
                    - malawi
                    - malaysia
                    - maldives
                    - mali
                    - malta
                    - mauritania
                    - mauritius
                    - mexico
                    - moldova
                    - monaco
                    - mongolia
                    - montenegro
                    - morocco
                    - mozambique
                    - myanmar
                    - namibia
                    - nepal
                    - netherlands
                    - new zealand
                    - nicaragua
                    - niger
                    - nigeria
                    - north korea
                    - north macedonia
                    - norway
                    - oman
                    - pakistan
                    - panama
                    - papua new guinea
                    - paraguay
                    - peru
                    - philippines
                    - poland
                    - portugal
                    - qatar
                    - romania
                    - russia
                    - rwanda
                    - saudi arabia
                    - senegal
                    - serbia
                    - singapore
                    - slovakia
                    - slovenia
                    - somalia
                    - south africa
                    - south korea
                    - south sudan
                    - spain
                    - sri lanka
                    - sudan
                    - sweden
                    - switzerland
                    - syria
                    - taiwan
                    - tajikistan
                    - tanzania
                    - thailand
                    - togo
                    - trinidad and tobago
                    - tunisia
                    - turkey
                    - turkmenistan
                    - uganda
                    - ukraine
                    - united arab emirates
                    - united kingdom
                    - united states
                    - uruguay
                    - uzbekistan
                    - venezuela
                    - vietnam
                    - yemen
                    - zambia
                    - zimbabwe
                  type: string
                end_date:
                  description: 返回指定结束日期之前的结果。
                  example: '2025-12-29'
                  format: date
                  type: string
                exclude_domains:
                  description: 要从搜索结果中特别排除的域名列表。
                  items:
                    type: string
                  maxItems: 150
                  type: array
                include_answer:
                  default: false
                  description: 包含由 LLM 生成的答案。true 使用默认答案模式；basic 或 advanced 用于选择答案生成模式。
                  oneOf:
                    - type: boolean
                    - enum:
                        - basic
                        - advanced
                      type: string
                include_domains:
                  description: 搜索结果中需要明确包含的域名列表。
                  items:
                    type: string
                  maxItems: 300
                  type: array
                include_favicon:
                  default: false
                  description: 为每个结果包含 favicon URL。
                  type: boolean
                include_image_descriptions:
                  default: false
                  description: 当 include_images 为 true 时，为每张图片添加描述性文本。
                  type: boolean
                include_images:
                  default: false
                  description: 执行图片搜索并包含搜索结果。
                  type: boolean
                include_raw_content:
                  default: false
                  description: >-
                    为每个搜索结果包含清理和解析后的内容。true 或 markdown 返回 Markdown；text
                    返回纯文本，并可能增加延迟。
                  oneOf:
                    - type: boolean
                    - enum:
                        - markdown
                        - text
                      type: string
                include_usage:
                  default: false
                  description: 在响应中包含信用额度用量信息。
                  type: boolean
                max_results:
                  default: 5
                  description: 返回的最大搜索结果数。
                  maximum: 20
                  minimum: 0
                  type: integer
                query:
                  description: 要使用 Tavily 执行的搜索查询。
                  example: Who is Leo Messi?
                  type: string
                safe_search:
                  default: false
                  description: >-
                    从搜索结果中过滤成人或不安全内容。仅限企业版；当 search_depth 为 fast 或 ultra-fast
                    时不受支持。
                  type: boolean
                search_depth:
                  default: basic
                  description: >-
                    控制延迟与相关性之间的权衡。advanced 以更高的延迟和成本提供最高相关性；basic 实现均衡；fast 和
                    ultra-fast 针对更低延迟进行优化。
                  enum:
                    - advanced
                    - basic
                    - fast
                    - ultra-fast
                  type: string
                start_date:
                  description: 返回指定开始日期之后的结果。
                  example: '2025-02-09'
                  format: date
                  type: string
                time_range:
                  description: 根据发布日期筛选结果的时间范围。
                  enum:
                    - day
                    - week
                    - month
                    - year
                    - d
                    - w
                    - m
                    - 'y'
                  type: string
                topic:
                  default: general
                  description: 搜索类别。
                  enum:
                    - general
                    - news
                    - finance
                  type: string
              required:
                - query
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  answer:
                    description: 由 LLM 生成的简短回答。当 include_answer 为 false 或未生成回答时，此字段为 null。
                    type:
                      - string
                      - 'null'
                  images:
                    items:
                      properties:
                        description:
                          description: 图片描述。
                          type: string
                        url:
                          description: 图片 URL。
                          type: string
                      type: object
                    type: array
                  query:
                    description: 已执行的搜索查询。
                    type: string
                  request_id:
                    description: 唯一请求标识符。
                    type: string
                  response_time:
                    description: 完成请求所用的时间（秒）。
                    format: float
                    type: number
                  results:
                    items:
                      properties:
                        content:
                          description: 搜索结果的内容摘要。
                          type: string
                        favicon:
                          description: 搜索结果的 Favicon URL。
                          type:
                            - string
                            - 'null'
                        raw_content:
                          description: >-
                            已清理并解析的源内容。除非请求了 include_raw_content 或没有可用的原始内容，否则为
                            Null。
                          type:
                            - string
                            - 'null'
                        score:
                          description: 搜索结果的相关性得分。
                          format: float
                          type: number
                        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/search \
              --header 'Authorization: Bearer <token>' \
              --header 'Content-Type: application/json' \
              --data '{
              "query": "Who is Leo Messi?"
            }'
components:
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````

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