{"id":639,"date":"2026-03-21T22:52:58","date_gmt":"2026-03-21T14:52:58","guid":{"rendered":"https:\/\/pa.yingzhi8.cn\/index.php\/2026\/03\/21\/tools-brave-search\/"},"modified":"2026-03-23T19:10:50","modified_gmt":"2026-03-23T11:10:50","slug":"tools-brave-search","status":"publish","type":"post","link":"https:\/\/pa.yingzhi8.cn\/index.php\/2026\/03\/21\/tools-brave-search\/","title":{"rendered":"Brave Search"},"content":{"rendered":"<h1>Brave Search<\/h1>\n<h1>Brave Search API<\/h1>\n<p>OpenClaw supports Brave Search API as a <code>web_search<\/code> provider.<\/p>\n<h2>Get an API key<\/h2>\n<ol>\n<li>Create a Brave Search API account at <a href=\"https:\/\/brave.com\/search\/api\/\">https:\/\/brave.com\/search\/api\/<\/a><\/li>\n<li>In the dashboard, choose the <strong>Search<\/strong> plan and generate an API key.<\/li>\n<li>Store the key in config or set <code>BRAVE_API_KEY<\/code> in the Gateway environment.<\/li>\n<\/ol>\n<h2>Config example<\/h2>\n<p>&#8220;`json5  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\n{<br \/>\n  plugins: {<br \/>\n    entries: {<br \/>\n      brave: {<br \/>\n        config: {<br \/>\n          webSearch: {<br \/>\n            apiKey: &#8220;BRAVE_API_KEY_HERE&#8221;,<br \/>\n          },<br \/>\n        },<br \/>\n      },<br \/>\n    },<br \/>\n  },<br \/>\n  tools: {<br \/>\n    web: {<br \/>\n      search: {<br \/>\n        provider: &#8220;brave&#8221;,<br \/>\n        maxResults: 5,<br \/>\n        timeoutSeconds: 30,<br \/>\n      },<br \/>\n    },<br \/>\n  },<br \/>\n}<\/p>\n<pre><code>\nProvider-specific Brave search settings now live under `plugins.entries.brave.config.webSearch.*`.\nLegacy `tools.web.search.apiKey` still loads through the compatibility shim, but it is no longer the canonical config path.\n\n## Tool parameters\n\n| Parameter     | Description                                                         |\n| ------------- | ------------------------------------------------------------------- |\n| `query`       | Search query (required)                                             |\n| `count`       | Number of results to return (1-10, default: 5)                      |\n| `country`     | 2-letter ISO country code (e.g., \"US\", \"DE\")                        |\n| `language`    | ISO 639-1 language code for search results (e.g., \"en\", \"de\", \"fr\") |\n| `ui_lang`     | ISO language code for UI elements                                   |\n| `freshness`   | Time filter: `day` (24h), `week`, `month`, or `year`                |\n| `date_after`  | Only results published after this date (YYYY-MM-DD)                 |\n| `date_before` | Only results published before this date (YYYY-MM-DD)                |\n\n**Examples:**\n\n```javascript  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}\n\/\/ Country and language-specific search\nawait web_search({\n  query: \"renewable energy\",\n  country: \"DE\",\n  language: \"de\",\n});\n\n\/\/ Recent results (past week)\nawait web_search({\n  query: \"AI news\",\n  freshness: \"week\",\n});\n\n\/\/ Date range search\nawait web_search({\n  query: \"AI developments\",\n  date_after: \"2024-01-01\",\n  date_before: \"2024-06-30\",\n});\n<\/code><\/pre>\n<h2>Notes<\/h2>\n<ul>\n<li>OpenClaw uses the Brave <strong>Search<\/strong> 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.<\/li>\n<li>Each Brave plan includes <strong>$5\/month in free credit<\/strong> (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 <a href=\"https:\/\/brave.com\/search\/api\/\">Brave API portal<\/a> for current plans.<\/li>\n<li>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 <a href=\"https:\/\/api-dashboard.search.brave.com\/terms-of-service\">Terms of Service<\/a>.<\/li>\n<li>Results are cached for 15 minutes by default (configurable via <code>cacheTtlMinutes<\/code>).<\/li>\n<\/ul>\n<p>See <a href=\"\/tools\/web\">Web tools<\/a> for the full web_search configuration.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Brave Search Brave Search API OpenClaw supports Brave S [&hellip;]<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-639","post","type-post","status-publish","format-standard","hentry","category-docs"],"_links":{"self":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/639","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/comments?post=639"}],"version-history":[{"count":3,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/639\/revisions"}],"predecessor-version":[{"id":8853,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/639\/revisions\/8853"}],"wp:attachment":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/media?parent=639"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/categories?post=639"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/tags?post=639"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}