Brave Search icon

Brave Search

Search the web using Brave Search

Overview

This node integrates with the Brave Search API to perform various types of searches including web, news, image, and video searches. It allows users to query Brave's search engine directly from n8n workflows, making it useful for automating data retrieval, content monitoring, or enriching datasets with search results.

Common scenarios include:

  • Automatically fetching recent news articles related to a topic.
  • Gathering images or videos based on specific queries for content curation.
  • Performing web searches to gather URLs or snippets for research or analysis.

For example, a marketing team could use this node to automatically pull the latest news about competitors, or a content creator might fetch relevant images or videos for their projects.

Properties

Name Meaning
Endpoint The type of search to perform. Options: Web Search, News Search, Image Search, Video Search.

Depending on the selected Endpoint, additional properties appear:

For Web Search

Name Meaning
Query The user's search query term (max 400 characters, max 50 words). Cannot be empty.
Count Number of results to return (1 to 20).

For News Search

Name Meaning
Query The user's search query term (max 400 characters, max 50 words). Cannot be empty.
Count Number of results to return (1 to 50). Actual results may be fewer.

For Image Search

Name Meaning
Query The user's search query term (max 400 characters, max 50 words). Cannot be empty.
Count Number of results to return (1 to 100). Actual results may be fewer.

For Video Search

Name Meaning
Query The user's search query term (max 400 characters, max 50 words). Cannot be empty.
Count Number of results to return (1 to 50). Actual results may be fewer.

Output

The node outputs an array of JSON objects corresponding to the search results returned by the Brave Search API. Each item in the output array represents the full response from one API call for each input item processed.

The exact structure of the JSON depends on the endpoint used but generally includes fields such as titles, URLs, snippets, thumbnails (for images/videos), publication dates (for news), and other metadata relevant to the search type.

No binary data is output by this node.

Dependencies

  • Requires an API key credential for authenticating requests to the Brave Search API.
  • The node uses the Brave Search API endpoints at https://api.search.brave.com/res/v1.
  • Requests are rate-limited internally by a 1100ms delay between calls to avoid hitting API limits.

Troubleshooting

  • Empty Query Error: The node requires a non-empty query string. Ensure the "Query" property is set and not blank.
  • Rate Limiting: If you send too many requests too quickly, the API may reject them. The node includes a delay between requests, but if you process many items, consider batching or reducing frequency.
  • Invalid Count Values: Counts must be within specified ranges depending on the endpoint. Using values outside these ranges will likely cause errors.
  • Authentication Errors: Make sure the API key credential is correctly configured and valid.
  • Unexpected API Responses: If the API changes or returns unexpected data, the node may fail or produce incomplete results.

Links and References

Discussion