In short. Set country for result country, search_lang for result language, and ui_lang for the preferred response interface language.
Definition: A Brave Search API country and language test sets separate request parameters for the country of search results (
country), their language (search_lang), and the preferred response interface language (ui_lang). As of October 2026, Brave documents defaults ofUS,en, anden-US, respectively.
Key facts
- Brave's web search API reference defines
countryas a two-character country code andsearch_langas a language code of two or more characters. - Brave's Web Search guide describes search language as filtering content language and UI language as setting the preferred language for response metadata.
- Brave's authentication guide documents the
X-Subscription-Tokenheader for API key authentication and recommends storing the key in an environment variable or secure configuration.
Which values belong in each parameter?
The request reference lists country, search_lang, and ui_lang independently. The country default is US; the search language default is en. The interface language usually follows a language-country format, with en-US as its default. The reference lists available options separately for each parameter, including AU for country and en-AU for interface language.
An Australian English configuration can therefore use country=AU, search_lang=en, and ui_lang=en-AU. The two language parameters carry different values because one specifies the result language and the other specifies a response interface preference. Explicit values make the selected configuration visible in the saved request, including when a chosen value equals the documented default.
What does a complete test request look like?
Brave's country and language example uses the query nachhaltige energie, country=DE, and search_lang=de for German content from Germany. This adapted request adds the documented English interface preference:
curl --get 'https://api.search.brave.com/res/v1/web/search' \
--data-urlencode 'q=nachhaltige energie' \
--data-urlencode 'country=DE' \
--data-urlencode 'search_lang=de' \
--data-urlencode 'ui_lang=en-US' \
-H 'Accept: application/json' \
-H "X-Subscription-Token: ${BRAVE_API_KEY}"
BRAVE_API_KEY holds the subscription token. The request selects Germany and German result content while requesting English response interface language. For a comparison of country settings, the query and both language parameters can remain fixed while country changes. A comparison of result languages instead changes search_lang while retaining the country and interface settings.
Which response fields help check the test?
The response reference defines query.country as the country code for the query, query.original as the original requested query, and query.altered as the query changed by the spellchecker. These fields support checking the country and query used in a recorded response.
The same reference defines query.language.main as the main detected language in the query string. It defines web.results[].language as the main language of a web result. A test record can retain the submitted search_lang alongside these separate observations. The country and detected query language fields are nullable in the response schema.
Related terms
- Brave Search API
- Brave Search localisation
- Interface language and search language
- How do I check whether Brave Search API changed my query?
FAQ
Which parameter should I use for German result content?
You can use search_lang=de, as in Brave's German search example. That example pairs it with country=DE; ui_lang separately controls the preferred response interface language.
What happens if I omit the country and language parameters?
The API reference documents defaults of country=US, search_lang=en, and ui_lang=en-US.
Sources
Check how a page reads to answer engines. Open the GEO score analyzer