Keys / Brave Search
BRAVE_API_KEY
The Brave Search API key your app searches the web, news, images and videos with. It goes in the X-Subscription-Token header.
- Expires
- the docs don't say
- API
- none; dashboard only
Get it
Create one on api-dashboard.search.brave.com/app/keys. The steps aren't recorded yet.
Set it
BRAVE_API_KEY=...
The Brave Search MCP server reads it from this variable. For the HTTP API, your app sends it in X-Subscription-Token. Or keep it out of .env with keypin: keypin run -- npm run dev
Replace it
- In the dashboard's API Keys section, generate a new key.
- Deploy it everywhere that reads
BRAVE_API_KEY. - Check that searches succeed with the new key, then revoke the old one.
Set rotate_every on the key in keypin.toml and a rotated date on its vault item, and keypin status shows when it's due.