bocha-search

博查搜索 API 插件,从全网搜索网页信息,结果准确、摘要完整,适合 AI 使用。

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "bocha-search" with this command: npx skills add sunjingji/bocha-search

博查搜索 (Bocha Search)

基于博查 AI 搜索 API 的网页搜索插件,返回结构化的搜索结果,适合大模型使用。

功能特点

  • 🔍 全网搜索,结果准确
  • 📝 可选返回网页摘要 (summary)
  • ⏰ 支持时间范围过滤
  • 🌐 Response 格式兼容 Bing Search API

配置

方式一:配置文件 (推荐)

编辑 config.json

{
  "apiKey": "sk-your-api-key"
}

方式二:环境变量

export BOCHA_API_KEY="sk-your-api-key"

API Key 获取:https://open.bochaai.com → API KEY 管理

使用方法

node scripts/search.js <query> [options]

参数说明

参数类型必填说明
<query>string搜索关键词
--count <n>number返回结果数量,范围 1-50,默认 10
--freshness <v>string时间范围过滤,默认 noLimit
--summaryflag是否返回网页摘要

freshness 取值说明

说明
noLimit不限时间 (默认,推荐)
oneDay一天内
oneWeek一周内
oneMonth一个月内
oneYear一年内
YYYY-MM-DD..YYYY-MM-DD自定义日期范围,如 2025-01-01..2025-04-06
YYYY-MM-DD指定日期,如 2025-04-06

⚠️ 推荐使用 noLimit,搜索算法会自动优化时间范围。指定时间范围可能导致无结果。

示例

基本搜索

node scripts/search.js "沪电股份"

限制数量

node scripts/search.js "人工智能" --count 5

带摘要

node scripts/search.js "DeepSeek" --summary

限定时间范围

node scripts/search.js "AI新闻" --freshness oneWeek --count 10

组合使用

node scripts/search.js "阿里巴巴ESG报告" --count 5 --freshness oneMonth --summary

输出格式

成功响应

{
  "type": "search",
  "query": "搜索词",
  "totalResults": 12345,
  "resultCount": 10,
  "results": [
    {
      "index": 1,
      "title": "网页标题",
      "url": "https://example.com/page",
      "description": "网页内容的简短描述",
      "summary": "网页内容的详细摘要 (需 --summary)",
      "siteName": "网站名称",
      "publishedDate": "2025-01-01T12:00:00+08:00"
    }
  ]
}

错误响应

{
  "type": "error",
  "code": "401",
  "message": "Invalid API KEY",
  "log_id": "xxxx"
}

常见错误码

错误码说明处理方式
400参数缺失检查 query 参数
401API Key 无效检查 config.json 或环境变量
403余额不足前往 open.bochaai.com 充值
429请求频率限制稍后重试

API 文档

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

EvoMap Heartbeat Manager

Automated EvoMap AI-to-AI network node heartbeat maintenance with continuous monitoring and error handling. Keeps your EvoMap nodes alive and active in the d...

Registry SourceRecently Updated
General

System Uptime

Get the current system uptime using the native 'uptime' command. Use when: user asks about system uptime, system status, or how long the system has been runn...

Registry SourceRecently Updated
3260alamby
General

Feishu Webhook

Send rich text messages to Feishu via Webhook with heredoc input support. Use when you need to send Markdown-formatted messages to Feishu channels or DMs, es...

Registry SourceRecently Updated
General

ai-news-daily-v1.0.4

AI 新闻日报 v1.0.3 - 自动抓取全球 AI 行业最新动态,每日推送 10 条精选新闻。支持英文标题/内容自动翻译、400-500 字中文摘要、外部配置 (config.yaml)、失败重试、智能去重。安装后自动创建 OpenClaw 定时任务,每天早上 9:00 自动推送到对话框。用于定时抓取 AI 新...

Registry SourceRecently Updated