Web search for local LLMs: SearXNG vs native Claude vs hosted search APIs — article mark

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

Web search options sorted by whether the query leaves your box and how many tokens each search injects stays on your box conversation never leaves (query still hits upstream engines) leaves for a vendor metered per call, data off-box lean snippets heavy ~6k tok SearXNG behind the LB 10 results, 556 tok, ~0.9 s warm, $0 the quadrant a local, bandwidth-bound box actually wants Tavily / Brave / Exa APIs ~$5–16 / 1k, tokens not measured Native Claude web search ~6k result tok (docs), encrypted blocks; $10/1k + tokens; Anthropic endpoints only SearXNG returns snippets only; page text = next stage: web scrapers The horizontal axis is the one a local deployment cannot cross: a hosted tool is off-box by definition. The vertical axis is tokens per search, re-read on every later turn.
Left column keeps the conversation on your hardware; right column trades that for a vendor's index. Top row: snippets (556 tok measured for SearXNG); bottom row: native Claude's ~6k-token encrypted result blocks (from docs).

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.

Native search runs inside Anthropic's API; our load balancer intercepts the identical request and answers it from a local SearXNG The same web_search_20250305 request, two endpoints Native — on Anthropic's API client api.anthropic.com performs the search itself web $10 / 1,000 searches, billed per search; results count as input tokens — this turn and every later one. Ours — load balancer in front of local models client :8010 Claude Code · Hermes LB intercepts the block no model sees it; not lease demand SearXNG local metasearch Brave Google CSE The LB synthesises the same two blocks the client reads — so native WebSearch works with zero client config. $0 per query, conversation stays local — but the query itself still travels to Brave / Google.
Same wire shape, different performer. Native search is a feature of Anthropic's servers; our load balancer impersonates that feature and answers from a self-hosted metasearch engine.

The headline number per deep-dive

Sub-topicHeadline number (robertz.co)Deep-dive
Native Claude vs self-hosted$10/1k + tokens vs $0; native runs on Anthropic endpoints onlyNative Claude vs self-hosted →
Search qualitypublished: Brave 94.1%, Tavily 93.3% (vendor-run SimpleQA) · ours: q2/q3 each returned the target page; bare robertz.co 2/10 on-targetSearch quality →
Output formats & token cost556 tok injected / search (q1/q2/q3 = 530/551/587) vs 1,197 raw SearXNG JSON · 894 ms warm, 4,022 ms coldOutput formats & token cost →

Three practical picks

SituationPickOn-box$ / 1k searchesTokens / search
Local modelSearXNG behind the LB✓$0556 (measured)
Already on Anthropic’s APINative Claude web search✗$10 + tokens~6k (docs)
Remote model, no search infraTavily / Brave / Exa API✗~$5–16not 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

Questions? Let's Chat :)

open source