Basic scraping
To scrape a single page and get clean markdown content, use the/scrape endpoint.
Scraping PDFs
Firecrawl supports PDFs. Use theparsers option (e.g., parsers: ["pdf"]) when you want to ensure PDF parsing. You can control the parsing strategy with the mode option:
auto(default) — attempts fast text-based extraction first, then falls back to OCR if needed.fast— text-based parsing only (embedded text). Fastest, but skips scanned/image-heavy pages.ocr— forces OCR parsing on every page. Use for scanned documents or whenautomisclassifies a page.
{ type: "pdf" } and "pdf" both default to mode: "auto".
Scrape options
When using the/scrape endpoint, you can customize the request with the following options.
Formats (formats)
The formats array controls which output types the scraper returns. Default: ["markdown"].
String formats: pass the name directly (e.g. "markdown").
Object formats: pass an object with
type and additional options.
Mobile scraping
Setmobile: true to emulate a mobile device. This is useful when a responsive site hides content on desktop or serves a different layout to mobile browsers.
For region-specific sites, combine with location and a mobile screenshot to verify the rendered layout:
mobile: true, add a mobile User-Agent via headers:
Content filtering
These parameters control which parts of the page appear in the output. WhenonlyMainContent is true (the default), boilerplate (nav, footer, etc.) is stripped. includeTags and excludeTags are applied against the original page DOM, not the post-filtered result, so your selectors should target elements as they appear in the source HTML. Set onlyMainContent: false to use the full page as the starting point for tag filtering.
Timing and cache
PDF parsing
Actions
Run browser actions before scraping. This is useful for dynamic content, navigation, or user-gated pages. You can include up to 50 actions per request, and the combined wait time across allwait actions and waitFor must not exceed 60 seconds.
Action execution notes
- Write requires a preceding
clickto focus the target element. - Scroll accepts an optional
selectorto scroll a specific element instead of the page. - Wait accepts either
milliseconds(fixed delay) orselector(wait until visible). - Actions run sequentially: each step completes before the next begins.
- Actions are not supported for PDFs. If the URL resolves to a PDF the request will fail.
Advanced action examples
Taking a screenshot:cURL
cURL
cURL
cURL
executeJavascript action is captured in the actions.javascriptReturns array of the response.
Full scrape example
The following request combines multiple scrape options:cURL
<h1>, <p>, <a>, and .main-content while excluding #ad and #footer, waits 1 second before scraping, sets a 15 second timeout, and enables PDF parsing.
See the full Scrape API reference for details.
JSON extraction via formats
Use the JSON format object informats to extract structured data in one pass:
Agent endpoint
Use the/v2/agent endpoint for autonomous, multi-page data extraction. The agent runs asynchronously: you start a job, then poll for results.
Agent options
Check agent status
PollGET /v2/agent/{jobId} to check progress. The response status field will be "processing", "completed", or "failed".
cURL
firecrawl.agent()) that starts the job and polls automatically until completion.
Crawling multiple pages
To crawl multiple pages, use the/v2/crawl endpoint. The crawl runs asynchronously and returns a job ID. Use the limit parameter to control how many pages are crawled. If omitted, the crawl will process up to 10,000 pages.
cURL
Response
Check crawl job
Use the job ID to check the status of a crawl and retrieve its results.cURL
next parameter, a URL to the next page of results.
Crawl prompt and params preview
You can provide a natural-languageprompt to let Firecrawl derive crawl settings. Preview them first:
cURL
Crawler options
When using the/v2/crawl endpoint, you can customize crawling behavior with the following options.
Path filtering
Crawl scope
Sitemap and deduplication
Scrape options for crawl
Crawl example
cURL
Mapping website links
The/v2/map endpoint identifies URLs related to a given website.
cURL
Map options
Here is the API Reference for it: Map Endpoint Documentation
Whitelisting Firecrawl
Allowing Firecrawl to scrape your website
- User Agent: Allow
FirecrawlAgentin your firewall or security rules. - IP addresses: Firecrawl does not use a fixed set of outbound IPs.
Allowing your application to call the Firecrawl API
If your firewall blocks outbound requests from your application to external services, you need to whitelist Firecrawl’s API server IP address so your application can reach the Firecrawl API (api.firecrawl.dev):
- IP Address:
35.245.250.27

