Brave search
Input
query requiredSearch query. Operators site:/""/OR are honored. site:domain also covers its subdomains (site:example.com returns docs.example.com), and site:domain/path narrows to a path prefix — the cheapest way to slice a large site.
offset optional0-based page index (0 = first page, ~20 results). The pool behind one query string is limited and its depth varies by query; Brave does not signal when you reach the end and instead re-serves earlier pages. Dedupe results by url across pages and stop paging once a page adds nothing new — never assume N pages means 20N results. Default 0.
exactMatch optionalMeant to force the literal query, but currently unreliable — Brave does not always announce the rewrite this depends on, especially for typo corrections. To pin a literal string, quote it in `query` instead. Default false.
Output
count requiredHow many result cards were extracted from THIS page — literally results.length. Not a match count and not an estimate of what Brave holds for the query; there is no such number on the page. A full page reads ~16-20.
query requiredoffset requiredresults requiredThe page's organic web results, in rank order. Empty only when Brave itself reported nothing for the query (see emptyBecause) — the script raises an error rather than returning an empty list when it cannot read a page that Brave answered normally.
emptyBecause requiredWhy `results` is empty, in Brave's own terms — and null whenever `results` is non-empty. One of: the operators were relaxed (too few documents matched them), Brave's no-matches banner, or its no-results message.
operatorsApplied requiredWhether Brave honored the operators in `query`. false = Brave found too few matching documents, dropped the operators and answered a relaxed query instead: `results` are then soft relevance over the whole web, not filtered, so treat them as empty for any hard-filter use such as a site: coverage check. Only meaningful when `query` contains an operator — for an operator-free query it is vacuously true.
rewrittenTo optionalWhat Brave actually searched if it announced an auto-rewrite, else null. null means 'no rewrite was announced', not 'the literal query was searched' — Brave sometimes corrects a query silently.
