duckduckgo-search
DuckDuckGo web search for private tracker-free searching. Use when user asks to search the web find information online or perform web-based research without tracking. Ideal for web search queries finding online information research without tracking quick fact verification and URL discovery.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/omprasad122007-rgb/ddg-search-privacyDuckDuckGo Web Search
Private web search using DuckDuckGo API for tracker-free information retrieval.
Core Features
- Privacy-focused search (no tracking)
- Instant answer support
- Multiple search modes (web, images, videos, news)
- JSON output for easy parsing
- No API key required
Quick Start
Basic Web Search
import requests
def search_duckduckgo(query, max_results=10):
"""
Perform DuckDuckGo search and return results.
Args:
query: Search query string
max_results: Maximum number of results to return (default: 10)
Returns:
List of search results with title, url, description
"""
url = "https://api.duckduckgo.com/"
params = {
"q": query,
"format": "json",
"no_html": 1,
"skip_disambig": 0
}
response = requests.get(url, params=params)
data = response.json()
# Extract results
results = []
# Abstract (instant answer)
if data.get("Abstract"):
results.append({
"type": "instant_answer",
"title": "Instant Answer",
"content": data["Abstract"],
"source": data.get("AbstractSource", "DuckDuckGo")
})
# Related topics
if data.get("RelatedTopics"):
for topic in data["RelatedTopics"][:max_results]:
if isinstance(topic, dict) and topic.get("Text"):
results.append({
"type": "related",
"title": topic.get("FirstURL", "").split("/")[-1].replace("-", " ").title(),
"content": topic["Text"],
"url": topic.get("FirstURL", "")
})
return results[:max_results]
Advanced Usage (HTML Scraping)
from bs4 import BeautifulSoup
import requests
def search_with_results(query, max_results=10):
"""
Perform DuckDuckGo search and scrape actual results.
Args:
query: Search query string
max_results: Maximum number of results to return
Returns:
List of search results with title, url, snippet
"""
url = "https://duckduckgo.com/html/"
params = {"q": query}
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36"
}
response = requests.post(url, data=params, headers=headers)
soup = BeautifulSoup(response.text, "html.parser")
results = []
for result in soup.find_all("a", class_="result__a", href=True)[:max_results]:
results.append({
"title": result.get_text(),
"url": result["href"],
"snippet": result.find_parent("div", class_="result__body").get_text().strip()
})
return results
Search Operators
DuckDuckGo supports standard search operators:
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-omprasad122007-rgb-ddg-search-privacy": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
lite-sqlite
Fast lightweight local SQLite database for OpenClaw agents with minimal RAM and storage usage. Use when creating or managing SQLite databases for storing agent data efficiently. Ideal for local data persistence quick agent data storage low-memory databases small-scale applications and agent memo and caching storage.
duckduckgo-search
Performs web searches using DuckDuckGo to retrieve real-time information from the internet. Use when the user needs to search for current events, documentation, tutorials, or any information that requires web search capabilities.