Brave Search
App · 11 actions
Search the web, news, videos, images and places; get local details, spelling suggestions and context for language models.
Actions
| Action | What it does |
|---|---|
| Get llm context | Get llm context. |
| Get local places | Get local places. |
| Get place descriptions | Get place descriptions. |
| Get rich result | Get rich result. |
| Search images | Search images. |
| Search news | Search news. |
| Search places | Search places. |
| Search videos | Search videos. |
| Search web | Search web. |
| Spellcheck | Spellcheck. |
| Suggest queries | Suggest queries. |
Get llm context
Get llm context.
Inputs
- Q
qtextRequired - The user's search query term. Query can not be empty. Maximum of 600 characters and 75 words in the query.
- Country
countrytext - The search query country, where the results come from. The country string is limited to 2 character country codes of supported countries.One of:
AR(Argentina),AU(Australia),AT(Austria),BE(Belgium),BR(Brazil),CA(Canada),CL(Chile),DK(Denmark),FI(Finland),FR(France), and 28 more. - Search lang
search_langtext - The search language preference. The 2 or more character language code for which the search results are provided.One of:
ar,eu,bn,bg,ca,zh-hans,zh-hant,hr,cs,da, and 42 more. - Count
countnumber - The maximum number of search results considered to select the LLM context data. The default is 20 and the maximum is 50.From 1.0 to 50.0.
- Safesearch
safesearchtext - Filters results for adult content. The following values are supported: - **off** - No filtering is done. - **moderate** - Drops adult content from the results used for context. - **strict** - Drops all adult content from the results used for context. When not set, no filtering is applied ; except for local recall, which stays `strict`.One of:
off,moderate,strict. - Spellcheck
spellchecktrue/false - Whether to enable spellcheck on the query.
- Operators
operatorstrue/false - Whether to apply search operators.
- Operators fallback
operators_fallbacktrue/false - Whether to fall back to the original results when search operators return no results.
- Maximum number of urls
maximum_number_of_urlsnumber - Maximum number of different URLs to include in LLM context.From 1.0 to 50.0.
- Maximum number of tokens
maximum_number_of_tokensnumber - Approximate maximum number of tokens to include in context. The default is `8192` and maximum is `32768`.From 1024.0 to 32768.0.
- Maximum number of snippets
maximum_number_of_snippetsnumber - Maximum number of different snippets (or chunks of text) to include in LLM context. The default is `50` and maximum is `256`.From 1.0 to 256.0.
- Context threshold mode
context_threshold_modetext - The mode to use to determine the threshold for including content in context.One of:
disabled,strict,lenient,balanced. - Maximum number of tokens per url
maximum_number_of_tokens_per_urlnumber - Maximum number of tokens to include per URL. The default is `4096` and maximum is `8192`.From 512.0 to 8192.0.
- Maximum number of snippets per url
maximum_number_of_snippets_per_urlnumber - Maximum number of snippets to include per URL. The default is `50` and maximum is `100`.From 1.0 to 100.0.
- Goggles
gogglestext - Goggles act as a custom re-ranking on top of Brave's search index. The parameter supports both a url where the Goggle is hosted or the definition of the Goggle. For more details, see the [Goggles documentation](/documentation/resources/goggles). The parameter can be a single Goggle or a list of up to 3 Goggles.
- Freshness
freshnesstext - Filters search results by page age. The age of a page is determined by the most relevant date reported by the content, such as its published or last modified date. The following values are supported: - **pd** - Pages aged 24 hours or less. - **pw** - Pages aged 7 days or less. - **pm** - Pages aged 31 days or less. - **py** - Pages aged 365 days or less. - **YYYY-MM-DDtoYYYY-MM-DD** - A custom date range is also supported by specifying start and end dates e.g. `2022-04-01to2022-07-30`.One of:
pd,pw,pm,py. - Enable local
enable_localtext - Whether to enable local recall. Not setting this value means auto-detect: local recall is used if a location is provided (`X-Loc-Lat` with `X-Loc-Long`, or `X-Loc-City`).
- Enable source metadata
enable_source_metadatatrue/false - Enable source metadata enrichment (site_name, favicon, thumbnail, description, fetched_content_timestamp) in the sources attribute of the response.
- Start date
start_datedate - First date for a custom freshness range; also choose an end date.
- End date
end_datedate - Last date for a custom freshness range.
Outputs
dataobject- Response.
Example output
{
"data": {
"grounding": {},
"sources": {}
}
}Get local places
Get local places.
Inputs
- Ids
idslistRequired - A list of unique identifiers for the location. The ids are valid only for 8 hours.
- Search lang
search_langtext - The search language preference. The 2 or more character language code for which the search results are provided.One of:
ar,eu,bn,bg,ca,zh-hans,zh-hant,hr,cs,da, and 42 more. - Ui lang
ui_langtext - User interface language preferred in response. Usually of the format -. For more, see [RFC 9110](https://www.rfc-editor.org/rfc/rfc9110.html#name-accept-language).One of:
es-AR,en-AU,de-AT,nl-BE,fr-BE,pt-BR,en-CA,fr-CA,es-CL,da-DK, and 29 more. - Units
unitstext - The measurement units. The following values are supported: - **metric** - The standardized measurement system (km, celcius..) - **imperial** - The British Imperial system of units (mile, fahrenheit..)One of:
imperial,metric.
Outputs
dataobject- Response.
Example output
{
"data": {
"results": [],
"type": "example"
}
}Get place descriptions
Get place descriptions.
Inputs
- Ids
idslistRequired - A list of unique identifiers for the location. The ids are valid only for 8 hours.
Outputs
dataobject- Response.
Example output
{
"data": {
"results": [],
"type": "example"
}
}Get rich result
Get rich result.
Inputs
- Callback key
callback_keytextRequired - The callback key to use for the rich header
Outputs
dataobject- Response.
Example output
{
"data": {
"response_callback_info": {},
"results": [],
"type": "example"
}
}Search images
Search images.
Inputs
- Q
qtextRequired - The user's search query term. Query can not be empty. Maximum of 400 characters and 50 words in the query.
- Search lang
search_langtext - The search language preference. The 2 or more character language code for which the search results are provided.One of:
ar,eu,bn,bg,ca,zh-hans,zh-hant,hr,cs,da, and 42 more. - Country
countrytext - The search query country, where the results come from. The country string is limited to 2 character country codes of supported countries and `ALL` for worldwide.One of:
AR(Argentina),AU(Australia),AT(Austria),BE(Belgium),BR(Brazil),CA(Canada),CL(Chile),DK(Denmark),FI(Finland),FR(France), and 28 more. - Safesearch
safesearchtext - Filters search results for adult content. The following values are supported: - **off** - No content filtering (except for illegal content). - **strict** - Drops all adult content from search results.One of:
off,strict. - Count
countnumber - The number of search results returned in response. The maximum is 200. The actual number delivered may be less than requested. **NOTE:** Image search is not paginated and has no `offset` parameter. Raise `count` to get more results.From 1.0 to 200.0.
- Spellcheck
spellchecktrue/false - Whether to spell check provided query. If the spell checker is enabled, the modified query is always used for search. The modified query can be found in altered key from the query response model.
Outputs
dataobject- Response.
Example output
{
"data": {
"extra": {},
"query": {},
"results": [],
"type": "example"
}
}Search news
Search news.
Inputs
- Q
qtextRequired - The user's search query term. Query can not be empty. Maximum of 400 characters and 50 words in the query.
- Search lang
search_langtext - The search language preference. The 2 or more character language code for which the search results are provided.One of:
ar,eu,bn,bg,ca,zh-hans,zh-hant,hr,cs,da, and 42 more. - Ui lang
ui_langtext - User interface language preferred in response. Usually of the format `-`. For more, see [RFC 9110](https://www.rfc-editor.org/rfc/rfc9110.html#name-accept-language).One of:
es-AR,en-AU,de-AT,nl-BE,fr-BE,pt-BR,en-CA,fr-CA,es-CL,da-DK, and 29 more. - Country
countrytext - The search query country, where the results come from. The country string is limited to 2 character country codes of supported countries or `ALL` for worldwide.One of:
AR(Argentina),AU(Australia),AT(Austria),BE(Belgium),BR(Brazil),CA(Canada),CL(Chile),DK(Denmark),FI(Finland),FR(France), and 28 more. - Safesearch
safesearchtext - Filters search results for adult content. The following values are supported: - **off** - No filtering is done. - **moderate** - Filter out explicit content. - **strict** - Filter out explicit and suggestive content.One of:
off,moderate,strict. - Count
countnumber - The number of search results returned in response. The maximum is 50. The actual number delivered may be less than requested. Combine this parameter with offset to paginate search results.From 1.0 to 50.0.
- Offset
offsetnumber - The zero based offset that indicates number of search results per page (count) to skip before returning the result. The maximum is 9. The actual number delivered may be less than requested based on the query. In order to paginate results use this parameter together with count. For example, if your user interface displays 20 search results per page, set count to 20 and offset to 0 to show the first page of results. To get subsequent pages, increment offset by 1 (e.g. 0, 1, 2). The results may oveFrom 0.0 to 9.0.
- Spellcheck
spellchecktrue/false - Whether to spell check the provided query. If the spellchecker is enabled, the modified query is always used for search. The modified query can be found in altered key from the query response model.
- Freshness
freshnesstext - Filters search results by page age. The age of a page is determined by the most relevant date reported by the content, such as its published or last modified date. The following values are supported: - **pd** - Pages aged 24 hours or less. - **pw** - Pages aged 7 days or less. - **pm** - Pages aged 31 days or less. - **py** - Pages aged 365 days or less. - **YYYY-MM-DDtoYYYY-MM-DD** - A custom date range is also supported by specifying start and end dates e.g. `2022-04-01to2022-07-30`.One of:
pd,pw,pm,py. - Extra snippets
extra_snippetstext - A snippet is an excerpt from a page you get as a result of the query, and extra_snippets allow you to get up to 5 additional, alternative excerpts.
- Goggles
gogglestext - Goggles act as a custom re-ranking on top of Brave's search index. The parameter supports both a url where the Goggle is hosted or the definition of the Goggle. For more details, see the [Goggles documentation](/documentation/resources/goggles). The parameter can be a single Goggle or a list of up to 3 Goggles.
- Include fetch metadata
include_fetch_metadatatrue/false - Include fetch metadata.
- Operators
operatorstrue/false - Whether to apply search operators.
- Start date
start_datedate - First date for a custom freshness range; also choose an end date.
- End date
end_datedate - Last date for a custom freshness range.
Outputs
dataobject- Response.
Example output
{
"data": {
"query": {},
"results": [],
"type": "example"
}
}Search places
Search places.
Inputs
- Radius
radiustext - Search radius bias around the given coordinates, in meters. **NOTE**: This is not strictly the radius of the search (nor the resulting radius of the results), but rather a bias towards results that are closer to the given coordinates. Search is performed globally if no radius is provided.
- Count
countnumber - Number of results to return. The maximum is 100.From 1.0 to 100.0.
- Country
countrytext - Two-letter country code (ISO 3166-1 alpha-2) to scope the search.One of:
AR(Argentina),AU(Australia),AT(Austria),BE(Belgium),BR(Brazil),CA(Canada),CL(Chile),DK(Denmark),FI(Finland),FR(France), and 28 more. - Search lang
search_langtext - Language for the search results.One of:
ar,eu,bn,bg,ca,zh-hans,zh-hant,hr,cs,da, and 42 more. - Ui lang
ui_langtext - User interface language for the response. Usually `-`.One of:
es-AR,en-AU,de-AT,nl-BE,fr-BE,pt-BR,en-CA,fr-CA,es-CL,da-DK, and 29 more. - Units
unitstext - Units of measurement for distance values: `metric` is kilometres, `imperial` is miles.One of:
imperial,metric. - Safesearch
safesearchtext - Safe search level for the query results.One of:
off,moderate,strict. - Spellcheck
spellchecktrue/false - Whether to apply spellcheck before executing the search.
- Geoloc
geoloctext - Optional geolocation of the user in the format `x`. Used to calculate distance values in results.
- Q
qtext - Query string to search for points of interest in an area. If no `q` is provided, the endpoint will return general points of interest in the given area.
- Latitude
latitudetext - Latitude of the geographical coordinates.
- Longitude
longitudetext - Longitude of the geographical coordinates.
- Location
locationtext - Location string to search for points of interest in an area. This is alternative to the `latitude` and `longitude` parameters. * For locations in US prefer the form ` `, ie. `san francisco ca united states` * For non-US locations, use the form ` `, ie. `tokyo japan` * No need for commas or other special chars, capitalization does not matter * We cover multiple languages: `nueva york` instead of `new york` works, but using English or the most popula
Outputs
dataobject- Response.
Example output
{
"data": {
"addresses": [],
"cities": [],
"countries": [],
"location": {},
"mixed": [],
"neighborhoods": [],
"query": {},
"regions": [],
"results": [],
"streets": [],
"type": "example"
}
}Search videos
Search videos.
Inputs
- Q
qtextRequired - The user's search query term. Query can not be empty. Maximum of 400 characters and 50 words in the query.
- Search lang
search_langtext - The search language preference. The 2 or more character language code for which the search results are provided.One of:
ar,eu,bn,bg,ca,zh-hans,zh-hant,hr,cs,da, and 42 more. - Ui lang
ui_langtext - User interface language preferred in response. Usually of the format `-`. For more, see [RFC 9110](https://www.rfc-editor.org/rfc/rfc9110.html#name-accept-language).One of:
es-AR,en-AU,de-AT,nl-BE,fr-BE,pt-BR,en-CA,fr-CA,es-CL,da-DK, and 29 more. - Country
countrytext - The search query country, where the results come from. The country string is limited to 2 character country codes of supported countries or `ALL` for worldwide.One of:
AR(Argentina),AU(Australia),AT(Austria),BE(Belgium),BR(Brazil),CA(Canada),CL(Chile),DK(Denmark),FI(Finland),FR(France), and 28 more. - Safesearch
safesearchtext - Filters search results for adult content. The following values are supported: - **off** - No filtering is done. - **moderate** - Filters explicit content, like images and videos, but allows adult domains in the search results. - **strict** - Drops all adult content from search results.One of:
off,moderate,strict. - Count
countnumber - The number of search results returned in response. The maximum is 50. The actual number delivered may be less than requested. Combine this parameter with offset to paginate search results.From 1.0 to 50.0.
- Offset
offsetnumber - The zero based offset that indicates number of search results per page (count) to skip before returning the result. The maximum is 9. The actual number delivered may be less than requested based on the query. In order to paginate results use this parameter together with count. For example, if your user interface displays 20 search results per page, set count to 20 and offset to 0 to show the first page of results. To get subsequent pages, increment offset by 1 (e.g. 0, 1, 2). The results may oveFrom 0.0 to 9.0.
- Spellcheck
spellchecktrue/false - Whether to spell check the provided query. If the spellchecker is enabled, the modified query is always used for search. The modified query can be found in altered key from the query response model.
- Freshness
freshnesstext - Filters search results by page age. The age of a page is determined by the most relevant date reported by the content, such as its published or last modified date. The following values are supported: - **pd** - Pages aged 24 hours or less. - **pw** - Pages aged 7 days or less. - **pm** - Pages aged 31 days or less. - **py** - Pages aged 365 days or less. - **YYYY-MM-DDtoYYYY-MM-DD** - A custom date range is also supported by specifying start and end dates e.g. `2022-04-01to2022-07-30`.One of:
pd,pw,pm,py. - Include fetch metadata
include_fetch_metadatatrue/false - Include fetch metadata.
- Operators
operatorstrue/false - Whether to apply search operators.
- Start date
start_datedate - First date for a custom freshness range; also choose an end date.
- End date
end_datedate - Last date for a custom freshness range.
Outputs
dataobject- Response.
Example output
{
"data": {
"extra": {},
"query": {},
"results": [],
"type": "example"
}
}Search web
Search web.
Inputs
- Q
qtextRequired - The user's search query term. Query can not be empty. Maximum of 600 characters and 75 words in the query.
- Country
countrytext - The 2 character country code where the search results come from.One of:
AR(Argentina),AU(Australia),AT(Austria),BE(Belgium),BR(Brazil),CA(Canada),CL(Chile),DK(Denmark),FI(Finland),FR(France), and 28 more. - Search lang
search_langtext - The 2 or more character language code for which the search results are provided.One of:
ar,eu,bn,bg,ca,zh-hans,zh-hant,hr,cs,da, and 42 more. - Ui lang
ui_langtext - User interface language preferred in response. Usually of the format -. For more, see [RFC 9110](https://www.rfc-editor.org/rfc/rfc9110.html#name-accept-language).One of:
es-AR,en-AU,de-AT,nl-BE,fr-BE,pt-BR,en-CA,fr-CA,es-CL,da-DK, and 29 more. - Count
countnumber - The number of search results returned in response. The maximum is 20. The actual number delivered may be less than requested. Combine this parameter with offset to paginate search results. **NOTE:** Count only applies to web results.From 1.0 to 20.0.
- Offset
offsetnumber - The zero based offset that indicates number of search result pages (count) to skip before returning the result. The default is 0 and the maximum is 9. The actual number delivered may be less than requested. Use this parameter along with the count parameter to page results. For example, if your user interface displays 10 search results per page, set count to 10 and offset to 0 to get the first page of results. For each subsequent page, increment offset by 1 (for example, 0, 1, 2). It is possibleFrom 0.0 to 9.0.
- Safesearch
safesearchtext - Filters search results for adult content. The following values are supported: - **off** - No filtering is done. - **moderate** - Filters explicit content, like images and videos, but allows adult domains in the search results. - **strict** - Drops all adult content from search results.One of:
off,moderate,strict. - Spellcheck
spellchecktrue/false - Whether to spell check provided query. If the spell checker is enabled, the modified query is always used for search. The modified query can be found in altered key from the query response model.
- Freshness
freshnesstext - Filters search results by page age. The age of a page is determined by the most relevant date reported by the content, such as its published or last modified date. The following values are supported: - **pd** - Pages aged 24 hours or less. - **pw** - Pages aged 7 days or less. - **pm** - Pages aged 31 days or less. - **py** - Pages aged 365 days or less. - **YYYY-MM-DDtoYYYY-MM-DD** - A custom date range is also supported by specifying start and end dates e.g. `2022-04-01to2022-07-30`.One of:
pd,pw,pm,py. - Text decorations
text_decorationstrue/false - Whether display strings (e.g. result snippets) should include decoration markers (e.g. highlighting characters).
- Result filter
result_filtertext - A comma delimited string of result types to include in the search response. Not specifying this parameter will return back all result types in search response where data is available and the plan has the corresponding option activated. The response always includes query and type to identify any query modifications and response type respectively. Available result filter values are: `discussions`, `faq`, `infobox`, `news`, `query`, `summarizer`, `videos`, `web`, `locations`. **NOTE:** count param
- Units
unitstext - The measurement units. The following values are supported: - **metric** - The standardized measurement system (km, celcius..) - **imperial** - The British Imperial system of units (mile, fahrenheit..)One of:
imperial,metric. - Goggles id
goggles_idtext - Goggles act as a custom re-ranking on top of Brave's search index. For more details, refer to the Goggles repository. This parameter is deprecated. Please use the goggles parameter.
- Goggles
gogglestext - Goggles act as a custom re-ranking on top of Brave's search index. The parameter supports both a url where the Goggle is hosted or the definition of the Goggle. For more details, see the [Goggles documentation](/documentation/resources/goggles). The parameter can be a single Goggle or a list of up to 3 Goggles.
- Extra snippets
extra_snippetstext - A snippet is an excerpt from a page you get as a result of the query, and extra_snippets allow you to get up to 5 additional, alternative excerpts.
- Summary
summarytext - This parameter enables summary key generation in web search results. This is required for summarizer to be enabled.
- Enable rich callback
enable_rich_callbacktrue/false - Enable rich callback. Allows you to get real time rich results via a callback URL when they are relevant to your query. **NOTE**: Requires `Search` plan.
- Include fetch metadata
include_fetch_metadatatrue/false - Include fetch metadata.
- Operators
operatorstrue/false - Whether to apply search operators
- Start date
start_datedate - First date for a custom freshness range; also choose an end date.
- End date
end_datedate - Last date for a custom freshness range.
Outputs
dataobject- Response.
Example output
{
"data": {
"discussions": {},
"faq": {},
"infobox": {},
"locations": {},
"mixed": {},
"news": {},
"query": {},
"rich": {},
"summarizer": {},
"type": "example",
"videos": {},
"web": {
"results": []
}
}
}Spellcheck
Spellcheck.
Inputs
- Q
qtextRequired - The phrase to be spell checked. Query can not be empty. Maximum of 400 characters and 50 words in the query.
- Lang
langtext - The spell check language preference, where potentially the results could come from. The 2 or more character language code for which the spell check search results are provided. This is a just a hint for calculating spell check responses.One of:
ar,eu,bn,bg,ca,zh-hans,zh-hant,hr,cs,da, and 42 more. - Country
countrytext - The spell check country, where potentially the results could come from. The country string is limited to 2 character country codes of supported countries. This is a just a hint for calculating spellcheck responses.One of:
AR(Argentina),AU(Australia),AT(Austria),BE(Belgium),BR(Brazil),CA(Canada),CL(Chile),DK(Denmark),FI(Finland),FR(France), and 28 more.
Outputs
dataobject- Response.
Example output
{
"data": {
"query": {},
"results": [],
"type": "example"
}
}Suggest queries
Suggest queries.
Inputs
- Q
qtextRequired - The user's suggest search query term. Query can not be empty. The max query length is 400 characters, and the word limit is 50 words.
- Lang
langtext - The suggest search language preference, where potentially the results could come from. The 2 or more character language code for which the suggest search results are provided. This is a just a hint for calculating suggest responses.One of:
ar,eu,bn,bg,ca,zh-hans,zh-hant,hr,cs,da, and 42 more. - Country
countrytext - The suggest search query country, where potentially the results could come from. The country string is limited to 2 character country codes of supported countries. This is a just a hint for calculating suggest responses.One of:
AR(Argentina),AU(Australia),AT(Austria),BE(Belgium),BR(Brazil),CA(Canada),CL(Chile),DK(Denmark),FI(Finland),FR(France), and 28 more. - Count
countnumber - The number of suggestion search results returned in response. The actual number of results delivered may be less than requested. Minimum is 1, maximum is 20. The default is 5.From 1.0 to 20.0.
- Rich
richtrue/false - Whether to enhance suggestions with rich results. This requires a paid autosuggest subscription.
Outputs
dataobject- Response.
Example output
{
"data": {
"query": {},
"results": [],
"type": "example"
}
}