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.
Quickstart Guide
This guide will help you make your first API request and scrape a website in minutes.
Get Your API Key
Generate an API key
Navigate to your dashboard and generate a new API key. Your API key will start with fc-.
Save your API key
Store your API key securely. You’ll need it for all API requests.
Never commit your API key to version control. Use environment variables to keep it secure.
Make Your First Request
Let’s scrape a website and get clean markdown output:
curl -X POST 'https://api.firecrawl.dev/v2/scrape' \
-H 'Authorization: Bearer fc-YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"url": "https://firecrawl.dev",
"formats": ["markdown", "html"]
}'
Response
You’ll receive a JSON response with the scraped content:
{
"success" : true ,
"data" : {
"markdown" : "# Firecrawl \n\n Turn websites into LLM-ready data..." ,
"html" : "<!DOCTYPE html><html>..." ,
"metadata" : {
"title" : "Firecrawl - The Web Data API for AI" ,
"description" : "The web crawling, scraping, and search API for AI." ,
"sourceURL" : "https://firecrawl.dev" ,
"statusCode" : 200
}
}
}
Install an SDK
For production applications, we recommend using one of our official SDKs:
Python
JavaScript
Go
Rust
Install the Python SDK: Basic usage: from firecrawl import Firecrawl
app = Firecrawl( api_key = "fc-YOUR_API_KEY" )
# Scrape a website
doc = app.scrape( "https://firecrawl.dev" , formats = [ "markdown" ])
print (doc.markdown)
# Crawl a website (automatically waits for completion)
docs = app.crawl( "https://docs.firecrawl.dev" , limit = 50 )
for doc in docs.data:
print (doc.metadata.source_url, doc.markdown[: 100 ])
# Search the web
results = app.search( "best web scraping tools 2024" , limit = 10 )
print (results)
Install the Node.js SDK: npm install @mendable/firecrawl-js
Basic usage: import Firecrawl from '@mendable/firecrawl-js' ;
const app = new Firecrawl ({ apiKey: 'fc-YOUR_API_KEY' });
// Scrape a website
const doc = await app . scrape ( 'https://firecrawl.dev' , { formats: [ 'markdown' ] });
console . log ( doc . markdown );
// Crawl a website (automatically waits for completion)
const docs = await app . crawl ( 'https://docs.firecrawl.dev' , { limit: 50 });
docs . data . forEach ( doc => {
console . log ( doc . metadata . sourceURL , doc . markdown . substring ( 0 , 100 ));
});
// Search the web
const results = await app . search ( 'best web scraping tools 2024' , { limit: 10 });
results . data . web . forEach ( result => {
console . log ( ` ${ result . title } : ${ result . url } ` );
});
Install the Go SDK: go get github.com/mendableai/firecrawl-go
Check out the Go SDK documentation for usage examples. Install the Rust SDK: Check out the Rust SDK documentation for usage examples.
One of Firecrawl’s most powerful features is extracting structured data using schemas:
from firecrawl import Firecrawl
from pydantic import BaseModel
app = Firecrawl( api_key = "fc-YOUR_API_KEY" )
class CompanyInfo ( BaseModel ):
company_mission: str
is_open_source: bool
is_in_yc: bool
result = app.scrape(
'https://firecrawl.dev' ,
formats = [{ "type" : "json" , "schema" : CompanyInfo.model_json_schema()}]
)
print (result.json)
# Output: {"company_mission": "Turn websites into LLM-ready data", "is_open_source": true, "is_in_yc": true}
You can also extract data without a schema using a simple prompt: result = app.scrape(
'https://firecrawl.dev' ,
formats = [{ "type" : "json" , "prompt" : "Extract the company mission" }]
)
Crawl an Entire Website
To scrape multiple pages from a website:
curl -X POST 'https://api.firecrawl.dev/v2/crawl' \
-H 'Authorization: Bearer fc-YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"url": "https://docs.firecrawl.dev",
"limit": 100,
"scrapeOptions": {
"formats": ["markdown"]
}
}'
The SDKs automatically handle polling for crawl completion. With the REST API, you’ll need to poll the status endpoint manually.
Next Steps
Authentication Learn about API keys and authentication
Scraping Deep dive into scraping options and formats
Crawling Master website crawling with advanced options
Agent Use AI agents for autonomous data gathering
Need Help?
API Reference Complete API documentation
Discord Community Join our community for support