Skip to content
Docs Security Sign in
PdfParse

PyMuPDF alternative PDF parsing API with JSON, Markdown and CSV

PdfParse is a PyMuPDF alternative for teams that need structured data from PDFs and scans without shipping an AGPL library inside their product. PyMuPDF is a fast library for reading text and drawing positions out of digital PDFs, and it stays a good choice for that. PdfParse is a hosted API: you send the file, you get JSON, Markdown and CSV tables back, scans included, and there is no PDF engine to install, patch or license.

Parse PDF

Parse a PDF that gives your PyMuPDF script trouble

Pick the file that breaks your current code: a scanned invoice, a table that continues over three pages or a statement with two columns. Inspect the fields, text and tables against the source page.

Drop a PDF or scan

PDF, PNG or JPG up to 10 MB. Page one is parsed in full, right here.

Or try a sample file
Output

Optional. Comma separated field names, for example invoice_number, total, due_date.

Page one is parsed in your browser and never uploaded. No card needed to try page one.

What one call returns

Page one rendered with every block outlined, next to the JSON your code receives.

  1. Reading text layer
  2. Detecting layout
  3. Extracting tables
  4. Building JSON
Rendered page Page 1 of your document

Headings, paragraphs, tables and totals detected

heading
Invoice
paragraph
Harbor Street Joinery
14 Dock Lane
Portsmouth, NH 03801
key_value
Invoice no.INV-2026-0418IssuedOct 14, 2026DueNov 13, 2026
table
DescriptionQtyUnitAmount
Oak countertop, 2.4 m2640.001,280.00
Cabinet doors, shaker1285.001,020.00
On site fitting1450.00450.00
total
Subtotal2,750.00Tax 8.5%233.75Total dueUSD 2,983.75
paragraph
Payment by bank transfer within 30 days.
Quote the invoice number with your transfer.
Goods remain ours until paid in full.
footer
Harbor Street JoineryPage 1 of 2
Locked page

Pages 2 and later are parsed after you create an account.

Output
{
  "document": {
    "pages": 2,
    "parsed_pages": 1,
    "language": "en"
  },
  "pages": [
    {
      "number": 1,
      "blocks": [
        { "type": "heading", "text": "Invoice", "bbox": [48, 52, 132, 84] },
        { "type": "paragraph", "text": "Harbor Street Joinery, 14 Dock Lane, Portsmouth" },
        { "type": "key_value", "pairs": {
            "Invoice no.": "INV-2026-0418",
            "Issued": "Oct 14, 2026",
            "Due": "Nov 13, 2026" } },
        { "type": "table", "columns": ["Description", "Qty", "Unit", "Amount"],
          "rows": [
            ["Oak countertop, 2.4 m", 2, 640.00, 1280.00],
            ["Cabinet doors, shaker", 12, 85.00, 1020.00],
            ["On site fitting", 1, 450.00, 450.00] ] },
        { "type": "total", "label": "Total due", "value": 2983.75, "currency": "USD", "confidence": 0.98 }
      ]
    }
  ],
  "fields": {
    "invoice_number": { "value": "INV-2026-0418", "confidence": 0.99, "page": 1 },
    "total": { "value": 2983.75, "confidence": 0.98, "page": 1 },
    "due_date": { "value": "2026-11-13", "confidence": 0.97, "page": 1 }
  }
}

Downloads from the demo include a watermark field and cover page one only.

Page one is parsed in your browser, so your file never reaches our servers.

Request
The same request from your code
Read the API reference
$ curl https://api.pdfparse.ai/v1/parse \
  -H "Authorization: Bearer $PDFPARSE_API_KEY" \
  -F file[email protected] \
  -F outputs=json,markdown,csv
200 OK, 1 page parsed

PyMuPDF and PdfParse side by side

PyMuPDF binds the MuPDF engine and gives you text blocks, words, fonts and coordinates, plus table detection and page rendering. You write the logic that turns those pieces into a record. PdfParse runs that logic for you and returns the finished structure.

What matters PyMuPDF PdfParse
What it is Python library bound to the MuPDF engine, runs in your process Hosted API with Python and Node SDKs
License AGPL, or a paid commercial license from Artifex Subscription, nothing to license inside your code
Digital PDF text Excellent, fast and local Layout analysis returns text, blocks and bounding boxes
Scans and photos You wire in an OCR engine and its language data yourself OCR is built in at the same page price
Tables Table finder that returns cells, you clean and join them across pages Table extraction with CSV output on every plan
Named fields Not provided, you write rules per layout Schemas on Growth return fields with confidence and source page
Output Python objects, text, dicts JSON, Markdown and CSV from one call
Where it runs Your servers, in your language Any language over HTTPS, Python and Node SDKs included
Cost model Library is free under AGPL, you pay in engineering time or a license Starter is $49 monthly or $24 per month billed yearly, with 2,000 pages

PyMuPDF details come from its public documentation, checked on November 11, 2026.

The AGPL question in plain terms

PyMuPDF and MuPDF are offered under the AGPL or a commercial license sold by Artifex. The AGPL expects you to offer the source of a networked application that uses the library, so a closed source SaaS usually either releases its code or buys the commercial license. Read the PyMuPDF license page and ask your counsel before you ship it. Calling a hosted API sidesteps the question because no PyMuPDF code ends up in your product.

What the library leaves for your team

A parsing library hands you the ingredients. Typical work after the call looks like this:

Each item is a few days of work the first time and a recurring cost after that. PdfParse is built to take over that list. Layout analysis and OCR run in one pass, tables come back as rows and CSV, and schema fields carry confidence and a source page so a reviewer can jump to the number.

  • Detect whether a page is a scan, then send it to OCR and merge the result with the text layer.
  • Stitch a table that continues on the next page and repeat the header row only once.
  • Find the invoice total when the label is "Amount due", "Balance" or "Total EUR" depending on the supplier.
  • Decide what to do when a value is unclear, and keep the page number for the reviewer.
  • Keep the engine, fonts and OCR language packs patched across servers and container images.

When PyMuPDF is still the right tool

Keep PyMuPDF when your documents are clean digital PDFs, speed on your own hardware matters most and the AGPL or a commercial license suits your product. It is also the right pick for rendering pages to images, splitting and merging files or editing annotations. PdfParse does not replace those jobs.

When an API is the better buy

Move extraction to PdfParse when any of these is true:

  1. 1 A meaningful share of your files are scans, photos or mixed documents.
  2. 2 You maintain per layout rules for invoices, statements or forms and they break each time a supplier changes a template.
  3. 3 Your product is closed source and the AGPL is a problem you would rather not solve.
  4. 4 You want the same result in Python and Node without maintaining two stacks.
  5. 5 Engineering hours spent on parsing cost more than the monthly page allowance.

Replace the extraction layer, keep the rest

Start with one workflow and keep PyMuPDF wherever it already does a job well, such as thumbnails.

  1. 1 Install the Python PDF parser SDK or the Node SDK and set your API key as an environment variable.
  2. 2 Call parse on a sample set that includes your worst files and request JSON, Markdown and CSV together. The document parsing API reference lists the response fields.
  3. 3 Replace the code that rebuilds tables with the CSV or rows from PDF table extraction, and map the rest to your records.
  4. 4 On Growth, describe your fields in an extraction schema so the same definition works across suppliers.
  5. 5 Keep accounting checks, such as totals that must add up, in your application. Extracted text is input to validation, not a validated record.

Teams sending scans first can read how OCR API handles photos and low quality pages. Teams comparing hosted options can look at the LlamaParse alternative page for another cost model.

What the monthly page allowance covers

Plans are billed by page, scans at the same price. Starter is $49 monthly for 2,000 pages, Growth is $149 for 7,000 and Scale is $499 for 24,000, each about 50% lower when billed yearly. As arithmetic, 7,000 pages on Growth works out to roughly $0.021 per page billed monthly and $0.011 billed yearly. If one engineer day costs more than that bill, the library is not the cheap option. See every plan on the PDF extraction API pricing page.

FAQ

What is the best alternative to PyMuPDF

PdfParse is a strong alternative when you need fields, CSV tables and scans handled without maintaining rules or an OCR stack. PyMuPDF remains better for fast local text extraction, page rendering and file editing. Many teams keep both, with PyMuPDF for rendering and PdfParse for structured extraction.

Is PyMuPDF free for commercial use

PyMuPDF is open source under the AGPL, and Artifex sells a commercial license for products that cannot meet the AGPL terms. Whether your product can use the free version depends on how you distribute it. Check the license text and ask a lawyer before you ship.

Can PyMuPDF extract tables from PDFs

Yes, PyMuPDF includes a table finder that returns cells from digital PDFs. You still handle merged cells, tables that run over several pages and scanned pages that have no text layer. PdfParse returns each table with page, rows, columns and a CSV string.

Does PyMuPDF do OCR

PyMuPDF can work with an external OCR engine such as Tesseract, which you install and configure yourself along with language data. PdfParse includes OCR in the same API call, and a scanned page counts as one page like any other.

Test your hardest file before you change anything

Try page one in your browser without a card. Compare fields, text and tables with your current PyMuPDF output, then evaluate the API against your monthly page volume.