← Back to Skills Marketplace
bird-frank

DuckDuckGo(API)

by bird-frank · GitHub ↗ · v0.2.0 · MIT-0
cross-platform ✓ Security Clean
338
Downloads
0
Stars
1
Active Installs
2
Versions
Install in OpenClaw
/install ddgs-search-api
Description
Use when needing to search the web in AI coding tools or OpenClaw. Uses DuckDuckGo API without API key.
README (SKILL.md)

DuckDuckGo Web Search Skill

An Agent Skill for searching web content via DuckDuckGo.

Overview

This Skill provides a command-line tool for web search using the ddgs Python package. Suitable for:

  • Real-time web information needs in AI coding tools
  • Fetching search results in OpenClaw workflows

Core Features

  • Web Search: General web search
  • News Search: Dedicated news content search
  • Multiple Output Formats: Text or JSON format
  • Flexible Configuration: Region, time limits, and safe search level
  • Proxy Support: HTTP/HTTPS/SOCKS5 proxy via CLI args or environment variables

Installation

This project uses uv as the Python package manager.

Option 1: Run with uv (Recommended)

# Run the script directly (uv will auto-install dependencies)
uv run scripts/ddgs_search.py "Python programming"

# Or navigate to the directory first
cd skills/ddgs-search
uv run scripts/ddgs_search.py "machine learning"

Option 2: Manual Dependency Installation

# Install dependencies using uv
uv pip install ddgs

# Or use pip
pip install ddgs

Quick Start

Basic Usage

# Run with uv (recommended)
uv run scripts/ddgs_search.py "Python programming"

# Limit the number of results
uv run scripts/ddgs_search.py "machine learning" --max-results 5

# Search news
uv run scripts/ddgs_search.py "tech news" --news

# JSON output (for programmatic parsing)
uv run scripts/ddgs_search.py "API documentation" --json

# Time limit (today)
uv run scripts/ddgs_search.py "breaking news" --timelimit d

Complete Parameter Reference

Parameter Short Description Default
query - Search keywords Required
--max-results -n Maximum number of results 10
--region -r Region code wt-wt
--safesearch -s Safe search (on/moderate/off) moderate
--timelimit -t Time limit (d/w/m/y) -
--backend -b Search backend (auto/html/lite) auto
--proxy -p Proxy server (http/https/socks5) -
--news - Search news -
--json -j JSON format output -
--verbose -v Show detailed information -

Proxy Configuration

Proxy settings are resolved in the following priority order:

  1. Command line: --proxy / -p
  2. Environment variable: HTTP_PROXY or http_proxy
  3. Environment variable: DDGS_PROXY

Proxy format examples:

Region Code Examples

  • wt-wt - Worldwide (default)
  • us-en - United States English
  • cn-zh - China Chinese
  • jp-jp - Japan
  • uk-en - United Kingdom

Time Limits

  • d - Past day
  • w - Past week
  • m - Past month
  • y - Past year

Usage in OpenClaw

In OpenClaw workflows, you can invoke it via the bash tool:

# Example workflow step
- name: search_web
  tool: bash
  command: cd skills/ddgs-search && uv run scripts/ddgs_search.py "{{ query }}" --json

Or using the Python tool:

# Assuming the current directory is the project root
import subprocess
import json

result = subprocess.run(
    ["uv", "run", "skills/ddgs-search/scripts/ddgs_search.py", "Python tips", "--json"],
    capture_output=True,
    text=True
)
data = json.loads(result.stdout)

Return Result Format

Web Search Results

[
  {
    "title": "Result Title",
    "href": "https://example.com/page",
    "body": "Page snippet/description..."
  }
]

News Search Results

[
  {
    "title": "News Headline",
    "href": "https://news.example.com/article",
    "body": "Article summary...",
    "date": "2024-01-15",
    "source": "News Source Name"
  }
]

Usage Examples

Example 1: Search Technical Documentation

uv run scripts/ddgs_search.py "FastAPI documentation" -n 5

Example 2: Get Latest News

uv run scripts/ddgs_search.py "artificial intelligence" --news -t d -n 3

Example 3: Chinese Search

uv run scripts/ddgs_search.py "机器学习教程" -r cn-zh -n 8

Example 4: JSON Output Processing

uv run scripts/ddgs_search.py "python tips" --json | jq '.[0].href'

Example 5: Using Proxy

# Via command line argument
uv run scripts/ddgs_search.py "query" --proxy http://1.2.3.4:8080

# Via HTTP_PROXY environment variable
export HTTP_PROXY="http://proxy.example.com:8080"
uv run scripts/ddgs_search.py "query"

# Via DDGS_PROXY environment variable
export DDGS_PROXY="socks5://127.0.0.1:9150"
uv run scripts/ddgs_search.py "query"

FAQ

uv Not Installed

# macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh

# Windows
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"

ImportError: No module named 'ddgs'

# Install using uv
uv pip install ddgs

# Or run in the script directory (uv will auto-handle)
cd skills/ddgs-search
uv run scripts/ddgs_search.py "query"

Empty Search Results

  • Check network connection
  • Try changing the --backend parameter (auto/html/lite)
  • Some regions may require a proxy (see Proxy Configuration)

Proxy Not Working

  • Verify proxy format: http://host:port or socks5://host:port
  • Check if authentication is required: http://user:pass@host:port
  • Ensure the proxy server is accessible from your network
  • Try using HTTP_PROXY environment variable instead of command line argument

Rate Limiting

DuckDuckGo has implicit rate limiting. If frequent requests fail:

  • Reduce request frequency
  • Add delays between requests
  • Use a different backend

Dependencies

  • Python 3.9+
  • uv (package manager)
  • ddgs >= 8.0.0
Usage Guidance
This skill appears to do what it says: run DuckDuckGo searches via the ddgs Python package. Before installing or running: (1) avoid running unfamiliar curl|sh installers — prefer pip install ddgs or inspect the installer at https://astral.sh if you want 'uv'; (2) be cautious if you supply a proxy URL containing credentials (HTTP_PROXY or DDGS_PROXY), since those are sensitive and could be logged or transmitted to the proxy; (3) if you need stronger isolation, run the script in a sandbox or ephemeral environment; and (4) review the ddgs package and network egress policies if you have strict security requirements.
Capability Analysis
Type: OpenClaw Skill Name: ddgs-search-api Version: 0.2.0 The skill bundle provides a legitimate command-line interface for performing DuckDuckGo searches using the 'ddgs' Python library. The code in 'scripts/ddgs_search.py' is well-structured, follows standard practices for proxy handling and argument parsing, and lacks any indicators of malicious intent, data exfiltration, or unauthorized execution.
Capability Assessment
Purpose & Capability
Name/description (DuckDuckGo web search) align with the included Python script and SKILL.md. The code uses the ddgs package to perform web and news searches and exposes the same CLI options documented in SKILL.md. No unrelated credentials, binaries, or config paths are requested.
Instruction Scope
SKILL.md instructs the agent to run the included script (uv run scripts/ddgs_search.py) and shows bash/python invocation examples; the instructions stay within the search task. The FAQ recommends installing 'uv' via a remote curl|sh installer (astral.sh), which introduces a network-download step outside the skill's code — this is an operational risk to be aware of but not evidence of malicious behavior in the skill itself.
Install Mechanism
There is no formal install spec in metadata (instruction-only + provided script). Dependencies are standard (ddgs, Python). SKILL.md recommends 'uv' and shows how to install it, including a curl|sh command that fetches code from https://astral.sh; downloading and executing remote install scripts is higher risk than using a package manager or pip, so prefer pip or verify the installer before running.
Credentials
The skill does not require any environment variables or secrets in its metadata. It optionally reads HTTP_PROXY/http_proxy/DDGS_PROXY to support proxies — reasonable given proxy support, but proxy URLs may contain credentials (user:pass@host) so those values should be treated as sensitive.
Persistence & Privilege
Skill does not request persistent/always-on presence, does not modify other skills or global agent config, and allows user invocation. It does not claim or require elevated privileges.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install ddgs-search-api
  3. After installation, invoke the skill by name or use /ddgs-search-api
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v0.2.0
- Added detailed proxy support, including configuration by command line argument or environment variables (HTTP_PROXY, DDGS_PROXY). - Updated documentation to include proxy usage instructions, priority order, and example formats (http, https, socks5). - Expanded FAQ with common proxy troubleshooting tips. - Removed pyproject.toml file from the project.
v0.1.0
- Initial public release of the ddgs-web-search skill. - Provides command-line web and news search using DuckDuckGo via the ddgs Python package. - Supports multiple output formats (text, JSON), region selection, safe search, and time limits. - Works out-of-the-box with the uv package manager; manual pip/uv install also supported. - Includes usage examples, integration instructions for OpenClaw workflows, and troubleshooting guidance.
Metadata
Slug ddgs-search-api
Version 0.2.0
License MIT-0
All-time Installs 1
Active Installs 1
Total Versions 2
Frequently Asked Questions

What is DuckDuckGo(API)?

Use when needing to search the web in AI coding tools or OpenClaw. Uses DuckDuckGo API without API key. It is an AI Agent Skill for Claude Code / OpenClaw, with 338 downloads so far.

How do I install DuckDuckGo(API)?

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

Is DuckDuckGo(API) free?

Yes, DuckDuckGo(API) is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does DuckDuckGo(API) support?

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

Who created DuckDuckGo(API)?

It is built and maintained by bird-frank (@bird-frank); the current version is v0.2.0.

💬 Comments