pdftojson.dev
API

The extraction API.

One POST, a PDF in, structured data back — text, JSON, Markdown or CSV, plus bank-statement extraction with a reconciliation check. Batch-ready.

Authentication

Every request needs your API key as a bearer token. Get one — and 100 free pages to test on — from your account. The base URL is https://api.pdftojson.dev, and metering is per page processed (see pricing).

# all requests
Authorization: Bearer $KEY

Extract — POST /v1/extract

Send a PDF as multipart form data and choose an output format. Digital PDFs are read directly; scanned PDFs are run through OCR automatically.

FieldValues
filea PDFrequired — multipart file
formatjson · markdown · text · csvoutput format
pagesall or a range like 1-5optional, defaults to all
curl -X POST https://api.pdftojson.dev/v1/extract \
  -H "Authorization: Bearer $KEY" \
  -F file=@document.pdf -F format=markdown

Response

{
  "format": "markdown",
  "pages": 3,
  "content": "# Quarterly Report\n\n## Summary\n...",
  "scanned": false
}

Bank statements — POST /v1/bank-statement

The premium endpoint. It extracts every transaction into a structured schema, then runs a reconciliation check: the transactions must account for the change from the opening to the closing balance. If they don't, reconciled comes back false — so you catch a dropped or misread row before it reaches your books.

FieldValues
filea statement PDFrequired — multipart file
outputjson · csvdefaults to json
curl -X POST https://api.pdftojson.dev/v1/bank-statement \
  -H "Authorization: Bearer $KEY" \
  -F file=@statement.pdf -F output=json

Response

{
  "account": { "bank": "...", "number_masked": "****1234", "period": "2026-07" },
  "currency": "USD",
  "transactions": [
    { "date": "2026-07-03", "description": "...", "amount": -42.10, "balance": 1875.00 }
  ],
  "totals": { "credits": 3200.00, "debits": -1810.55, "net": 1389.45 },
  "reconciled": true,
  "pages": 4
}

Errors

CodeMeaning
401Missing or invalid API key
402Over your monthly page quota — upgrade
413File too large for a synchronous request
422PDF is unreadable or encrypted

Requests are synchronous in v1 (up to ~20 pages). Need more? Get a key and start with 100 free pages.