Install
openclaw skills install bocha-search-momo博查 AI 搜索工具。调用 https://api.bocha.cn 进行网页搜索,返回带摘要的中文结果。不依赖 OpenClaw 内置 web_search。
openclaw skills install bocha-search-momo博查 AI 搜索工具 - 调用 api.bocha.cn 进行网页搜索。
# 替换 YOUR_API_KEY 为你的博查 API Key
~/.openclaw/skills/bocha-search/scripts/setup.sh YOUR_API_KEY
获取 API Key: https://open.bocha.cn
# 搜索(默认 5 条结果)
~/.openclaw/skills/bocha-search/scripts/search.sh "搜索关键词"
# 指定结果数量
~/.openclaw/skills/bocha-search/scripts/search.sh "搜索关键词" 10
export BOCHA_API_KEY="sk-你的APIKey"
~/.openclaw/skills/bocha-search/scripts/search.sh "关键词"
curl -s "https://api.bocha.cn/v1/web-search" \
-H "Authorization: Bearer $BOCHA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query":"关键词",
"summary": true,
"freshness": "noLimit",
"count": 5
}'
| 参数 | 说明 | 默认值 |
|---|---|---|
query | 搜索关键词 | 必填 |
summary | true 返回 AI 摘要 | true |
freshness | 时间筛选: noLimit/pd/pw/pm/py | noLimit |
count | 结果数量 (1-10) | 5 |
每条结果包含:
首次配置后,API Key 保存在:
~/.openclaw/skills-config/bocha-search.json
# 重新运行 setup 脚本
~/.openclaw/skills/bocha-search/scripts/setup.sh 新的APIKey
bocha-search/
├── SKILL.md # 本文档
├── _meta.json # 元数据
└── scripts/
├── setup.sh # 配置 API Key
└── search.sh # 搜索脚本
Q: 搜索返回错误怎么办? A: 检查 API Key 是否正确,可访问 https://open.bocha.cn 查看配额
Q: 结果数量可以更多吗? A: 当前支持 1-10 条,API 限制
Q: 如何切换搜索时间? A: 修改 freshness 参数: pd(天)、pw(周)、pm(月)、py(年)、noLimit(不限)