ddg-search
通过 web_fetch 使用 DuckDuckGo Lite 进行无需 API 密钥的 Web 搜索。当 web_search 因 Missing_brave_api_key 错误而失败时,或者当您需要搜索 Web 并且未配置搜索 API 时,可用作后备。提供研究查询的标题、URL 和片段。零依赖性——仅适用于内置的 web_fetch 工具。
安装 / 下载方式
TotalClaw CLI推荐
totalclaw install totalclaw:totalclaw~jakelin-ddg-web-searchcURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/totalclaw%3Atotalclaw~jakelin-ddg-web-search/file -o jakelin-ddg-web-search.md# DuckDuckGo Search via web_fetch Search the web using DuckDuckGo Lite's HTML interface, parsed via `web_fetch`. No API key or package install required. ## How to Search ``` web_fetch(url="https://lite.duckduckgo.com/lite/?q=QUERY", extractMode="text", maxChars=8000) ``` - URL-encode the query — use `+` for spaces - Use `extractMode="text"` (not markdown) for clean results - Increase `maxChars` for more results ## Region Filtering Append `&kl=REGION` for regional results: - `au-en` — Australia - `us-en` — United States - `uk-en` — United Kingdom - `de-de` — Germany - `fr-fr` — France Full list: https://duckduckgo.com/params ### Example — Australian search ``` web_fetch(url="https://lite.duckduckgo.com/lite/?q=best+coffee+melbourne&kl=au-en", extractMode="text", maxChars=8000) ``` ## Reading Results Results appear as numbered items with title, snippet, and URL. Skip entries marked "Sponsored link" (ads) — organic results follow. ## Search-then-Fetch Pattern 1. **Search** — query DDG Lite for a list of results 2. **Pick** — identify the most relevant URLs 3. **Fetch** — use `web_fetch` on those URLs to read full content ## Tips - First 1-2 results may be ads — skip to organic results - For exact phrases, wrap in quotes: `q=%22exact+phrase%22` - Add specific terms to narrow results (site name, year, location) ## Limitations - No time/date filtering (DDG Lite doesn't support `&df=` reliably via fetch) - Text results only — no images or videos - Results sourced from Bing (may differ from Google) - Google search does NOT work via web_fetch (captcha blocked) --- ## 中文说明 # 通过 web_fetch 使用 DuckDuckGo 搜索 使用 DuckDuckGo Lite 的 HTML 界面搜索 Web,并通过 `web_fetch` 解析。无需 API 密钥或安装软件包。 ## 如何搜索 ``` web_fetch(url="https://lite.duckduckgo.com/lite/?q=QUERY", extractMode="text", maxChars=8000) ``` - 对查询进行 URL 编码 —— 用 `+` 表示空格 - 使用 `extractMode="text"`(而非 markdown)以获得干净的结果 - 增大 `maxChars` 以获取更多结果 ## 地区过滤 追加 `&kl=REGION` 以获取特定地区的结果: - `au-en` —— 澳大利亚 - `us-en` —— 美国 - `uk-en` —— 英国 - `de-de` —— 德国 - `fr-fr` —— 法国 完整列表:https://duckduckgo.com/params ### 示例 —— 澳大利亚搜索 ``` web_fetch(url="https://lite.duckduckgo.com/lite/?q=best+coffee+melbourne&kl=au-en", extractMode="text", maxChars=8000) ``` ## 阅读结果 结果以带编号的条目形式出现,包含标题、片段和 URL。跳过标记为 "Sponsored link"(广告)的条目 —— 自然结果紧随其后。 ## 先搜索后抓取模式 1. **搜索** —— 向 DDG Lite 查询一组结果 2. **挑选** —— 确定最相关的 URL 3. **抓取** —— 对这些 URL 使用 `web_fetch` 以读取完整内容 ## 小贴士 - 前 1-2 个结果可能是广告 —— 跳过到自然结果 - 对于精确短语,用引号包裹:`q=%22exact+phrase%22` - 添加特定词语以缩小结果范围(网站名称、年份、地点) ## 局限性 - 无时间/日期过滤(DDG Lite 通过 fetch 无法可靠地支持 `&df=`) - 仅文本结果 —— 无图片或视频 - 结果来源于 Bing(可能与 Google 不同) - Google 搜索无法通过 web_fetch 使用(被验证码拦截)