Repository navigation
05 Metasearch and SearXNG
A metasearch engine owns no index. It forwards a query to several upstream engines, normalises and merges what comes back. This is the component at the centre of the project's collector.
SearXNG (source) is an open-source metasearch engine. It aggregates results from many search services and exposes a common interface, including a JSON search API. Engines are enabled and configured through settings.
sequenceDiagram
participant C as Collector (runner)
participant S as SearXNG (service container)
participant D as DuckDuckGo (upstream)
C->>S: GET /search?q=...&pageno=n&format=json
S->>D: engine request (region, page)
alt normal
D-->>S: results
S-->>C: HTTP 200 + results + engine metadata
else CAPTCHA / throttle
D-->>S: challenge
S-->>C: HTTP 200 + zero results + unresponsive_engines
end
| Benefit | Detail |
|---|---|
| One endpoint | Collector code does not change per engine |
| Common response shape | Normalisation and provenance fields are uniform |
| Configurable engines | Experiments can pin DuckDuckGo-only to keep attribution clean |
| Central diagnostics | Engine errors appear in response metadata and container logs |
| Ephemeral | Starts as a service container inside a GitHub Actions job |
- It is not a bypass. It abstracts providers; it does not remove upstream restrictions, guarantee depth, or make results available indefinitely.
- Page size is not fixed: the run saw 10 records on page 1 and ~15 afterwards, despite an expectation of 10 — measure, don't assume.
- It reports engine failure inside an HTTP 200 body, so clients must parse diagnostics (13).
SearXNG weights results by engine and position and merges duplicate URLs, comparable to rank-fusion ideas in 4.5. Treat its ranking as an aggregate of upstream rankings, not an independent relevance judgement. (Exact scoring: see the SearXNG docs.)
Hosted aggregators and agent-oriented APIs are compared in 9. Search APIs for Agents.
Q1. Why pin SearXNG to one upstream engine in experiments?
To make provenance unambiguous and to avoid silent fallback that would hide an upstream failure. The production path is "SearXNG-only; no silent switch".
Q2. How did the collector detect the page-16 failure?
The endpoint returned HTTP 200 with zero results, while engine diagnostics listed DuckDuckGo/CAPTCHA as unresponsive and the container log showed a CAPTCHA exception.
Q3. If metasearch uses the same upstream as everyone else, where does diversity come from?
Only from enabling multiple independent upstreams — each of which has its own terms, quotas and reliability, to be tested first (Stage 4 in 21).
← Prev 4. Ranking Math · Next → 6. Parametric vs Retrieved Knowledge
Web Search Engine Pipeline Wiki · evidence snapshot 29 Nov 2026 · measured results are from the project's GitHub Actions runs; third-party figures are cited inline and listed in References.
Part I · Mission
Part II · Search Ecosystem
Part III · LLMs Meet the Web
- 6. Parametric vs Retrieved Knowledge
- 7. Agentic Search Architecture History
- 8. How Major Assistants Search
- 9. Search APIs for Agents
- 10. Agentic Browsing & Computer Use
Part IV · Simulation Lab
- 11. Simulation Strategy on GitHub Actions
- 12. Experiments & Measured Results
- 13. Reliability & Failure Taxonomy
- 14. Simulation vs Real Infrastructure
Part V · The Machine-Majority Web
- 15. Bot Traffic & AI Crawlers
- 16. Detection, Blocking & Monetisation
- 17. Detection Gaps
- 18. AI-Generated Content & the Info Ecosystem
- 19. Industry Adoption & Use Cases
Part VI · Future
Appendix