Extract text from a PDF: clean, reflowed Markdown for LLM context, summaries or RAG. Scanned pages are read by OCR automatically (warning ocr_applied). Billed per page.
export KEY=bigapi_… # your key, once per terminal
curl -X POST https://api.bigapi.dev/v1/pdf/to-markdown -H "Authorization: Bearer $KEY" -F 'file=@report.pdf' -F 'output=json'
New keys come with 100 free operations, no signup: curl -X POST https://api.bigapi.dev/v1/keys. Failed calls cost nothing.
| Name | Meaning |
|---|---|
file required | PDF to read. Pages without a text layer (scans) are read by OCR, up to 50 such pages; the warning ocr_applied names them. Pages that stay empty are reported as no_text_layer. |
first | First page to read (1 is the first page). Default: first page |
last | Last page to read. Default: last page |
layout | Keep column layout instead of reflowing paragraphs. Default: false |
output | Markdown file or JSON {markdown, pages, total_pages}. Pages are separated by a line with ---. Allowed: md, jsonDefault: "md" |
ocr | auto reads pages without a text layer by OCR; off leaves them empty and only warns. Allowed: auto, offDefault: "auto" |
lang | OCR language(s) for scanned pages, e.g. deu, eng, fra or deu+eng. Default: "deu+eng" |
Returns text/markdown | application/json. Response headers carry the cost (X-BigAPI-Cost) and notes about your input (X-BigAPI-Warnings).
Connect BiGapi as an MCP server: https://api.bigapi.dev/mcp (hosted) or npx -y @bigapi/mcp (local). Then ask in plain words; the agent finds pdf_to_markdown on its own.