用于寻找页面、检索相似页面、爬取以及专门代码搜索的网页搜索引擎,供AI代理在开放网络上使用。
exa-search/v1/search来自 EmpirioLabs 目录的实时按量计费价格。只为实际用量付费,没有月度最低消费。
Exa Search 通过 POST /v1/search 回答实时查询。连同模型 ID exa-search 发送搜索词,并从响应中读取结构化结果。 在EmpirioLabs 控制台获取 API 密钥。
curl https://api.empiriolabs.ai/v1/search \
-H "Authorization: Bearer $EMPIRIOLABS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "exa-search",
"query": "latest developments in solid-state batteries"
}'import requests
response = requests.post(
"https://api.empiriolabs.ai/v1/search",
headers={"Authorization": "Bearer YOUR_EMPIRIOLABS_API_KEY"},
json={
"model": "exa-search",
"query": "latest developments in solid-state batteries",
},
)
print(response.json())EmpirioLabs 上 Exa Search API 支持的请求参数。省略字段时使用默认值。
| 参数 | 类型 | 默认值 | 范围 / 值 | 描述 |
|---|---|---|---|---|
| query | string | - | - | 搜索查询(或“similar”的URL) |
| operation | enum | search | search, similar, contents, code | 搜索执行网页搜索,类似的搜索会找到类似给定URL的页面,内容返回给定URL的文本,代码返回查询的代码上下文。 |
| search_type | enum | auto | auto, instant, neural, deep, fast | 搜索算法:自动、即时、神经、深度或快速。别名类型。 |
| type | enum | auto | auto, instant, neural, deep, fast | 搜索算法:自动、即时、神经、深度或快速。自动为每个查询选择最佳模式。 |
| num_results | number | 10 | 1 到 100 | 要返回多少结果(1-100)。 |
| category | enum | - | company, research paper, news, github, tweet, movie, song, pe... | 将结果限制在某个类别,比如研究论文、新闻或GitHub。 |
| include_domains | string | - | - | 逗号分隔的域名允许列表。只返回这些领域的结果(例如 arxiv.org、github.com)。 |
| exclude_domains | string | - | - | 用逗号分隔的域名否认列表过滤结果。 |
| include_text | string | - | - | 必须出现的逗号分隔文本片段 |
| exclude_text | string | - | - | 逗号分隔文本片段以排除 |
| start_crawl_date | string | - | - | 只有返回结果在此日期之后才会爬取。ISO 8601(例如 2024-01-01T00:00:00Z)。 |
| end_crawl_date | string | - | - | 只有返回结果在此日期之前被爬取。ISO 8601。 |
| start_published_date | string | - | - | 仅返回此日期之后发布的结果。ISO 8601。 |
| end_published_date | string | - | - | 仅提交此日期之前发布的结果。ISO 8601。 |
在 EmpirioLabs,Exa Search 按量计费:Search, Auto or Fast (up to 10 results) $0.0084 每个搜索; Search, Instant or Neural (up to 10 results) $0.0048 每个搜索; Search, Deep (up to 10 results) $0.0144 per search; Find Similar (up to 10 results) $0.0048 per search; Each Result Above 10 $0.0012 per page; Result Summary $0.0012 per page; Contents: Text, Highlights or Summary (each) $0.0012 per page; Code Search $0.0048 per request。本页的实时价格表始终与 API 的实际计费一致。
Exa Search 通过 api.empiriolabs.ai 上的 POST /v1/search 提供,使用标准的 Bearer 令牌认证。
可以。EmpirioLabs Playground在浏览器中以与 API 相同的参数运行 Exa Search,你可以在写代码之前先测试提示词。
创建 EmpirioLabs 账户,然后在控制台的 API Keys生成密钥。计费使用按量付费的额度,只为实际发出的请求付费。