Exa Search: Neural and Keyword Search with Content Extraction
This page covers how to integrate Exa AI search into your workflow, including setup, API key configuration, and tool parameters. It is intended for developers needing neural, keyword, or hybrid search with built-in content extraction.
Read this when
- You want to use Exa for web_search
- You need an EXA_API_KEY
- You want neural search or content extraction
Exa AI is a web_search provider offering neural, keyword, and hybrid search capabilities along with built-in content extraction for highlights, text, and summaries.
Install plugin
openclaw plugins install @openclaw/exa-plugin
openclaw gateway restart
Get an API key
Create an account
Create an account at exa.ai and obtain an API key through your dashboard.
Store the key
Configure EXA_API_KEY in the Gateway environment, or use the following setup:
openclaw configure --section web
Config
{
plugins: {
entries: {
exa: {
config: {
webSearch: {
apiKey: "exa-...", // optional if EXA_API_KEY is set
baseUrl: "https://api.exa.ai", // optional; OpenClaw appends /search
},
},
},
},
},
tools: {
web: {
search: {
provider: "exa",
},
},
},
}
Environment alternative: place EXA_API_KEY in the Gateway environment. For a gateway installation, store it in ~/.openclaw/.env. Refer to Env vars.
Base URL override
Assign plugins.entries.exa.config.webSearch.baseUrl to direct Exa search
requests through a compatible proxy or alternative endpoint. OpenClaw
normalizes bare hosts by adding https:// at the beginning and /search at the end unless the path already terminates there. The final endpoint becomes part of the search cache key, so results from different endpoints are never combined.
Tool parameters
-
query(string, required), The search term. -
count(number, default: 5), Number of results (1-100, limited by Exa search type). -
type(auto' | 'neural' | 'fast' | 'deep' | 'deep-reasoning' | 'instant), The search type. -
freshness(day' | 'week' | 'month' | 'year), Restricts results by time. Not usable withdate_after/date_before. -
date_after(string), Results after this date (YYYY-MM-DD). -
date_before(string), Results before this date (YYYY-MM-DD). -
contents(object), Controls for content extraction (details below).
Content extraction
Provide a contents object to manage what content is extracted from results:
await web_search({
query: "transformer architecture explained",
type: "neural",
contents: {
text: true, // full page text
highlights: { numSentences: 3 }, // key sentences
summary: true, // AI summary
},
});
| Contents option | Type | Description |
|---|---|---|
text | boolean | { maxCharacters } | Retrieve full page text |
highlights | boolean | { maxCharacters, query, numSentences, highlightsPerUrl } | Retrieve key sentences |
summary | boolean | { query } | AI-generated summary |
When contents is not provided, Exa uses { highlights: true } as the default, meaning results include key-sentence excerpts. Descriptions for results are drawn from highlights first, then summary, then full text, whichever is available earliest. Results also retain the raw highlightScores and summary fields from the Exa API response when they exist.
Search modes
| Mode | Description |
|---|---|
auto | Exa selects the optimal mode (default) |
neural | Search based on meaning and semantics |
fast | Fast keyword-based search |
deep | In-depth thorough search |
deep-reasoning | Deep search with reasoning |
instant | Quickest possible results |
Notes
countsupports up to 100 results, depending on Exa search type limits.- Results are cached for 15 minutes by default. Adjust the shared
tools.web.search.cacheTtlMinutes(in minutes) andtools.web.search.timeoutSeconds(default 30s) to modify caching and request timeout for allweb_searchproviders, including Exa.
Related
- Web Search overview -- all providers and automatic detection
- Brave Search -- structured results with country and language filters
- Perplexity Search -- structured results with domain filtering