docs/tools/searxng-search.md
OpenClaw supports SearXNG as a self-hosted,
key-free web_search provider. SearXNG is an open-source meta-search engine
that aggregates results from Google, Bing, DuckDuckGo, and other sources.
Advantages:
Or use any existing SearXNG deployment you have access to. See the
[SearXNG documentation](https://docs.searxng.org/) for production setup.
Or set the env var and let auto-detection find it:
```bash
export SEARXNG_BASE_URL="http://localhost:8888"
```
{
tools: {
web: {
search: {
provider: "searxng",
},
},
},
}
Plugin-level settings for the SearXNG instance:
{
plugins: {
entries: {
searxng: {
config: {
webSearch: {
baseUrl: "http://localhost:8888",
categories: "general,news", // optional
language: "en", // optional
},
},
},
},
},
}
The baseUrl field also accepts SecretRef objects.
Transport rules:
https:// works for public or private SearXNG hostshttp:// is only accepted for trusted private-network or loopback hostshttps://https://
hosts stay on the strict web-search guard and cannot redirect to private
addressesSet SEARXNG_BASE_URL as an alternative to config:
export SEARXNG_BASE_URL="http://localhost:8888"
When SEARXNG_BASE_URL is set and no explicit provider is configured, auto-detection
picks SearXNG automatically (at the lowest priority -- any API-backed provider with a
key wins first).
| Field | Description |
|---|---|
baseUrl | Base URL of your SearXNG instance (required) |
categories | Comma-separated categories such as general, news, or science |
language | Language code for results such as en, de, or fr |
format=json endpoint, not HTML scrapingimg_src when SearXNG
returns a direct image URLbaseUrl must be a valid http:// or https://
URL; public hosts must use https://https:// SearXNG endpoints keep strict SSRF
protectiongeneral when not configuredgeneral category request succeeds but
returns zero results, OpenClaw retries the same query once with general
before returning an empty result set