Overview
This node performs news article searches using the DuckDuckGo search engine. It allows users to query for recent or historical news articles based on keywords, with options to filter by region, safe search level, and time period. The node is useful for gathering current events, monitoring news trends, or researching past news coverage.
Typical use cases include:
- Fetching the latest news articles about a specific topic or event.
- Filtering news results by geographic region or language.
- Limiting results to a certain time frame (e.g., past day, week, month).
- Integrating news search results into workflows for content aggregation, sentiment analysis, or alerting.
Properties
| Name | Meaning |
|---|---|
| Locale | Specify the search language/region locale. Options include English (US), English (UK), Spanish, French, German, Italian, Japanese, Russian, Chinese, Portuguese (Brazil), Dutch, Polish, Swedish, Korean, Turkish, Arabic, Hebrew, Persian. Default: English (US). |
| Use API Key | Whether to use API key authentication for DuckDuckGo API access (boolean). |
| News Search Query | The search terms to find news articles for (string, required). |
| News Search Options | Collection of options to customize the news search: |
| - Maximum Results | Maximum number of news articles to return (number, 1-100, default 10). |
| - Region | The region to target for news. Options include Argentina, Australia, Austria, Belgium (Dutch/French), Brazil, Bulgaria, Canada (English/French), Czech Republic, Denmark, Estonia, Finland, France, Germany, Greece, Hong Kong, Hungary, India (English), Ireland, Israel (English), Italy, Japan, Korea, Latvia, Lithuania, Mexico, Netherlands, New Zealand, Norway, Poland, Portugal, Romania, Russia, Singapore, Slovakia, Slovenia, Spain, Sweden, Switzerland (French/German), Taiwan, United Kingdom, United States (English/Spanish), Vietnam, Worldwide. Default: Worldwide. |
| - Safe Search | Content filtering level for news articles. Options: Strict (filter explicit content), Moderate (default), Off (no filtering). Default: Moderate. |
| - Time Period | Time range for news articles. Options: All Time (no restriction), Past Day (last 24 hours), Past Week (last 7 days), Past Month (last 30 days), Past Year (last 365 days). Default: Past Week. |
| - Return Raw Results | Whether to return the raw API response instead of processed results (boolean). |
| Error Handling | How errors should be handled: Break on Error (stop execution) or Continue on Error (continue execution). Default: Continue on Error. |
| Debug Mode | When enabled, includes detailed request and response information for troubleshooting (boolean). |
| Cache Settings | Collection to configure caching of search results: |
| - Enable Cache | Whether to cache search results to improve performance for repeated queries (boolean). Default: true. |
| - Cache TTL | Time in seconds to keep results in cache (Time-To-Live). Range: 60 to 86400 seconds. Default: 300. |
| Enable Telemetry | Whether to send anonymous usage data to help improve the node (no personal data collected) (boolean). |
| Proxy Settings | Collection to configure proxy for all requests: |
| - Use Proxy | Whether to use a proxy for requests (boolean). |
| - Proxy Type | Type of proxy to use: HTTP, HTTPS, SOCKS4, SOCKS5. |
| - Proxy Host | Hostname or IP address of the proxy server (string). |
| - Proxy Port | Port number of the proxy server (number). |
| - Proxy Authentication | Whether the proxy requires authentication (boolean). |
| - Proxy Username | Username for proxy authentication (string). |
| - Proxy Password | Password for proxy authentication (string, password type). |
Output
The node outputs an array of JSON objects, each representing a news search result or status:
success: Boolean indicating if the search was successful.query: The original search query string.count: Number of news articles returned (0 if none).results: Array of news article objects when processed output is returned. Each article typically contains fields like title, body/description, URL, date, source, and possibly image.result: The raw API response object if "Return Raw Results" is enabled.error: Error message string if the search failed.errorDetails: Detailed error stack trace or message (only if debug mode is enabled).requestOptions: The parameters used for the search request (only if debug mode is enabled).fromCache: Boolean indicating if the results were served from cache.fallbackUsed: Boolean indicating if a fallback search method was used due to primary search failure.
No binary data output is produced by this node.
Dependencies
- Requires internet access to DuckDuckGo's news search API endpoints.
- Optionally requires an API key credential if "Use API Key" is enabled.
- Supports proxy configuration for network requests.
- Uses internal caching mechanism configurable via node properties.
- Optional telemetry reporting to improve the node (anonymous usage data).
Troubleshooting
Common Issues
- Missing or empty search query: The node requires a non-empty search query string; otherwise, it throws an error.
- API key required but not provided: If "Use API Key" is enabled but no API key credential is configured, the node will throw an error.
- Network or connectivity issues: Failures to reach DuckDuckGo services may cause errors; verify network and proxy settings.
- Rate limiting or API restrictions: Excessive requests might be throttled; enabling caching can reduce repeated calls.
- Invalid parameter values: Providing unsupported regions, time periods, or other options may cause errors.
Error Messages and Resolution
"API key is required when 'Use API Key' is enabled!"— Provide a valid API key credential or disable API key usage."Query is required for search operation"— Ensure the news search query input is not empty.- Errors related to network or HTTP failures will include details if debug mode is enabled; check logs for specifics.
- Fallback search attempts are made automatically on primary search failure; if both fail, the node returns an error result.
- To handle errors gracefully, set "Error Handling" to "Continue on Error" to avoid workflow interruption.
Links and References
- DuckDuckGo Official Website
- DuckDuckGo News Search Documentation (if available)
- n8n Documentation
- Proxy Configuration Guide
- Caching Concepts in n8n
This summary covers the "News Search" operation of the DuckDuckGo node, describing its inputs, outputs, dependencies, and common troubleshooting tips based on static code analysis.