# SearXNG

Your own metasearch engine. The default search source.

[SearXNG](https://github.com/searxng/searxng) runs on your machine and fans each query out to many engines. It needs no account, key or Docker.

- First in the default search order.
- Upstream engine failures are shown in `upstream_failures`, not hidden.
- Bound to `127.0.0.1:8088`.

Search works without it (DuckDuckGo, Bing and the topic sources answer), but is
stronger with it: it answered about a third of the queries in our blind benchmark.

## Set up

```bash
frankensurf install search        # install and start it (about 140 MB, a few seconds)
frankensurf search-engine stop    # any time; also: start, status
frankensurf uninstall search      # remove it
```

`install search` downloads SearXNG's source at one pinned commit, refuses it
unless its SHA-256 matches, installs its Python packages in an environment of its
own (`~/.local/share/frankensurf/searxng-native`), and runs it in the background
on `127.0.0.1:8088` only, with JSON output on. Settings are copied to
`~/.local/share/frankensurf/searxng/` with a random secret key; edit them if you
like, they are never overwritten. After a reboot, the next search starts it again
(set `FRANKENSURF_SEARCH_AUTOSTART=0` to stop that). If a SearXNG with JSON
already answers on that port, nothing is run.

## At volume

SearXNG asks Google, Brave, DuckDuckGo and the other public engines from your own
address. At a few dozen searches in a few minutes they start refusing: CAPTCHAs,
"access denied", "too many requests". In one test, 39 of the first 100 searches met
a refusal, with 54 refusal messages in 5 minutes. SearXNG then rests each refusing
engine and answers from the rest, so results get thinner rather than stopping.

Frankensurf's settings spread the load: Bing, Google, Yahoo, Qwant and Mojeek are
switched on beside SearXNG's defaults (DuckDuckGo and Brave), and a refusing engine
rests 15 minutes instead of 3. An unedited settings file from an earlier release is
upgraded to these the next time the engine starts; one you edited is left alone
(delete it to get the new defaults). For steady volume, add a paid source such as
[Serper](/docs/integrations/serper/) and allow paid tools.

Prefer Docker? Without the native install, `frankensurf search-engine start`
runs a pinned SearXNG image as a container named `frankensurf-search` on the same
port, with the same settings.

Nothing needs an environment variable: Frankensurf looks at `http://127.0.0.1:8088`
by default. Set `FRANKENSURF_SEARCH_URL` (MCP server) or pass `--search-url`
(CLI) only to use a SearXNG somewhere else on loopback. From a clone,
`bash scripts/start-search.sh` starts the same image.

When a search ran without it because it was not reachable,
`receipt.search_routing.local_search` says so, with the command to install or start it.

## Use it

Ask for this source by name. Named sources never fall back to another.

```python
results = await web.search("playwright python tutorial", source="searxng")
```

```bash
frankensurf search playwright python tutorial --source searxng
```

```json
{ "tool": "search", "arguments": { "query": "playwright python tutorial", "source": "searxng" } }
```

## Details

| Property | Value |
| --- | --- |
| Source ID | `searxng` |
| Cost | Free |
| Tested | Live |
| Docs | [docs.searxng.org](https://docs.searxng.org/) |
