Brave Search icon

Brave Search

Search the web using Brave Search

Overview

The Brave Search node allows users to perform web searches using the Brave Search API. It is designed to query the web and retrieve search results based on user-defined parameters such as query text, result count, language preferences, safe search filtering, and more.

This node is beneficial in scenarios where automated or programmatic web search capabilities are needed within an n8n workflow. For example, it can be used to:

  • Automatically gather recent news articles or web content related to a specific topic.
  • Perform market research by retrieving web results filtered by country or language.
  • Integrate search results into data pipelines for further processing or analysis.
  • Build custom search-based tools or chatbots that require live web search data.

Properties

Name Meaning
Query The user's search query term. Cannot be empty. Maximum of 400 characters and 50 words.
Count Number of results to return. Must be between 1 and 20. Can be combined with Offset to paginate results.
Additional Parameters A collection of optional parameters to customize the search:
- Country The country from which search results originate. Options include many countries like US, UK, Germany, India, etc., plus "All Regions".
- Search Language Preferred language for search results (e.g., English, French, Spanish, Chinese Simplified, etc.).
- User Interface Language Preferred language for the user interface (e.g., en-US, es-AR, de-DE).
- Offset Number of result sets to skip before returning results, used for pagination. Default is 0.
- Safe Search Filters adult content in results. Options: Off, Moderate, Strict.
- Freshness Filters results by discovery time. Options: All Time, Past 24 Hours, Past 7 Days, Past Month, Past Year.
- Text Decorations Boolean indicating if display strings should include decoration markers like highlighting characters.
- Spellcheck Boolean to enable spellchecking of the query. If enabled, the modified query is used for search.
- Result Filter Multi-select filter for types of results to include, e.g., Web, Discussions, Videos, News, FAQ, Infobox, Locations, Summarizer. Defaults to Web only.
- Goggles One or more URLs acting as custom re-ranking filters on top of Brave’s search index.
- Units Measurement units for results, either Metric or Imperial. If not provided, derived from the search country.
- Extra Snippets Boolean to include up to 5 additional alternative snippets (excerpts) in results. Available under certain subscription plans.
- Summary Boolean to include summary key generation in web search results, required for enabling summarizer feature.

Output

The node outputs an array of JSON objects representing the search results returned by the Brave Search API. Each item typically contains fields describing the search results, including but not limited to:

  • The original or modified query information.
  • The type of each result (e.g., web page, video, news).
  • Result metadata such as title, URL, snippet/excerpt, and other relevant details depending on the result type.
  • If enabled, additional snippets or summaries may be included.

The output does not include binary data; all data is structured as JSON.

Dependencies

  • Requires an API key credential for authenticating requests to the Brave Search API.
  • The node uses the Brave Search API endpoint https://api.search.brave.com/res/v1.
  • Proper configuration of the API key credential in n8n is necessary for successful execution.

Troubleshooting

  • Empty or invalid query error: Ensure the Query property is not empty and respects the maximum length and word count limits.
  • API authentication errors: Verify that the API key credential is correctly configured and has valid permissions.
  • Rate limiting or quota exceeded: The Brave Search API may limit the number of requests; check your plan and usage.
  • Invalid parameter values: Make sure numeric parameters like Count and Offset are within allowed ranges.
  • Unexpected response structure: If the API changes or returns unexpected data, verify the node version compatibility and update if necessary.

Links and References

Discussion