PDF to Markdown API
Convert PDF to Markdown from any script, cron job or RAG pipeline. Send a PDF and get clean Markdown back — the same engine that powers the PDF to Markdown browser tool, so headings, lists and structure survive. Also works for batch PDF to Markdown and bulk download your PDFs as Markdown.
REST · JSON + Markdown · free tier · same engine as the browser tool
How the PDF to Markdown API works
Three steps from a PDF on disk to Markdown in your codebase — ideal for automation, RAG and documentation pipelines.
Get an API key
Create a key from your dashboard. The free tier of the PDF to Markdown API covers everyday scripts and prototypes.
POST your PDF
Send the file as multipart form data with your key. The API reads the text layer and rebuilds the document as Markdown.
Use the Markdown
Write the response to disk, pipe it into a vector store, or commit it to Git. For many files, loop the call or use batch PDF to Markdown.
PDF to Markdown API examples
Copy a snippet and start converting PDF to Markdown programmatically in seconds.
cURL
curl -X POST https://www.dlpdfs.com/api/v1/pdf-to-markdown \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@report.pdf" \
-F "headings=true" \
-o report.mdPython
import requests
with open("report.pdf", "rb") as f:
r = requests.post(
"https://www.dlpdfs.com/api/v1/pdf-to-markdown",
headers={"Authorization": "Bearer YOUR_API_KEY"},
files={"file": f},
data={"headings": "true"},
)
r.raise_for_status()
with open("report.md", "w", encoding="utf-8") as out:
out.write(r.text)Node.js
import fs from "fs";
const res = await fetch("https://www.dlpdfs.com/api/v1/pdf-to-markdown", {
method: "POST",
headers: { Authorization: "Bearer YOUR_API_KEY" },
body: (() => {
const fd = new FormData();
fd.append("file", fs.createReadStream("report.pdf"));
return fd;
})(),
});
const md = await res.text();
fs.writeFileSync("report.md", md);Parameters
| Field | Type | Description |
|---|---|---|
| file | file (required) | The PDF to convert to Markdown. Native digital PDFs give the cleanest output. |
| headings | bool | Preserve H1–H3 as Markdown headings (default true). |
| lists | bool | Convert bullet and numbered lists to Markdown (default true). |
| page_breaks | bool | Insert a Markdown comment between pages (default true). |
Limits & rate limits
The free tier of the PDF to Markdown API allows a generous number of conversions per day and files up to a standard document size. Paid plans raise both the rate limit and the file cap, and unlock batch PDF to Markdown for bulk jobs where you download your PDFs as Markdown together. Responses are Markdown text, so they drop straight into a file, a database or a RAG pipeline.
PDF to Markdown API — common questions
Is the PDF to Markdown API the same engine as the site?
Yes. The API uses the same conversion engine as the browser tool, so headings, lists and structure behave the same whether you convert PDF to Markdown by hand or by script.
Can I convert PDF to Markdown in Python?
Yes — send the file as multipart form data with a POST request (see the Python snippet above) and write the Markdown response to disk.
Does the API support batch PDF to Markdown?
Batch is supported via the batch endpoint or by looping calls. For bulk work you can also download your PDFs as Markdown from the batch tool on the site.
Is there a free tier for the PDF to Markdown API?
Yes. A free tier covers everyday automation. Paid plans add higher rate limits and larger file support for production pipelines.
PDF Tool