Skip to main content

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

1

Sign up for Firecrawl

Go to firecrawl.dev and create a free account.
2

Generate an API key

Navigate to your dashboard and generate a new API key. Your API key will start with fc-.
3

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\nTurn 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:
Install the Python SDK:
pip install firecrawl-py
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)

Extract Structured Data

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