返回顶部
b

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.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
2,318
下载量
1
收藏
概述
安装方式
版本历史

bocha-search

# 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开放平台](https://open.bocha.cn/) 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`: ```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: ```bash 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 | Feature | Description | |---------|-------------| | **Chinese Optimized** | Better results for Chinese language queries | | **High-Quality Summaries** | AI-generated article summaries (when `summary: true`) | | **Multi-Modal** | Returns web pages, images, and related content | | **Time Filtering** | Filter results by time range (day/week/month/year) | | **Fast Response** | Typically returns results within 1-2 seconds | | **Rich Metadata** | Includes publish date, site name, favicon, etc. | ## API Parameters When calling the underlying tool directly: | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | `query` | string | ✅ Yes | - | Search query (supports Chinese and English) | | `count` | number | No | 10 | Number of results (1-50) | | `freshness` | string | No | "noLimit" | Time filter: "oneDay", "oneWeek", "oneMonth", "oneYear", "noLimit" | | `summary` | boolean | No | true | Whether to include AI-generated summaries | ### Example Tool Call ```javascript // 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 ```json { "_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: | Error | Cause | Solution | |-------|-------|----------| | `BOCHA_API_KEY is required` | API key not configured | Add API key to config or environment | | `Invalid API KEY` | Wrong API key | Check your API key at https://open.bocha.cn/ | | `Insufficient balance` | Out of credits | Recharge your account | | `Rate limit exceeded` | Too many requests | Wait before making more requests | ## Pricing - Visit https://open.bocha.cn/pricing for current pricing - New users typically get free credits to start - Pay-as-you-go based on search volume ## 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 | Feature | Bocha Search | Brave Search | Perplexity | |---------|--------------|--------------|------------| | 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 - 🔗 [博查AI开放平台](https://open.bocha.cn/) - 🔗 [API Documentation](https://bocha-ai.feishu.cn/wiki/RXEOw02rFiwzGSkd9mUcqoeAnNK) - 🔗 [OpenClaw Docs](https://docs.openclaw.ai) - 🔗 [ClawdHub](https://clawdhub.com) ## 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.

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 bocha-skill-1776365052 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 bocha-skill-1776365052 技能

通过命令行安装

skillhub install bocha-skill-1776365052

下载 Zip 包

⬇ 下载 bocha-search v1.0.0

文件大小: 16.51 KB | 发布时间: 2026-4-17 15:02

v1.0.0 最新 2026-4-17 15:02
bocha-skill 1.0.0

- Initial release of bocha-search skill for OpenClaw.
- Enables Chinese-optimized web, image, and news search using the Bocha AI Search API.
- Supports high-quality AI-generated summaries, time filtering, and multi-modal results.
- Requires BOCHA_API_KEY and Node.js; full setup and error handling instructions included.
- Designed for superior Chinese-language and domestic content search.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部