Exa Search
Use Exa for source-first retrieval.
Prefer it when the task is about:
- official documentation
- API/reference pages
- pricing/plan details
- product/company pages
- extracting the text of a page instead of just finding the link
- expanding from one canonical page to similar pages
Do not default to Exa for:
- breaking news
- X/Twitter chatter
- live sentiment / fast-moving discourse
- broad real-time synthesis across many fresh sources
For those, prefer grok-search.
Workflow
- Start with
docsfor official documentation lookups. - Use
search --textorresearchwhen you need extracted body text. - Restrict domains aggressively when the user wants official sources.
- Use
similarwhen you already have the best canonical page and want adjacent sources. - For official-doc-only work, prefer
docsplus domain restriction oversimilar;similaris semantic, not source-pure. - Return links plus extracted evidence, not just titles.
Config
Preferred key resolution order:
--api-keyEXA_API_KEYEXA_API_KEYS(comma-separated)config.local.jsonconfig.json~/.codex/config/exa-search.json
Recommended setup for this workspace: keep the real key inside the skill folder in config.local.json so the entire skill can be backed up or moved as one directory.
Single key
{
"profiles": [
{ "id": "main", "api_key": "YOUR_EXA_API_KEY" }
],
"base_url": "https://api.exa.ai",
"timeout_seconds": 30
}
Multiple keys with auto failover
{
"profiles": [
{ "id": "main", "api_key": "KEY_1" },
{ "id": "backup-1", "api_key": "KEY_2" },
{ "id": "backup-2", "api_key": "KEY_3" }
],
"base_url": "https://api.exa.ai",
"timeout_seconds": 30
}
Failover behavior:
- profiles are tried in order
- 401 / 403 / 429 and quota / billing / rate-limit style errors automatically move to the next key
- the output includes
profileIdandattemptsso you can see which key was used
Commands
Official docs search
python3 scripts/exa_search.py docs --query "telegram streaming openclaw"
Official docs search with extracted text
python3 scripts/exa_search.py docs --query "model failover openclaw" --text --num 2
General source-first search
python3 scripts/exa_search.py search --query "OpenClaw Telegram streaming" --num 5
Deep extraction / research
python3 scripts/exa_search.py research --query "OpenClaw model failover" --num 3
Force a specific key/profile
python3 scripts/exa_search.py docs --query "telegram streaming openclaw" --profile main
Find similar pages
python3 scripts/exa_search.py similar --url "https://docs.openclaw.ai/channels/telegram" --num 5
Notes
docsdefaults toincludeDomains=docs.openclaw.ai.researchdefaults to text extraction.- output is normalized JSON so downstream agents can consume it reliably.
- use
references/query-recipes.mdfor ready-made query patterns.