Exa - Search + Research
Use this skill for web search, code-context search, URL content extraction, and async research workflows.
What This Skill Does
- Run Exa web search with optional category and domain filters.
- Retrieve full page content (and optional subpage crawling).
- Find code and docs context for programming queries.
- Run async research tasks (one-shot or create/poll workflows).
- Support optional structured outputs via
outputSchema.
Setup
Set EXA_API_KEY using one of these methods.
export EXA_API_KEY="your-exa-api-key"
# .env next to SKILL.md
EXA_API_KEY=your-exa-api-key
Behavior:
- If
EXA_API_KEYis missing in the environment, scripts load onlyEXA_API_KEYfrom.env. - Other
.envvariables are ignored by the loader.
Safety and Data Handling
SCHEMA_FILEcontent is sent tohttps://api.exa.ai/research/v1asoutputSchema.- Never use sensitive local files for
SCHEMA_FILE(for example:.env, key/cert files, secrets, internal confidential docs). research_create.shblocks obvious sensitive paths/suffixes (for example:.env,.pem,.key,.p12,.pfx,id_rsa).
Command Quick Reference
Search
bash scripts/search.sh "query"
Main env vars:
NUM=10(max 100)TYPE=auto(auto,neural,fast,deep,instant)CATEGORY=(company,research paper,news,tweet,personal site,financial report,people)DOMAINS=domain1.com,domain2.comEXCLUDE=domain1.com,domain2.comSINCE=YYYY-MM-DDUNTIL=YYYY-MM-DDLOCATION=NL
Constraints:
EXCLUDEis not supported whenCATEGORY=companyorCATEGORY=people.SINCEandUNTILare not supported whenCATEGORY=companyorCATEGORY=people.- When
CATEGORY=people,DOMAINSaccepts LinkedIn domains only (linkedin.com,www.linkedin.com,*.linkedin.com).
Content Extraction
bash scripts/content.sh "url1" "url2"
Main env vars:
MAX_CHARACTERS=2000HIGHLIGHT_SENTENCES=3HIGHLIGHTS_PER_URL=2SUBPAGES=10SUBPAGE_TARGET="docs,reference,api"LIVECRAWL=preferred(preferred,always,fallback)LIVECRAWL_TIMEOUT=12000
Code Context Search
bash scripts/code.sh "query" [num_results]
Research (One-shot)
bash scripts/research.sh "instructions"
Main env vars:
MODEL=exa-researchorMODEL=exa-research-proSCHEMA_FILE=path/to/schema.jsonPOLL_INTERVAL=2MAX_WAIT_SECONDS=240EVENTS=true
Research (Create/Poll)
bash scripts/research_create.sh "instructions" | jq
bash scripts/research_poll.sh "researchId" | jq
Agent Decision Rules
Choose TYPE for Search
Use this decision order:
- User explicitly asks for realtime or autocomplete ->
TYPE=instant. - Task needs broad coverage or deeper synthesis ->
TYPE=deep. - User asks for speed/quality balance ->
TYPE=fast. - Otherwise ->
TYPE=auto(default).
Fallback/escalation:
- If too slow or time-sensitive:
deep -> auto -> fast -> instant. - If too shallow:
instant -> fast -> auto -> deep. - Explicit user requirement always wins.
Recommended pattern:
TYPE=auto bash scripts/search.sh "query"
Common Pitfalls
- Do not pass sensitive files to
SCHEMA_FILE. - Do not combine
CATEGORY=people|companywithEXCLUDE,SINCE, orUNTIL. - Prefer
https://docs.exa.ai/for subpage crawling seeds (more reliable thanhttps://exa.ai/docs/reference/).
More Examples
See EXAMPLES.md for grouped command examples and edge-case workflows.