Brave search
기준일: 2026-07-26
난이도: 중급
공식 기준: Brave search
개요
이 페이지는 OpenClaw Brave search 도구(파라미터, 권한, 설정, CLI)를 공식 문서 기준으로 정리합니다.
공식 요약: Brave Search API setup for web_search
도구 가시성은 profile / allow·deny policy / sandbox / channel 권한에 따라 달라집니다. 최신 스키마는 항상 공식 문서를 우선합니다.
공식 문서 기반 상세
아래는 공식 tools/brave-search 문서를 정리한 내용입니다. 코드 블록, 파라미터 이름, 기본값은 원문 그대로입니다.
OpenClaw supports Brave Search API as a web_search provider.
Get an API key
- Create a Brave Search API account at https://brave.com/search/api/
- In the dashboard, choose the Search plan and generate an API key.
- Store the key in config or set
BRAVE_API_KEYin the Gateway environment.
설정 예시
{
plugins: {
entries: {
brave: {
config: {
webSearch: {
apiKey: "BRAVE_API_KEY_HERE",
mode: "web", // or "llm-context"
baseUrl: "https://api.search.brave.com", // optional proxy/base URL override
},
},
},
},
},
tools: {
web: {
search: {
provider: "brave",
maxResults: 5,
timeoutSeconds: 30,
},
},
},
}
Provider-specific Brave search settings live under plugins.entries.brave.config.webSearch.*; this is the canonical config path.
webSearch.mode controls the Brave transport:
web(default): normal Brave web search with titles, URLs, and snippetsllm-context: Brave LLM Context API with pre-extracted text chunks and sources for grounding
webSearch.baseUrl can point Brave requests at a trusted Brave-compatible proxy
or gateway. OpenClaw appends /res/v1/web/search or /res/v1/llm/context to
the configured base URL and keeps the base URL in the cache key. Public
endpoints must use https://; http:// is accepted only for trusted loopback
or private-network proxy hosts.
Tool parameters
query(string) (required): Search query.count(number) · default:5: Number of results to return (1–10).country(string): 2-letter ISO country code (e.g.US,DE).language(string): ISO 639-1 language code for search results (e.g.en,de,fr).search_lang(string): Brave search-language code (e.g.en,en-gb,zh-hans).ui_lang(string): ISO language code for UI elements.freshness('day' | 'week' | 'month' | 'year'): Time filter —dayis 24 hours.date_after(string): Only results published after this date (YYYY-MM-DD).date_before(string): Only results published before this date (YYYY-MM-DD).
Examples:
// Country and language-specific search
await web_search({
query: "renewable energy",
country: "DE",
language: "de",
});
// Recent results (past week)
await web_search({
query: "AI news",
freshness: "week",
});
// Date range search
await web_search({
query: "AI developments",
date_after: "2024-01-01",
date_before: "2024-06-30",
});
참고
- OpenClaw uses the Brave Search plan. If you have a legacy subscription (e.g. the original Free plan with 2,000 queries/month), it remains valid but does not include newer features like LLM Context or higher rate limits.
- Each Brave plan includes $5/month in free credit (renewing). The Search plan costs $5 per 1,000 requests, so the credit covers 1,000 queries/month. Set your usage limit in the Brave dashboard to avoid unexpected charges. See the Brave API portal for current plans.
- The Search plan includes the LLM Context endpoint and AI inference rights. Storing results to train or tune models requires a plan with explicit storage rights. See the Brave Terms of Service.
llm-contextmode returns grounded source entries instead of the normal web-search snippet shape.llm-contextmode supportsfreshnessand boundeddate_after+date_beforeranges. It does not supportui_lang;date_beforewithoutdate_afteris rejected because Brave requires custom freshness ranges to include both start and end dates.ui_langmust include a region subtag likeen-US.- Results are cached for 15 minutes by default (configurable via
cacheTtlMinutes). - Custom
webSearch.baseUrlvalues are included in Brave cache identity, so proxy-specific responses do not collide. - Enable the
brave.httpdiagnostics flag to log Brave request URLs/query params, response status/timing, and search-cache hit/miss/write events while troubleshooting. The flag never logs the API key or response bodies, but search queries can be sensitive.
관련 문서
- Web Search overview -- all providers and auto-detection
- Perplexity Search -- structured results with domain filtering
- Exa Search -- neural search with content extraction
검증 체크리스트
- 해당 tool이 활성 profile/policy에서 허용되는지 확인
- sandbox / elevated / host 실행 경로 정책을 이해했는지 확인
- 채널·에이전트 권한과 충돌하지 않는지 확인
- 공식 CLI/
--help와 문서 옵션이 버전과 맞는지 확인