How do I check whether Brave Search API changed my query?

The Citead team, updated

In short. Compare query.altered with query.original to inspect a reported spelling change, and set spellcheck=false to disable spellchecking.

Definition: Brave Search API reports a spelling-corrected search query in query.altered. As of 17 October 2026, Brave documents spellcheck as enabled by default and says the modified query is always used for search when the spell checker is enabled.

Key facts

  • Brave's Web Search API reference identifies query.original as the requested query and query.altered as the query altered by the spellchecker.
  • Brave's Web Search guide dates the addition of the spellcheck flag to 11 October 2023.
  • Brave's Quickstart requires an API key in the X-Subscription-Token header for requests.

Which response field shows the change?

The response schema defines query as the search query and its modifications used for search. Within that object, original records the requested text, while altered records the spellchecker's alteration. Comparing those strings identifies a reported spelling change when altered contains different text.

The schema marks altered as a nullable string. A response reader should handle a null value before comparing strings. The separate query.cleaned field contains the cleaned, normalized query. Its description concerns normalization; the field specifically assigned to spelling alterations is query.altered.

For a website search test, retaining the returned query object alongside the submitted text makes the spelling change visible during review. This is a practical use of the documented fields when checking results for a brand or page topic.

How is spellcheck disabled for a comparison?

The parameter reference defines spellcheck as a boolean with a default of true. Setting it explicitly to false disables that spelling check. The response schema also exposes query.spellcheck_off, a nullable boolean describing whether spellcheck is disabled for the query.

The following request adapts the endpoint and sample query from Brave's Web Search guide, adding the documented spellcheck setting:

curl 'https://api.search.brave.com/res/v1/web/search?q=machine+learning+tutorials&spellcheck=false' \
  -H 'X-Subscription-Token: YOUR_API_KEY'

Brave's Quickstart explains that the API key goes in that header and must remain confidential. The placeholder in the command requires a valid key.

For a comparison, a test can send the same q with spellcheck=true and spellcheck=false, retaining each returned query object. Reviewing original, altered, and spellcheck_off ties the observation to the request setting. This comparison checks the reported spelling treatment of the submitted text.

FAQ

Does enabling spellcheck only return a suggestion?

Brave's Web Search reference says the modified query is always used for search when the spell checker is enabled. You can inspect query.altered to read that alteration.

Can I request only web results and still inspect the query?

The same reference says the response always includes query and type when describing result_filter. You can therefore use result_filter=web while retaining the query information for review.

Sources

  1. Brave, "Web Search API reference", undated
  2. Brave, "Web Search", undated
  3. Brave, "Quickstart", undated

Check how a page reads to answer engines. Open the GEO score analyzer

Test a page and see what to fix first

The analysis usually takes less than 10 seconds and needs no account.

400,000+ pages scored in the public benchmark