duckduckgo-search

Search the web via DuckDuckGo for text, news, images, and videos without an API key.

Updated May 18, 2026
One-click install
npx skills add https://github.com/ossoolli/Nexum-Core --skill duckduckgo-search-ossoolli
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: duckduckgo-search
Source: https://github.com/ossoolli/Nexum-Core/tree/main/optional-skills/research/duckduckgo-search
Command: npx skills add https://github.com/ossoolli/Nexum-Core --skill duckduckgo-search-ossoolli

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires ddgs, and includes scripts (resource) components.

What problem does it solve? It provides free web search through DuckDuckGo when built-in search tools are unavailable or no API key (such as FIRECRAWL_API_KEY) is configured, covering text, news, image, and video queries. ## Core Features & Use Cases - CLI-First Search: Runs text, news, image, and video searches through the ddgs command-line tool with region, time, and safe-search filters. - Python API Fallback: Uses the DDGS class from the ddgs Python package after verifying the package is importable in the target runtime. - Runtime Detection Flow: Distinguishes between terminal and execute_code runtimes so searches never assume a package is installed where it is not. - Use Case: When a research agent needs current AI regulation news but no search API key is set, run ddgs news -q "AI regulation" -m 5 to get dated headlines, sources, and URLs, then extract the best page with a content-retrieval tool. ## Quick Start Ask the agent to search DuckDuckGo for a topic such as "fastapi deployment guide" and return the top five result titles and URLs.

Frequently Asked Questions about duckduckgo-search

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I search the web with DuckDuckGo from the command line?▼

Install the ddgs package with pip, then run commands like `ddgs text -q "python async programming" -m 5`. The CLI also supports news, images, and videos subcommands with region, time, and JSON output flags.

How to use the ddgs Python library for web search?▼

Import DDGS from the ddgs package and call methods like ddgs.text("query", max_results=5) inside a context manager. Note that max_results is keyword-only, and you must verify the package is installed in that specific Python runtime first.

Does DuckDuckGo search require an API key?▼

No, DuckDuckGo search via the ddgs package requires no API key. This makes it a practical fallback when services like Firecrawl are unavailable because their API keys are not configured.

Why does ddgs import fail in execute_code after pip install?▼

The terminal and execute_code are separate runtimes, so installing ddgs in a shell does not make it importable in execute_code. Verify the import in the target runtime or keep using the CLI through the terminal instead.

What are the limitations of DuckDuckGo search results?▼

DuckDuckGo returns titles, URLs, and snippets rather than full page content, and may rate-limit rapid requests or block some cloud IPs. Use a content-extraction tool on result URLs and add short delays between searches.