Overview
This node performs searches using the DuckDuckGo search engine without relying on official APIs, instead scraping results directly. It supports multiple types of searches: general web search, image search, news search, and video search. This node is useful when you want to integrate DuckDuckGo search capabilities into your workflows for retrieving relevant information, images, news articles, or videos based on a query.
Practical examples include:
- Automatically gathering recent news articles about a topic.
- Fetching images related to a keyword for content creation.
- Searching videos for media monitoring or research.
- General web search to extract URLs and descriptions for data enrichment.
Properties
| Name | Meaning |
|---|---|
| Query | The search term or phrase to look up on DuckDuckGo. |
| Locale | The locale/language code to tailor search results (e.g., "en-us" for English - United States). |
| Safe Search | Level of safe search filtering applied to results. Options: Strict, Moderate, Off. |
Output
The output is an array of JSON objects representing individual search results. The structure depends on the selected operation:
Search (general web search):
bang: Shortcut command used in DuckDuckGo.description: Short description of the result.hostname: Hostname of the URL.icon: Icon URL associated with the site.rawDescription: Raw text description.title: Title of the result.url: URL of the result.
Search Images:
height: Image height in pixels.image: Direct URL to the image.source: Source website of the image.thumbnail: Thumbnail URL.title: Title or alt text of the image.url: URL of the page hosting the image.width: Image width in pixels.
Search News:
date: Publication date as a JavaScript Date object (or null if unavailable).excerpt: Short excerpt from the news article.image: URL of an image related to the news.isOld: Boolean indicating if the news is old.relativeTime: Relative time string (e.g., "2 hours ago").syndicate: Syndication source.title: Title of the news article.url: URL to the news article.
Search Videos:
description: Description of the video.duration: Duration of the video.image: Thumbnail image URL.published: Published timestamp or date.publishedOn: Additional published info.publisher: Publisher name.title: Video title.url: URL to the video.viewCount: Number of views.
No binary data output is produced by this node.
Dependencies
- Uses the external
duck-duck-scrapelibrary to perform scraping-based searches. - No API keys or authentication tokens are required.
- Requires internet access to perform live searches on DuckDuckGo.
Troubleshooting
Common issues:
- Network connectivity problems can cause failures in fetching search results.
- Changes in DuckDuckGo's HTML structure may break scraping, resulting in empty or incomplete results.
- Queries that are too broad or vague might return many irrelevant results.
Error messages:
- Errors during scraping will be thrown as node execution errors unless "Continue On Fail" is enabled.
- If an error includes context about the item index, it indicates which input caused the failure.
Resolutions:
- Verify internet connection.
- Adjust query terms for better specificity.
- Enable "Continue On Fail" to allow partial processing of multiple inputs.
- Update the node or dependencies if scraping breaks due to site changes.
Links and References
- DuckDuckGo Official Website
- duck-duck-scrape npm package (used internally for scraping)