DuckDuckGo icon

DuckDuckGo

Search using DuckDuckGo

Overview

This node performs video searches using the DuckDuckGo search engine. It allows users to query for videos based on specific search terms and retrieve relevant video results from various sources. The node supports filtering by region, safe search level, and maximum number of results. It also offers options to return raw API responses or processed results.

Common scenarios where this node is beneficial include:

  • Automating video content discovery for marketing or research.
  • Integrating video search capabilities into workflows that require multimedia data.
  • Filtering video content by region or safety preferences for compliance or audience targeting.

Practical example: A user wants to find the top 10 family-friendly cooking tutorial videos available in the United States. They can configure the node with a query like "family cooking tutorials," set the region to "United States (English)," enable strict safe search, and limit results to 10.

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), and others.
Use API Key Whether to use an API key credential for authenticating requests to the DuckDuckGo API.
Video Search Query The search terms used to find videos. This is a required string input.
Video Search Options Collection of options to customize the video search:
• Maximum Results: Number of videos to return (1–100).
• Region: Target region for videos (e.g., United States, Germany, Brazil, Worldwide).
• Safe Search: Content filtering level (Strict, Moderate, Off).
• Return Raw Results: Whether to output the raw API response instead of processed results.
Error Handling How errors are 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 in logs for troubleshooting purposes.
Cache Settings Controls caching behavior:
• Enable Cache: Whether to cache search results to improve performance.
• Cache TTL: Time-to-live for cached results in seconds (60–86400).
Enable Telemetry Whether to send anonymous usage data to help improve the node (no personal data collected).

Output

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

  • success: Boolean indicating if the search was successful.
  • query: The original search query string.
  • count: Number of results returned.
  • results: An array of video result objects (if processed results are returned).
  • result: The raw API response object (if raw results are requested).
  • requestOptions (optional): The parameters used for the search request, included if debug mode is enabled.
  • fromCache (optional): Boolean indicating if the results were retrieved from cache.
  • error (if any): Error message string if the search failed.
  • errorDetails (optional): Detailed error stack trace or message if debug mode is enabled.

Each video result object typically contains metadata about a video such as title, URL, thumbnail, duration, source, and other relevant details extracted and normalized by the node's processing logic.

The node does not output binary data.

Dependencies

  • Requires access to the DuckDuckGo search service via the duck-duck-scrape library.
  • Optionally requires an API key credential if "Use API Key" is enabled.
  • Supports caching internally to improve performance; no external cache service required.
  • Telemetry feature sends anonymous usage data to improve the node but can be disabled.
  • No additional environment variables or n8n configurations are explicitly required beyond standard credential setup.

Troubleshooting

Common Issues

  • Missing API Key: If "Use API Key" is enabled but no API key credential is provided, the node will throw an error indicating the API key is required.
  • No Results Found: Queries may return zero results if the search terms are too specific, misspelled, or filtered out by safe search settings.
  • Rate Limiting or API Errors: Network issues or API limits may cause errors; enabling debug mode helps diagnose these.
  • Cache Staleness: Cached results might be outdated if the cache TTL is set too high.

Error Messages and Resolutions

  • "API key is required when 'Use API Key' is enabled!": Provide a valid API key credential or disable API key usage.
  • "The operation \"<operation>\" is not supported!": Ensure the selected operation is valid; for video search, select "Video Search."
  • Errors related to network or API failures will include detailed messages if debug mode is enabled; check logs for specifics.
  • To handle errors gracefully, consider setting "Error Handling" to "Continue on Error."

Links and References


This summary covers the video search operation of the DuckDuckGo node, detailing its inputs, outputs, dependencies, and common troubleshooting tips based on static analysis of the provided source code and property definitions.

Discussion