Brave Search icon

Brave Search

Search the web using Brave Search

Overview

This node enables users to perform image searches using the Brave Search API. It is designed to query Brave's search engine specifically for images based on user-defined criteria such as search terms, result count, language, country, and content filtering preferences.

Common scenarios where this node is beneficial include:

  • Automatically retrieving relevant images for content creation or marketing materials.
  • Integrating image search capabilities into workflows that require visual data enrichment.
  • Building applications or automations that need to fetch images dynamically based on user input or other triggers.

For example, a user could input a search term like "sunset beach" and specify to return 30 images filtered for safe content in English from the United States region.

Properties

Name Meaning
Query The search term or phrase to find images for. Must not be empty; limited to 400 characters and 50 words.
Count Number of image results to return. Accepts values from 1 up to 200. The actual number returned may be fewer than requested.
Additional Parameters A collection of optional parameters to refine the search:
- Country: Region from which search results originate (e.g., US, GB, DE, etc.).
- Language: Preferred language for search results (e.g., en, fr, es).
- Safe Search: Filter adult content ("off" or "strict").
- Spellcheck: Boolean to enable or disable spellchecking of the query. If enabled, the modified query is used for searching.

Output

The node outputs an array of JSON objects representing the image search results returned by the Brave Search API. Each item typically contains metadata about an image such as URLs, titles, source information, and possibly altered query details if spellcheck was applied.

If binary data is included (not explicitly shown in the provided code), it would represent image files or thumbnails corresponding to the search results.

Dependencies

  • Requires an API key credential for authenticating with the Brave Search API.
  • Needs proper configuration of this API key within n8n credentials.
  • Relies on network access to https://api.search.brave.com to perform HTTP requests.

Troubleshooting

  • Empty or invalid query error: Ensure the "Query" property is not empty and respects the character and word limits.
  • API authentication errors: Verify that the API key credential is correctly set up and has valid permissions.
  • Rate limiting or quota exceeded: The Brave Search API may limit the number of requests; check your usage and consider adding delays or reducing request frequency.
  • Unexpected response structure: If the API changes, the node might fail to parse results properly. Check for updates or changes in the Brave Search API documentation.
  • Network issues: Confirm that the n8n instance can reach the Brave Search API endpoint without firewall or proxy restrictions.

Links and References

Discussion