PDF to Markdown API — Text, Headings & Metadata from Any PDF
Pricing
$3.00 / 1,000 documents
PDF to Markdown API — Text, Headings & Metadata from Any PDF
Converts PDFs at public links to Markdown and plain text with page markers, headings, links and metadata; scanned pages are flagged, never charged. Unofficial PDF to Markdown API.
Pricing
$3.00 / 1,000 documents
Rating
0.0
(0)
Developer
yestrue
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
15 hours ago
Last modified
Categories
Share
Give it links to PDF files and get each one back as clean Markdown — headings, paragraphs, lists, tables and links, with a marker at every page break — plus the plain text, a list of headings and tables, the web links and the document's metadata. Built for RAG pipelines, LLM agents and document workflows that need PDFs as text they can actually use.
Try it in 1 minute:
- Press Start — the prefilled input converts the "Attention Is All You Need" paper from arXiv (15 pages, about half a second).
- Open the Output tab: one record with
markdown,text,headings,tables,linksandmetadata. - Price: $3.00 per 1,000 documents. Files that give no text (404, not a PDF, scanned without a text layer, too large) are free.
Use it to:
- Feed PDFs to an LLM or a vector database as Markdown that keeps the structure: headings, lists, tables.
- Index reports, papers, manuals and filings from public links in bulk, page by page.
- Let an AI agent read a PDF it found on the web without downloading it first.
- Extract tables (pricing sheets, results, schedules) as rows you can load into a spreadsheet.
- Pull metadata — title, creation date, producer — for a document catalogue.
How it works
Each PDF is downloaded (up to 100 MB; the link must return a real PDF, not an HTML page) and read with the open-source pdf.js engine. Every text run comes with its position and font size, so lines are rebuilt top to bottom, a wide gap inside a line becomes a table cell boundary and a tall gap a paragraph break. From that, plain rules make Markdown: a line in a clearly larger font than the body (or an ALL CAPS / numbered "2.3 Method" line) is a heading, bullets become list items, hyphenated line breaks are joined, wrapped lines merge back into paragraphs, three or more aligned lines become a GFM table. Pages are joined with <!-- page N --> markers and a rule, so you can split the document again by page. Text set at an angle (side watermarks) is left out.
The Author field of the PDF and any e-mail addresses or phone numbers in the text are not delivered. Only public links: no login, no cookies.
Input
| Field | What it does | Default |
|---|---|---|
urls | Links to PDF files, one per line | the arXiv paper |
pages | Pages to read: 1-5, 8 or 10-; empty = all | all |
outputFormat | both, markdown or text | both |
maxPages | Read at most this many pages (0 = all, up to 2,000) | 0 |
includePages | Also deliver one entry per page | false |
maxTextLength | Cut markdown and text after this many characters | 0 |
maxConcurrency | PDFs read at the same time | 3 |
proxyConfiguration | Used only when a site turns a direct download down | Apify Proxy |
Output
One record per PDF:
| Field | What it is |
|---|---|
markdown | The document as Markdown with <!-- page N --> markers between pages |
text | The plain text, pages separated by a blank line |
headings | { level, text, page } for every heading found |
tables | { page, rows } for every table found — rows is an array of cell arrays |
links | Web links from the text and the PDF's link annotations |
metadata | title, subject, keywords, creator, producer, createdAt, modifiedAt, pdfVersion, language |
pageCount, pagesRead, pageNumbers | How many pages the file has and which were converted |
words, characters, fileBytes | Sizes |
pages | With includePages: { page, markdown, text } per page |
url, finalUrl, status, error, scrapedAt | What you gave, where it came from, and why a link gave nothing |
Example
{"url": "https://arxiv.org/pdf/1706.03762","finalUrl": "https://arxiv.org/pdf/1706.03762v7","pageCount": 15,"pagesRead": 15,"markdown": "<!-- page 1 -->\n\n# Attention Is All You Need\n\n### Abstract\n\nThe dominant sequence transduction models are based on complex recurrent or convolutional neural networks ...\n\n---\n\n<!-- page 2 -->\n\n# 1 Introduction\n\nRecurrent neural networks ...","text": "Attention Is All You Need\nAbstract\nThe dominant sequence transduction models ...","headings": [{ "level": 1, "text": "Attention Is All You Need", "page": 1 },{ "level": 3, "text": "Abstract", "page": 1 },{ "level": 1, "text": "1 Introduction", "page": 2 },{ "level": 2, "text": "3.1 Encoder and Decoder Stacks", "page": 3 }],"tables": [{ "page": 8, "rows": [["Model", "BLEU EN-DE", "BLEU EN-FR"], ["ByteNet", "23.75", ""], ["Transformer (big)", "28.4", "41.8"]] }],"links": ["https://github.com/tensorflow/tensor2tensor"],"metadata": {"title": null,"creator": "LaTeX with hyperref","producer": "pdfTeX-1.40.25","createdAt": "2024-04-10T21:11:43Z","pdfVersion": "1.5"},"words": 9412,"characters": 61230,"fileBytes": 2215244,"status": "OK","scrapedAt": "2026-10-19T12:34:56.000Z"}
Pricing
You are charged per document delivered — see the price on this page. Links that give nothing (404, not a PDF, too large, no text layer) are free. Use pages or maxPages to keep long documents cheap in compute.
FAQ
Is this an official API? No, it's an unofficial API built on public pages. It reads PDFs from public links with the open-source pdf.js engine.
Does it do OCR? No. A scanned PDF without a text layer comes back as NO_TEXT, free, with a clear message. If your documents are scans, run them through an OCR step first.
How good is the Markdown? Headings, paragraphs, bullets and simple aligned tables come out well from text-based PDFs (papers, reports, manuals). Multi-column layouts, footnotes mixed into the body, and tables with merged cells are the hard cases — the plain text is always there as well.
Can I convert a PDF I upload? Give it a public link: upload the file to your Apify key-value store (or any public storage) and paste the link.
What about password-protected or very large files? Encrypted PDFs fail with a clear error; files over 100 MB are reported as TOO_LARGE. Both are free.
Like it? A short review on the Store page helps other people find this Actor. Something missing or broken? Tell us on the Issues tab — we read every one.
Related Actors
- PDF Text Extractor & Scraper — page-by-page PDF text and metadata
- Sitemap Extractor & Scraper — every URL, date and image from a sitemap
- URL to Markdown API — clean Markdown from any URL for LLMs
- Article Extractor API — title, author, date and full text of any article
- Web Fetch API — Fetch any URL as HTML, text, Markdown or JSON