# 执行神经网络语义网络搜索。

**API:** Data API

**Endpoint:** `POST /v1/beta/exa/search`

**Tags:** Exa

按语义而非关键词搜索网络。`query` 为必填；可通过 `category`、`includeDomains`、`excludeDomains`、`startPublishedDate`、`endPublishedDate` 缩小范围，并设置 `numResults`。返回 `requestId`、`resolvedSearchType`、`searchTime`、`costDollars` 以及包含 `id`、`title` 和 `url` 的 `results[]`。**`id` 就是 URL**，也是 `post_exa_contents` 接受的值。⚠️ 除非主动请求，否则结果**不含页面文本**：传入 `contents`，或随后调用 `post_exa_contents`。当查询是一段描述而非关键词时，优先用它而不是 `searchWeb`；如果希望同一次调用就拿到文本，请选 Tavily；如果需要书面回答而非列表，请用 `post_exa_answer`。

### 计费参考

- 计量方式：按上报的响应成本计量。
- 参考请求估算：0.017 美元。
- 参考客户倍率：1.0。不得对已结算的客户金额再次应用。

仅供参考的元数据，不是账户报价、保证价格或消费上限。资源额度不同于 Felo 额度。最终扣费以 Felo 计费记录为准。

## Base URL

- `https://openapi.felo.ai`

## Authentication

- `FeloBearerAuth` (http bearer, bearer format Felo API Key)
- `FeloApiKey` (apiKey in header `X-API-Key`)

## Request body

Required: **yes**

### application/json

Schema:

```json
{
  "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": "指导如何生成结构化输出的指令。"
    },
    "stream": {
      "default": false,
      "enum": [
        false
      ],
      "type": "boolean"
    }
  },
  "required": [
    "query"
  ]
}
```

## Responses

### 200 — 搜索成功完成。

Headers:
- `X-Request-Id` (string) — 联系 Felo 支持时需提供的请求标识符。

**application/json**

Schema: object

```json
{
  "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 时存在。"
    },
    "costDollars": {
      "description": "资源使用的提供方成本明细。仅供参考；不是 Felo 客户扣费或 Felo 账单凭证。"
    }
  }
}
```

### 400 — 无法处理该请求。请检查请求参数。

### 401 — 需要有效的 Felo API 密钥。

### 402 — 由于未满足计费要求，请求无法继续。

### 403 — 该账户无权执行此操作。

### 429 — 已达到请求或支出限额。

### 502 — 服务无法完成该请求。

### 503 — API 或计费服务暂时不可用。

### 504 — 服务在处理请求时超时。

### default — 错误响应；上游透传响应可能采用提供方格式

**application/json**

Schema:

```json
{}
```
