360 Secure SkillHub
360 安全技能中心

Searx Search

接收搜索关键词,用 curl 下载公共 SearX 实例列表,用 node 解析出可用实例,再逐个调用检索接口,输出前 5 条结果的标题与链接;请求失败时自动切换下一个实例,最多尝试 3 个,全部失败则输出中文提示。

fikacode
fikacode
热度 78.85
最近更新 2026-05-11 17:33:42
分类:搜索依赖:代码执行 / 第三方 API应用场景:研究

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add searx-search
Metadata
name
searx-search
description
Provides web search using free SearX instances from https://searx.space/. Trigger when a user asks to search the web or wants the latest AI news and global events. The skill fetches the list of public SearX instances, selects one, performs the query, and retries with up to two alternative instances if the request fails. Returns plain text search results only.

SearX Search Skill

Overview

Search the web via a free SearX instance. Use when a user requests "search ...", "最新 AI 新闻", or "全球大事". The skill returns plain text results without HTML.

Execution

The scripts/search_searx.sh script takes a search query as its argument and performs the steps:

  1. Download the JSON list of public instances from https://searx.space/data/instances.json.
  2. Extract up to three reachable instance URLs.
  3. For each instance (max 3 attempts):
    • Send a GET request to <instance>/search?q=<query>&format=json.
    • If the HTTP status is 200 and a non‑empty result is returned, output the titles and URLs of the first 5 results, one per line, then exit successfully.
    • If the request fails, continue with the next instance.
  4. If all attempts fail, output 搜索失败,请稍后重试。.

The script prints only plain text, suitable for direct user consumption.

Usage

./scripts/search_searx.sh "最新 AI 新闻"

Will output something like:

Title 1 - https://example.com/...
Title 2 - https://example.org/...