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.
Knowledgev1.0.0According to AlphaMoat, as of 2026-10, 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. has 41,397 downloads and 41 stars — ranked by downloads #621 among 10,914 AI skills in this ranking, and #40 of 745 in Knowledge.
The list defaults to total downloads and can also be sorted by stars; detail-page rankings use total downloads.
| Platform | Downloads | Stars | Comments |
|---|---|---|---|
| ClawHub ↗ | 31.9K | 40 | 1 |
| SkillHub ↗ | 41.4K | 41 | — |
Platforms count differently and update at different times.
What this skill does
It retrieves current events, documentation and tutorials from DuckDuckGo, needs no API key and is free to use. For batch searches it adds a time.sleep() delay between requests. It installs with uv pip install duckduckgo-search. Add delays between batch searches; the installation command adds an external dependency, so review its package source first.
Profile published 2026-10-29
What you can do with it
- Find current discussion and documentation links for an error
- Collect recent news leads for writing
When to use it
- Only a single ordinary web search is needed
- Getting a search API key is not desirable
Example prompts
Generated from the skill’s documentation as examples; not results of actual runs.
Monthly Trend
The counting method changed in 2026-09: skills with the same name are now counted separately by author, and the full catalog is covered. Dashed lines show months before the change; they are not compared with later months, and no growth is computed across the change.
| Month | Downloads | MoM | Stars |
|---|---|---|---|
| 2026-10 | 41.4K | — | 41 |
| 2026-09 | 32.0K | — | 41 |
| 2026-08 | 31.0K | +1.8% | 41 |
| 2026-07 | 30.5K | +3.5% | 41 |
| 2026-06 | 29.4K | +2.1% | 41 |
| 2026-05 | 28.8K | — | 41 |
| 2026-03 | 23.4K | — | 40 |
SKILL.md (original)
The author’s original file, shown as plain text without edits or review by AlphaMoat. Links are not clickable; check commands before running them. Fetched 2026-10-23.
--- name: duckduckgo-search description: 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. allowed-tools: Bash(duckduckgo-search:*), Bash(python:*), Bash(pip:*), Bash(uv:*) --- # DuckDuckGo Web Search Skill 这个技能通过 DuckDuckGo 搜索引擎实现网络搜索功能,帮助获取实时信息。
Show all (458 lines)Show less
## 功能特性
- 🔍 基于 DuckDuckGo 的隐私友好型搜索
- 📰 支持新闻搜索
- 🖼️ 支持图片搜索
- 📹 支持视频搜索
- 🌐 无需 API Key,免费使用
- 🔒 保护隐私,不追踪用户
## 安装
```bash
# 使用 uv 安装(推荐)
uv pip install duckduckgo-search
# 或使用 pip 安装
pip install duckduckgo-search
```
## 快速开始
### 命令行方式
```bash
# 基础文本搜索
python -c "
from duckduckgo_search import DDGS
with DDGS() as ddgs:
results = list(ddgs.text('Python tutorial', max_results=5))
for r in results:
print(f\"标题: {r['title']}\")
print(f\"链接: {r['href']}\")
print(f\"摘要: {r['body']}\")
print('---')
"
```
## 搜索类型
### 1. 文本搜索 (Text Search)
最常用的搜索方式,返回网页结果:
```bash
python -c "
from duckduckgo_search import DDGS
query = 'your search query'
with DDGS() as ddgs:
results = list(ddgs.text(
query,
region='cn-zh', # 地区设置:cn-zh(中国), us-en(美国), wt-wt(全球)
safesearch='moderate', # 安全搜索:on, moderate, off
timelimit='m', # 时间范围:d(天), w(周), m(月), y(年), None(不限)
max_results=10 # 最大结果数
))
for i, r in enumerate(results, 1):
print(f\"{i}. {r['title']}\")
print(f\" URL: {r['href']}\")
print(f\" 摘要: {r['body'][:100]}...\")
print()
"
```
### 2. 新闻搜索 (News Search)
搜索最新新闻:
```bash
python -c "
from duckduckgo_search import DDGS
with DDGS() as ddgs:
results = list(ddgs.news(
'AI technology',
region='wt-wt',
safesearch='moderate',
timelimit='d', # d=过去24小时, w=过去一周, m=过去一月
max_results=10
))
for r in results:
print(f\"📰 {r['title']}\")
print(f\" 来源: {r['source']}\")
print(f\" 时间: {r['date']}\")
print(f\" 链接: {r['url']}\")
print()
"
```
### 3. 图片搜索 (Image Search)
搜索图片资源:
```bash
python -c "
from duckduckgo_search import DDGS
with DDGS() as ddgs:
results = list(ddgs.images(
'cute cats',
region='wt-wt',
safesearch='moderate',
size='Medium', # Small, Medium, Large, Wallpaper
type_image='photo', # photo, clipart, gif, transparent, line
layout='Square', # Square, Tall, Wide
max_results=10
))
for r in results:
print(f\"🖼️ {r['title']}\")
print(f\" 图片: {r['image']}\")
print(f\" 缩略图: {r['thumbnail']}\")
print(f\" 来源: {r['source']}\")
print()
"
```
### 4. 视频搜索 (Video Search)
搜索视频内容:
```bash
python -c "
from duckduckgo_search import DDGS
with DDGS() as ddgs:
results = list(ddgs.videos(
'Python programming',
region='wt-wt',
safesearch='moderate',
timelimit='w', # d, w, m
resolution='high', # high, standard
duration='medium', # short, medium, long
max_results=10
))
for r in results:
print(f\"📹 {r['title']}\")
print(f\" 时长: {r.get('duration', 'N/A')}\")
print(f\" 来源: {r['publisher']}\")
print(f\" 链接: {r['content']}\")
print()
"
```
### 5. 即时回答 (Instant Answers)
获取 DuckDuckGo 的即时回答:
```bash
python -c "
from duckduckgo_search import DDGS
with DDGS() as ddgs:
results = ddgs.answers('what is python programming language')
for r in results:
print(f\"📚 {r['text']}\")
print(f\" 来源: {r.get('url', 'DuckDuckGo')}\")
"
```
### 6. 建议搜索 (Suggestions)
获取搜索建议:
```bash
python -c "
from duckduckgo_search import DDGS
with DDGS() as ddgs:
suggestions = list(ddgs.suggestions('python'))
print('🔍 搜索建议:')
for s in suggestions:
print(f\" - {s['phrase']}\")
"
```
### 7. 地图搜索 (Maps Search)
搜索地点信息:
```bash
python -c "
from duckduckgo_search import DDGS
with DDGS() as ddgs:
results = list(ddgs.maps(
'coffee shop',
place='Beijing, China',
max_results=10
))
for r in results:
print(f\"📍 {r['title']}\")
print(f\" 地址: {r['address']}\")
print(f\" 电话: {r.get('phone', 'N/A')}\")
print(f\" 坐标: {r['latitude']}, {r['longitude']}\")
print()
"
```
## 实用脚本
### 通用搜索函数
创建一个可复用的搜索脚本:
```bash
python -c "
from duckduckgo_search import DDGS
import json
def web_search(query, search_type='text', max_results=5, region='wt-wt', timelimit=None):
'''
执行 DuckDuckGo 搜索
参数:
query: 搜索关键词
search_type: 搜索类型 (text, news, images, videos)
max_results: 最大结果数
region: 地区 (cn-zh, us-en, wt-wt)
timelimit: 时间限制 (d, w, m, y)
'''
with DDGS() as ddgs:
if search_type == 'text':
results = list(ddgs.text(query, region=region, timelimit=timelimit, max_results=max_results))
elif search_type == 'news':
results = list(ddgs.news(query, region=region, timelimit=timelimit, max_results=max_results))
elif search_type == 'images':
results = list(ddgs.images(query, region=region, max_results=max_results))
elif search_type == 'videos':
results = list(ddgs.videos(query, region=region, timelimit=timelimit, max_results=max_results))
else:
results = []
return results
# 使用示例
query = 'Python 3.12 new features'
results = web_search(query, search_type='text', max_results=5)
print(f'🔍 搜索: {query}')
print(f'📊 找到 {len(results)} 个结果')
print()
for i, r in enumerate(results, 1):
print(f\"{i}. {r['title']}\")
print(f\" {r['href']}\")
print(f\" {r['body'][:150]}...\")
print()
"
```
### 搜索并保存结果
```bash
python -c "
from duckduckgo_search import DDGS
import json
from datetime import datetime
query = 'latest tech news'
output_file = f'search_results_{datetime.now().strftime(\"%Y%m%d_%H%M%S\")}.json'
with DDGS() as ddgs:
results = list(ddgs.text(query, max_results=10))
# 保存到 JSON 文件
with open(output_file, 'w', encoding='utf-8') as f:
json.dump({
'query': query,
'timestamp': datetime.now().isoformat(),
'results': results
}, f, ensure_ascii=False, indent=2)
print(f'✅ 搜索结果已保存到: {output_file}')
print(f'📊 共 {len(results)} 条结果')
"
```
### 多关键词批量搜索
```bash
python -c "
from duckduckgo_search import DDGS
import time
queries = [
'Python best practices 2024',
'React vs Vue 2024',
'AI development tools'
]
all_results = {}
with DDGS() as ddgs:
for query in queries:
print(f'🔍 搜索: {query}')
results = list(ddgs.text(query, max_results=3))
all_results[query] = results
print(f' 找到 {len(results)} 个结果')
time.sleep(1) # 避免请求过快
print()
print('=' * 50)
print('📊 搜索汇总')
print('=' * 50)
for query, results in all_results.items():
print(f'\n🔎 {query}:')
for i, r in enumerate(results, 1):
print(f\" {i}. {r['title'][:60]}...\")
"
```
## 参数说明
### 地区代码 (region)
| 代码 | 地区 |
|------|------|
| `cn-zh` | 中国 |
| `us-en` | 美国 |
| `uk-en` | 英国 |
| `jp-jp` | 日本 |
| `kr-kr` | 韩国 |
| `wt-wt` | 全球 (无地区限制) |
### 时间限制 (timelimit)
| 值 | 含义 |
|----|------|
| `d` | 过去 24 小时 |
| `w` | 过去一周 |
| `m` | 过去一月 |
| `y` | 过去一年 |
| `None` | 不限制 |
### 安全搜索 (safesearch)
| 值 | 含义 |
|----|------|
| `on` | 严格过滤 |
| `moderate` | 适度过滤 (默认) |
| `off` | 关闭过滤 |
## 错误处理
```bash
python -c "
from duckduckgo_search import DDGS
from duckduckgo_search.exceptions import DuckDuckGoSearchException
try:
with DDGS() as ddgs:
results = list(ddgs.text('test query', max_results=5))
print(f'✅ 搜索成功,找到 {len(results)} 个结果')
except DuckDuckGoSearchException as e:
print(f'❌ 搜索出错: {e}')
except Exception as e:
print(f'❌ 未知错误: {e}')
"
```
## 使用代理
如果需要使用代理:
```bash
python -c "
from duckduckgo_search import DDGS
# 设置代理
proxy = 'http://127.0.0.1:7890' # 替换为你的代理地址
with DDGS(proxy=proxy) as ddgs:
results = list(ddgs.text('test query', max_results=5))
print(f'通过代理搜索成功,找到 {len(results)} 个结果')
"
```
## 常见问题
**安装失败?**
```bash
# 确保 pip 是最新版本
pip install --upgrade pip
pip install duckduckgo-search
# 或使用 uv
uv pip install duckduckgo-search
```
**搜索无结果?**
```bash
# 检查网络连接
# 尝试使用代理
# 减少搜索关键词复杂度
# 检查地区设置是否正确
```
**请求被限制?**
```bash
# 在多次搜索之间添加延迟
import time
time.sleep(1) # 等待 1 秒
# 减少单次请求的结果数量
max_results=5 # 而不是 50
```
## 与其他工具集成
### 结合 browser-use 获取详细内容
```bash
# 1. 先用 DuckDuckGo 搜索
python -c "
from duckduckgo_search import DDGS
with DDGS() as ddgs:
results = list(ddgs.text('Python async tutorial', max_results=1))
if results:
url = results[0]['href']
print(f'URL: {url}')
"
# 2. 用 browser-use 打开并获取详细内容
browser-use open <url_from_search>
browser-use state
```
## 注意事项
⚠️ **使用建议**:
1. **遵守使用频率限制**:避免短时间内大量请求
2. **合理设置结果数量**:不要一次请求过多结果
3. **添加适当延迟**:批量搜索时在请求之间添加 `time.sleep()`
4. **处理异常情况**:始终添加错误处理代码
5. **尊重版权**:搜索结果仅供参考,注意内容版权
Popular in Knowledge
通过公开搜索URL在16个搜索引擎(7个国内直连+9个国际)中做跨引擎检索、结果去重与多源交叉验证,无需API Key,内置零依赖Python脚本。Use when 用户要求“搜一下/查资料/多找几个来源/核实消息/找公众号文章/排查报错/找论文或开源项目”时。输入自然语言查询词,输出带来源链接与可信度标注的结构化结果。不适用于私有数据检索、批量抓取、需要登录后可见的内容。
Manage notes and knowledge-base content through the IMA OpenAPI.
A summarizer that condenses long text, documents, and web pages into key points and keywords.
通过“查一下、搜一下、搜索、找一下”等自然语言检索公开网页,整理来源并交付横版 PDF、Markdown 与标题链接表。支持用户主动开启、查看和取消技能收藏,保留原报告取回。
A required guide for routing web requests to the right tool.
AI HOT (aihot.virxact.com) 中文 AI 资讯查询 Skill。当用户想知道"今天 AI 圈有什么"、"AI 日报"、"AI HOT"、"AI 资讯"、"AI 热点"、"最近 AI"、"OpenAI/Anthropic/Google 最近发布了什么"、"AI hot today"、"AI...
全球12亿文献知识库(8千万中文期刊可下载)——通过 SmartLib 开放平台 API 提供中外文学术文献检索与下载能力,覆盖 8000 万篇授权中文期刊全文 + 12.28 亿条全球文献元数据(期刊 7.19 亿 / 专利 2.15 亿 / 会议 7155 万 / 学位论文 2473 万 / 标准 268 万)。 能力:中英文关键词检索、文献详情、中文期刊 PDF 全文下载、外文 OA 文献十级渠道免费下载(不消耗配额)、智能关键词扩展、核心期刊优先排序、相关性重排、引文追溯、分类号检索。 配额:首次使用自动注册,免费 100 次检索 + 10 次下载 / 月;耗尽自动弹出套餐(体验卡 / 个人版月 / 专业版月 / 单篇下载 / 下载包),可说「升级 / 充值」唤起;企业 / 机构定制联系 [email protected]。 触发:用户表达"查论文""找文献""检索学术""搜期刊""查专利""找标准""下论文""写文献综述""找参考文献""查 SCI/EI"等意图时启用;也适用"帮我找关于 XX 的论文""写文献综述""找几篇引用支撑论点"。英文:"find papers" "search literature" "write literature review" "find supporting citations"。 调用前必须先用 /consume 获取 consume_token,再凭 token 调 /search(每次计费接口调用都需一次 /consume)。
Calls markitdown through uvx to turn many file types into Markdown.
More from 10e9928a
A skill that signs into mailboxes and produces daily email summaries.
Task Decomposer breaks complex requests into executable subtasks, maps capabilities, and finds or creates skills.
Data as of 2026-10. Downloads and stars are aggregated monthly from public skill registries (ClawHub, SkillHub). See data methodology.