bocha-search

Search the web using Bocha AI Search API (博查AI搜索) - a Chinese search engine optimized for Chinese content. Requires BOCHA_API_KEY. Supports web pages, images, and news with high-quality summaries.

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 ypw757/bocha-skill

Bocha Search Skill for OpenClaw

🔍 博查AI搜索 - 专为中文内容优化的智能搜索工具

Overview

This skill provides web search capabilities through the Bocha AI Search API (博查AI搜索). It's particularly effective for:

  • ✅ Chinese language searches (中文搜索)
  • ✅ Domestic Chinese content (国内内容)
  • ✅ News and current events (新闻资讯)
  • ✅ Encyclopedia and knowledge queries (百科知识)
  • ✅ High-quality AI-generated summaries (AI智能摘要)

Requirements

  • API Key: You need a Bocha API key from https://open.bocha.cn/
  • Node.js: Required to run the search script
  • Environment Variable: Set BOCHA_API_KEY or configure via OpenClaw settings

Configuration

Step 1: Get API Key

  1. Visit 博查AI开放平台
  2. Register an account (注册账号)
  3. Create an application and get your API KEY
  4. Recharge if needed (充值以获得搜索额度)

Step 2: Configure OpenClaw

Add to ~/.openclaw/openclaw.json:

{
  "skills": {
    "entries": {
      "bocha-search": {
        "enabled": true,
        "apiKey": "your-bocha-api-key-here",
        "env": {
          "BOCHA_API_KEY": "your-bocha-api-key-here"
        }
      }
    }
  }
}

Or set environment variable:

export BOCHA_API_KEY="your-bocha-api-key-here"

Usage

Once configured, you can use this skill by asking in Chinese or English:

"搜索北京今天的天气"
"用博查查找人工智能的最新进展"
"bocha search: 量子计算发展趋势"
"查找特朗普的最新新闻"

The skill will automatically route Chinese queries or explicit "bocha" / "博查" / "search" requests to this search provider.

Features

FeatureDescription
Chinese OptimizedBetter results for Chinese language queries
High-Quality SummariesAI-generated article summaries (when summary: true)
Multi-ModalReturns web pages, images, and related content
Time FilteringFilter results by time range (day/week/month/year)
Fast ResponseTypically returns results within 1-2 seconds
Rich MetadataIncludes publish date, site name, favicon, etc.

API Parameters

When calling the underlying tool directly:

ParameterTypeRequiredDefaultDescription
querystring✅ Yes-Search query (supports Chinese and English)
countnumberNo10Number of results (1-50)
freshnessstringNo"noLimit"Time filter: "oneDay", "oneWeek", "oneMonth", "oneYear", "noLimit"
summarybooleanNotrueWhether to include AI-generated summaries

Example Tool Call

// Search for recent AI news in Chinese
{
  "query": "人工智能最新进展",
  "count": 10,
  "freshness": "oneWeek",
  "summary": true
}

// Search for Trump news
{
  "query": "特朗普 Trump 最新新闻",
  "count": 5,
  "freshness": "oneDay"
}

Response Format

The API returns structured data including:

  • Web Pages: Title, URL, snippet, summary, site name, publish date
  • Images: Thumbnail URL, full image URL, dimensions
  • Total Matches: Estimated total number of matching results
  • Related Queries: Suggested related search terms

Sample Response Structure

{
  "_type": "SearchResponse",
  "queryContext": {
    "originalQuery": "search term"
  },
  "webPages": {
    "totalEstimatedMatches": 1908646,
    "value": [
      {
        "name": "Article Title",
        "url": "https://example.com/article",
        "snippet": "Short description...",
        "summary": "Full AI-generated summary...",
        "siteName": "Example Site",
        "datePublished": "2026-01-30T07:19:14+08:00"
      }
    ]
  },
  "images": {
    "value": [...]
  }
}

Error Handling

Common errors and solutions:

ErrorCauseSolution
BOCHA_API_KEY is requiredAPI key not configuredAdd API key to config or environment
Invalid API KEYWrong API keyCheck your API key at https://open.bocha.cn/
Insufficient balanceOut of creditsRecharge your account
Rate limit exceededToo many requestsWait before making more requests

Pricing

Technical Details

API Endpoint

  • URL: https://api.bocha.cn/v1/web-search
  • Method: POST
  • Auth: Bearer token in Authorization header

Script Location

skills/bocha-search/
├── SKILL.md              # This file
├── README.md             # Full documentation
├── LICENSE               # MIT License
└── scripts/
    ├── package.json      # Node.js config
    ├── tool.json         # OpenClaw tool definition
    └── bocha_search.js   # Main search script ⬅️ Entry point

Comparison with Other Search Tools

FeatureBocha SearchBrave SearchPerplexity
Chinese Content⭐⭐⭐ Excellent⭐⭐ Good⭐⭐ Good
Speed⭐⭐⭐ Fast⭐⭐⭐ Fast⭐⭐ Moderate
Summaries⭐⭐⭐ AI-powered❌ No⭐⭐⭐ AI-powered
Images⭐⭐⭐ Included⭐⭐ Separate⭐ Limited
Pricing💰 Affordable🆓 Free tier💰 Moderate

Best Practices

  1. Use Chinese queries for better Chinese content results
  2. Enable summaries (summary: true) for better context
  3. Set appropriate freshness based on your needs:
    • Breaking news: "oneDay"
    • Recent developments: "oneWeek"
    • General research: "noLimit"
  4. Start with count=10, increase if needed (max 50)
  5. Handle rate limits gracefully in production use

Troubleshooting

No results returned

  • Try different keywords or synonyms
  • Remove time restrictions (freshness: "noLimit")
  • Check if your query is too specific

Slow response

  • Reduce count parameter
  • Disable summaries if not needed (summary: false)
  • Check network connectivity to api.bocha.cn

API errors

  • Verify API key is correct and active
  • Check account balance at https://open.bocha.cn/
  • Ensure you're not exceeding rate limits

Links

License

MIT License - See LICENSE file for details


Note: This skill is specifically designed for OpenClaw and uses the official Bocha AI Search API. It is not affiliated with or endorsed by Bocha AI.

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

Sendflare

通过 Sendflare SDK 发送带附件的电子邮件,管理联系人列表,支持 CC/BCC 和安全 API 认证。

Registry SourceRecently Updated
General

Playtomic - Book courts using padel-tui

This skill should be used when the user asks to "book a padel court", "find available padel courts", "search padel courts near me", "reserve a Playtomic cour...

Registry SourceRecently Updated
General

Fund Keeper

国内场外基金智能顾问 + 股票行情查询。实时估值、买卖建议、收益统计、定投计划、OCR 识图、股票 - 基金联动。支持离线模式、多数据源缓存。

Registry SourceRecently Updated