A self-hosted metasearch engine with an AI assistant that can run entirely inside the browser, with no API key required.
- Stars
- 869
- Forks
- 66
- Open issues
- 17
- Last commit
- yesterday
What is it?
RustXNG is a self-hosted web search service built for AI agents. It is a Rust port of SearXNG that aggregates results from many search engines and, in a single request, can also return the extracted text of the top pages, so an agent can answer from sources rather than from memory. No API keys or per-query fees are required, and search terms are processed on the user's own machine.
The service exposes a SearXNG-compatible JSON endpoint and a browser UI. It queries about 180 engines in parallel by default, with per-engine timeouts, suspension with backoff, and automatic rest for engines that keep returning nothing. Results are ranked by term coverage, site authority and identifier matching, then deduplicated. Outbound requests are restricted to public addresses as an SSRF guard, which matters when URLs come from untrusted content. An optional experimental local index can crawl your own corpus and rank with BM25.
It ships as a prebuilt binary, a Cargo install, a Docker image, or a source build requiring Rust 1.85 or newer. Operational endpoints include /healthz and OpenMetrics /metrics, along with a response cache and image proxy.
Key features
- 01Keyless, self-hosted search with a SearXNG-compatible JSON API.
- 02Returns ranked results and extracted page text in one request for grounding.
- 03Queries roughly 180 engines in parallel with per-engine timeouts and backoff.
- 04Restricts outbound requests to public addresses as an SSRF guard.
- 05Optional local index that crawls your own corpus and ranks with BM25.
- 06Exposes health and OpenMetrics endpoints plus a response cache.
Use cases
- Giving a local LLM agent web search with source text it can cite.
- Keeping search queries inside your own network instead of a third-party API.
- Running a private metasearch backend for scripts or other tools.
- Searching your own document corpus alongside public web results.
Quick start
- 1
Install the server with Cargo
cargo install --git https://github.com/sahenjp/RustXNG.git --tag v0.25.0 - 2
Start the server on 127.0.0.1:8888
rustxng - 3
Run a search that returns JSON
curl "http://127.0.0.1:8888/search?q=tokio+runtime&format=json"
Things to know
- Google is unavailable in this build because its endpoints now block or require JavaScript.
- Building from source requires Rust 1.85 or newer.
- The license is AGPL-3.0-or-later, so running a modified version as a network service requires offering its source to users.
In collections
Topics
FAQ
- What is RustXNG?
- A self-hosted, keyless web search engine in Rust that returns ranked results plus page text for grounding local AI agents. RustXNG is a self-hosted web search service built for AI agents. It is a Rust port of SearXNG that aggregates results from many search engines and, in a single request, can also return the extracted text of the top pages, so an agent can answer from sources rather than from memory. No API keys or per-query fees are required, and search terms are processed on the user's own machine.
- Is RustXNG free to use? What license does it have?
- RustXNG is open source under the AGPL-3.0 license. Check the license terms before using it in commercial products.
- Is RustXNG still maintained?
- Actively maintained. The last commit to RustXNG was on Nov 6, 2026.
- What can I use RustXNG for?
- Giving a local LLM agent web search with source text it can cite. Keeping search queries inside your own network instead of a third-party API. Running a private metasearch backend for scripts or other tools. Searching your own document corpus alongside public web results.
- How do I install RustXNG?
- Install the server with Cargo: cargo install --git https://github.com/sahenjp/RustXNG.git --tag v0.25.0 Start the server on 127.0.0.1:8888: rustxng Run a search that returns JSON: curl "http://127.0.0.1:8888/search?q=tokio+runtime&format=json"
- Where can I get RustXNG?
- The source code and installation instructions are on GitHub: https://github.com/sahenjp/RustXNG
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A self-hostable metasearch engine that aggregates results from multiple search services without tracking or profiling users.
A local-first personal AI agent for Android with permanent memory, scheduled autonomous tasks, self-written mini-apps, and an optional home-screen launcher.
Local-first web search, fetch, crawl and research tools for AI agents over MCP, with no API keys and no per-query cost.
An open-source AI answer engine that searches the web and returns cited answers with generative UI, built with Next.js and the Vercel AI SDK.
Self-hostable AI answering engine that searches the web via SearxNG and cites sources, working with local LLMs through Ollama or cloud providers.