Web search for local LLMs: SearXNG vs native Claude vs hosted search APIs
Web search = query → ranked links + snippets. Self-hosted SearXNG behind our LB: 10 results, 556 tokens, ~0.9 s warm, $0. Native Claude: $10 / 1,000 searches, Anthropic endpoints only.
Series — web search for local LLMs: Overview · Native Claude vs self-hosted · Search quality · Output formats & token cost · Next stage: Web scrapers for local LLMs
Example: robertz.co, 3 queries. Run locally on my fleet. Reading the pages a search returns (URL → page text) is the next stage: Web scrapers for local LLMs.
The field, in one 2×2
The mechanism
Claude Code’s WebSearch is server-side: the model sends a web_search_20250305 block and expects the endpoint to search. A local model can’t — it answers unavailable. So you either call a hosted API (works with any model, data off-box), or intercept the block at a load balancer and answer it from a self-hosted SearXNG (works with any :8010 client, stays on-box, free). The client can’t tell the difference.
The headline number per deep-dive
| Sub-topic | Headline number (robertz.co) | Deep-dive |
|---|---|---|
| Native Claude vs self-hosted | $10/1k + tokens vs $0; native runs on Anthropic endpoints only | Native Claude vs self-hosted → |
| Search quality | published: Brave 94.1%, Tavily 93.3% (vendor-run SimpleQA) · ours: q2/q3 each returned the target page; bare robertz.co 2/10 on-target | Search quality → |
| Output formats & token cost | 556 tok injected / search (q1/q2/q3 = 530/551/587) vs 1,197 raw SearXNG JSON · 894 ms warm, 4,022 ms cold | Output formats & token cost → |
Three practical picks
| Situation | Pick | On-box | $ / 1k searches | Tokens / search |
|---|---|---|---|---|
| Local model | SearXNG behind the LB | ✓ | $0 | 556 (measured) |
| Already on Anthropic’s API | Native Claude web search | ✗ | $10 + tokens | ~6k (docs) |
| Remote model, no search infra | Tavily / Brave / Exa API | ✗ | ~$5–16 | not measured |
Need the page text behind a result? Next stage: Web scrapers for local LLMs.
TL;DR
TL;DR: A web search returns links + snippets. For a local model, SearXNG behind the LB keeps the conversation on-box at $0, 556 tokens and ~0.9 s a search; native Claude costs $10/1k + ~6k tokens and only runs on Anthropic endpoints; hosted APIs score highest in vendor-run SimpleQA (93–94%) but ship the query off-box.
Series — web search for local LLMs: Overview · Native Claude vs self-hosted · Search quality · Output formats & token cost · Next stage: Web scrapers for local LLMs