The Problem
SearXNG self-hosted instances return empty results 10-20% of the time when upstream search engines block requests. For human browsing, this is a minor inconvenience: just search again. For automated agent pipelines, an empty result breaks the workflow. The agent either hallucinates a response without search data or fails visibly to the user. SearXNG's reliability is fundamentally limited by its dependence on upstream engines it does not control.
The Scavio Solution
Add Scavio as an automatic fallback when SearXNG returns fewer than 3 results. The pipeline checks SearXNG result count after each query. If results are below threshold, it immediately queries Scavio at $0.005/query. This hybrid approach keeps 80-85% of queries free (SearXNG) while ensuring 100% result availability. Scavio adds AI Overview data that SearXNG cannot provide.
Before
Before the fallback, the monitoring pipeline failed silently on 15% of queries. The agent's daily reports had gaps where SearXNG returned empty results. Team members stopped trusting the reports, defeating the purpose of automation.
After
After adding Scavio fallback, zero queries return empty. SearXNG handles 83% of queries (free). Scavio handles 17% ($0.005 each). For 1,000 queries/month: 170 fallback queries = $0.85/month for 100% reliability. Reports are complete every day.
Who It Is For
Self-hosters running SearXNG who need guaranteed result availability for automated pipelines. Privacy-focused teams that want search consistency without abandoning self-hosted infrastructure.
Key Benefits
- Eliminates SearXNG empty-result failures entirely
- 80-85% of queries remain free via SearXNG
- Fallback cost under $1/month for 1,000 queries
- AI Overview data on fallback queries adds value SearXNG cannot
- Privacy-first default with reliable commercial fallback
Python Example
import requests
SCAVIO_KEY = "your_scavio_api_key"
SEARXNG_URL = "http://localhost:8888/search"
MIN_RESULTS = 3
def hybrid_search(query: str) -> dict:
"""SearXNG primary, Scavio fallback on empty results."""
try:
res = requests.get(SEARXNG_URL, params={"q": query, "format": "json"}, timeout=8)
res.raise_for_status()
results = res.json().get("results", [])
if len(results) >= MIN_RESULTS:
return {"source": "searxng", "results": [{"title": r["title"], "link": r["url"], "snippet": r.get("content", "")} for r in results[:10]]}
except Exception:
pass
res = requests.post(
"https://api.scavio.dev/api/v1/search",
headers={"x-api-key": SCAVIO_KEY},
json={"platform": "google", "query": query, "ai_overview": True},
timeout=15,
)
res.raise_for_status()
data = res.json()
return {
"source": "scavio",
"results": [{"title": r["title"], "link": r["link"], "snippet": r.get("snippet", "")} for r in data.get("organic", [])[:10]],
"ai_overview": data.get("ai_overview", {}).get("text", ""),
}
result = hybrid_search("best self-hosted search engine 2026")
print(f"Source: {result['source']}, Results: {len(result['results'])}")JavaScript Example
const SCAVIO_KEY = "your_scavio_api_key";
async function hybridSearch(query) {
try {
const res = await fetch(`http://localhost:8888/search?q=${encodeURIComponent(query)}&format=json`, { signal: AbortSignal.timeout(8000) });
const data = await res.json();
if ((data.results ?? []).length >= 3) return { source: "searxng", results: data.results.slice(0, 10) };
} catch {}
const res = await fetch("https://api.scavio.dev/api/v1/search", {
method: "POST",
headers: { "x-api-key": SCAVIO_KEY, "content-type": "application/json" },
body: JSON.stringify({ platform: "google", query, ai_overview: true }),
});
const data = await res.json();
return { source: "scavio", results: (data.organic ?? []).slice(0, 10) };
}
const r = await hybridSearch("best self-hosted search 2026");
console.log(`Source: ${r.source}, Results: ${r.results.length}`);Platforms Used
Web search with knowledge graph, PAA, and AI overviews