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.
here the guard rails are about provenance and repeatability: knowing where a result came from, reading the same answer again from the cache, 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 when it was fetched.
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 the output format
checks the output’s shape against the format’s schema (
--schema-json), not whether the results are true.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.