Guides / Extract

PDF → Markdown

POST /v1/pdf/to-markdown  ·  1¢ / page

Extracts the text layer of a PDF and returns clean Markdown: paragraphs are reflowed (hyphenation and hard line breaks resolved), pages are separated by a rule, and headings are kept as headings where the layout makes them recognisable. Works on any PDF with a text layer — scanned documents need ocr first.

Parameters

NameTypeDescription
filefilePDF to extract. Required.
firstintegerFirst page (1-based). Optional.
lastintegerLast page. Optional.
layoutbooleanKeep column layout instead of reflowing paragraphs. Default false.
outputstringmd (file, default) or json{markdown, pages}.

Example request

curl -X POST https://api.bigapi.dev/v1/pdf/to-markdown \
  -H "Authorization: Bearer $KEY" \
  -F "file=@report.pdf" \
  -F "output=json"

Example response

{
  "markdown": "Annual Report 2026\n\nRevenue grew 18%...",
  "pages": 12,
  "total_pages": 12,
  "_meta": { "op": "pdf.to-markdown", "durationMs": 340.2 }
}

Related guides