← 返回 Skills 市场
619
总下载
1
收藏
6
当前安装
3
版本数
在 OpenClaw 中安装
/install bocha-web-search-yikailucas
功能描述
统一封装博查(Bocha)全系搜索接口(Web Search / AI Search / Agent Search / Reranker),使用 Node.js 脚本调用并支持标准参数与原始 JSON 透传。用户提到“博查搜索/联网搜索/AI 搜索/Agent 搜索/重排/rerank/事实核查/行业研报检索”时使用。
使用说明 (SKILL.md)
bocha-web-search
统一封装 Bocha API(Web / AI / Agent / Reranker),适合中文互联网检索、问答增强与结果重排。
前置配置
二选一:
- 环境变量(推荐)
export BOCHA_API_KEY="你的博查API Key"
- 本地配置文件(仅本机)
在技能目录创建 config.json:
{
"apiKey": "你的博查API Key"
}
统一调用入口
优先使用:scripts/bocha.sh
cd skills/bocha-web-search
# Web Search
bash scripts/bocha.sh web --query "中国最火 app 研报" --count 10 --freshness oneYear --summary true --pretty
# AI Search
bash scripts/bocha.sh ai --query "总结中国移动互联网最新趋势" --count 8 --summary true --timeout 45
# Agent Search
bash scripts/bocha.sh agent --query "给我可追溯来源的回答" --count 8 --freshness oneMonth
# Reranker(通常配合 --raw-json 传 documents)
bash scripts/bocha.sh rerank --query "中国最火app" --raw-json '{"documents":["...","..."]}'
子命令
web:Web Search APIai:AI Search APIagent:Agent Search APIrerank:Semantic Reranker API
参数
--query:查询词(除纯重排场景外通常必填)--count:返回条数(默认 10,脚本内限幅 1~50)--freshness:时间过滤(默认noLimit)--summary:是否返回摘要(默认true)--page/--offset:分页参数(若接口支持)--language/--region/--site:语言、地区、站点过滤(若接口支持)--raw-json:原始 JSON 透传(用于覆盖/补充高级参数)--timeout:请求超时秒数(默认 30)--pretty:Node 端 JSON 美化输出(无需jq)
输出规则
- 默认输出 API 原始 JSON。
- 若提供
--raw-json,会与标准参数合并后发送,且--raw-json字段优先。
使用建议
- 先宽搜拿候选(例:
2025 中国移动互联网 报告)。 - 再加限定词二次检索(例:
QuestMobile、CNNIC、CTR)。 - 回答时优先引用机构来源,避免只用自媒体榜单。
安全使用建议
This skill is a straightforward client for the Bocha search APIs and will send your queries (and any JSON you pass with --raw-json) to https://api.bochaai.com. Before installing: 1) Be aware you must provide BOCHA_API_KEY (either as BOCHA_API_KEY env var or a local skills/bocha-web-search/config.json) — the registry metadata failing to declare this is an inconsistency you should note. 2) Do not include secrets or unrelated private data in queries or in --raw-json, since those values are transmitted to an external service. 3) Verify you trust the Bocha service and restrict the API key’s permissions/rotation as appropriate; store config.json with tight filesystem permissions. 4) Ensure Node is available in the environment. If you need stronger assurances, ask the publisher for a homepage/contact, or run the scripts in a sandbox and monitor outbound requests to confirm they go only to api.bochaai.com.
功能分析
Type: OpenClaw Skill
Name: bocha-web-search-yikailucas
Version: 1.0.2
The skill is classified as suspicious primarily due to the `--raw-json` parameter in `scripts/bocha.mjs`. This parameter allows arbitrary JSON to be passed directly into the API request body, providing broad and unconstrained control over the payload sent to the external Bocha API. While intended for advanced usage, this capability could be leveraged by a malicious prompt to the agent to interact with the external API in unintended or harmful ways, potentially exploiting vulnerabilities in the upstream API or performing actions beyond the skill's stated purpose. No direct malicious intent (e.g., data exfiltration, persistence, local system compromise) was found within the skill's code or `SKILL.md`.
能力评估
Purpose & Capability
Name, description, and implementation align: the scripts call Bocha search endpoints (web/ai/agent/reranker) and expose parameters the SKILL.md documents. The code only targets api.bochaai.com endpoints, which matches the declared purpose.
Instruction Scope
SKILL.md tells the agent to run the included Node/Bash scripts and to provide an API key via BOCHA_API_KEY or a local config.json. The scripts only read that config or env var, build a JSON payload, and POST to the Bocha API. One scope note: the --raw-json option allows callers to pass arbitrary JSON that will be merged and sent to the external API — this is expected for advanced use but means the caller must avoid embedding secrets or unrelated data in queries.
Install Mechanism
There is no install spec; this is a script bundle intended to be run directly. No network downloads or package installs occur during setup, and the code itself is not obfuscated. Requires a Node runtime present on the host.
Credentials
The skill requires a Bocha API key at runtime (BOCHA_API_KEY or skills/bocha-web-search/config.json), but the registry metadata lists no required environment variables or primary credential. That mismatch is an incoherence: the skill will fail without providing a sensitive secret, and the metadata does not surface that requirement. Apart from that single API key, no other credentials or unrelated env vars are accessed.
Persistence & Privilege
The skill does not request permanent/always-enabled presence, does not modify other skills' settings, and does not write to system-wide config. The only file it suggests creating is a local skills/bocha-web-search/config.json to store the API key (local persistent file).
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install bocha-web-search-yikailucas - 安装完成后,直接呼叫该 Skill 的名称或使用
/bocha-web-search-yikailucas触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.2
Rename display name to 'Bocha Web Search' (remove parenthetical suffix).
v1.0.1
Migrate execution to Node.js only; remove Python dependency; add bocha.mjs/search.mjs and update docs.
v1.0.0
Refresh CLI entrypoint (bocha.sh), add timeout/pretty output, improve docs and parameter validation.
元数据
常见问题
Bocha Web Search 是什么?
统一封装博查(Bocha)全系搜索接口(Web Search / AI Search / Agent Search / Reranker),使用 Node.js 脚本调用并支持标准参数与原始 JSON 透传。用户提到“博查搜索/联网搜索/AI 搜索/Agent 搜索/重排/rerank/事实核查/行业研报检索”时使用。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 619 次。
如何安装 Bocha Web Search?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install bocha-web-search-yikailucas」即可一键安装,无需额外配置。
Bocha Web Search 是免费的吗?
是的,Bocha Web Search 完全免费(开源免费),可自由下载、安装和使用。
Bocha Web Search 支持哪些平台?
Bocha Web Search 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Bocha Web Search?
由 Lucas(@yikailucas)开发并维护,当前版本 v1.0.2。
推荐 Skills