Brave Search icon

Brave Search

Search the web using Brave Search

Overview

This node integrates with Brave Search to perform web search queries. It is designed to provide search suggestions based on a user's input query, making it useful for applications that require autocomplete or search recommendation features. For example, it can be used in chatbots, search bars, or any interface where users benefit from real-time search suggestions.

The "Suggest" operation specifically returns suggested search terms related to the user's query, optionally enhanced with rich results if enabled and supported by the subscription.

Properties

Name Meaning
Query The user's suggest search query term. Cannot be empty. Maximum length is 400 characters, with a word limit of 50.
Count Number of suggestion results requested. Minimum 1, maximum 20. Default is 5. Actual returned count may be less.
Additional Parameters Optional parameters to refine the suggestion request:
- Country: Country code hint for regional relevance (default "US"). Options include many countries like US, UK, Germany, India, etc.
- Language: Language code hint (default "en"). Many language options available.
- Rich Results: Boolean flag to enable enhanced suggestions with rich results (requires paid subscription).

Output

The node outputs an array of JSON objects representing the search suggestions returned by Brave Search. Each item corresponds to one suggestion result. The exact structure depends on the API response but generally includes suggested search terms and possibly metadata if rich results are enabled.

No binary data output is produced by this node.

Dependencies

  • Requires an API key credential for Brave Search API authentication.
  • The node uses the Brave Search API endpoint https://api.search.brave.com/res/v1.
  • The user must configure the API key credential in n8n before using this node.

Troubleshooting

  • Empty Query Error: The query parameter cannot be empty. Ensure you provide a valid non-empty string.
  • Count Limits: If requesting more than 20 suggestions, the API will reject or truncate the request. Keep count between 1 and 20.
  • API Authentication Errors: Verify that the Brave Search API key credential is correctly configured and has necessary permissions.
  • Rich Results Access: Enabling rich results requires a paid subscription. Without it, the API may return errors or ignore the flag.
  • Network Issues: Check network connectivity and Brave Search API availability if requests fail.
  • Error Handling: The node supports continuing on failure; otherwise, errors will throw with context about the failed item index.

Links and References

Discussion