← 返回
开发者工具 Key

Bocha Search (Momo优化版)

博查 AI 搜索工具。调用 https://api.bocha.cn 进行网页搜索,返回带摘要的中文结果。不依赖 OpenClaw 内置 web_search。
博查 AI 搜索工具。调用 https://api.bocha.cn 进行网页搜索,返回带摘要的中文结果。不依赖 OpenClaw 内置 web_search。
justaboyhai-wq
开发者工具 clawhub v1.0.0 1 版本 99873.9 Key: 需要
★ 0
Stars
📥 792
下载
💾 16
安装
1
版本
#latest

概述

🔍 Bocha Search Skill

博查 AI 搜索工具 - 调用 api.bocha.cn 进行网页搜索。

⚡ 快速开始

1. 配置 API Key

# 替换 YOUR_API_KEY 为你的博查 API Key
~/.openclaw/skills/bocha-search/scripts/setup.sh YOUR_API_KEY

获取 API Key: https://open.bocha.cn

2. 执行搜索

# 搜索(默认 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

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搜索关键词必填
summarytrue 返回 AI 摘要true
freshness时间筛选: noLimit/pd/pw/pm/pynoLimit
count结果数量 (1-10)5

📤 输出格式

每条结果包含:

  • 📌 标题 - 页面标题
  • 🔗 链接 - 页面 URL
  • 📝 摘要 - AI 生成的摘要

⚙️ 配置说明

配置文件位置

首次配置后,API Key 保存在:

~/.openclaw/skills-config/bocha-search.json

更新 API Key

# 重新运行 setup 脚本
~/.openclaw/skills/bocha-search/scripts/setup.sh 新的APIKey

🔒 安全说明

  • ✅ API Key 存储在本地配置文件中,不暴露在代码中
  • ✅ 支持环境变量方式,避免配置文件泄露
  • ❌ 不要将包含 API Key 的配置提交到代码仓库

📂 文件结构

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(不限)

🔗 相关链接

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-30 11:25 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

Gog

steipete
Google Workspace 命令行工具,支持 Gmail、日历、云端硬盘、通讯录、表格和文档。
★ 920 📥 185,726
developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 666 📥 323,787
ai-intelligence

Safe Config Modifier

justaboyhai-wq
安全修改 OpenClaw 配置文件。用于任何需要修改 ~/.openclaw/openclaw.json 的场景,包括:模型切换、channel 配置、tools 配置、skill 安装等。确保修改前备份、预览(脱敏 key)、并获得用户
★ 0 📥 696