OpenClaw plugin that adds a bocha_web_search tool powered by the Bocha Search API.
OpenClaw's built-in web_search uses Brave Search with a hardcoded API endpoint — no way to set a custom base URL or swap the backend. This is a problem if:
- Brave Search is inaccessible from your network (e.g. China mainland)
- You want to use a different search provider
- You need features Brave doesn't offer (AI summaries, date range filtering, etc.)
This plugin replaces it with Bocha Search, which provides good Chinese-language results and built-in AI summaries.
-
Place this folder under
~/.openclaw/extensions/bocha-search/ -
Add to
~/.openclaw/openclaw.json:
{
"plugins": {
"allow": ["bocha-search"],
"entries": {
"bocha-search": {
"enabled": true,
"config": {
"apiKey": "sk-your-bocha-api-key"
}
}
}
}
}- (Recommended) Deny the built-in
web_searchtool to force the agent to use Bocha:
{
"tools": {
"deny": ["web_search"]
}
}Without this, both web_search (Brave) and bocha_web_search will be available and the agent may pick either one.
| Parameter | Type | Required | Description |
|---|---|---|---|
query |
string | yes | Search query |
count |
number | no | Number of results, 1-20 (default 5) |
freshness |
string | no | Time filter: oneDay, oneWeek, oneMonth, oneYear, or YYYY-MM-DD..YYYY-MM-DD |
summary |
boolean | no | Include AI summaries (default true) |
- New tools only appear in new sessions. If the bot is already in a conversation, send
/newto reset. - The API key can also be set via
BOCHA_API_KEYenvironment variable as a fallback.