Firecrawl API keys start with fc-, are created on the API Keys page at firecrawl.dev/app/api-keys, and are sent as Authorization: Bearer <key>. Firecrawl's SDKs, CLI and docs use the FIRECRAWL_API_KEY environment variable. A Firecrawl key has full access to the team that owns it and no expiry, and an account must always keep one active key, so a replacement has to exist before a leaked key can be revoked.
Firecrawl key types
| Type | Prefix | Secret? | Scope | Expiry |
|---|---|---|---|---|
| Firecrawl API key Keys created for OAuth and MCP OAuth connections are separate per connection, so deleting a dashboard key does not affect them. | fc- | Yes | Full access to the team that owns it, unless Key Restrictions (an enterprise feature) limit its formats and endpoints | Does not expire; deleted keys are removed permanently, not soft-deleted |
How to create a Firecrawl key
- Sign in to Firecrawl and open the API Keys page at
firecrawl.dev/app/api-keys. - Create a new key for the team.
- Copy the
fc-key and store it inFIRECRAWL_API_KEYon your server, never in client-side code. - Or run
npx -y firecrawl-cli@latest init --all --browser, which signs in through the browser and sets up the Firecrawl CLI.
Limiting what the key can do
A standard Firecrawl key can do anything its team can, so keep it on a server. Enterprise organizations can turn on Key Restrictions, which give a key two allowlists, output formats and endpoint groups, enforced at authentication; a restricted key asking for a blocked format or endpoint gets a 403, and it cannot call the legacy v0 API. Team-wide IP allowlists and spend limits are separate controls listed in Firecrawl's security overview. The keyless tier (/v2/scrape and /v2/search without any Authorization header) is limited per IP address and needs no key at all.
How to rotate a Firecrawl key
- Create a new key on the API Keys page.
- Replace
FIRECRAWL_API_KEYin every service, CI secret and MCP client config. - Revoke the old key on the API Keys page.
Firecrawl requires at least one active key per account, which is why rotation is create-then-revoke. Partners on Firecrawl for Platforms can rotate a user's key in one call with a platform key, and accounts provisioned through Stripe Projects can run stripe projects rotate firecrawl.
How to revoke a Firecrawl key
- Open the API Keys page at
firecrawl.dev/app/api-keys. - Create a replacement first if this is the account's only key, then revoke the old one; deletion is permanent.
- To cut off an OAuth-connected app, revoke it under Connected apps in Settings instead.
If your Firecrawl key leaked
- Create a new Firecrawl key, then revoke the exposed one on the API Keys page.
- Rotate any key that was embedded in a legacy MCP server URL, which Firecrawl treats as exposed if the URL is shared.
- Check the team's usage for crawls and scrapes you did not run.
- Consider an IP allowlist or spend limit for the team.
Environment variables and CLI
Firecrawl's SDKs and docs read the key from FIRECRAWL_API_KEY.
Firecrawl CLI (firecrawl): firecrawl login opens a browser sign-in; firecrawl login --api-key fc-… stores a key directly, and FIRECRAWL_API_KEY works instead of stored credentials
Things that catch people out
- An empty bearer token is treated as a bad key; for keyless calls the
Authorizationheader must be absent. - You cannot revoke your only Firecrawl key until another one exists.
- Deleted keys are gone for good; Firecrawl cannot tell a deleted key from one that never existed, so a deleted key cannot be recovered.
Common Firecrawl authentication errors
401 - The API key was not provided.
No Firecrawl key was sent, the key was revoked, or the request sent an Authorization header with an empty token, which Firecrawl rejects with "Token missing".
403 - Forbidden
A key with Key Restrictions asked for a format or endpoint outside its allowlists, or called the legacy v0 API.
Using your Firecrawl key with AI agents
A coding agent that can read your .env file or your shell history can read the key, and anything in its context can end up in logs, transcripts or a prompt-injected request. The safer pattern is to keep the key in a credential broker that performs the authenticated step for the agent and hands back only the result.
BotPassword works this way. For a Firecrawl key, these intents fit:
| Intent | What BotPassword does |
|---|---|
run_with | Runs a command with the key injected as an environment variable or a 0600 temporary file, never on the command line, and redacts the key from the output. |
http_request | Makes an authenticated API call after checking the destination against the hosts this key may be sent to. The response comes back with credential-shaped values redacted, and one that holds the key itself is refused. |
Firecrawl also publishes its own MCP server. Whatever server the agent uses, keep the credential it authenticates with out of the agent's context.
Set it up in your agent: Aider · Amp · Claude Code · Claude Desktop · Cline · OpenAI Codex CLI · all agents
Frequently asked questions
Where do I get a Firecrawl API key?
Sign in and open firecrawl.dev/app/api-keys. Keys start with fc-.
What is the Firecrawl API key environment variable?
FIRECRAWL_API_KEY. The docs, the SDKs and the Firecrawl CLI all read it.
Do I need an API key to use Firecrawl?
Not for light use; /v2/scrape and /v2/search work keyless with a per-IP limit. A key gives higher limits and the other endpoints.
How do I add Firecrawl to Claude Code or another MCP client?
Use the OAuth endpoint https://mcp.firecrawl.dev/v2/mcp-oauth, which needs no key or headers, or https://mcp.firecrawl.dev/v2/mcp with the key as a bearer token. For Claude Code, claude mcp add --transport http firecrawl https://mcp.firecrawl.dev/v2/mcp adds the keyless server.
Do Firecrawl API keys expire?
No. Firecrawl keys have no expiry date and last until you revoke them, so rotate them yourself.
Can an AI agent use my Firecrawl key without seeing it?
Yes, if the key never enters the agent's context. Instead of pasting the key into a chat or leaving it in a .env file the agent can read, keep it in a credential broker that injects it into the command or request on the agent's behalf. BotPassword does this with run_with, http_request, so the agent gets the result and never the value.