Clark Farming CompanySoftware Foundry

Agent Stack · Tool/System

Firecrawl Document Parsing

Firecrawl provides automated document parsing capabilities that convert various file formats (PDFs, Excel spreadsheets, Word documents) into clean, structured markdown. The service detects file types automatically from URLs and processes them without requiring separate upload steps. This is particularly useful for extracting structured data from business documents, reports, and spreadsheets as part of automated scrap…

needs-reviewinferred-with-source-trail4 source links2 resolved links
wiki/wiki/julius/firecrawl-document-parsing.md

Answer

Firecrawl provides automated document parsing capabilities that convert various file formats (PDFs, Excel spreadsheets, Word documents) into clean, structured markdown. The service detects file types automatically from URLs and processes them without requiring separate upload steps. This is particularly useful for extracting structured data from business documents, reports, and spreadsheets as part of automated scrap…

Auto-generated neutral summary from the source page — needs human review before trusted use.

Evidence & Source Cards

Externalhttps://docs.firecrawl.dev/features/document-parsingexternal/unverified
Externalhttps://firecrawl.dev/pricingexternal/unverified
Externalhttps://docs.firecrawl.dev/api-reference/v2-introductionexternal/unverified
Externalhttps://github.com/firecrawl/firecrawlexternal/unverified

Source Excerpt

Overview

Firecrawl provides automated document parsing capabilities that convert various file formats (PDFs, Excel spreadsheets, Word documents) into clean, structured markdown. The service detects file types automatically from URLs and processes them without requiring separate upload steps. This is particularly useful for extracting structured data from business documents, reports, and spreadsheets as part of automated scraping workflows.

Why it matters: Instead of building custom parsers for each document format, agents can use Firecrawl's unified API to extract markdown from any supported file type, enabling consistent downstream processing by Large Language Models.

Technical Specifications

Supported Document Formats

Verified: Firecrawl supports three major document categories:

FormatExtensionsOutput StructureNotes
Excel Spreadsheets.xlsx, .xlsEach worksheet → HTML table, separated by H2 headings with sheet namePreserves cell formatting and data types
Word Documents.docx, .doc, .odt, .rtfExtracts text with document structure (headings, paragraphs, lists, tables)Maintains basic formatting and styling
PDF Documents.pdfText content with layout information, sections, paragraphsSupports both text-based and scanned PDFs via OCR

PDF Parsing Modes

Verified: Three parsing strategies available for PDFs:

ModeDescriptionSpeedBest ForCredit Cost
auto (default)Attempts fast text extraction first, falls back to OCR if neededFastMost documents; handles mixed content1 credit/page
fastText-only extraction from embedded text layerFastestBorn-digital PDFs with selectable text1 credit/page
ocrForces OCR on every pageSlowestScanned documents, image-heavy PDFs, when auto misclassifies1 credit/page

Configuration syntax:

// Object syntax with explicit mode
parsers: [{ type: "pdf", mode: "ocr", maxPages: 20 }]

// Default (auto mode)
parsers: [{ type: "pdf" }]

Pricing

Verified: Document parsing is priced at 1 credit per page for PDFs. Excel and Word document pricing follows standard scraping credits (verify current rates in Firecrawl pricing documentation).

Implementation

Method 1: Basic Document Scraping

Prerequisites:

Procedure:

  1. Initialize Firecrawl client
   import Firecrawl from '@mendable/firecrawl-js';

   const firecrawl = new Firecrawl({
     apiKey: "fc-YOUR-API-KEY"
   });
  1. Scrape document (auto-detects format)
   // Excel file
   const excelDoc = await firecrawl.scrape('https://example.com/data.xlsx');
   console.log(excelDoc.markdown);

   // Word document
   const wordDoc = await firecrawl.scrape('https://example.com/report.docx');
   console.log(wordDoc.markdown);

   // PDF (default auto mode)
   const pdfDoc = await firecrawl.scrape('https://example.com/report.pdf');
   console.log(pdfDoc.markdown);
  1. Process markdown output

Verification: Check that doc.markdown contains expected content structure. For multi-sheet Excel files, verify each sheet appears as separate section.

Method 2: PDF with Custom Parsing Mode

Prerequisites: Same as Method 1

Procedure:

import Firecrawl from '@mendable/firecrawl-js';

const firecrawl = new Firecrawl({ apiKey: "fc-YOUR-API-KEY" });

// Force OCR for scanned document
const ocrResult = await firecrawl.scrape(
  'https://example.com/scanned-report.pdf',
  {
    parsers: [{ type: "pdf", mode: "ocr", maxPages: 20 }]
  }
);

// Fast mode for born-digital PDF (skip OCR entirely)
const fastResult = await firecrawl.scrape(
  'https://example.com/digital-report.pdf',
  {
    parsers: [{ type: "pdf", mode: "fast" }]
  }
);

// Auto mode with page limit
const autoResult = await firecrawl.scrape(
  'https://example.com/long-report.pdf',
  {
    parsers: [{ type: "pdf", maxPages: 50 }]
  }
);

Verification: Compare output quality between modes. OCR mode should extract text from scanned pages where fast mode returns empty or garbled content.

Method 3: Batch Document Processing

Prerequisites: Firecrawl API key, list of document URLs

Procedure:

import Firecrawl from '@mendable/firecrawl-js';

const firecrawl = new Firecrawl({ apiKey: "fc-YOUR-API-KEY" });

const documentUrls = [
  'https://example.com/q1-report.pdf',
  'https://example.com/q2-report.xlsx',
  'https://example.com/contract.docx'
];

// Process multiple documents in parallel
const results = await Promise.all(
  documentUrls.map(url => firecrawl.scrape(url))
);

results.forEach((doc, index) => {
  console.log(`Document ${index + 1}:`);
  console.log(doc.markdown);
});

Verification: All documents should be processed and returned in order. Check for any failed requests in the results array.

Example Output Formats

Excel Spreadsheet (.xlsx):

## Sheet1

| Name   | Value |
|--------|-------|
| Item 1 | 100   |
| Item 2 | 200   |

## Sheet2

| Date       | Description    |
|------------|----------------|
| 2023-01-01 | First quarter  |
| 2023-04-01 | Second quarter |

Word Document (.docx):

# Annual Report 2025

## Executive Summary

This document contains the annual financial summary...

### Key Metrics

- Revenue: $1.2M
- Growth: 15%
- Customers: 450

## Financial Details

| Quarter | Revenue | Expenses |
|---------|---------|----------|
| Q1      | $300K   | $250K    |
| Q2      | $320K   | $260K    |

PDF Document:

# Technical Specification v2.1

## 1. Introduction

This specification defines the requirements for...

### 1.1 Scope

The system shall support the following features:

1. Feature A
2. Feature B
3. Feature C

## 2. Technical Requirements

[Content continues with preserved structure]

Source excerpt truncated at 220 of 310 lines. Open the canonical wiki path above for the full page.

Relationships

Outbound links

Referenced by

Tags

document-parsingocrpdffirecrawldata-extractionmarkdown