Installation
Install the SDK using pip:Quick Start
Authentication
Get your API key from firecrawl.dev and set it as an environment variable or pass it directly:Scraping
Basic Scrape
Scrape a single URL and get content in various formats:Structured Data Extraction
Extract structured data using Pydantic models:Extract with Prompt (No Schema)
Additional Formats
Crawling
Basic Crawl (Auto-Wait)
Crawl a website and automatically wait for completion:Async Crawl (Manual Polling)
Start a crawl and poll manually:Cancel a Crawl
Manual Pagination
For large crawls, manually paginate through results:WebSocket Crawling
Watch crawl progress in real-time:Agent
Use the AI agent to autonomously gather data from the web:Agent with Schema
Agent with URLs
Focus the agent on specific pages:Model Selection
Map
Generate a list of all URLs on a website:Map with Search
Search
Search the web and optionally scrape results:Search with Content Scraping
Batch Scraping
Scrape multiple URLs in parallel:Async Batch Scrape
Async Client
For async operations, use theAsyncFirecrawl class:
v1 Compatibility
Legacy v1 API is available underfirecrawl.v1: