# Firecrawl API keys: find, store, rotate, and use them safely with AI agents

Source: https://botpassword.com/keys/firecrawl
Last checked: 2026-11-08

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.

## Key types

| Type | Prefix | Secret | Scope | Expiry |
|---|---|---|---|---|
| Firecrawl API key | `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

1. Sign in to Firecrawl and open the **API Keys** page at `firecrawl.dev/app/api-keys`.
2. Create a new key for the team.
3. Copy the `fc-` key and store it in `FIRECRAWL_API_KEY` on your server, never in client-side code.
4. 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

1. Create a new key on the **API Keys** page.
2. Replace `FIRECRAWL_API_KEY` in every service, CI secret and MCP client config.
3. Revoke the old key on the **API Keys** page.

## How to revoke a Firecrawl key

1. Open the **API Keys** page at `firecrawl.dev/app/api-keys`.
2. Create a replacement first if this is the account's only key, then revoke the old one; deletion is permanent.
3. To cut off an OAuth-connected app, revoke it under **Connected apps** in Settings instead.

## If the key leaked

1. Create a new Firecrawl key, then revoke the exposed one on the **API Keys** page.
2. Rotate any key that was embedded in a legacy MCP server URL, which Firecrawl treats as exposed if the URL is shared.
3. Check the team's usage for crawls and scrapes you did not run.
4. Consider an IP allowlist or spend limit for the team.

## Environment variables

- `FIRECRAWL_API_KEY`

## Gotchas

- An empty bearer token is treated as a bad key; for keyless calls the `Authorization` header 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.

## Using this key with AI agents (BotPassword)

- `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.

## FAQ

### 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.

## Sources

- https://docs.firecrawl.dev/introduction
- https://docs.firecrawl.dev/authentication
- https://docs.firecrawl.dev/dashboard
- https://docs.firecrawl.dev/api-reference/introduction
- https://docs.firecrawl.dev/features/key-restrictions
- https://docs.firecrawl.dev/firecrawl-for-platforms
- https://docs.firecrawl.dev/integrations/stripe-projects
- https://docs.firecrawl.dev/mcp-server
- https://github.com/firecrawl/cli
