Configure and verify JSON output
Run openssl rand -hex 32, then paste its output into secret_key below. YAML does not execute shell commands.
SearXNG needs JSON output enabled for agent integration:
~/searxng/config/settings.yml
use_default_settings: true
search:
formats:
- html
- json # This is what agents need
server:
secret_key: "PASTE_YOUR_GENERATED_SECRET_HERE"
limiter: false # Disable rate limiting for local useRestart after config changes:
bash
docker compose restart searxngCheck the JSON response
curl -fsSG http://127.0.0.1:8080/search --data-urlencode "q=hello" --data "format=json" | jq '.results | length'Reference: SearXNG search formats.
It’s working if
A request with format=json returns a JSON object with a results array. Zero results is different from an unsupported-format error.
