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.
| Name | Type | Description |
|---|---|---|
file | file | PDF to extract. Required. |
first | integer | First page (1-based). Optional. |
last | integer | Last page. Optional. |
layout | boolean | Keep column layout instead of reflowing paragraphs. Default false. |
output | string | md (file, default) or json → {markdown, pages}. |
curl -X POST https://api.bigapi.dev/v1/pdf/to-markdown \ -H "Authorization: Bearer $KEY" \ -F "file=@report.pdf" \ -F "output=json"
{
"markdown": "Annual Report 2026\n\nRevenue grew 18%...",
"pages": 12,
"total_pages": 12,
"_meta": { "op": "pdf.to-markdown", "durationMs": 340.2 }
}