what it’s for
searxng sends queries to a SearXNG metasearch instance and returns the results as TOON by default, or JSON, JSON lines, CSV, markdown, YAML, XML, RSS or HTML. any upstream SearXNG parameter can be passed through, so the CLI never hides a feature of the instance.
searching changes nothing, so the guard rails here are about trust and repeatability: knowing where a result came from, getting the same answer twice, and failing loudly when there is nothing to find.
what it covers
- search over GET and POST
- autocomplete
- engines and categories
- time ranges
- presets
- persistent cache
- instance health
- engine errors
- Prometheus metrics
- OpenSearch metadata
built for agents
results you can check
an agent acting on a search result should know where it came from and whether it is complete.
a contract agents can read
prints the complete, versioned command contract, in TOON or as JSON for tool builders.
searxng commands --jsonmodes for agents
--agenttrims output for language models,--agent-jsonadds validated compact JSON,--agent-ciis strict, offline-first and validated.searxng --agent-json "query"repeatable from the cache
answers from the local cache only, without touching the network.
searxng --offline-first "query"validate before you trust
checks the output against the format’s schema; the schemas themselves are available with
--schema-json.searxng --format json --validate-output "query"fail loudly on nothing
exits with code 2 when a search returns no results. machine formats also carry the source instance and a timestamp.
searxng --strict --json "query"
a first run
same rules, four services
each service CLI pairs compact, structured output with discovery an agent can read and writes that have to be asked for.