Unified multi-provider web search with Intelligent Auto-Routing β uses multi-signal analysis to automatically select between Serper, Tavily, Querit, Exa, Perplexity (Sonar Pro), You.com, and SearXNG with confidence scoring.
Intelligent Multi-Signal Routing β The skill uses sophisticated query analysis:
- Intent Classification: Shopping vs Research vs Discovery vs RAG/Real-time vs Privacy
- Linguistic Patterns: "how much" (price) vs "how does" (research) vs "privately" (privacy)
- Entity Detection: Product+brand combos, URLs, domains
- Complexity Analysis: Long queries favor research providers
- Confidence Scoring: Know how reliable the routing decision is
python3 scripts/search.py -q "how much does iPhone 16 cost" # β Serper (68% confidence)
python3 scripts/search.py -q "how does quantum entanglement work" # β Tavily (86% HIGH)
python3 scripts/search.py -q "startups similar to Notion" # β Exa (76% HIGH)
python3 scripts/search.py -q "companies like stripe.com" # β Exa (100% HIGH - URL detected)
python3 scripts/search.py -q "summarize key points on AI" # β You.com (68% MEDIUM - RAG intent)
python3 scripts/search.py -q "search privately without tracking" # β SearXNG (74% HIGH - privacy intent)- β General web searches
- β Privacy-focused
- β Quick lookups
- β Default fallback
- π Product specs, prices, shopping
- π Local businesses, places
- π― "Google it" - explicit Google results
- π° Shopping/images needed
- π Knowledge Graph data
- π Research questions, deep dives
- π¬ Complex multi-part queries
- π Need full page content (not just snippets)
- π Academic/technical research
- π Domain filtering (trusted sources)
- π Multilingual AI search across 10+ languages
- β‘ Fast real-time answers with ~400ms latency
- πΊοΈ International / cross-language queries
- π° Recency-aware results for current information
- π€ Good fit for AI workflows with clean metadata
- π Find similar pages
- π’ Company/startup discovery
- π Research papers
- π» GitHub projects
- π Date-specific content
- β‘ Direct answers (great for βwho/what/defineβ)
- π§Ύ Cited, answer-first output
- π Current events / βas ofβ questions
- π Auth via
KILOCODE_API_KEY(routes tohttps://api.kilo.ai)
- π€ RAG applications (LLM-ready snippets)
- π° Combined web + news (single API call)
- β‘ Real-time information (current events)
- π Summarization context ("What's the latest...")
- π Live crawling (full page content on demand)
- π Privacy-preserving search (no tracking)
- π Multi-source aggregation (70+ engines)
- π° $0 API cost (self-hosted)
- π― Diverse perspectives (results from multiple engines)
- π Self-hosted environments (full control)
- Quick Start
- Smart Auto-Routing
- Configuration Guide
- Provider Deep Dives
- Usage Examples
- Workflow Examples
- Optimization Tips
- FAQ & Troubleshooting
- API Reference
# Run the setup wizard - it guides you through everything
python3 scripts/setup.pyThe wizard explains each provider, collects your API keys, and creates config.json automatically.
# 1. Set up at least one API key (or SearXNG instance)
export SERPER_API_KEY="your-key" # https://serper.dev
export TAVILY_API_KEY="your-key" # https://tavily.com
export QUERIT_API_KEY="your-key" # https://querit.ai
export EXA_API_KEY="your-key" # https://exa.ai
export KILOCODE_API_KEY="your-key" # enables Perplexity Sonar Pro via https://api.kilo.ai
export YOU_API_KEY="your-key" # https://api.you.com
export SEARXNG_INSTANCE_URL="https://your-instance.example.com" # Self-hosted
# 2. Run a search (auto-routed!)
python3 scripts/search.py -q "best laptop 2024"# Auto-routed to best provider
python3 scripts/search.py -q "best laptop 2024"
# Or specify a provider explicitly
python3 scripts/search.py -p serper -q "iPhone 16 specs"
python3 scripts/search.py -p tavily -q "quantum computing explained" --depth advanced
python3 scripts/search.py -p querit -q "latest AI policy updates in Germany"
python3 scripts/search.py -p exa -q "AI startups 2024" --category company
python3 scripts/search.py -p perplexity -q "Who is the president of Austria?"When you don't specify a provider, the skill analyzes your query and routes it to the best provider:
| Query Contains | Routes To | Example |
|---|---|---|
| "price", "buy", "shop", "cost" | Serper | "iPhone 16 price" |
| "near me", "restaurant", "hotel" | Serper | "pizza near me" |
| "weather", "news", "latest" | Serper | "weather Berlin" |
| "how does", "explain", "what is" | Tavily | "how does TCP work" |
| "research", "study", "analyze" | Tavily | "climate research" |
| "tutorial", "guide", "learn" | Tavily | "python tutorial" |
| multilingual, current status, latest updates | Querit | "latest AI policy updates in Germany" |
| "similar to", "companies like" | Exa | "companies like Stripe" |
| "startup", "Series A" | Exa | "AI startups Series A" |
| "github", "research paper" | Exa | "LLM papers arxiv" |
| "private", "anonymous", "no tracking" | SearXNG | "search privately" |
| "multiple sources", "aggregate" | SearXNG | "results from all engines" |
# These are all auto-routed to the optimal provider:
python3 scripts/search.py -q "MacBook Pro M3 price" # β Serper
python3 scripts/search.py -q "how does HTTPS work" # β Tavily
python3 scripts/search.py -q "latest AI policy updates in Germany" # β Querit
python3 scripts/search.py -q "startups like Notion" # β Exa
python3 scripts/search.py -q "best sushi restaurant near me" # β Serper
python3 scripts/search.py -q "explain attention mechanism" # β Tavily
python3 scripts/search.py -q "alternatives to Figma" # β Exa
python3 scripts/search.py -q "search privately without tracking" # β SearXNGSearch results are automatically cached for 1 hour to save API costs:
# First request: fetches from API ($)
python3 scripts/search.py -q "AI startups 2024"
# Second request: uses cache (FREE!)
python3 scripts/search.py -q "AI startups 2024"
# Output includes: "cached": true
# Bypass cache (force fresh results)
python3 scripts/search.py -q "AI startups 2024" --no-cache
# View cache stats
python3 scripts/search.py --cache-stats
# Clear all cached results
python3 scripts/search.py --clear-cache
# Custom TTL (in seconds, default: 3600 = 1 hour)
python3 scripts/search.py -q "query" --cache-ttl 7200Cache location: .cache/ in skill directory (override with WSP_CACHE_DIR environment variable)
See exactly why a provider was selected:
python3 scripts/search.py --explain-routing -q "best laptop to buy"Output:
{
"query": "best laptop to buy",
"selected_provider": "serper",
"reason": "matched_keywords (score=2)",
"matched_keywords": ["buy", "best"],
"available_providers": ["serper", "tavily", "exa"]
}Every search result includes routing information:
{
"provider": "serper",
"query": "iPhone 16 price",
"results": [...],
"routing": {
"auto_routed": true,
"selected_provider": "serper",
"reason": "matched_keywords (score=1)",
"matched_keywords": ["price"]
}
}Create a .env file or set these in your shell:
# Required: Set at least one
export SERPER_API_KEY="your-serper-key"
export TAVILY_API_KEY="your-tavily-key"
export EXA_API_KEY="your-exa-key"The config.json file lets you customize auto-routing and provider defaults:
{
"defaults": {
"provider": "serper",
"max_results": 5
},
"auto_routing": {
"enabled": true,
"fallback_provider": "serper",
"provider_priority": ["serper", "tavily", "exa"],
"disabled_providers": [],
"keyword_mappings": {
"serper": ["price", "buy", "shop", "cost", "deal", "near me", "weather"],
"tavily": ["how does", "explain", "research", "what is", "tutorial"],
"exa": ["similar to", "companies like", "alternatives", "startup", "github"]
}
},
"serper": {
"country": "us",
"language": "en"
},
"tavily": {
"depth": "basic",
"topic": "general"
},
"exa": {
"type": "neural"
}
}{
"auto_routing": {
"disabled_providers": ["exa"]
}
}{
"auto_routing": {
"fallback_provider": "tavily"
}
}{
"auto_routing": {
"keyword_mappings": {
"serper": [
"price", "buy", "shop", "amazon", "ebay", "walmart",
"deal", "discount", "coupon", "sale", "cheap"
],
"tavily": [
"how does", "explain", "research", "what is",
"coursera", "udemy", "learn", "course", "certification"
],
"exa": [
"similar to", "companies like", "competitors",
"YC company", "funded startup", "Series A", "Series B"
]
}
}
}{
"serper": {
"country": "de",
"language": "de"
}
}{
"auto_routing": {
"enabled": false
},
"defaults": {
"provider": "serper"
}
}{
"auto_routing": {
"fallback_provider": "tavily",
"provider_priority": ["tavily", "serper", "exa"]
},
"tavily": {
"depth": "advanced",
"include_raw_content": true
}
}What it is: Direct access to Google Search results via API β the same results you'd see on google.com.
| Strength | Description |
|---|---|
| π― Accuracy | Google's search quality, knowledge graph, featured snippets |
| π Shopping | Product prices, reviews, shopping results |
| π Local | Business listings, maps, places |
| π° News | Real-time news with Google News integration |
| πΌ Images | Google Images search |
| β‘ Speed | Fastest response times (~200-400ms) |
- β Product specifications and comparisons
- β Shopping and price lookups
- β Local business searches ("restaurants near me")
- β Quick factual queries (weather, conversions, definitions)
- β News headlines and current events
- β Image searches
- β When you need "what Google shows"
- Go to serper.dev
- Sign up with email or Google
- Copy your API key from the dashboard
- Set
SERPER_API_KEYenvironment variable
What it is: AI-optimized search engine built for research and RAG applications β returns synthesized answers plus full content.
| Strength | Description |
|---|---|
| π Research Quality | Optimized for comprehensive, accurate research |
| π¬ AI Answers | Returns synthesized answers, not just links |
| π Full Content | Can return complete page content (raw_content) |
| π― Domain Filtering | Include/exclude specific domains |
| π¬ Deep Mode | Advanced search for thorough research |
| π° Topic Modes | Specialized for general vs news content |
- β Research questions requiring synthesized answers
- β Academic or technical deep dives
- β When you need actual page content (not just snippets)
- β Multi-source information comparison
- β Domain-specific research (filter to authoritative sources)
- β News research with context
- β RAG/LLM applications
- Go to tavily.com
- Sign up and verify email
- Navigate to API Keys section
- Generate and copy your key
- Set
TAVILY_API_KEYenvironment variable
What it is: Neural/semantic search engine that understands meaning, not just keywords β finds conceptually similar content.
| Strength | Description |
|---|---|
| π§ Semantic Understanding | Finds results by meaning, not keywords |
| π Similar Pages | Find pages similar to a reference URL |
| π’ Company Discovery | Excellent for finding startups, companies |
| π Category Filters | Filter by type (company, paper, tweet, etc.) |
| π Date Filtering | Precise date range searches |
| π Academic | Great for research papers and technical content |
- β Conceptual queries ("companies building X")
- β Finding similar companies or pages
- β Startup and company discovery
- β Research paper discovery
- β Finding GitHub projects
- β Date-filtered searches for recent content
- β When keyword matching fails
- Go to exa.ai
- Sign up with email or Google
- Navigate to API section in dashboard
- Copy your API key
- Set
EXA_API_KEYenvironment variable
What it is: Open-source, self-hosted meta-search engine that aggregates results from 70+ search engines without tracking.
| Strength | Description |
|---|---|
| π Privacy-First | No tracking, no profiling, no data collection |
| π Multi-Engine | Aggregates Google, Bing, DuckDuckGo, and 70+ more |
| π° Free | $0 API cost (self-hosted, unlimited queries) |
| π― Diverse Results | Get perspectives from multiple search engines |
| β Customizable | Choose which engines to use, SafeSearch, language |
| π Self-Hosted | Full control over your search infrastructure |
- β Privacy-sensitive searches (no tracking)
- β When you want diverse results from multiple engines
- β Budget-conscious (no API fees)
- β Self-hosted/air-gapped environments
- β Fallback when paid APIs are rate-limited
- β When "aggregate everything" is the goal
# Docker (recommended, 5 minutes)
docker run -d -p 8080:8080 searxng/searxng
# Enable JSON API in settings.yml:
# search:
# formats: [html, json]- See docs.searxng.org
- Deploy via Docker, pip, or your preferred method
- Enable JSON format in
settings.yml - Set
SEARXNG_INSTANCE_URLenvironment variable
# Just search β the skill picks the best provider
python3 scripts/search.py -q "Tesla Model 3 price"
python3 scripts/search.py -q "how do neural networks learn"
python3 scripts/search.py -q "YC startups like Stripe"
python3 scripts/search.py -q "search privately without tracking"# Different search types
python3 scripts/search.py -p serper -q "gaming monitor" --type shopping
python3 scripts/search.py -p serper -q "coffee shop" --type places
python3 scripts/search.py -p serper -q "AI news" --type news
# With time filter
python3 scripts/search.py -p serper -q "OpenAI news" --time-range day
# Include images
python3 scripts/search.py -p serper -q "iPhone 16 Pro" --images
# Different locale
python3 scripts/search.py -p serper -q "Wetter Wien" --country at --language de# Deep research mode
python3 scripts/search.py -p tavily -q "quantum computing applications" --depth advanced
# With full page content
python3 scripts/search.py -p tavily -q "transformer architecture" --raw-content
# Domain filtering
python3 scripts/search.py -p tavily -q "AI research" --include-domains arxiv.org nature.com# Category filtering
python3 scripts/search.py -p exa -q "AI startups Series A" --category company
python3 scripts/search.py -p exa -q "attention mechanism" --category "research paper"
# Date filtering
python3 scripts/search.py -p exa -q "YC companies" --start-date 2024-01-01
# Find similar pages
python3 scripts/search.py -p exa --similar-url "https://stripe.com" --category company# Basic search
python3 scripts/search.py -p searxng -q "linux distros"
# Specific engines only
python3 scripts/search.py -p searxng -q "AI news" --engines "google,bing,duckduckgo"
# SafeSearch (0=off, 1=moderate, 2=strict)
python3 scripts/search.py -p searxng -q "privacy tools" --searxng-safesearch 2
# With time filter
python3 scripts/search.py -p searxng -q "open source projects" --time-range week
# Custom instance URL
python3 scripts/search.py -p searxng -q "test" --searxng-url "http://localhost:8080"# Step 1: Get product specs (auto-routed to Serper)
python3 scripts/search.py -q "MacBook Pro M3 Max specs"
# Step 2: Check prices (auto-routed to Serper)
python3 scripts/search.py -q "MacBook Pro M3 Max price comparison"
# Step 3: In-depth reviews (auto-routed to Tavily)
python3 scripts/search.py -q "detailed MacBook Pro M3 Max review"# Step 1: Understand the topic (auto-routed to Tavily)
python3 scripts/search.py -q "explain transformer architecture in deep learning"
# Step 2: Find recent papers (Exa)
python3 scripts/search.py -p exa -q "transformer improvements" --category "research paper" --start-date 2024-01-01
# Step 3: Find implementations (Exa)
python3 scripts/search.py -p exa -q "transformer implementation" --category github# Step 1: Find competitors (auto-routed to Exa)
python3 scripts/search.py -q "companies like Notion"
# Step 2: Find similar products (Exa)
python3 scripts/search.py -p exa --similar-url "https://notion.so" --category company
# Step 3: Deep dive comparison (Tavily)
python3 scripts/search.py -p tavily -q "Notion vs Coda comparison" --depth advanced| Tip | Savings |
|---|---|
| Use SearXNG for routine queries | $0 API cost |
| Use auto-routing (defaults to Serper, cheapest paid) | Best value |
Use Tavily basic before advanced |
~50% cost reduction |
Set appropriate max_results |
Linear cost savings |
| Use Exa only for semantic queries | Avoid waste |
| Tip | Impact |
|---|---|
| Serper is fastest (~200ms) | Use for time-sensitive queries |
Tavily basic faster than advanced |
~2x faster |
Lower max_results = faster response |
Linear improvement |
Q: Do I need API keys for all three providers?
No. You only need keys for providers you want to use. Auto-routing skips providers without keys.
Q: Which provider should I start with?
Serper β it's the fastest, cheapest, and has the largest free tier (2,500 queries).
Q: Can I use multiple providers in one workflow?
Yes! That's the recommended approach. See Workflow Examples.
Q: How do I reduce API costs?
Use auto-routing (defaults to cheapest), start with lower
max_results, use Tavilybasicbeforeadvanced.
Q: Why did my query go to the wrong provider?
Use
--explain-routingto debug. Add custom keywords to config.json if needed.
Q: Can I add my own keywords?
Yes! Edit
config.jsonβauto_routing.keyword_mappings.
Q: How does keyword scoring work?
Multi-word phrases get higher weights. "companies like" (2 words) scores higher than "like" (1 word).
Q: What if no keywords match?
Uses the fallback provider (default: Serper).
Q: Can I force a specific provider?
Yes, use
-p serper,-p tavily, or-p exa.
Error: "Missing API key"
# Check if key is set
echo $SERPER_API_KEY
# Set it
export SERPER_API_KEY="your-key"Error: "API Error (401)"
Your API key is invalid or expired. Generate a new one.
Error: "API Error (429)"
Rate limited. Wait and retry, or upgrade your plan.
Empty results?
Try a different provider, broaden your query, or remove restrictive filters.
Slow responses?
Reduce
max_results, use Tavilybasic, or use Serper (fastest).
All providers return unified JSON:
{
"provider": "serper|tavily|exa",
"query": "original search query",
"results": [
{
"title": "Page Title",
"url": "https://example.com/page",
"snippet": "Content excerpt...",
"score": 0.95,
"date": "2024-01-15",
"raw_content": "Full page content (Tavily only)"
}
],
"images": ["url1", "url2"],
"answer": "Synthesized answer",
"knowledge_graph": { },
"routing": {
"auto_routed": true,
"selected_provider": "serper",
"reason": "matched_keywords (score=1)",
"matched_keywords": ["price"]
}
}| Option | Providers | Description |
|---|---|---|
-q, --query |
All | Search query |
-p, --provider |
All | Provider: auto, serper, tavily, querit, exa, perplexity, you, searxng |
-n, --max-results |
All | Max results (default: 5) |
--auto |
All | Force auto-routing |
--explain-routing |
All | Debug auto-routing |
--images |
Serper, Tavily | Include images |
--country |
Serper, You | Country code (default: us) |
--language |
Serper, SearXNG | Language code (default: en) |
--type |
Serper | search/news/images/videos/places/shopping |
--time-range |
Serper, SearXNG | hour/day/week/month/year |
--depth |
Tavily | basic/advanced |
--topic |
Tavily | general/news |
--raw-content |
Tavily | Include full page content |
--querit-base-url |
Querit | Override Querit API base URL |
--querit-base-path |
Querit | Override Querit API path |
--exa-type |
Exa | neural/keyword |
--category |
Exa | company/research paper/news/pdf/github/tweet |
--start-date |
Exa | Start date (YYYY-MM-DD) |
--end-date |
Exa | End date (YYYY-MM-DD) |
--similar-url |
Exa | Find similar pages |
--searxng-url |
SearXNG | Instance URL |
--searxng-safesearch |
SearXNG | 0=off, 1=moderate, 2=strict |
--engines |
SearXNG | Specific engines (google,bing,duckduckgo) |
--categories |
SearXNG | Search categories (general,images,news) |
--include-domains |
Tavily, Exa | Only these domains |
--exclude-domains |
Tavily, Exa | Exclude these domains |
--compact |
All | Compact JSON output |
MIT