← Back to Skills Marketplace
idkwhodatis

ddgs (DuckDuckGo Search)

by idkwhodatis · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
819
Downloads
0
Stars
13
Active Installs
1
Versions
Install in OpenClaw
/install ddgs
Description
Perform privacy-focused web searches via DDGS metasearch for webpages, news, images, videos, or books with no tracking and no API key required.
README (SKILL.md)

DDGS Web Search Skill\r

This skill implements web search functionality via the DDGS (Dux Distributed Global Search) engine, aggregating results from diverse search services to fetch real-time information.\r \r

Features\r

🔍 Privacy-friendly metasearch \r 📰 News search support \r 🖼️ Image search support \r 📹 Video search support \r 📚 Books search support \r 🌐 Free to use, no API Key required \r 🔒 Privacy protection, no user tracking \r ⚡ MCP (Model Context Protocol) and API server support \r \r

Installation\r

# Install via uv (Recommended)\r
uv pip install ddgs\r
\r
# Or install via pip\r
pip install ddgs\r
```\r
\r
## Quick Start\r
\r
### 1. Text Search\r
The most commonly used search method, returning webpage results:\r
```python\r
python -c "\r
from ddgs import DDGS\r
\r
query = 'your search query'\r
\r
results = DDGS().text(\r
    query,\r
    region='wt-wt',        # Region: cn-zh (China), us-en (US), wt-wt (Global)\r
    safesearch='moderate', # Safe search: on, moderate, off\r
    timelimit='m',         # Time range: d (day), w (week), m (month), y (year), None (unlimited)\r
    max_results=10,        # Maximum number of results\r
    backend='auto'         # Backends: auto, duckduckgo, brave, bing, etc.\r
)\r
\r
for i, r in enumerate(results, 1):\r
    print(f\"{i}. {r.get('title')}\")\r
    print(f\"   URL: {r.get('href')}\")\r
    print(f\"   Snippet: {str(r.get('body'))[:100]}...\
\")\r
"\r
```\r
\r
### 2. News Search\r
Search for the latest news:\r
```python\r
python -c "\r
from ddgs import DDGS\r
\r
results = DDGS().news(\r
    'AI technology',\r
    region='wt-wt',\r
    safesearch='moderate',\r
    timelimit='d',       # d=past 24 hours, w=past week, m=past month\r
    max_results=10\r
)\r
\r
for r in results:\r
    print(f\"📰 {r.get('title')}\")\r
    print(f\"   Source: {r.get('source')}\")\r
    print(f\"   Date: {r.get('date')}\")\r
    print(f\"   Link: {r.get('url')}\
\")\r
"\r
```\r
\r
### 3. Image Search\r
Search for image resources:\r
```python\r
python -c "\r
from ddgs import DDGS\r
\r
results = DDGS().images(\r
    'cute cats',\r
    region='wt-wt',\r
    safesearch='moderate',\r
    size='Medium',       # Small, Medium, Large, Wallpaper\r
    type_image='photo',  # photo, clipart, gif, transparent, line\r
    layout='Square',     # Square, Tall, Wide\r
    max_results=10\r
)\r
\r
for r in results:\r
    print(f\"🖼️ {r.get('title')}\")\r
    print(f\"   Image: {r.get('image')}\")\r
    print(f\"   Thumbnail: {r.get('thumbnail')}\")\r
    print(f\"   Source: {r.get('source')}\
\")\r
"\r
```\r
\r
### 4. Video Search\r
Search for video content:\r
```python\r
python -c "\r
from ddgs import DDGS\r
\r
results = DDGS().videos(\r
    'Python programming',\r
    region='wt-wt',\r
    safesearch='moderate',\r
    timelimit='w',       # d, w, m\r
    resolution='high',   # high, standard\r
    duration='medium',   # short, medium, long\r
    max_results=10\r
)\r
\r
for r in results:\r
    print(f\"📹 {r.get('title')}\")\r
    print(f\"   Duration: {r.get('duration', 'N/A')}\")\r
    print(f\"   Publisher: {r.get('publisher')}\")\r
    print(f\"   Link: {r.get('content')}\
\")\r
"\r
```\r
\r
### 5. Books Search\r
Search for books:\r
```python\r
python -c "\r
from ddgs import DDGS\r
\r
results = DDGS().books(\r
    'sea wolf jack london',\r
    max_results=5\r
)\r
\r
for r in results:\r
    print(f\"📚 {r.get('title')}\")\r
    print(f\"   Author: {r.get('author')}\")\r
    print(f\"   Publisher: {r.get('publisher')}\")\r
    print(f\"   Link: {r.get('link')}\
\")\r
"\r
```\r
\r
## Practical Scripts\r
\r
### Reusable Search Function\r
```python\r
python -c "\r
from ddgs import DDGS\r
\r
def web_search(query, search_type='text', max_results=5, region='wt-wt', timelimit=None):\r
    '''\r
    Execute DDGS search\r
    \r
    Args:\r
        query: Search keyword\r
        search_type: text, news, images, videos, books\r
        max_results: Maximum results\r
        region: Region (cn-zh, us-en, wt-wt)\r
        timelimit: Time limit (d, w, m, y)\r
    '''\r
    ddgs = DDGS()\r
    if search_type == 'text':\r
        return list(ddgs.text(query, region=region, timelimit=timelimit, max_results=max_results))\r
    elif search_type == 'news':\r
        return list(ddgs.news(query, region=region, timelimit=timelimit, max_results=max_results))\r
    elif search_type == 'images':\r
        return list(ddgs.images(query, region=region, max_results=max_results))\r
    elif search_type == 'videos':\r
        return list(ddgs.videos(query, region=region, timelimit=timelimit, max_results=max_results))\r
    elif search_type == 'books':\r
        return list(ddgs.books(query, max_results=max_results))\r
    return []\r
\r
results = web_search('Python 3.12 new features', max_results=5)\r
print(f'📊 Found {len(results)} results')\r
"\r
```\r
\r
## Parameters Explained\r
\r
### Region Codes (region)\r
| Code | Region |\r
|---|---|\r
| cn-zh | China |\r
| us-en | United States |\r
| uk-en | United Kingdom |\r
| jp-jp | Japan |\r
| kr-kr | South Korea |\r
| wt-wt | Global (No region limit) |\r
\r
### Time Limit (timelimit)\r
| Value | Meaning |\r
|---|---|\r
| d | Past 24 hours |\r
| w | Past week |\r
| m | Past month |\r
| y | Past year |\r
| None | No limit |\r
\r
### Safe Search (safesearch)\r
| Value | Meaning |\r
|---|---|\r
| on | Strict filtering |\r
| moderate | Moderate filtering (Default) |\r
| off | Filtering disabled |\r
\r
## Error Handling & Proxies\r
\r
### Basic Error Handling\r
```python\r
python -c "\r
from ddgs import DDGS\r
from ddgs.exceptions import DDGSException\r
\r
try:\r
    results = DDGS().text('test query', max_results=5)\r
    print(f'✅ Search successful, found {len(results)} results')\r
except DDGSException as e:\r
    print(f'❌ Search error: {e}')\r
except Exception as e:\r
    print(f'❌ Unknown error: {e}')\r
"\r
```\r
\r
### Using Proxies\r
```python\r
python -c "\r
from ddgs import DDGS\r
\r
# Set proxy (supports http/https/socks5)\r
proxy = 'http://127.0.0.1:7890'  \r
\r
results = DDGS(proxy=proxy).text('test query', max_results=5)\r
print(f'Successfully searched via proxy, found {len(results)} results')\r
"\r
```\r
\r
## FAQ\r
\r
**Installation Failed?**\r
```bash\r
pip install --upgrade pip\r
pip install ddgs\r
```\r
\r
**No Results Found?**\r
- Check your network connection.\r
- Try using a proxy.\r
- Simplify your search query.\r
- Verify that your region settings are correct.\r
\r
**Rate Limited?**\r
- Add a delay between multiple requests (e.g., `import time; time.sleep(1)`).\r
- Reduce the `max_results` per request.\r
\r
## Integration & Notes\r
\r
### Integration Example\r
```python\r
# 1. Search with DDGS\r
python -c "\r
from ddgs import DDGS\r
results = DDGS().text('Python async tutorial', max_results=1)\r
if results:\r
    print(f\"URL: {results[0].get('href')}\")\r
"\r
\r
# 2. Open result with your browser-use tool\r
browser-use open \x3Curl_from_search>\r
```\r
\r
**⚠️ Best Practices:**\r
- **Respect Rate Limits:** Avoid sending a massive volume of requests in a short period.\r
- **Optimize Results:** Do not request more results than necessary in a single query.\r
- **Add Delays:** Use `time.sleep()` when executing batch searches.\r
- **Handle Exceptions:** Always wrap your API calls in `try/except` blocks.\r
- **Copyright Awareness:** Search results are for reference only; respect the copyright of the indexed content.
Usage Guidance
This skill is internally consistent (it simply documents how to use a Python ddgs package), but the package provenance is missing: there is no homepage/source and the registry metadata gives an opaque owner id. Before installing or running this skill, do the following: 1) Verify the PyPI package 'ddgs' (or the intended package) and its publisher—inspect the package page, homepage, and source repository; 2) Audit the package code and setup scripts for install-time actions (setup.py/pyproject hooks) and for network/call-home behavior; 3) Prefer running it in an isolated environment (container or sandbox) or ask the skill author to include an explicit install spec pointing to a verified release; 4) Avoid running the suggested pip install commands on sensitive hosts; 5) Clarify what 'uv' means in the install instructions and verify the 'MCP/API server support' details. If you cannot validate the package source and contents, treat this skill as untrusted.
Capability Analysis
Type: OpenClaw Skill Name: ddgs Version: 1.0.0 The OpenClaw AgentSkills bundle for 'ddgs' is classified as benign. The skill's purpose is to provide web search functionality via the `ddgs` Python library, which is a legitimate tool for DuckDuckGo search. All code examples in `SKILL.md` demonstrate standard usage of this library, including installation via `pip`, various search types, error handling, and proxy configuration (using a local proxy `127.0.0.1:7890`). There is no evidence of malicious intent such as data exfiltration, unauthorized command execution, persistence mechanisms, or prompt injection attempts against the agent. The instructions and code are aligned with the stated purpose and include best practices for responsible use.
Capability Assessment
Purpose & Capability
Name/description match the SKILL.md examples: all examples call a Python package named 'ddgs' to perform searches without API keys. No unrelated credentials, binaries, or config paths are requested.
Instruction Scope
SKILL.md stays within the expected scope (showing text/news/images/videos/books searches, proxy usage, and error handling). However, it instructs installing and running a third-party Python package (via 'pip install ddgs' and 'uv pip install ddgs') which will execute code outside the agent unless the package provenance is verified. The doc mentions 'MCP and API server support' without describing endpoints or auth, which is vague.
Install Mechanism
There is no formal install spec in the skill bundle; instead SKILL.md recommends installing from PyPI (pip). Installing packages at runtime pulls code from a public registry and can execute install-time code (moderate risk). The 'uv pip install ddgs' line references an uncommon wrapper ('uv') and may be a typo or platform-specific tool — lack of clear, auditable install instructions and absent homepage/source increases risk.
Credentials
The skill does not request environment variables, credentials, or config paths. Examples accept an optional proxy string but do not read secrets or other environment state, which is proportional to a search wrapper.
Persistence & Privilege
always is false and the skill does not request persistent system-wide changes. There is no code in the bundle that would alter other skills or agent configuration. Autonomous invocation is enabled (platform default) but not combined with other high-risk factors.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install ddgs
  3. After installation, invoke the skill by name or use /ddgs
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
DDGS Web Search Skill 1.0.0 - Initial release of the DDGS web search skill, enabling real-time, privacy-friendly search across text, news, images, videos, and books. - Provides region, safesearch, and timelimit parameters for flexible querying. - Supports MCP and API server integration. - No API key required; no user tracking. - Includes practical code examples for all search features, reusable functions, and error handling. - Documentation covers region codes, search parameters, proxy usage, and troubleshooting tips.
Metadata
Slug ddgs
Version 1.0.0
License
All-time Installs 13
Active Installs 13
Total Versions 1
Frequently Asked Questions

What is ddgs (DuckDuckGo Search)?

Perform privacy-focused web searches via DDGS metasearch for webpages, news, images, videos, or books with no tracking and no API key required. It is an AI Agent Skill for Claude Code / OpenClaw, with 819 downloads so far.

How do I install ddgs (DuckDuckGo Search)?

Run "/install ddgs" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is ddgs (DuckDuckGo Search) free?

Yes, ddgs (DuckDuckGo Search) is completely free (open-source). You can download, install and use it at no cost.

Which platforms does ddgs (DuckDuckGo Search) support?

ddgs (DuckDuckGo Search) is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created ddgs (DuckDuckGo Search)?

It is built and maintained by idkwhodatis (@idkwhodatis); the current version is v1.0.0.

💬 Comments