DuckDuckGo Search
DuckDuckGo Search is a simple tool that lets you ask the system to look up information on the web.
You type a question or keyword, choose how many results you want, and the component returns a list of titles, short descriptions, and URLs.
If you need the full page text, you can turn on the “Fetch Content” option and the component will download the page for you.
How it Works
When you run the component, it first tries to use the ddgr
command‑line tool to get search results in JSON format.
If ddgr
isn’t available or fails, it falls back to the duckduckgo_search
Python library.
The results are parsed into a list of dictionaries that contain:
title
– the headline of the resultbody
– a short summary or abstracturl
– the link to the page
If “Fetch Content” is checked, the component opens each URL with aiohttp
and downloads the page text.
The downloaded text is added to the result as a content
field.
All of this happens asynchronously so the dashboard stays responsive.
Inputs
- Fetch Content: Choose whether the component should download the full text of each web page.
- Search Query: The words or question you want to search for.
- Max Results: The maximum number of search results to return (default is 5).
- Tool Description: A short description that explains what the tool does.
Search for recent results using DuckDuckGo with result limiting
- Tool Name: The name you want to give to the tool when it is used in other parts of the workflow.
Outputs
- Data: A list of
Data
objects that contain each search result.
Each object has the raw result dictionary and a plain‑text body that can be used directly in the workflow. - Tool: A reusable tool that can be called by other components or agents.
It performs the same search but is packaged as a callable function.
Usage Example
- Drag the DuckDuckGo Search component onto the canvas.
- In the Search Query field, type
latest AI trends 2025
. - Set Max Results to
3
to keep the list short. - Leave Fetch Content unchecked if you only need titles and URLs.
- Click Run.
- The component will output a
Data
list that you can feed into a text‑generation component to write a summary, or you can use the Tool output to let an AI agent perform the search automatically.
Related Components
- Google Search – Uses the Google Custom Search API to retrieve results.
- Bing Search – Retrieves results from Microsoft Bing.
- Web Scraper – Pulls data from a specific website rather than a search engine.
These components can be combined to create more complex information‑retrieval workflows.
Tips and Best Practices
- Keep Max Results low (e.g., 3–5) to avoid long lists and reduce network traffic.
- Enable Fetch Content only when you need the full page text; it increases load time.
- Use a descriptive Tool Name (e.g.,
duckduckgo_recent
) so it’s easy to identify in larger workflows. - If you’re running many searches, consider enabling caching in your workflow to avoid repeated queries.
Security Considerations
- The component accesses the public internet, so ensure your network allows outbound HTTP/HTTPS traffic.
- No sensitive data is sent to DuckDuckGo; however, the URLs returned could contain personal or confidential information if the query is too specific.
- Use the component in a secure environment and monitor the URLs it retrieves if you’re handling sensitive content.