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
},
},
},
},
},
}
baseUrl also accepts a SecretRef object (for example { source: "env", id: "SEARXNG_BASE_URL" }).
Set SEARXNG_BASE_URL as an alternative to config:
export SEARXNG_BASE_URL="http://localhost:8888"
Resolution order: configured baseUrl string, then an inline env SecretRef on
baseUrl, then SEARXNG_BASE_URL. When none of the config paths are set and
SEARXNG_BASE_URL is present with no explicit provider chosen, auto-detection
picks SearXNG.
| 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 |
The web_search tool call also accepts count (1-10 results), categories,
and language as per-call overrides.
format=json endpoint, not HTML scrapingimg_src when SearXNG
returns a direct image URLbaseUrl must be a valid http:// or https://
URLhttp:// base URLs must target a trusted private or
loopback host (public hosts must use https://); https:// base URLs that
resolve to a private/internal address get the same self-hosted allowance,
while https:// base URLs that resolve publicly keep strict SSRF protectionbaseUrl (order
200 among providers that already have their required credential). Key-free
providers such as DuckDuckGo or Ollama Web Search never win auto-detection
implicitly; they only activate on an explicit provider choicegeneral when not configuredgeneral category request succeeds but
returns zero results, OpenClaw retries the same query once with general
before returning an empty result setminHostVersion: >=2026.6.9