solution tools medium macos linux windows

Web search: missing_brave_api_key even though it's configured

If `web_search` fails with `missing_brave_api_key` but you set the key via `openclaw configure --section web`, make sure the running gateway service can see the secret (often via `~/.openclaw/.env`) and restart the gateway.

By CoClaw Team •

Symptoms

  • web_search fails with missing_brave_api_key.
  • You already ran openclaw configure --section web and the config shows an apiKey field (often redacted when printed).

Cause

The running gateway process may not be reading the same secrets source you just edited.

Common cases:

  • You edited config in an interactive shell, but the gateway is running as a background service with a different environment.
  • The Brave key exists in config, but the gateway/tool path is only checking the environment variable in your current version/build.

Fix

1) Put the key in ~/.openclaw/.env and restart the gateway (most reliable)

printf 'BRAVE_API_KEY=%s\n' 'YOUR_BRAVE_KEY' >> ~/.openclaw/.env
openclaw gateway restart

2) Confirm config flags are sane

openclaw config get tools.web.search.enabled
openclaw config get tools.web.search.provider

Notes:

  • enabled should not be false.
  • provider should be brave (or unset; brave is the default).

Verify

  • Run a small search and confirm it returns results (not missing_brave_api_key).
  • If it still fails, capture the tool error payload + openclaw gateway status --json (redact tokens).

Verification & references

  • Reviewed by:CoClaw Code Team
  • Last reviewed:March 14, 2026
  • Verified on: macOS · Linux · Windows

References

Want to explore more? Browse all solutions or ask in the Community Forum .
Report a problem

Related Resources

Venice AI: models unavailable or requests make no API calls
Fix
Fix Venice provider issues by checking VENICE_API_KEY, network reachability to api.venice.ai, model refs, and credits/billing.
Moonshot (Kimi): API works in browser but OpenClaw keeps failing (wrong endpoint)
Fix
Fix Moonshot/Kimi model failures by using the correct baseUrl for your region (api.moonshot.ai vs api.moonshot.cn), and ensuring MOONSHOT_API_KEY is set on the gateway host.
Web chat: dragging an image opens it in a new tab (no upload)
Fix
Work around OpenClaw web chat drag-and-drop image uploads opening in a new tab by using paste/file picker and keeping images small until the UI fix lands.
Onboarding skips Model/Auth setup (agent unresponsive after install)
Fix
Fix a broken onboarding flow where OpenClaw defaults to a model without credentials, causing the agent to hang, by configuring provider auth manually or downgrading.
OpenClaw Brave `llm-context` Web Search: When It’s Better Than Normal Search
Guide
A practical guide to Brave's `llm-context` mode in OpenClaw: what it returns, when to use it instead of normal web search, how to think about freshness and region, and how to avoid common key and environment mistakes.
OpenClaw Not Responding: Fix 'no output', Incorrect API, Rate Limits, and Silent Failures
Guide
A high-signal checklist for when OpenClaw stops replying (TUI shows '(no output)', channels go quiet, or logs show 401/403/429). Covers config precedence, provider auth, model allowlists, relay API-mode mismatch, and rate-limit/billing traps.