Scrape API Overview
Document parsing is performed via POST /v2/scrape. When your URL points to a supported document type (PDF/Word/Excel), Firecrawl detects the file type and picks the appropriate parser.
Basics
Section titled “Basics”- Endpoint:
POST https://api.firecrawl.dev/v2/scrape - Headers:
Authorization: Bearer <token>,Content-Type: application/json
Minimal example (Markdown)
Section titled “Minimal example (Markdown)”import Firecrawl from '@mendable/firecrawl-js'
const firecrawl = new Firecrawl({ apiKey: 'fc-YOUR-API-KEY' })
const doc = await firecrawl.scrape('https://example.com/file.pdf', { formats: ['markdown'], onlyMainContent: true, parsers: [{ type: 'pdf' }],})