The JSON API and Other Formats
Scope: searching by program instead of by eye — the four formats, why three of them are switched off out of the box, what the JSON actually contains (measured on this version), and what the formats are good for.
Off by default, on purpose
A fresh SearXNG answers exactly one format: HTML. Ask for JSON and you are refused:
curl 'http://127.0.0.1:8888/search?q=test&format=json'
# HTTP 403 Forbidden
(Transcript t04.) This is a stance, not an oversight. The HTML page is for people; the machine formats are for scripts, and scripts are indistinguishable from bots at scale. A public instance that serves JSON to all comers will be scraped through it, so the choice belongs to the admin. On a household instance on a home network, turning it on is reasonable and useful.
The switch is one list in settings.yml:
search:
formats:
- html
- csv
- json
- rss
Restart, and the same request that got a 403 answers 200 (transcript t05).
What the JSON contains
curl 'http://127.0.0.1:8888/search?q=how%20to%20sharpen%20a%20kitchen%20knife&format=json'
The reply's top-level keys, as this version
(2026.10.19) actually sends them: query,
results, answers, corrections, infoboxes,
suggestions, and unresponsive_engines. In the
lab's run: 20 results, each carrying title, url,
content, engine, category, score,
parsed_url and more — everything the HTML page
renders, as data. The first result was a YouTube
tutorial on sharpening knives; all 20 that minute
came from one engine, with three others listed as
unresponsive and their reasons attached.
One correction to older write-ups you may meet: this
version's JSON has no number_of_results field.
Count the results array, and treat
unresponsive_engines as part of the answer — a
script that ignores it will happily report half a
committee's findings as the whole story.
CSV and RSS
Same switch, two more shapes (transcript t06):
- CSV — a header row (
title,url,content,host, engine,score,type) and one row per result. For spreadsheets, shell pipelines, and quick diffs of "what does it say today versus last month." - RSS — the same search as a feed: a standing query you can subscribe to in a feed reader and watch change. Niche, and quietly delightful for topics that move slowly.
What it's for
Honest uses on a home network: a browser home page widget that searches your instance; a script that checks what the web says about your name, your club, your call sign, and files the diff; a dashboard that asks questions on a schedule. The pattern is always the same — your programs talk to your instance, and your instance does the asking, with the same privacy shape as the page itself: no API key, no account, no per-query bill, and the upstreams see only the instance. Mind the flip side: your scripts inherit your instance's reputation with the engines, so a chatty cron job can get the household's searches CAPTCHA'd. Ask politely, cache answers, and let the unresponsive list tell you when to back off.