In short. Set text_decorations to false to request Brave API snippets without decoration markers.
Definition: Brave Search API's
text_decorationssetting controls whether display strings, including result snippets, contain decoration markers such as highlighting characters. Set this Boolean parameter tofalsein the request to ask for snippets without those markers.
Key facts
- Brave's Web Search GET reference lists
text_decorationsas a Boolean query parameter with a default oftrue. - The reference describes the setting as applying to display strings, with result snippets as an example, and identifies highlighting characters as an example of decoration markers.
- The GET reference places the setting beside the other Web Search query parameters, so it belongs in the request URL for a GET search.
- Brave's Web Search POST reference lists the same property as a Boolean field in the request body and gives it the same default.
How is the setting added to a GET request?
The GET reference identifies the Web Search path as /v1/web/search and gives https://api.search.brave.com/res as the base URL. The documented parameter can therefore be added to the query string with the value false:
GET /res/v1/web/search?q=brave+search&text_decorations=false
The parameter name uses an underscore: text_decorations. The value is a Boolean, so false is the value that requests display strings without the decoration markers described by Brave. The reference gives true as the default, which means a request that omits the parameter uses the documented default behaviour.
How is the setting added to a POST request?
The POST reference presents Web Search as a JSON request with properties including text_decorations. The corresponding body property is:
{
"q": "brave search",
"text_decorations": false
}
The POST documentation also labels the property boolean and describes it with the same sentence as the GET reference. A client using the POST form can place the Boolean in the request body instead of adding it to the URL query string.
What does false change?
Brave defines the scope as display strings. Its example names result snippets, and its description connects the setting with decoration markers, including highlighting characters. The setting therefore concerns the text returned in those display strings. It is a response-format control for the API request, rather than a setting on the source website.
Brave's references do not specify the exact marker characters or a separate syntax for removing them after the response arrives. If an integration already receives decorated text, setting text_decorations=false on the next request is the documented control to use.
Related terms
- Brave Search API
- Does Brave's offset parameter count results or result pages?
- Does Brave's count setting also cap news and location results?
FAQ
Can you set text_decorations to false on a GET request?
Yes. Add text_decorations=false to the Web Search query string. The GET reference defines the parameter as Boolean and documents true as its default.
Can you use the same control with POST?
Yes. Add "text_decorations": false to the JSON request body. Brave's POST reference documents the property with the same description and default as the GET reference.
Sources
- Brave Search API, "Web Search API reference, GET", undated
- Brave Search API, "Web Search API reference, POST", undated
Check how a page reads to answer engines. Open the GEO score analyzer