| name | exa-cli |
| description | CLI tool for Exa AI search API. Search the web semantically, extract content from URLs, get AI answers with citations, and conduct automated research. Use when the user wants to search the web, find information, extract content from websites, get AI answers with sources, or perform automated research tasks. |
Exa CLI Skill
This skill provides command-line access to Exa AI search API for semantic web search, content extraction, AI-powered Q&A, and automated research.
Capabilities
- Semantic Web Search: Search by meaning, not just keywords
- Content Extraction: Pull full text, highlights, and summaries from URLs
- AI-Powered Answers: Get answers with source citations
- Similar Page Discovery: Find pages similar to a given URL
- Automated Research: Deep research tasks with polling and status tracking
Setup
1. Installation
npm install -g @ai-bubble/exa-cli
npx @ai-bubble/exa-cli <command>
bun install @ai-bubble/exa-cli
2. Configuration
Set the Exa API key:
export EXA_API_KEY="your-api-key-here"
Or pass with each command:
exa search "query" --api-key "your-key"
Get an API key at: https://dashboard.exa.ai/api-keys
Core Skills
Skill: Semantic Search
Search the web using semantic understanding.
When to use:
- User asks to search for information
- User wants to find articles, papers, or websites
- User needs to research a topic
Command:
exa search "<query>" [options]
Key Options:
--num-results <n>: Results count (default: 10, max: 10 on basic plans)
--type <mode>: Search mode - auto, fast, deep, instant
--text: Include full text content
--highlights: Include relevant text highlights
--summary: Include AI-generated summary
--category <type>: Filter by category (company, research paper, news, pdf, tweet, personal site, financial report, people)
--include-domains <list>: Comma-separated domains to include
--exclude-domains <list>: Comma-separated domains to exclude
--start-date <date>: Start date (YYYY-MM-DD)
--end-date <date>: End date (YYYY-MM-DD)
--autoprompt: Enhance query with autoprompt
Examples:
exa search "latest AI developments"
exa search "transformer architecture explained" --type deep --text --highlights
exa search "startup funding" --category news --start-date 2024-01-01
exa search "machine learning" --include-domains "arxiv.org,openai.com"
Skill: Content Extraction
Retrieve content from specific URLs.
When to use:
- User provides a URL and wants to extract content
- User wants to analyze a specific article or page
- User needs text from academic papers or documentation
Command:
exa contents <url1> [<url2> ...] [options]
Key Options:
--text: Extract full text content
--highlights: Extract relevant highlights
--summary: Generate AI summary
--max-age-hours <n>: Maximum cached content age (0 = always fetch fresh)
Examples:
exa contents "https://arxiv.org/abs/2304.15004" --text
exa contents "https://example.com/1" "https://example.com/2" --text --highlights
exa contents "https://example.com/article" --text --max-age-hours 0
Skill: Find Similar Pages
Discover pages similar to a given URL.
When to use:
- User wants to find similar articles or resources
- User wants related content to a specific page
- User is researching a topic and found one good source
Command:
exa similar <url> [options]
Key Options:
--num-results <n>: Number of similar pages (default: 10)
--exclude-source-domain: Don't return pages from same domain
--text, --highlights, --summary: Include content
--category <type>: Filter by category
Examples:
exa similar "https://openai.com/research/gpt-4"
exa similar "https://techcrunch.com/article" --exclude-source-domain --text
Skill: AI-Powered Answers
Get AI-generated answers with source citations.
When to use:
- User asks a factual question
- User wants an explanation with sources
- User needs a quick answer with references
Command:
exa answer "<question>" [options]
Key Options:
--text: Include source text in citations
--model <model>: Model to use (exa, exa-pro)
--stream: Stream response in real-time
--system-prompt <prompt>: Custom system prompt
Examples:
exa answer "What is quantum computing?"
exa answer "Explain neural networks" --stream
exa answer "Compare transformer vs RNN architectures" --model exa-pro
exa answer "Explain blockchain" --system-prompt "Explain to a 10-year-old"
Skill: Automated Research
Create and manage deep research tasks.
When to use:
- User needs comprehensive research on a topic
- User wants automated information gathering
- User needs structured research output
Command:
exa research "<instructions>" [options]
Key Options:
--model <model>: Research model (fast, regular, pro)
--poll: Wait for completion and show results
--poll-interval <ms>: Check interval in ms (default: 1000)
--timeout <ms>: Max wait time (default: 600000 = 10 min)
Examples:
exa research "Latest SpaceX valuation and funding rounds"
exa research "CRISPR applications in medicine" --poll
exa research "Fusion energy progress 2024" --model pro --poll --timeout 300000
Skill: Research Task Management
Check status and list research tasks.
When to use:
- User wants to check on a research task
- User needs to list all their research tasks
- User wants to see research results
Commands:
exa research-status <task-id>
exa research-list
exa research-list --limit 10 --cursor "next-page-token"
Workflows
Workflow: Deep Topic Research
Research a topic thoroughly with multiple approaches:
-
Initial Search
exa search "topic keywords" --type deep --num-results 10 --text
-
Extract Key Sources
exa contents "https://key-source-1.com" "https://key-source-2.com" --text --highlights
-
Find Related Content
exa similar "https://best-article-found.com" --num-results 5 --text
-
Get AI Summary
exa answer "Synthesize findings about [topic]" --model exa-pro
-
Deep Research (if needed)
exa research "Comprehensive analysis of [topic]" --model pro --poll
Workflow: News Monitoring
Track recent news on a topic:
-
Search Recent News
exa search "topic" --category news --start-date $(date -d '7 days ago' +%Y-%m-%d) --num-results 10
-
Get Full Articles
exa contents "https://news-site.com/article-1" "https://news-site.com/article-2" --text --summary
Workflow: Academic Research
Research academic papers:
-
Search Papers
exa search "research topic" --category "research paper" --num-results 10
-
Extract Paper Content
exa contents "https://arxiv.org/abs/xxxxx" --text --highlights
-
Find Related Papers
exa similar "https://arxiv.org/abs/xxxxx" --category "research paper"
Common Patterns
Pattern: JSON Output for Scripting
Use --json flag when integrating with scripts:
exa search "query" --json | jq '.results[0].title'
exa research-status "task-id" --json | jq '.status'
Pattern: Content Options
Content flags (--text, --highlights, --summary) work across multiple commands:
exa search "query" --text --highlights
exa similar "url" --text --summary
exa contents "url" --text --highlights --summary
Pattern: Date Filtering
Filter by publication date:
exa search "topic" --start-date $(date -d '30 days ago' +%Y-%m-%d)
exa search "topic" --start-date 2024-01-01 --end-date 2024-12-31
Pattern: Domain Control
Include or exclude specific domains:
exa search "topic" --include-domains "arxiv.org,openai.com,anthropic.com"
exa search "topic" --exclude-domains "reddit.com,twitter.com"
Search Categories
Available categories for filtering:
company - Company websites and profiles
research paper - Academic papers and research
news - News articles and journalism
pdf - PDF documents
tweet - Twitter/X posts
personal site - Personal blogs and websites
financial report - Financial documents
people - People profiles
Search Types
Different search modes for different needs:
auto - Automatically choose best type (default)
fast - Quick search, good for speed-critical apps
deep - Thorough search, best for research
instant - Lowest latency, optimized for real-time
Research Models
Research task quality levels:
fast / exa-research-fast - Fastest, good for quick facts
regular / exa-research - Balanced speed and quality
pro / exa-research-pro - Highest quality, slower
Error Handling
Common errors and solutions:
Missing API Key:
Error: EXA_API_KEY not set. Use --api-key or set EXA_API_KEY environment variable.
Solution: Set EXA_API_KEY environment variable or use --api-key flag
Missing Arguments:
Error: search requires a query argument
Solution: Provide the required argument
Invalid URLs:
Error: API Error 400: Invalid URL format
Solution: Check URL format and try again
Rate Limiting:
Error: API Error 429: Too many requests
Solution: Wait and retry, or upgrade your Exa plan
Tips and Best Practices
-
Use autoprompt for better results: Add --autoprompt to searches when you're not getting relevant results
-
Combine content options: Use --text --highlights --summary together for comprehensive content extraction
-
Stream for long answers: Use --stream with the answer command for better UX on long responses
-
Poll for research: Always use --poll with research tasks unless you want to check status manually later
-
Check costs: Look for cost information in the output to monitor API usage
-
Use categories: Filter by category (especially research paper or news) for more targeted results
-
Date filtering: Use date filters for time-sensitive research
-
JSON for automation: Use --json flag when integrating with other tools or scripts
Resources
Examples Summary
exa search "AI startups" --num-results 5 --text --type deep
exa contents "https://example.com/article" --text --highlights
exa similar "https://openai.com/blog" --exclude-source-domain
exa answer "What is LLM?" --model exa-pro --stream
exa research "SpaceX history" --model pro --poll
exa research-status "task-id"
exa research-list --limit 10