# Brave Search

> Search the web, news, videos, images and places; get local details, spelling suggestions and context for language models.

App · 11 actions. Web page: https://docs.lodol.com/docs/integrations/brave-search

## Actions

### Get llm context

Get llm context.

**Inputs**

- Q (`q`, text, required): The user's search query term. Query can not be empty. Maximum of 600 characters and 75 words in the query.
- Country (`country`, text): 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_lang`, text): 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 (`count`, number): 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 (`safesearch`, text): 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 (`spellcheck`, true/false): Whether to enable spellcheck on the query.
- Operators (`operators`, true/false): Whether to apply search operators.
- Operators fallback (`operators_fallback`, true/false): Whether to fall back to the original results when search operators return no results.
- Maximum number of urls (`maximum_number_of_urls`, number): Maximum number of different URLs to include in LLM context. From 1.0 to 50.0.
- Maximum number of tokens (`maximum_number_of_tokens`, number): 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_snippets`, number): 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_mode`, text): 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_url`, number): 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_url`, number): Maximum number of snippets to include per URL. The default is `50` and maximum is `100`. From 1.0 to 100.0.
- Goggles (`goggles`, text): 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 (`freshness`, text): 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_local`, text): 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_metadata`, true/false): Enable source metadata enrichment (site_name, favicon, thumbnail, description, fetched_content_timestamp) in the sources attribute of the response.
- Start date (`start_date`, date): First date for a custom freshness range; also choose an end date.
- End date (`end_date`, date): Last date for a custom freshness range.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "grounding": {},
    "sources": {}
  }
}
```

### Get local places

Get local places.

**Inputs**

- Ids (`ids`, list, required): A list of unique identifiers for the location. The ids are valid only for 8 hours.
- Search lang (`search_lang`, text): 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_lang`, text): 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 (`units`, text): 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**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "results": [],
    "type": "example"
  }
}
```

### Get place descriptions

Get place descriptions.

**Inputs**

- Ids (`ids`, list, required): A list of unique identifiers for the location. The ids are valid only for 8 hours.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "results": [],
    "type": "example"
  }
}
```

### Get rich result

Get rich result.

**Inputs**

- Callback key (`callback_key`, text, required): The callback key to use for the rich header

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "response_callback_info": {},
    "results": [],
    "type": "example"
  }
}
```

### Search images

Search images.

**Inputs**

- Q (`q`, text, required): The user's search query term. Query can not be empty. Maximum of 400 characters and 50 words in the query.
- Search lang (`search_lang`, text): 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 (`country`, text): 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 (`safesearch`, text): 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 (`count`, number): 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 (`spellcheck`, true/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**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "extra": {},
    "query": {},
    "results": [],
    "type": "example"
  }
}
```

### Search news

Search news.

**Inputs**

- Q (`q`, text, required): The user's search query term. Query can not be empty. Maximum of 400 characters and 50 words in the query.
- Search lang (`search_lang`, text): 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_lang`, text): 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 (`country`, text): 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 (`safesearch`, text): 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 (`count`, number): 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 (`offset`, number): 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 ove. From 0.0 to 9.0.
- Spellcheck (`spellcheck`, true/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 (`freshness`, text): 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_snippets`, text): 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 (`goggles`, text): 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_metadata`, true/false): Include fetch metadata.
- Operators (`operators`, true/false): Whether to apply search operators.
- Start date (`start_date`, date): First date for a custom freshness range; also choose an end date.
- End date (`end_date`, date): Last date for a custom freshness range.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "query": {},
    "results": [],
    "type": "example"
  }
}
```

### Search places

Search places.

**Inputs**

- Radius (`radius`, text): 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 (`count`, number): Number of results to return. The maximum is 100. From 1.0 to 100.0.
- Country (`country`, text): 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_lang`, text): 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_lang`, text): 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 (`units`, text): Units of measurement for distance values: `metric` is kilometres, `imperial` is miles. One of: `imperial`, `metric`.
- Safesearch (`safesearch`, text): Safe search level for the query results. One of: `off`, `moderate`, `strict`.
- Spellcheck (`spellcheck`, true/false): Whether to apply spellcheck before executing the search.
- Geoloc (`geoloc`, text): Optional geolocation of the user in the format `x`. Used to calculate distance values in results.
- Q (`q`, text): 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 (`latitude`, text): Latitude of the geographical coordinates.
- Longitude (`longitude`, text): Longitude of the geographical coordinates.
- Location (`location`, text): 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**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "addresses": [],
    "cities": [],
    "countries": [],
    "location": {},
    "mixed": [],
    "neighborhoods": [],
    "query": {},
    "regions": [],
    "results": [],
    "streets": [],
    "type": "example"
  }
}
```

### Search videos

Search videos.

**Inputs**

- Q (`q`, text, required): The user's search query term. Query can not be empty. Maximum of 400 characters and 50 words in the query.
- Search lang (`search_lang`, text): 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_lang`, text): 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 (`country`, text): 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 (`safesearch`, text): 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 (`count`, number): 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 (`offset`, number): 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 ove. From 0.0 to 9.0.
- Spellcheck (`spellcheck`, true/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 (`freshness`, text): 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_metadata`, true/false): Include fetch metadata.
- Operators (`operators`, true/false): Whether to apply search operators.
- Start date (`start_date`, date): First date for a custom freshness range; also choose an end date.
- End date (`end_date`, date): Last date for a custom freshness range.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "extra": {},
    "query": {},
    "results": [],
    "type": "example"
  }
}
```

### Search web

Search web.

**Inputs**

- Q (`q`, text, required): The user's search query term. Query can not be empty. Maximum of 600 characters and 75 words in the query.
- Country (`country`, text): 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_lang`, text): 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_lang`, text): 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 (`count`, number): 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 (`offset`, number): 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 possible. From 0.0 to 9.0.
- Safesearch (`safesearch`, text): 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 (`spellcheck`, true/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 (`freshness`, text): 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_decorations`, true/false): Whether display strings (e.g. result snippets) should include decoration markers (e.g. highlighting characters).
- Result filter (`result_filter`, text): 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 (`units`, text): 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_id`, text): 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 (`goggles`, text): 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_snippets`, text): 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 (`summary`, text): This parameter enables summary key generation in web search results. This is required for summarizer to be enabled.
- Enable rich callback (`enable_rich_callback`, true/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_metadata`, true/false): Include fetch metadata.
- Operators (`operators`, true/false): Whether to apply search operators
- Start date (`start_date`, date): First date for a custom freshness range; also choose an end date.
- End date (`end_date`, date): Last date for a custom freshness range.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "discussions": {},
    "faq": {},
    "infobox": {},
    "locations": {},
    "mixed": {},
    "news": {},
    "query": {},
    "rich": {},
    "summarizer": {},
    "type": "example",
    "videos": {},
    "web": {
      "results": []
    }
  }
}
```

### Spellcheck

Spellcheck.

**Inputs**

- Q (`q`, text, required): The phrase to be spell checked. Query can not be empty. Maximum of 400 characters and 50 words in the query.
- Lang (`lang`, text): 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 (`country`, text): 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**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "query": {},
    "results": [],
    "type": "example"
  }
}
```

### Suggest queries

Suggest queries.

**Inputs**

- Q (`q`, text, required): 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 (`lang`, text): 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 (`country`, text): 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 (`count`, number): 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 (`rich`, true/false): Whether to enhance suggestions with rich results. This requires a paid autosuggest subscription.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "query": {},
    "results": [],
    "type": "example"
  }
}
```
