duckduckgo-search

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

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? When built-in web search tools are unavailable or require API keys you do not have, you still need a way to run web searches. This Skill provides free DuckDuckGo search across text, news, images, and videos with no API key required. ## Core Features & Use Cases - CLI-First Search: Runs text, news, image, and video queries through the ddgs command-line tool with region, time, and safe-search filters. - Python API Fallback: Uses the DDGS Python class only after verifying the ddgs package is importable in that specific runtime, avoiding false assumptions about preinstalled packages. - Search-then-Extract Workflow: Returns titles, URLs, and snippets, then hands off to extraction tools like web_extract or curl for full page content. - Use Case: You need current news about AI regulation but have no Firecrawl API key. Run ddgs news -q "AI regulation" -m 5 to get dated headlines with sources, then extract the most relevant article. ## Quick Start Ask the assistant to search DuckDuckGo for a topic, for example: "Search DuckDuckGo for the latest news on AI regulation and show me the top five results."

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 install ddgs, then run commands like ddgs text -q "your query" -m 5. The CLI supports text, news, images, and videos subcommands with flags for region, time range, and JSON output.

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 must be passed as a keyword argument, and the package must be installed in that specific Python runtime first.

Does DuckDuckGo search require an API key?▼

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

Why does ddgs return empty results or fail to import?▼

Empty results usually indicate rate limiting, so wait a few seconds and retry or adjust the query. A ModuleNotFoundError means the ddgs package is not installed in that Python runtime, since terminal and execute_code environments are separate.

Can DuckDuckGo search extract full page content?▼

No, ddgs returns only titles, URLs, and snippets, not full page content. To get complete articles, search first and then pass the best URL to an extraction tool such as web_extract, a browser tool, or curl.