Convert PDF to Markdown API
Turn any public PDF URL into Markdown with a single API call: a title heading from the PDF's metadata, then one section per page. Built for LLM pipelines, RAG systems, and vector databases that chunk by page.
Why convert PDFs to Markdown?
Large language models and RAG systems need text with boundaries they can chunk on. A single blob of PDF text gives you nothing to split on; Markdown headings do.
PDFPipe's Markdown output is deliberately simple: a top-level heading from the PDF's Title (or "Document" if it has none), then a ## Page N heading followed by that page's text. That gives you one clean chunk boundary per page, a document title for your metadata, and a format every LLM reads.
It does not detect headings, lists, or tables inside the page - the page text is passed through as-is. If you need finer-grained structure, ask your LLM to derive it from the page text. Works with inline PDFs and auto-download files behind redirects or JavaScript triggers; login-walled PDFs and scanned PDFs (no text layer) are not supported.
How it works
One POST request. We handle the rest.
1. Send a request
curl -X POST https://api.pdfpipe.dev/v1/convert \
-H "Authorization: Bearer pk_..." \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/whitepaper.pdf",
"format": "markdown",
"returnMethod": "inline"
}'2. Get the response
{
"requestId": "req_a1b2c3...",
"status": "complete",
"format": "markdown",
"pagesProcessed": 12,
"creditsUsed": 1,
"contentType": "text/markdown",
"content": "# Quarterly Financial Report\n\n## Page 1\n\nQUARTERLY FINANCIAL REPORT\nQ4 2025..."
}Page-sectioned Markdown, ready for AI
Every document comes back in the same shape, so your chunking code never changes: one H1 for the document, one H2 per page, plain text underneath.
- H1 from the PDF's Title metadata (or "Document")
- "## Page N" heading for every page
- Page text passed through unchanged
- Clean per-page chunk boundaries for RAG pipelines
- Optional pages parameter to convert only a range
# Quarterly Financial Report
## Page 1
QUARTERLY FINANCIAL REPORT
Q4 2025
Prepared by: Acme Corp
Date: January 15, 2026
## Page 2
Executive Summary
Revenue for Q4 2025 reached $4.2M, a 23% increase
over the previous quarter. Operating margins improved
to 18.5%, driven by reduced infrastructure costs.
## Page 3
Key Metrics
Revenue $4,200,000
Operating Margin 18.5%
Customer Acquisition Cost $142
Monthly Active Users 52,400const response = await fetch(
"https://api.pdfpipe.dev/v1/convert",
{
method: "POST",
headers: {
"Authorization": "Bearer pk_...",
"Content-Type": "application/json",
},
body: JSON.stringify({
url: "https://example.com/whitepaper.pdf",
format: "markdown",
returnMethod: "inline",
}),
}
);
const data = await response.json();
const markdown = data.content;
// One chunk per page: split on the "## Page N" headings
const chunks = markdown.split(/\n## Page \d+\n/).slice(1);
// Feed each chunk to your vector database
for (const [i, chunk] of chunks.entries()) {
await vectorDb.upsert({
id: `${data.requestId}-p${i + 1}`,
content: chunk.trim(),
embedding: await embed(chunk),
});
}Built for AI workflows
Feed PDFs into ChatGPT, Claude, or any LLM. Build RAG pipelines that chunk on page boundaries. Index documents into Pinecone, Weaviate, or Chroma. PDFPipe gets the text out of the PDF and onto your side of the pipeline with one call.
Start converting PDFs to Markdown today
Free tier includes 300 requests per month. No credit card required.