DuckDuckGo icon

DuckDuckGo

Search using DuckDuckGo

Overview

This node performs image searches using the DuckDuckGo search engine. It allows users to query for images based on specified search terms and retrieve relevant image results with various filtering options such as region, safe search level, and locale. The node supports caching to improve performance for repeated queries and can optionally return raw API responses or processed results.

Common scenarios where this node is beneficial:

  • Automatically fetching images related to a topic for content creation workflows.
  • Gathering image data for research or analysis.
  • Integrating image search capabilities into automation pipelines without manual browsing.
  • Filtering image results by region or safe search settings to comply with content policies.

Practical example:

A marketing team wants to automatically collect images related to their new product launch in different regions. They configure this node to search images with the product name, set the region to "United States (English)", enable strict safe search filtering, and limit results to 20 images. The node returns structured image data that can be used downstream for social media posts or presentations.


Properties

Name Meaning
Locale Specify the language/region locale for the search. Options include English (US), English (UK), Spanish (Spain), French (France), German (Germany), Italian (Italy), Japanese (Japan), Russian (Russia), Chinese (China), Portuguese (Brazil), Dutch (Netherlands), Polish (Poland), Swedish (Sweden), Korean (Korea), Turkish (Turkey), Arabic (Saudi Arabia), Hebrew (Israel), Persian (Iran). Default is "en-us".
Use API Key Boolean flag to indicate whether to use an API key for authenticating requests to the DuckDuckGo API.
Image Search Query The search terms to find images for. This is a required string input.
Image Search Options Collection of options to customize the image search:
- Maximum Results: Number (1-100) specifying max number of images to return.
- Region: Target region for image search (e.g., Argentina, Australia, Brazil, United States, Worldwide, etc.).
- Safe Search: Content filtering level with options Strict (filter explicit images), Moderate (default), Off (no filtering).
- Return Raw Results: Boolean to return raw API response instead of processed results.
Error Handling How errors should be handled during execution:
- Break on Error: Stop execution when an error occurs.
- Continue on Error: Continue execution even if errors occur.
Debug Mode When enabled, includes detailed request and response information for troubleshooting purposes.
Cache Settings Collection to configure caching behavior:
- Enable Cache: Whether to cache search results to improve performance.
- Cache TTL: Time-to-live in seconds for cached results (60 to 86400 seconds).
Enable Telemetry Whether to send anonymous usage data to help improve the node (no personal data collected).
Proxy Settings Configure proxy for all requests:
- Use Proxy: Enable proxy usage.
- Proxy Type: HTTP, HTTPS, SOCKS4, SOCKS5.
- Proxy Host: Hostname or IP of proxy server.
- Proxy Port: Port number.
- Proxy Authentication: Whether proxy requires authentication.
- Proxy Username and Password: Credentials for proxy authentication.

Output

The node outputs JSON objects containing the results of the image search. The structure includes:

  • success: Boolean indicating if the search was successful.
  • query: The original search query string.
  • result or results: An array of image result objects (if processed output):
    • title: Title or description of the image.
    • image: URL of the full-size image.
    • thumbnail: URL of the thumbnail image.
    • url: Source page URL where the image was found.
    • height: Height of the image in pixels.
    • width: Width of the image in pixels.
  • count: Number of results returned (0 if none).
  • error: Present only if the search failed, contains error message.
  • Additional debug info if Debug Mode is enabled:
    • requestOptions: Parameters used for the search request.
    • fromCache: Boolean indicating if results were served from cache.
    • errorDetails: Stack trace or detailed error info if an error occurred.

If "Return Raw Results" is enabled, the node returns the unprocessed API response under the result field.

The node does not output binary data.


Dependencies

  • Requires access to the DuckDuckGo search service via the internet.
  • Optionally requires an API key credential if "Use API Key" is enabled.
  • Supports proxy configuration for network requests.
  • Uses internal caching mechanisms configurable via node parameters.
  • Optional telemetry reporting to improve the node (anonymous data only).

No additional external services are mandatory beyond DuckDuckGo.


Troubleshooting

Common Issues

  • Empty or no results: Could be due to overly restrictive safe search settings, incorrect region/locale, or very specific queries with no matching images.
  • API key missing or invalid: If "Use API Key" is enabled but no valid key is provided, the node will throw an error.
  • Network or proxy errors: Misconfigured proxy settings or network issues may cause request failures.
  • Rate limiting or request blocking: Excessive requests might be blocked by DuckDuckGo; enabling caching helps reduce repeated calls.
  • Invalid parameter values: Providing unsupported region codes or out-of-range numbers for max results may cause errors.

Error Messages and Resolutions

  • "API key is required when 'Use API Key' is enabled!" — Provide a valid API key credential or disable the API key option.
  • "No results found for image search query" — Try broadening the search query or adjusting safe search and region filters.
  • "Image search error: <details>" — Check network connectivity, proxy settings, and ensure query parameters are valid.
  • Errors logged with stack traces appear if Debug Mode is enabled; use these logs to identify issues.

Links and References


This summary is based solely on static code analysis of the provided source code and property definitions.

Discussion