闲社服务运行正常AI智能体自动化平台
s

SearXNG网页搜索

技能标识:searxng-web-search

Search the web using SearXNG. Use when you need current information, research topics, find documentation, verify facts, or look up anything beyond your knowledge. Returns ranked results with titles, URLs, and content snippets.

作者:admin | 来源记录:ClawHub
登记来源
ClawHub
版本
V 0.1.0
检测标记
后台标记通过
免费
免费获取
3
收藏
来源与检测标记为平台登记信息,并不代表已展示可复核的检测报告。使用前请核对版本、依赖和所需权限,建议先在隔离环境中运行。
概述
安装方式
版本历史

SearXNG网页搜索

SearXNG 网络搜索

使用自托管的 SearXNG 实例搜索网络。该技能通过 SearXNG JSON API 提供网络搜索结果访问,内置速率限制、错误处理和结果格式化功能。

使用场景

在以下情况下使用此技能:

  • - 查找最新信息或近期新闻
  • 研究超出知识截止日期的话题
  • 查阅文档或技术参考资料
  • 验证事实或检查当前状态
  • 查找特定主题的网址或资源
  • 搜索代码示例或解决方案

配置

将 SEARXNG_URL 环境变量设置为你的 SearXNG 实例:

bash
export SEARXNG_URL=http://localhost:8888

若未设置,则使用默认值 (http://localhost:8888)。

使用方法

使用查询内容执行搜索脚本:

bash
bb scripts/search.clj 你的搜索查询

高级选项

以 JSON 格式传递额外参数:

bash
bb scripts/search.clj 你的查询 {category: news, timerange: day, numresults: 10}

可用选项:

  • - category - 按类别筛选:general、news、images、videos、it、science
  • timerange - 时间筛选:day、week、month、year
  • language - 语言代码(默认:en)
  • numresults - 返回结果数量(默认:5)

输出格式

脚本以文本形式返回格式化搜索结果:

你的查询的搜索结果
共找到 42 条结果

  1. 1. 结果标题 [评分:1.85]
网址:https://example.com/page 页面描述摘要... 搜索引擎:google, bing
  1. 2. 另一个结果 [评分:1.62]
...

错误处理

脚本优雅地处理常见错误:

  • - 网络超时(30秒超时)
  • SearXNG 不可用(清晰的错误信息)
  • 无效查询(错误详情)
  • 速率限制(429响应)
  • 空结果(提示信息)

速率限制

脚本实现基本速率限制:

  • - 请求间隔至少1秒
  • 使用基于文件系统的状态(.searxng-last-request)
  • 防止意外滥用

示例

基本搜索

bash bb scripts/search.clj NixOS 配置

新闻搜索

bash bb scripts/search.clj AI 发展 {category: news, time_range: week}

技术搜索

bash bb scripts/search.clj babashka http 客户端 {category: it, num_results: 3}

仅最新结果

bash bb scripts/search.clj 产品发布 {time_range: day}

故障排除

SEARXNG_URL 未设置

  • - 设置环境变量:export SEARXNG_URL=http://localhost:8888

连接超时

  • - 检查 SearXNG 是否运行:curl $SEARXNG_URL/search?q=test&format=json
  • 验证防火墙设置
  • 检查服务状态:systemctl status searx

空结果

  • - 尝试更宽泛的查询
  • 移除筛选条件后重试
  • 检查 SearXNG 日志:journalctl -u searx -n 50

速率限制错误

  • - 在搜索之间等待几秒
  • 脚本自动强制执行至少1秒延迟

实现说明

搜索脚本(scripts/search.clj)使用:

  • - babashka.http-client 进行 HTTP 请求
  • Clojure 的 cheshire.core 进行 JSON 解析
  • 基于文件系统的速率限制
  • 30秒超时并带有适当的错误信息
  • 结果评分和排序,优先显示最佳结果

详细 API 文档请参见 references/api-guide.md。

标签

skill ai

通过对话安装

以下为平台配置的接入选项,并非逐项实测通过。能否安装取决于客户端支持、技能来源和运行环境:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 searxng-local-search-1776311045 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 searxng-local-search-1776311045 技能

通过命令行安装

skillhub install searxng-local-search-1776311045

下载

⬇ 下载 searxng-web-search v0.1.0(免费)

文件大小: 5.01 KB | 发布时间: 2026-4-16 16:47

v0.1.0 最新 2026-4-16 16:47
Initial release of SearXNG Web Search skill.

- Provides web search using a self-hosted SearXNG instance via JSON API.
- Supports advanced options: category, time range, language, and number of results.
- Handles network errors, rate limiting, and empty result cases gracefully.
- Outputs ranked and formatted search results with titles, URLs, snippets, and engines.
- Includes command-line usage documentation and troubleshooting tips.
- Requires `babashka`, the `bb` command, and the `SEARXNG_URL` environment variable.
返回顶部