DuckDuckGo Node icon

DuckDuckGo Node

DuckDuckGo Search

Overview

This node performs searches using the DuckDuckGo search engine without requiring an API key. It supports multiple types of searches including web, images, news, and videos. The "Search Images" operation specifically retrieves image results based on a user query, locale, and safe search settings.

Common scenarios for this node include:

  • Quickly fetching image URLs and metadata for content curation or automation workflows.
  • Integrating image search capabilities into data pipelines without relying on official APIs.
  • Filtering image search results by locale and safe search preferences to tailor content appropriately.

For example, you could use this node to automatically gather images related to a product name in a specific language and moderate content filtering level, then pass those images downstream for processing or display.

Properties

Name Meaning
Query The search term or phrase to find relevant images.
Locale The regional language code to localize search results (e.g., "en-us").
Safe Search Level of safe search filtering: Strict (0), Moderate (-1), or Off (-2).

Output

The output is an array of JSON objects, each representing one image search result with the following fields:

  • height: Height of the image in pixels.
  • image: Direct URL to the full-sized image.
  • source: Source website or domain hosting the image.
  • thumbnail: URL to a smaller thumbnail version of the image.
  • title: Title or description associated with the image.
  • url: URL to the webpage containing the image.
  • width: Width of the image in pixels.

No binary data is output by this node; all data is provided as JSON metadata and URLs.

Dependencies

  • Uses the external duck-duck-scrape library to perform DuckDuckGo scraping-based searches.
  • No API keys or authentication credentials are required.
  • Requires internet access from the n8n environment to reach DuckDuckGo.

Troubleshooting

  • Empty Results: If no images are returned, verify that the query string is not empty and that the locale and safe search settings are appropriate.
  • Network Errors: Since the node scrapes DuckDuckGo, network issues or changes to DuckDuckGo's site structure may cause failures.
  • Rate Limiting or Blocking: Excessive requests might be blocked by DuckDuckGo; consider adding delays or limiting usage frequency.
  • Error Messages: Errors thrown during execution will include context about the item index. Use the "Continue On Fail" option to handle errors gracefully in batch runs.

Links and References

Discussion