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

# 搜索

> 按语义而不是关键词搜索网页。

> [!NOTE]
>
> 参考示例是可自行编辑的固定 cURL 请求。本页暂时停用交互表单，因为嵌套内容控件可能加入未选择的选项。执行前请核对请求体并获取新报价。

按语义而不是关键词搜索网页。`query` 必填；可用 `category`、`includeDomains`、`excludeDomains`、`startPublishedDate`、`endPublishedDate` 收窄，用 `numResults` 控制条数。返回 `requestId`、`resolvedSearchType`、`searchTime`、`costDollars` 和 `results[]`（含 `id`、`title`、`url`）。**`id` 就是 URL**，也正是 [`post_exa_contents`](https://aisa.one/docs/zh/api-reference/search/post_exa-contents) 要的东西。延迟取决于请求及上游状态。执行前请用同一查询和选项获取最新报价，并参考当前公开价格进行估算。⚠️ 结果**默认不带页面正文**：要么传 `contents`，要么再调一次 [`post_exa_contents`](https://aisa.one/docs/zh/api-reference/search/post_exa-contents)。查询是一段描述而不是关键词时，选它而不是 [`post_tavily_search`](https://aisa.one/docs/zh/api-reference/search/post_tavily-search)；想在同一次调用里拿到正文，选 Tavily；想要一段写好的答案而不是列表，用 [`post_exa_answer`](https://aisa.one/docs/zh/api-reference/search/post_exa-answer)。

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

## 请求规范

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

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

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

```json theme={null}
{
  "operationId": "post_exa_search",
  "method": "POST",
  "path": "/apis/v1/exa/search",
  "servers": [
    {
      "url": "https://api.aisa.one"
    }
  ],
  "parameters": [],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "properties": {
            "category": {
              "description": "Optional hint about the kind of pages to prioritize.",
              "enum": [
                "company",
                "research paper",
                "news",
                "personal site",
                "financial report",
                "people"
              ],
              "type": "string"
            },
            "contents": {
              "description": "Content options to return alongside each result.",
              "properties": {
                "highlights": {
                  "description": "Return highlighted relevant snippets.",
                  "type": "boolean"
                },
                "summary": {
                  "description": "Return an AI-generated summary of the page.",
                  "type": "boolean"
                },
                "text": {
                  "description": "Return the full page text.",
                  "type": "boolean"
                }
              },
              "type": "object"
            },
            "endPublishedDate": {
              "description": "Only return results published on or before this ISO 8601 date.",
              "format": "date-time",
              "type": "string"
            },
            "excludeDomains": {
              "description": "Exclude results from these domains.",
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "includeDomains": {
              "description": "Only return results from these domains.",
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "numResults": {
              "default": 10,
              "description": "Number of results to return.",
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            },
            "outputSchema": {
              "description": "JSON Schema used to synthesize a structured output from the results.",
              "type": "object"
            },
            "query": {
              "description": "The natural-language search query.",
              "example": "latest evaluation frameworks for AI agents",
              "type": "string"
            },
            "startPublishedDate": {
              "description": "Only return results published on or after this ISO 8601 date.",
              "format": "date-time",
              "type": "string"
            },
            "stream": {
              "default": false,
              "enum": [
                false
              ],
              "type": "boolean"
            },
            "systemPrompt": {
              "description": "Instruction that guides how the structured output is generated.",
              "type": "string"
            },
            "type": {
              "default": "auto",
              "description": "Search mode. auto lets Exa choose; the deep modes trade latency for higher-quality retrieval.",
              "enum": [
                "auto",
                "fast",
                "instant",
                "deep-lite",
                "deep",
                "deep-reasoning"
              ],
              "type": "string"
            }
          },
          "required": [
            "query"
          ],
          "type": "object"
        }
      }
    },
    "required": true
  },
  "x-aisa-status": "enabled",
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  }
}
```

## 费用与请求规则

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


## OpenAPI

````yaml openapi/zh/exa.json POST /apis/v1/exa/search
openapi: 3.1.0
info:
  description: ''
  title: Exa
  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:
    exa:
      description: ''
      title: Exa
      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: d10529a4463a002dd39ad505e0bc30212230a00b2034082221e854d90728a9b8
        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/exa/agent/runs
    - /apis/v1/exa/answer
    - /apis/v1/exa/contents
    - /apis/v1/exa/search
  x-aisa-document:
    composer_version: '31'
    document_hash: sha256:ab46e78f199b7355eb8b0849ccc6b69f09ed9c898a6d7b83d8a86b70a43c863a
    facts_hash: d10529a4463a002dd39ad505e0bc30212230a00b2034082221e854d90728a9b8
    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: exa
servers:
  - url: https://api.aisa.one
security:
  - bearerAuth: []
paths:
  /apis/v1/exa/search:
    post:
      tags:
        - default
      summary: 搜索
      description: >-
        Search the web by meaning rather than by keyword. `query` is required;
        narrow with `category`, `includeDomains`, `excludeDomains`,
        `startPublishedDate`, `endPublishedDate`, and set `numResults`. Returns
        `requestId`, `resolvedSearchType`, `searchTime`, `costDollars` and
        `results[]` with `id`, `title` and `url`. **`id` is the URL**, and it is
        what `post_exa_contents` takes. Measured at 1.4 seconds — the fastest
        search here. Use current endpoint pricing and a fresh quote for this
        request. ⚠️ Results carry **no page text** unless you ask: pass
        `contents`, or follow up with `post_exa_contents`. Choose it over
        `post_tavily_search` when the query is a description rather than
        keywords; choose Tavily when you want the text in the same call, and
        `post_exa_answer` when you want a written answer rather than a list.
      operationId: post_exa_search
      requestBody:
        content:
          application/json:
            schema:
              properties:
                category:
                  description: 关于优先抓取哪类页面的可选提示。
                  enum:
                    - company
                    - research paper
                    - news
                    - personal site
                    - financial report
                    - people
                  type: string
                contents:
                  description: 随每条结果一并返回的内容选项。
                  properties:
                    highlights:
                      description: 返回高亮的相关片段。
                      type: boolean
                    summary:
                      description: 返回该页面由 AI 生成的摘要。
                      type: boolean
                    text:
                      description: 返回完整的页面文本。
                      type: boolean
                  type: object
                endPublishedDate:
                  description: 仅返回在该 ISO 8601 日期当天或之前发布的结果。
                  format: date-time
                  type: string
                excludeDomains:
                  description: 排除来自这些域名的结果。
                  items:
                    type: string
                  type: array
                includeDomains:
                  description: 只返回来自这些域名的结果。
                  items:
                    type: string
                  type: array
                numResults:
                  default: 10
                  description: 返回的结果数量。
                  maximum: 100
                  minimum: 1
                  type: integer
                outputSchema:
                  description: 用于从结果中合成结构化输出的 JSON Schema。
                  type: object
                query:
                  description: 自然语言搜索查询。
                  example: latest evaluation frameworks for AI agents
                  type: string
                startPublishedDate:
                  description: 仅返回在该 ISO 8601 日期当天或之后发布的结果。
                  format: date-time
                  type: string
                stream:
                  default: false
                  enum:
                    - false
                  type: boolean
                systemPrompt:
                  description: 用于引导结构化输出如何生成的指令。
                  type: string
                type:
                  default: auto
                  description: 搜索模式。auto 让 Exa 自行选择；deep 模式以更高延迟换取更高质量的检索。
                  enum:
                    - auto
                    - fast
                    - instant
                    - deep-lite
                    - deep
                    - deep-reasoning
                  type: string
              required:
                - query
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  costDollars:
                    description: >-
                      Upstream Exa cost breakdown. Informational only; it is not
                      the AIsa customer charge. Use a fresh quote for the actual
                      request.
                  output:
                    description: 结构化输出，仅在提供了 outputSchema 时出现。
                  requestId:
                    description: Exa 请求标识符。
                    type: string
                  results:
                    description: 排序后的搜索结果。
                    items:
                      properties:
                        author:
                          type: string
                        id:
                          type: string
                        publishedDate:
                          type: string
                        title:
                          type: string
                        url:
                          type: string
                      type: object
                    type: array
                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/exa/search \
              --header 'Authorization: Bearer <token>' \
              --header 'Content-Type: application/json' \
              --data '{
              "query": "latest evaluation frameworks for AI agents"
            }'
components:
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````

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