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:
- Free and unlimited -- no API key or commercial subscription required
- Privacy / air-gap -- queries never leave your network
- Works anywhere -- no region restrictions on commercial search APIs
Setup
Run a SearXNG instance
```bash
docker run -d -p 8888:8080 searxng/searxng
```
Or use any existing SearXNG deployment you have access to. See the
[SearXNG documentation](https://docs.searxng.org/) for production setup.
Configure
```bash
openclaw configure --section web
# Select "searxng" as the provider
```
Or set the env var and let auto-detection find it:
```bash
export SEARXNG_BASE_URL="http://localhost:8888"
```
Config
json5
{
tools: {
web: {
search: {
provider: "searxng",
},
},
},
}Plugin-level settings for the SearXNG instance:
json5
{
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 hosts- public SearXNG hosts must use
https:// - private/internal hosts use the self-hosted network guard; public
https://hosts stay on the strict web-search guard and cannot redirect to private addresses
Environment variable
Set SEARXNG_BASE_URL as an alternative to config:
bash
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).
Plugin config reference
| 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 |
Notes
- JSON API -- uses SearXNG's native
format=jsonendpoint, not HTML scraping - Image result URLs -- image-category results include
img_srcwhen SearXNG returns a direct image URL - No API key -- works with any SearXNG instance out of the box
- Base URL validation --
baseUrlmust be a validhttp://orhttps://URL; public hosts must usehttps:// - Network guard -- private/internal SearXNG endpoints opt in to private-network access; public
https://SearXNG endpoints keep strict SSRF protection - Auto-detection order -- SearXNG is checked after API-backed providers with configured keys (order 200). Key-free providers such as DuckDuckGo or Ollama Web Search are not auto-selected without an explicit provider choice
- Self-hosted -- you control the instance, queries, and upstream search engines
- Categories default to
generalwhen not configured - Category fallback -- if a non-
generalcategory request succeeds but returns zero results, OpenClaw retries the same query once withgeneralbefore returning an empty result set
Tip
For SearXNG JSON API to work, make sure your SearXNG instance has the json format enabled in its settings.yml under search.formats.
Related
- Web Search overview -- all providers and auto-detection
- DuckDuckGo Search -- another key-free provider
- Brave Search -- structured results with free tier