SearXNG — Privacy-First Metasearch Engine
Self-hosted search engine aggregating 70+ sources. No tracking, no ads. Perfect backend for AI search apps. 27K+ stars.
What it is
SearXNG is a free, self-hosted metasearch engine that aggregates results from over 70 search engines and sources. It sends queries to multiple backends (Google, Bing, DuckDuckGo, Wikipedia, and others), combines the results, and returns them without tracking, profiling, or advertising. SearXNG is a maintained fork of the original SearX project.
SearXNG targets privacy-conscious users, self-hosters, and developers building AI search applications. As a self-hosted backend, it provides a clean search API that AI agents can query without API key limits or tracking.
How it saves time or tokens
SearXNG provides a unified search API across 70+ sources. Instead of integrating with Google Custom Search API, Bing API, and others individually, you query one SearXNG instance. The JSON API returns structured results that are ready for LLM consumption. No rate limits beyond what your server can handle, and no per-query API costs.
How to use
- Deploy SearXNG with Docker:
docker run -d --name searxng -p 8080:8080 searxng/searxng. - Open
http://localhost:8080for the web interface. - Use the JSON API at
http://localhost:8080/search?q=query&format=jsonfor programmatic access.
Example
# Deploy with Docker
docker run -d --name searxng \
-p 8080:8080 \
-v ./searxng:/etc/searxng \
-e SEARXNG_BASE_URL=http://localhost:8080/ \
searxng/searxng
# Web search via browser
# Open http://localhost:8080
# JSON API for AI applications
curl 'http://localhost:8080/search?q=python+web+frameworks&format=json'
# Use SearXNG as AI search backend
import requests
def search(query: str) -> list:
resp = requests.get(
'http://localhost:8080/search',
params={'q': query, 'format': 'json'}
)
return resp.json()['results']
Related on TokRepo
- Research Tools — AI-powered research and search tools
- Self-Hosted Tools — Self-hosted infrastructure
Common pitfalls
- SearXNG depends on upstream search engines. If Google or Bing blocks your server's IP (common with high query volumes), result quality degrades. Rotate IPs or use proxy configurations.
- Default configuration may not enable all search engines. Edit settings.yml to activate the sources you need.
- Public SearXNG instances get rate-limited by upstream engines. For reliable AI search, run your own private instance.
Frequently Asked Questions
SearXNG is self-hosted and aggregates from 70+ sources including DuckDuckGo. You control the server, the data, and which sources to query. DuckDuckGo is a hosted service with its own privacy policy. SearXNG gives you complete control.
Yes. SearXNG's JSON API returns structured search results that AI agents can parse directly. It is commonly used as a search tool for LangChain, LlamaIndex, and custom AI agents.
No. SearXNG does not store queries, results, or user data by default. Each search is stateless. You can enable search result caching for performance but it does not track users.
Edit the settings.yml file in your SearXNG configuration directory. Each search engine has an enabled flag. You can also configure engine priority and timeout settings.
Yes. SearXNG is open source under the AGPL-3.0 license. Self-hosting for personal or organizational use is legal. However, some upstream engines may have terms of service about automated querying.
Citations (3)
- SearXNG GitHub— SearXNG aggregates results from 70+ search engines with no tracking
- SearXNG Documentation— SearXNG configuration and deployment
- SearXNG Official Site— Metasearch engine architecture and privacy
Related on TokRepo
Source & Thanks
Created by SearXNG team. Licensed under AGPL-3.0.
searxng — ⭐ 27,500+
Thanks to the SearXNG community for keeping private, open-source search alive.
Discussion
Related Assets
Conda — Cross-Platform Package and Environment Manager
Install, update, and manage packages and isolated environments for Python, R, C/C++, and hundreds of other languages from a single tool.
Sphinx — Python Documentation Generator
Generate professional documentation from reStructuredText and Markdown with cross-references, API autodoc, and multiple output formats.
Neutralinojs — Lightweight Cross-Platform Desktop Apps
Build desktop applications with HTML, CSS, and JavaScript using a tiny native runtime instead of bundling Chromium.