Documentation Index
Fetch the complete documentation index at: https://mintlify.com/firecrawl/firecrawl/llms.txt
Use this file to discover all available pages before exploring further.
Authentication
The Firecrawl API uses API keys to authenticate requests. All API requests must include your API key in the Authorization header.Getting Your API Key
Create an Account
Sign up for a free account at firecrawl.dev.
Generate an API Key
Navigate to the API Keys section in your dashboard and click “Create New API Key”.
Using Your API Key
All API requests must include your API key in theAuthorization header as a Bearer token:
REST API
Include the Authorization header in all API requests:Python SDK
You can pass your API key directly to the SDK or use an environment variable:JavaScript/Node.js SDK
Similar to Python, you can pass the API key directly or use an environment variable:Environment Variables
It’s recommended to store your API key in environment variables rather than hardcoding it in your application:- .env File
- System Environment
- Docker
- CI/CD
Create a Python: Use JavaScript: Use
.env file in your project root:python-dotenv to load environment variables:dotenv package:API Key Best Practices
Never Hardcode
Don’t hardcode API keys in your source code. Always use environment variables or secret management systems.
Rotate Regularly
Regularly rotate your API keys, especially if you suspect they may have been compromised.
Use Different Keys
Use different API keys for development, staging, and production environments.
Monitor Usage
Monitor your API usage in the dashboard to detect any unusual activity.
Rate Limits
API keys are subject to rate limits based on your plan. The current rate limit information is included in the response headers:If you exceed your rate limit, you’ll receive a
429 Too Many Requests response. The X-RateLimit-Reset header indicates when your rate limit will reset (as a Unix timestamp).Checking Credit Usage
You can check your remaining credits using the API:Troubleshooting
Invalid API Key
If you receive a401 Unauthorized error, check that:
- Your API key is correct and starts with
fc- - The API key is included in the
Authorizationheader asBearer fc-YOUR_API_KEY - Your API key hasn’t been revoked or expired
Missing Authorization Header
If you receive an error about a missing authorization header:Authorization header in your request:
Payment Required
If you receive a402 Payment Required error, you’ve exhausted your credits. Upgrade your plan or purchase additional credits in the dashboard.
Managing Multiple API Keys
You can create multiple API keys for different purposes:- Development: For local development and testing
- Staging: For pre-production environments
- Production: For live applications
- CI/CD: For automated testing and deployments
Revoking API Keys
If an API key is compromised or no longer needed:Next Steps
Quickstart
Start making API requests with your new API key
API Reference
Explore all available endpoints
SDKs
Learn more about our official SDKs
Pricing
View plans and pricing