一键导入
duckduckgo-search
Search the web using DuckDuckGo. No API key required. Supports instant answers and HTML scraping modes. Privacy-focused search alternative.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Search the web using DuckDuckGo. No API key required. Supports instant answers and HTML scraping modes. Privacy-focused search alternative.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Drive a headed Chromium via the agent-browser CLI — open/click/type/hover/scroll/screenshot/snapshot/eval/pdf/network-route. Use this for any web interaction; no native browser tool is exposed.
Search, install, and verify Debian or Ubuntu packages with apt-get in the container.
Control the Linux desktop GUI using xdotool, wmctrl, dogtail, and scrot. Provides a window list, an accessibility-tree viewer (with coordinates) for finding buttons and text fields, a thin xdotool wrapper for actuating them, and a launcher helper that enables accessibility for Electron/Chromium apps.
This skill should be used when users need to search the web for information, find current content, look up news articles, search for images, or find videos. It uses DuckDuckGo's search API to return results in clean, formatted output (text, markdown, or JSON). Use for research, fact-checking, finding recent information, or gathering web resources.
Placeholder task skill.
Extract text from images using Tesseract.js OCR (100% local, no API key required). Supports Chinese (simplified/traditional) and English.
| name | duckduckgo-search |
| description | Search the web using DuckDuckGo. No API key required. Supports instant answers and HTML scraping modes. Privacy-focused search alternative. |
| homepage | https://duckduckgo.com |
| metadata | {"openclaw":{"emoji":"🦆","requires":{"bins":["python3"]}}} |
使用 DuckDuckGo 进行隐私保护的网页搜索,无需 API Key。
python3 scripts/duckduckgo_search.py "搜索关键词"
python3 scripts/duckduckgo_search.py "Python 教程" -n 10
# Instant 模式(快速,适合事实性问题)
python3 scripts/duckduckgo_search.py "Python 是什么" --mode instant
# HTML 模式(完整搜索结果)
python3 scripts/duckduckgo_search.py "Python 教程" --mode html
python3 scripts/duckduckgo_search.py "伊朗局势" --summarize
python3 scripts/duckduckgo_search.py "API" --json
| 参数 | 说明 | 默认值 |
|---|---|---|
query | 搜索关键词(必需) | - |
-n, --top-k | 返回结果数量 | 5 |
--mode | 搜索模式:instant / html | html |
--fetch-content | 抓取网页内容(仅 html) | false |
--summarize | 生成关键信息总结 | false |
--json | 输出原始 JSON | false |
| 模式 | 优点 | 缺点 | 适用场景 |
|---|---|---|---|
| Instant | 快速、稳定 | 结果有限 | 事实性问题、定义查询 |
| HTML | 完整搜索结果 | 可能被反爬 | 一般搜索、需要多个结果 |
python3 scripts/duckduckgo_search.py "Python 编程语言"
输出:
🔍 DuckDuckGo 搜索结果 (3 条)
============================================================
1. Python (programming language) - Wikipedia
🔗 https://en.wikipedia.org/wiki/Python_(programming_language)
📝 Python is a high-level, general-purpose programming language...
📊 来源:instant
2. Python.org
🔗 https://www.python.org/
📝 The official home of the Python Programming Language...
📊 来源:instant
python3 scripts/duckduckgo_search.py "Python 入门教程" --mode html -n 10
🔍 DuckDuckGo 搜索结果 (5 条)
============================================================
1. 标题
🔗 https://example.com
📝 内容摘要...
📊 来源:instant/html
[
{
"title": "标题",
"url": "https://example.com",
"snippet": "摘要",
"source": "instant",
"type": "abstract"
}
]
搜一下 Python 教程
exec("python3 skills/duckduckgo-search/scripts/duckduckgo_search.py '关键词' -n 5")
| 特性 | DuckDuckGo | Tavily |
|---|---|---|
| API Key | 不需要 | 需要 |
| 成本 | 免费 | 免费额度 + 付费 |
| 结果质量 | 一般 | 优秀(AI 总结) |
| 稳定性 | 一般 | 高 |
| 适用场景 | 轻量搜索 | 生产环境 |
建议:
原因:Instant API 没有相关答案
解决:切换到 HTML 模式
python3 scripts/duckduckgo_search.py "关键词" --mode html
原因:被 DuckDuckGo 限制
解决:
原因:DuckDuckGo 重定向链接未正确解析
解决:检查 extract_real_url() 函数
# 事实性问题(Instant 模式)
python3 scripts/duckduckgo_search.py "Python 是谁创造的"
# 教程搜索(HTML 模式)
python3 scripts/duckduckgo_search.py "Python 入门教程" --mode html -n 10
# 技术文档
python3 scripts/duckduckgo_search.py "Python requests 库用法" --mode html
# 获取 JSON 用于程序处理
python3 scripts/duckduckgo_search.py "API" --json
基于 DuckDuckGo 公开端点,仅供学习使用。生产环境建议使用官方 API。