duckduckgo-search

Search web, news, images, and videos via DuckDuckGo using the ddgs CLI or Python API.

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

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 (for example when FIRECRAWL_API_KEY is not set), you still need a way to run web, news, image, and video searches. This Skill provides a free, keyless search path through DuckDuckGo via the ddgs package. ## Core Features & Use Cases - Keyless Search: Run text, news, image, and video searches through DuckDuckGo without any API key, using either the ddgs CLI or its Python API. - Runtime Detection Flow: Check whether the ddgs CLI is installed before choosing between terminal commands and Python imports, avoiding ModuleNotFoundError surprises. - Search-then-Extract Workflow: Get titles, URLs, and snippets from search results, then hand off the best URL to web_extract or browser tools for full page content. - Use Case: You need current news on AI regulation but have no search API key configured. Run ddgs news -q "AI regulation" -m 5 in the terminal to get dated headlines with sources, then extract the most relevant article. ## Quick Start Ask the agent to search DuckDuckGo for a topic, for example: "Search DuckDuckGo for the latest FastAPI deployment guides and summarize the top three 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 without an API key in Python?▼

Use the ddgs package, which queries DuckDuckGo without credentials. Install it with pip install ddgs, then call ddgs.text("query", max_results=5) inside a DDGS context manager to get titles, URLs, and snippets.

How to use the ddgs CLI for DuckDuckGo search?▼

Run ddgs text -q "your query" -m 5 in the terminal after installing with pip install ddgs. The CLI also supports news, images, and videos subcommands, plus flags for region, time limit, and JSON output.

ddgs vs duckduckgo-search Python package, which should I install?▼

Install ddgs, which is the current package name; duckduckgo-search is the previous name. Use pip install ddgs and import with from ddgs import DDGS.

Why does ddgs.text() raise an error when passing max results positionally?▼

The max_results parameter is keyword-only in ddgs, so ddgs.text("query", 5) raises an error. Always pass it as ddgs.text("query", max_results=5).

Why does ddgs work in terminal but fail to import in execute_code?▼

Terminal and execute_code are separate Python runtimes, so installing ddgs in a shell does not make it importable elsewhere. Verify the import in the target runtime or keep using the CLI path.

What are the limitations of DuckDuckGo search via ddgs?▼

ddgs returns titles, URLs, and snippets rather than full page content, and DuckDuckGo may rate-limit rapid requests or block some cloud IPs. Use web_extract or browser tools for full articles and retry after a short delay on empty results.