duckduckgo-search

Search the web via DuckDuckGo using the ddgs CLI or Python library without an API key.

Updated Jul 7, 2026
One-click install
npx skills add https://github.com/episvr/USTB-2026-SummerInternship --skill duckduckgo-search-episvr
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: duckduckgo-search
Source: https://github.com/episvr/USTB-2026-SummerInternship/tree/main/hermes-config/optional-skills/research/duckduckgo-search
Command: npx skills add https://github.com/episvr/USTB-2026-SummerInternship --skill duckduckgo-search-episvr

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Built-in web search tools often require API keys or paid services. This Skill provides free web search through DuckDuckGo, covering text, news, images, and videos, with no API key required. ## Core Features & Use Cases - CLI and Python Search: Run text, news, image, and video searches through the ddgs CLI or the Python DDGS class after verifying installation. - Runtime Detection: Guides you to check whether the ddgs CLI exists before choosing between terminal commands and Python imports, since terminal and code-execution runtimes are separate. - Search-then-Extract Workflow: Returns titles, URLs, and snippets, then pairs with extraction tools to retrieve full page content. - Use Case: When web_search is unavailable because no API key is configured, run ddgs text -q "fastapi deployment guide" -m 3 to get relevant URLs, then extract the best result for full content. ## Quick Start Ask the assistant to search DuckDuckGo for a topic such as "latest AI regulation news" and return the top five results with titles and links.

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 "your query" -m 5` for text results. Subcommands for news, images, and videos follow the same flag pattern, and `-o json` gives parseable output.

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

Import DDGS from the ddgs package and call methods like text, news, images, or videos inside a context manager. Always pass max_results as a keyword argument, since positional usage raises an error on all methods.

Does DuckDuckGo search require an API key?▼

No, DuckDuckGo search through the ddgs package requires no API key or account. 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 code-execution environments are separate runtimes, so installing ddgs in a shell does not make it importable elsewhere. Verify the package in the exact runtime you plan to use before importing DDGS.

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 extraction tools or curl for full articles, and retry with delays when results come back empty.