360 Secure SkillHub
360 安全技能中心

小宿智能搜索

该 Skill 通过小宿智能搜索 V2 接口执行实时网络检索,支持按时间过滤(Day/Week/Month)、长文正文抽取、智能片段提取、指定站点检索与站点屏蔽,并可输出原始 JSON。使用者需先配置访问密钥与接口路径两个环境变量,再通过随附的 Python 脚本或 curl 调用接口。

Dr-xiaoming
Dr-xiaoming
热度 46.15
最近更新 2026-05-11 17:34:09
分类:搜索依赖:代码执行 / 第三方 API应用场景:研究

安装技能

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

执行命令安装此 skill: npx secure-skills-cli add xiaosu-search
Metadata
name
xiaosu-search
version
1.0.0
description
Web search via 小宿智能搜索 V2 API (XiaoSu Smart Search). Use when internet search, web lookup, real-time information retrieval, news search, or fact-checking is needed. Supports time-filtered search (Day/Week/Month), long-form content extraction, smart snippet extraction, site-specific search, and site blocking. Triggers on "search the web", "look up", "find online", "latest news about", "search for", or any task requiring current internet data. NOT for local file search, memory search, or social media platform-specific queries (use sm-data-query for those).
metadata
{"openclaw":{"requires":{"envs":["XIAOSU_AK","XIAOSU_ENDPOINT"]}}}

小宿智能搜索 V2

Web search API for real-time internet information retrieval.

Setup (Required)

Set these environment variables before using this skill:

export XIAOSU_AK="<your-access-key>"
export XIAOSU_ENDPOINT="<your-endpoint-path>"

Get your credentials at: https://www.xiaosuai.com (小宿智能搜索)

You can add them to your shell profile (~/.bashrc / ~/.zshrc) or OpenClaw's .env file.

Quick Usage

Run the search script directly:

python3 ~/.openclaw/skills/xiaosu-search/scripts/xiaosu_search.py "<query>" \
  --ak $XIAOSU_AK --endpoint $XIAOSU_ENDPOINT [options]

Common Patterns

# Basic search
python3 scripts/xiaosu_search.py "宁德时代" --ak $AK --endpoint $EP

# Recent news (last 24h)
python3 scripts/xiaosu_search.py "CATL battery" --freshness Day --ak $AK --endpoint $EP

# With full content extraction (for deep reading)
python3 scripts/xiaosu_search.py "储能行业趋势" --content --content-type MARKDOWN --content-timeout 5 --ak $AK --endpoint $EP

# Smart snippets (relevant text fragments)
python3 scripts/xiaosu_search.py "固态电池进展" --main-text --ak $AK --endpoint $EP

# Site-specific search
python3 scripts/xiaosu_search.py "宁德时代" --sites finance.eastmoney.com --ak $AK --endpoint $EP

# Raw JSON output (for programmatic use)
python3 scripts/xiaosu_search.py "query" --json --ak $AK --endpoint $EP

# Pagination
python3 scripts/xiaosu_search.py "query" --count 20 --offset 20 --ak $AK --endpoint $EP

Script Options

Flag Description
--count N Results count: 10/20/30/40/50
--freshness X Time filter: Day, Week, Month
--offset N Pagination offset
--content Enable long-form content extraction
--content-type T TEXT (default), MARKDOWN, HTML
--content-timeout S Content read timeout (max 10s)
--main-text Enable smart snippet extraction
--sites HOST Restrict to site
--block HOST Exclude site
--no-cache Disable 10-min result cache
--json Raw JSON output

Direct API Usage (curl)

curl -s -G "https://searchapi.xiaosuai.com/search/$XIAOSU_ENDPOINT/smart" \
  --data-urlencode "q=<query>" \
  --data-urlencode "count=10" \
  -H "Authorization: Bearer $XIAOSU_AK"

Guidelines

  • For news monitoring: use --freshness Day + --count 20
  • For deep research: use --content --content-type MARKDOWN --content-timeout 5
  • For fact-checking: use --main-text for relevant fragments without full content overhead
  • Rate limit: 429 = QPS exceeded, back off and retry
  • Results have a score field (0-1) indicating relevance; prioritize high-score results
  • API reference details: see references/api-docs.md