Overview
OpenClaw is a powerful self-hosted personal AI assistant ("the lobster way 🦞") that runs locally on any OS and connects to messaging platforms like WhatsApp, Telegram, Discord, Slack, and more. The Brave Search API is the official default and recommended web_search provider, allowing agents to fetch fresh web results directly from Brave's independent 30+ billion page index.
This integration reduces hallucinations by grounding responses in real-time data and powers core tools like web_search and related web capabilities.
Key Features
- Default web_search tool with full Brave API support
- Advanced filters: country, language, freshness (day/week/month/year), date ranges
- Result control: 1–10 results (default 5), caching (15 min TTL)
- AI-optimized: Works seamlessly with LLM Context endpoint (included in Search plan)
- Privacy-first: No tracking, independent index, Zero Data Retention option
- Multi-endpoint support: Web, images, news, videos via the same API key
Setup & Configuration
- Sign up at brave.com/search/api and select the Search plan.
- Generate your API key in the Brave dashboard.
- Set the key in OpenClaw:
- Environment variable:
BRAVE_API_KEY=your_key_here - Or via config file /
openclaw configure(recommended for security).
- Environment variable:
- (Optional) Customize in
tools.web.search:{ "tools": { "web": { "search": { "provider": "brave", "apiKey": "BRAVE_API_KEY_HERE", "maxResults": 5, "timeoutSeconds": 30 } } } }
Example agent call:
await web_search({
query: "AI news",
freshness: "week",
language: "en"
});
Pricing & Credits
- Every Brave plan includes $5/month renewing free credit (covers ~1,000 queries).
- Search plan: $5 per 1,000 requests.
- Legacy free tier (2,000 queries) still works for some users but lacks newer features.
- Set usage alerts in the Brave dashboard to avoid overages.
Use Cases
- Real-time research during conversations
- Fact-checking and current events summarization
- Building autonomous agents that browse, extract, and act on live web data
- Enhancing coding, shopping, or news agents with fresh sources
Notes & Best Practices
- Results are cached for performance (configurable).
- Storage of results for model training requires explicit plan rights (see Brave ToS).
- Community plugins exist for alternatives (Tavily, Perplexity, etc.) if needed.
For full OpenClaw docs: github.com/openclaw/openclaw. Brave API portal: brave.com/search/api.
Tags
openclawbrave-search-apiweb-searchai-agentself-hostedragprivacytool-integration
