English | 简体中文
Bocha Web Search provider plugin for
OpenClaw. Adds bocha as a selectable
provider for the built-in web_search tool.
Not using OpenClaw? A standalone ClawHub skill (clawhub.ai/helloworldtang/skills/bocha) teaches any agent to call the Bocha API directly with the same conventions.
- Chinese-first search quality — Bocha's index is strong on Chinese-language content, which matters for queries Brave/Tavily/Exa handle poorly.
- Direct mainland-China access —
api.bocha.cnneeds no proxy, unlike most Western search APIs. - Cheap — metered per successful search (see pricing).
openclaw plugins install @chaojihao/openclaw-plugin-bochaThen set your API key (get one at https://open.bocha.cn, free tier available):
openclaw config set plugins.entries.bocha.enabled true
# Option A (recommended, persistent): store the key in OpenClaw config
openclaw config set plugins.entries.bocha.config.webSearch.apiKey sk-...
# or interactively: openclaw configure --section web
# Option B: environment variable — must reach the Gateway process itself
# (on macOS a shell export or `launchctl setenv` does not survive a reboot,
# hence Option A; the config entry also takes priority over the env var)
BOCHA_API_KEY=sk-...Select the provider:
openclaw config set tools.web.search.provider bochaDon't forget: tools.web.search.enabled is off by default — without it the
web_search tool never shows up:
openclaw config set tools.web.search.enabled trueExposed through the standard web_search tool:
| Parameter | Type | Default | Description |
|---|---|---|---|
query |
string | required | Search query; natural language supported |
count |
integer | 10 | Results to return (1–50) |
freshness |
string | noLimit |
oneDay / oneWeek / oneMonth / oneYear / noLimit |
summary |
boolean | false | Include Bocha's AI-generated page summaries |
Path (in openclaw.json) |
Env var | Purpose |
|---|---|---|
plugins.entries.bocha.config.webSearch.apiKey |
BOCHA_API_KEY |
Bocha API key |
plugins.entries.bocha.config.webSearch.baseUrl |
BOCHA_BASE_URL |
API base override (proxies) |
tools.web.search.timeoutSeconds |
— | Request timeout (default 30s) |
tools.web.search.cacheTtlMinutes |
— | Result cache TTL (default 10min) |
Untrusted content: every title/snippet/summary is wrapped in per-request boundary markers before it reaches the agent, mirroring OpenClaw's bundled search providers.
- OpenClaw
>= 2026.9.6(developed and tested against 2026.9.6; plugin APIs are experimental — pin and test your host version). - Node 24.16+ / 26.1+.
pnpm install
pnpm test # vitest, no network needed
pnpm lint && pnpm typecheck
pnpm build # emits dist/ (required for installation)MIT. Not affiliated with Bocha AI or the OpenClaw Foundation.