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

# Exa Search

> 用自然语言查询执行神经语义网页搜索，返回最相关的结果。

用自然语言 `query` 搜索公开网页，返回最相关的结果，按语义相关性而非关键词排序。可用 `type`（从 `fast` 到 `deep-reasoning`）调节检索方式，用 `numResults`（1–100，默认 10）限制结果数量，并用 `category`、`includeDomains`/`excludeDomains` 或发布日期区间收窄范围。

设置 `contents` 可在每条结果中内联返回页面 `text`、`highlights` 或 AI `summary`；提供 `outputSchema`（可搭配 `systemPrompt`）可让 Exa 合成结构化的 `output`。每次成功请求固定计费 **\$0.08**；上游 4xx 响应不计费。如果你已经知道确切要看哪些页面，[`post_exa-contents`](/docs/zh/api-reference/search/post_exa-contents) 可以直接获取它们的全文。


## OpenAPI

````yaml openapi/zh/exa.json POST /exa/search
openapi: 3.0.0
info:
  title: Exa API
  version: 1.0.0
  description: >-
    通过 AIsa 网关开放的 Exa 神经语义搜索 endpoint 的统一 API 文档：Search、Contents、Answer，以及异步的研究型
    Agent Runs。


    Search、Contents 和 Answer 为同步接口，每次成功请求固定计费 $0.08。Agent Runs
    为异步接口：调用方提交任务，然后轮询返回的任务资源以获取状态和结果，每次任务固定计费 $0.10。上游 4xx 响应（例如
    401/403/404）不计费。Exa 返回的 `costDollars` 字段是上游成本明细，仅供参考——客户计费以上述 AIsa 固定价格为准。
servers:
  - url: https://api.aisa.one/apis/v1
security:
  - bearerAuth: []
paths:
  /exa/search:
    post:
      tags:
        - https://docs.exa.ai/reference/search
      summary: 执行神经语义网页搜索。
      description: 同步接口。用自然语言 query 搜索公开网页，返回最相关的结果，可选择内联返回页面内容。每次成功请求固定计费 $0.08。
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                query:
                  type: string
                  description: 自然语言搜索查询。
                  example: latest evaluation frameworks for AI agents
                type:
                  type: string
                  enum:
                    - auto
                    - fast
                    - instant
                    - deep-lite
                    - deep
                    - deep-reasoning
                  default: auto
                  description: 搜索模式。auto 让 Exa 自行选择；deep 模式以更高延迟换取更高质量的检索。
                numResults:
                  type: integer
                  minimum: 1
                  maximum: 100
                  default: 10
                  description: 返回的结果数量。
                category:
                  type: string
                  enum:
                    - company
                    - research paper
                    - news
                    - personal site
                    - financial report
                    - people
                  description: 关于优先抓取哪类页面的可选提示。
                includeDomains:
                  type: array
                  items:
                    type: string
                  description: 只返回来自这些域名的结果。
                excludeDomains:
                  type: array
                  items:
                    type: string
                  description: 排除来自这些域名的结果。
                startPublishedDate:
                  type: string
                  format: date-time
                  description: 仅返回在该 ISO 8601 日期当天或之后发布的结果。
                endPublishedDate:
                  type: string
                  format: date-time
                  description: 仅返回在该 ISO 8601 日期当天或之前发布的结果。
                contents:
                  type: object
                  description: 随每条结果一并返回的内容选项。
                  properties:
                    text:
                      type: boolean
                      description: 返回完整的页面文本。
                    highlights:
                      type: boolean
                      description: 返回高亮的相关片段。
                    summary:
                      type: boolean
                      description: 返回该页面由 AI 生成的摘要。
                outputSchema:
                  type: object
                  description: 用于从结果中合成结构化输出的 JSON Schema。
                systemPrompt:
                  type: string
                  description: 用于引导结构化输出如何生成的指令。
              required:
                - query
      responses:
        '200':
          description: 搜索成功完成。
          content:
            application/json:
              schema:
                type: object
                properties:
                  requestId:
                    type: string
                    description: Exa 请求标识符。
                  results:
                    type: array
                    description: 排序后的搜索结果。
                    items:
                      type: object
                      properties:
                        title:
                          type: string
                        url:
                          type: string
                        publishedDate:
                          type: string
                        author:
                          type: string
                        id:
                          type: string
                  output:
                    description: 结构化输出，仅在提供了 outputSchema 时出现。
                    nullable: true
                  costDollars:
                    description: 上游 Exa 的成本明细。仅供参考；客户计费为固定 $0.08。
                    nullable: true
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````