Claude-code-minoan exa-search
Search the web with Exa AI — neural search, content extraction, similar page discovery, quick research with citations, and async pro research with structured output. Covers all Exa endpoints (/search, /contents, /findSimilar, /answer, /research/v1). Triggers on web search, find pages, similar pages, research with citations, Exa, neural search.
git clone https://github.com/tdimino/claude-code-minoan
T=$(mktemp -d) && git clone --depth=1 https://github.com/tdimino/claude-code-minoan "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/research/exa-search" ~/.claude/skills/tdimino-claude-code-minoan-exa-search && rm -rf "$T"
skills/research/exa-search/SKILL.mdExa Search Skill
5 specialized scripts for Exa AI search API—neural search, content extraction, similar pages, research with citations, and async pro research.
Prerequisite:
EXA_API_KEY environment variable. Get key at https://dashboard.exa.ai
Token-Efficient Search
Inspired by Anthropic's dynamic filtering—always filter before reasoning. ~24% fewer tokens, ~11% better accuracy.
The Principle: Search Cheaply → Filter → Extract Selectively → Reason
DO:
# Step 1: Search with --no-text (titles/URLs only — cheapest) python3 ~/.claude/skills/exa-search/scripts/exa_search.py "query" -n 20 --no-text # Step 2: Evaluate titles, pick best 3-5 URLs # Step 3: Extract only those URLs with bounded content python3 ~/.claude/skills/exa-search/scripts/exa_contents.py URL1 URL2 --highlights --max-chars 3000
DON'T: Search with full text for 50 results, then reason over all of it.
Use API-Level Filters First (Free Filtering)
These reduce results at the API level before you ever see them:
— results must contain this string--must-include "term"
— removes irrelevant results--must-exclude "term"
— restrict to authoritative sources--domains site1.com site2.com
— eliminate irrelevant content types--category "research paper"
/--after 2025-01-01
— temporal filtering--before
Use Summaries Over Full Text
When you need the gist, not raw content:
# AI-distilled summaries — much smaller than full text python3 ~/.claude/skills/exa-search/scripts/exa_search.py "query" --summary "Key findings" -n 5
Use Bounded Context for RAG
# Capped context string — prevents unbounded token usage python3 ~/.claude/skills/exa-search/scripts/exa_search.py "query" --context --context-chars 5000
Post-Process with filter_web_results.py
Pipe Exa JSON output through the Firecrawl filter script for additional reduction:
python3 ~/.claude/skills/exa-search/scripts/exa_search.py "query" --json | \ python3 ~/.claude/skills/firecrawl/scripts/filter_web_results.py \ --fields "title,url,text" --max-chars 3000
Cost Tiers — Match to Task
| Type | Latency | Cost/1k | When |
|---|---|---|---|
| <150ms | Cheapest | Real-time lookups, autocomplete |
| ~500ms | Low | Quick checks, confirmations |
(default) | -- | Medium | General search |
| 4-12s | $12 | Comprehensive research |
| 12-50s | $15 | Maximum depth + synthesis |
Structured Deep Search (Exa Deep)
Deep and deep-reasoning searches support structured JSON output via
outputSchema. The API returns parsed content in output.content with per-field grounding citations and confidence scores.
| Quick Example | Purpose |
|---|---|
| Simple text answer |
| Structured company research |
| Custom schema |
| Schema from file |
Presets:
company, paper-survey, competitor-analysis, person, news-digest
Output includes field-level grounding: per-field citations with [H]igh/[M]edium/[L]ow confidence.
Available Scripts
1. exa_search.py — Neural Web Search
python3 ~/.claude/skills/exa-search/scripts/exa_search.py "query" [options]
| Quick Example | Purpose |
|---|---|
| Basic search |
| Academic papers |
| Deep search |
| Domain-filtered |
| Recent news |
| RAG context |
| Sub-150ms lookup |
| Structured company research |
| Quick factual answer |
Categories: company, research paper, news, pdf, github, tweet, personal site, people, financial report
2. exa_contents.py — URL Content Extraction
python3 ~/.claude/skills/exa-search/scripts/exa_contents.py URL [URL2...] [options]
| Quick Example | Purpose |
|---|---|
| Extract paper |
| Summarized extraction |
| Fresh content |
| Bounded extraction |
3. exa_similar.py — Find Similar Pages
python3 ~/.claude/skills/exa-search/scripts/exa_similar.py URL [options]
| Quick Example | Purpose |
|---|---|
| Find competitors |
| Related papers |
| Comparison summaries |
4. exa_research.py — AI-Powered Research
python3 ~/.claude/skills/exa-search/scripts/exa_research.py "question" [options]
| Quick Example | Purpose |
|---|---|
| Research with citations |
| Real-time streaming |
| Authoritative sources |
| Markdown with citations |
| Pipe-friendly output |
5. exa_research_async.py — Async Pro Research
python3 ~/.claude/skills/exa-search/scripts/exa_research_async.py "question" [options]
| Quick Example | Purpose |
|---|---|
| Pro model |
| Fast model |
| Structured output |
| Check job |
| List jobs |
Script Selection Guide
| Task | Best Script |
|---|---|
| Web search with filters | |
| Research papers | |
| Company/startup info | |
| GitHub repos/code | |
| Extract known URL content | |
| Find competitors | |
| Quick answers with citations | |
| Complex structured research | |
| Real-time search | |
| RAG context building | |
| Structured research with grounding | |
| Quick factual answer | |
Exa vs Firecrawl vs Native Claude Tools
| Need | Best Tool | Why |
|---|---|---|
| Semantic/neural search | Exa | AI-powered relevance |
| Find research papers | Exa | Academic index |
| Quick research answer | Exa | Citations + synthesis |
| Find similar pages | Exa | Semantic similarity |
| Single page → markdown | Firecrawl | Cleanest output |
| Crawl entire site | Firecrawl | Link following |
| Autonomous data finding | Firecrawl | No URLs needed |
| Search + scrape combined | Firecrawl | One operation |
| Claude API agent building | Native | Built-in dynamic filtering |
| Twitter/X content | | Only tool that works |
Common Workflows
Research a Topic
python3 ~/.claude/skills/exa-search/scripts/exa_research.py "How does RAG work?" --sources --markdown
Literature Review
# Find papers, then find similar to best hit python3 ~/.claude/skills/exa-search/scripts/exa_search.py "transformer optimization" --category "research paper" -n 20 --summary "Key contributions" python3 ~/.claude/skills/exa-search/scripts/exa_similar.py "https://arxiv.org/abs/1706.03762" --category "research paper" -n 15
Documentation Research
python3 ~/.claude/skills/exa-search/scripts/exa_search.py "React useEffect cleanup" --domains react.dev developer.mozilla.org --context
Build RAG Context
python3 ~/.claude/skills/exa-search/scripts/exa_search.py "Python async patterns" --context --context-chars 15000 --domains docs.python.org
Reference Documentation
| File | Contents |
|---|---|
| Full parameter reference for all 5 scripts, cost table, MCP comparison, test suite |
Test Suite
python3 ~/.claude/skills/exa-search/scripts/test_exa.py --quick # Quick validation python3 ~/.claude/skills/exa-search/scripts/test_exa.py # Full suite python3 ~/.claude/skills/exa-search/scripts/test_exa.py --endpoint search # Specific endpoint