# Document Parsing API

Documentation: https://docs.firecrawl.dev/features/parse

## Any document in. Markdown out.

/parse turns PDF, Word, Excel, and HTML files into clean markdown or structured JSON.

- [Try Parse now](/app/playground?endpoint=parse)
- [Read the docs](https://docs.firecrawl.dev/features/parse)

Example: a report.pdf goes in and report.md comes out, with the heading kept and a table preserved as a markdown table.

```markdown
Revenue grew across all three
regions, with EMEA leading at
+28% year over year.

| Region | Revenue | Growth |
| ------ | ------- | ------ |
| NA     | $4.2M   | +12%   |
| EMEA   | $3.1M   | +28%   |
| APAC   | $1.8M   | +19%   |
```

## Features

### Production-ready parsing for your agents

Built in Rust. Parse classifies, extracts, and structures a document in one call, skipping the expensive work whenever the text is already there.

### Milliseconds, not minutes (Rust parsing engine)

No models to load, no services to call. Documents convert in single-digit milliseconds.

Median conversion time for an Office document, by engine:

| Engine             | Time per document |
| ------------------ | ----------------- |
| anydoc (Firecrawl) | 4.7 ms            |
| mammoth            | 52.5 ms           |
| pandoc             | 102.1 ms          |
| markitdown         | 134.8 ms          |
| libreoffice        | 1,129.5 ms        |

### PDFs, docs, and spreadsheets (20 file types)

Word, Excel, PowerPoint, OpenDocument, RTF, EPUB, CSV, HTML, and PDF all come back the same way.

### OCR only where it's needed (smart OCR routing)

Every page is classified before anything is rendered, so text-based pages are extracted natively and only the scanned ones reach a GPU. About half of PDFs are text based, so they never touch OCR.

### Tables survive the trip (layout aware)

Headings, tables, nested lists, footnotes, and reading order all come through.

### Straight to typed JSON (schema extraction)

Hand Parse a schema and get the fields you asked for, not a wall of markdown. For example, an invoice returns `vendor` (string), `total` (number), and `dueDate` (string) as typed fields.

### The engine is on GitHub (open source engines)

pdf-inspector and anydoc are MIT licensed with Python, Node, and Rust bindings. Run them yourself, or let us handle OCR and scale. Both are MIT licensed and self-hostable.

| Engine        | What it does                      | Source                                     |
| ------------- | --------------------------------- | ------------------------------------------ |
| pdf-inspector | PDF classification and extraction | https://github.com/firecrawl/pdf-inspector |
| anydoc        | Office documents to Markdown      | https://github.com/firecrawl/anydoc        |

## For AI agents

Built into the AI tools you already use. Use Firecrawl from Claude Code, Cursor, Windsurf, and the agent harnesses your team already runs.

### One command

Connect your agent to Firecrawl through MCP or the CLI and skills. Paste this prompt into your AI agent:

```text
Read and follow https://www.firecrawl.dev/agent-onboarding/SKILL.md
```

CLI:

```bash
npx -y firecrawl-cli@latest init --all --browser
```

MCP:

```json
{
  "mcpServers": {
    "firecrawl": {
      "url": "https://mcp.firecrawl.dev/v2/mcp-oauth"
    }
  }
}
```

[View the docs](https://docs.firecrawl.dev/ai-onboarding)

### Are you an AI agent?

Fetch this skill to connect Firecrawl and Alexandria through a connector, MCP or the CLI.

```bash
curl -sL https://www.firecrawl.dev/agent-onboarding/SKILL.md
```

[View the skill](https://www.firecrawl.dev/agent-onboarding/SKILL.md)

## Pricing

Parse costs 1 Firecrawl credit per PDF page, whether the page is read from embedded text or through OCR. LLM-backed formats such as json or summary add to that, and results are never cached. Free accounts include 1,000 Firecrawl credits per month, no credit card required. See [Pricing](/pricing.md) for plans.

## Parse FAQ

### General

**What is Firecrawl Parse?** Firecrawl Parse turns a document into clean markdown your agent can read. Upload a PDF, Word doc, spreadsheet, or HTML file and Parse returns the same structured markdown, JSON, or summary you'd get from scraping a web page. One endpoint, one consistent output format, no matter what goes in.

**Which file types can I parse?** Twenty extensions: PDF (.pdf), Word (.docx, .doc, .docm), Excel (.xlsx, .xls, .xlsm, .xlsb), PowerPoint (.pptx, .ppt, .pptm), OpenDocument (.odt, .ods, .odp), .rtf, .epub, .csv, and HTML (.html, .htm, .xhtml). Files can be up to 50 MB per request, and GET /v2/parse/formats returns the current list with MIME types.

**Who uses Parse?** Teams building document ingestion for RAG, invoice and contract extraction, research pipelines over academic PDFs, and any agent that gets handed a file instead of a URL. Over 1.25M developers and 150,000+ companies build with Firecrawl, including teams at Zapier, Botpress, Vercel, and Coinbase.

**When should I use Parse vs. Scrape?** Use Scrape when you have a URL and want the page behind it. Use Parse when you already have the bytes: a file upload from your users, a document pulled from S3, an email attachment. Both return the same clean markdown, so the rest of your pipeline doesn't have to care where the content came from.

### How It Works

**Why is Parse so fast?** Two open-source Rust engines do the heavy lifting. pdf-inspector reads a PDF's internals, its fonts, text operators, and image coverage, to classify every page in milliseconds without rendering it. anydoc converts Word, Excel, OpenDocument, and RTF files straight into GitHub-Flavored Markdown, with a median conversion time under 5 ms per document. Neither loads a model or calls an external service.

**Does every page go through OCR?** No, and that's the point. Parse classifies each page first and only sends the ones that actually need it to the GPU. Roughly half of real-world PDFs are text-based and never touch OCR, which is where most of the speedup comes from. You can override the behavior per request with the pdf parser mode: fast for text-only extraction, auto for text-first with OCR fallback, or ocr to force every page through OCR.

**What happens to tables and layout?** They survive. A layout model detects tables, formulas, text blocks, and headers as separate regions, then tunes extraction per region: tables get a higher token budget, formulas are preserved in LaTeX, and reading order is predicted for multi-column documents. Headings, nested lists, footnotes, and links come through as ordinary markdown.

**Can Firecrawl Parse turn PDF tables into JSON?** Yes. Request the json format with a schema that describes one table row, and Parse returns the table as an array of typed row objects. To keep the original layout instead, turn on layout blocks for PDFs, and each table comes back as a table block with its HTML markup, page number, and bounding box, at no extra cost.

**Can Firecrawl Parse read scanned PDFs?** Yes. In the default auto mode, Firecrawl Parse reads embedded text first and runs OCR on any page that is only an image, so scanned and mixed PDFs come back as markdown in one call. Set the pdf parser mode to ocr to force OCR on every page. OCR pages cost the same 1 Firecrawl credit per page as text pages.

**How do I turn a PDF into markdown for RAG with Firecrawl Parse?** Upload the PDF to Firecrawl Parse, or pass a public PDF URL to Firecrawl Scrape, and you get one markdown document with headings, tables, and reading order kept. Turn on pageMarkers to tag each page break inside the markdown, or pages to get one markdown string per page, so every chunk can cite the page it came from. Neither option adds Firecrawl credits.

**What formats can I get back?** Markdown by default. You can also request summary, links, images, cleaned or raw HTML, and json with a schema or a prompt to pull typed fields straight out of the document. Request several at once and they all come back in the same response.

**How does Parse handle very large documents?** Set maxPages to bound the work and timeout to control how long you're willing to wait, up to 300 seconds. The response reports numPages alongside totalPages, so totalPages greater than numPages tells you the output was truncated. For batches of files, call Parse once per file in parallel; there's no batch upload variant.

**What happens to my documents after parsing?** Parse supports Zero Data Retention, and results are never cached, so every call re-parses from the bytes you sent. Firecrawl is SOC 2 Type II certified, and a DPA is available. You can also redact personally identifiable information from the returned markdown with redactPII.

### Pricing

**How much does Parse cost?** 1 Firecrawl credit per PDF page, whether the page is read from embedded text or through OCR, so a 40-page report costs 40 Firecrawl credits as markdown. LLM-backed formats such as json or summary add to that. Set maxPages to cap the bill on long files. Because results are never cached, re-uploading the same file is billed again.

**Is there a free tier?** Yes. Free accounts include 1,000 Firecrawl credits per month, enough to parse about 1,000 PDF pages to markdown and try every format. No credit card required.

**Can I run the parsing engines myself?** Yes. pdf-inspector and anydoc are both MIT licensed and published on GitHub, with bindings for Python, Node.js, and Rust, plus a WebAssembly build that runs in the browser. Run them on your own infrastructure, or use the hosted endpoint and get OCR, layout detection, and structured extraction on top.

_Canonical HTML: https://www.firecrawl.dev/parse_

## Site Navigation

### Global Hub
- [Home](/index.md)
- [Pricing](/pricing.md)
- [Blog](/blog.md)
- [Glossary](/glossary.md)
- [Alternatives](/alternatives.md)
- [Tools](/tools.md)
- [Use Cases](/use-cases.md)
- [Integrations](/integrations.md)
- [Changelog](/changelog.md)
