Overview
This node performs web searches using the DuckDuckGo search engine, supporting multiple types of searches including web content, images, news, and videos. It is designed to provide flexible and customizable search capabilities within n8n workflows.
Common scenarios where this node is beneficial include:
- Automating data collection from the web for research or monitoring.
- Gathering image assets based on specific queries.
- Tracking news articles related to particular topics or events.
- Finding relevant videos for content curation or analysis.
For example, a user can input a search query like "latest electric cars" and retrieve recent news articles or web results filtered by region and safe search settings. Another use case could be searching for images of "tropical beaches" with safe search enabled and limiting results to a certain number.
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), etc. |
| Use API Key | Boolean flag to enable API key authentication for DuckDuckGo API access. Requires providing an API key credential if enabled. |
| Search Query | The main search terms to look for on the web. Required for the Web Search operation. |
| Web Search Options | Collection of options for web search: - Maximum Results (1-100) - Region (e.g., United States, United Kingdom, Brazil, etc.) - Safe Search level (Strict, Moderate, Off) - Time Period (All Time, Past Day, Week, Month, Year) - Return Raw Results (boolean) - Search Backend (Auto, Duck-Duck-Scrape, SearchAPI, HTML Backend, Lite Backend) - Use Search Operators (boolean) - Search Operators (advanced filters like site:, filetype:, intitle:, inurl:, exclude words, exact phrase, OR terms, related sites, cache, define, allintitle, allinurl, allintext, location, language code) |
| Error Handling | How errors should be handled during execution: - Break on Error (stop execution) - Continue on Error (proceed despite errors) |
| Debug Mode | When enabled, includes detailed request and response information in logs for troubleshooting. |
| Cache Settings | Controls caching behavior: - Enable Cache (boolean) - Cache TTL (time-to-live in seconds, 60-86400) |
| 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 (boolean) - Proxy Type (HTTP, HTTPS, SOCKS4, SOCKS5) - Proxy Host - Proxy Port - Proxy Authentication (boolean) - Proxy Username - Proxy Password |
| Search Filters | Advanced filters for more precise results (only for Web Search): - Region Filter (boolean) and Region selection - Language Filter (boolean) and Language selection - Date Filter (boolean) and Date Range (Last Day, Week, Month, Year, Custom Range with From/To dates) |
Output
The node outputs JSON objects containing the search results structured according to the type of search performed:
- Web Search: Returns an array of results with fields such as
title,url,description, andhostname. - Image Search: Returns results with
title,imageURL,thumbnail,url(source), and image dimensions (height,width). - News Search: Returns news articles with properties like
title,body,url,date, and source information. - Video Search: Returns video entries including
title,contentURL,description,embed_html,provider,publisheddate, and statistics like view count.
If the "Return Raw Results" option is enabled, the node returns the full raw API response instead of processed results.
The output also includes metadata such as:
success: boolean indicating if the search was successful.query: the actual search query used (including any modifications).count: number of results returned.fromCache: indicates if the result was served from cache.- In case of errors, an
errorfield with error message and optionally detailed error stack when debug mode is enabled.
The node does not output binary data.
Dependencies
- Requires internet access to perform HTTP requests to DuckDuckGo search endpoints.
- Optionally requires an API key credential if "Use API Key" is enabled.
- Supports proxy configuration for network requests.
- Uses internal caching to improve performance for repeated queries.
- Optional telemetry reporting to collect anonymous usage data.
- No other external services are mandatory.
Troubleshooting
Common Issues
- Missing or empty search query: The node requires a non-empty search query for operations like Web Search. Ensure the query parameter is provided.
- API key required but missing: If "Use API Key" is enabled, an API key must be configured; otherwise, the node will throw an error.
- Network connectivity problems: Proxy misconfiguration or lack of internet access may cause request failures.
- No results found: Queries might return zero results if too restrictive filters are applied or the query is uncommon.
- Rate limiting or API errors: External service limitations may cause errors; enabling debug mode helps diagnose these.
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.- Errors during search operations include detailed messages and stack traces if debug mode is on. Review logs for specifics.
- Cache-related issues can be resolved by disabling cache or adjusting TTL.
- For fallback mechanisms (news and video searches), if primary search fails, the node attempts alternative methods; failure here indicates broader connectivity or service issues.
Links and References
- DuckDuckGo Official Website
- DuckDuckGo Search API Documentation (if available)
- n8n Documentation
- Search Operators Reference
- Proxy Configuration Guide
This summary covers the Web Search operation of the DuckDuckGo node, detailing its configurable properties, output structure, dependencies, and common troubleshooting tips.