MarkUDown

PDF to Markdown API — MarkUDown PDF converter API docs

POST/api/pdf-to-markdown

PDF to Markdown

Upload a PDF and get its text back as Markdown, with headings inferred from font size. The request is synchronous: the Markdown comes back in the response.

ParameterTypeRequiredDefaultDescription
filefile (multipart/form-data)required—The PDF file, sent as multipart/form-data. Up to 200 MB.

Request

curl -X POST https://api.scrapetechnology.com/api/pdf-to-markdown \
  -H "X-API-KEY: your-api-key" \
  -F "file=@report.pdf"

Response

{
  "filename": "report.pdf",
  "title": "Annual Report",
  "markdown": "# Annual Report\n\nFirst paragraph...",
  "page_count": 12,
  "pages_processed": 12,
  "truncated": false
}

Text is read from the PDF's text layer: scanned PDFs (images only) come back with little or no text, and tables and columns are not reconstructed.

Up to 500 pages are read per file; truncated is true when pages were left unread or the text was cut. title is the PDF's own title, or the file name when it has none.

Cost: 1 credit per 10 pages read (minimum 1), charged after a successful conversion.

Errors

StatusMeaning
400The file is not a PDF.
413File larger than 200 MB.
422The PDF could not be read (corrupted or password-protected?).
504The conversion timed out.