URL to Markdown: converter, Python, CLI or API compared
Four ways to turn a web page into Markdown: pandoc on the command line, Python libraries, a hosted API or a batch tool, with real commands, costs and limits.
Updated 15 November 2026
Guide · PDF, Word and PowerPoint to Markdown
A PDF to Markdown converter can only keep what the PDF actually stores. If the PDF has a text layer, the words, the reading order, the headings (guessed from font sizes), lists and most tables come through, and page numbers can be kept for citing. What does not survive: text in scanned pages (unless you run OCR), text in locked files, pictures and charts as content, and the exact visual layout. Word and PowerPoint files convert more cleanly, because they store headings, lists and tables as structure rather than as positioned text.
A PDF is a page description. It says “draw these characters at these positions in this font”, not “this is a heading” or “this is row 3 of a table”. A converter rebuilds structure from clues:
Where those clues are clear, the Markdown is good. Where they are not (a heading set in body-size bold, a table with merged cells, a sidebar box), the converter has to guess.
We ran our converter on RFC 9309, the Robots Exclusion Protocol, a 12-page text PDF, in a cloud run on 13 November 2026. The real output row, with the long text cut short:
{
"source": "https://www.rfc-editor.org/rfc/rfc9309.pdf",
"fileName": "rfc9309.pdf",
"fileSizeBytes": 177688,
"status": "ok",
"docType": "pdf",
"title": "RFC 9309: Robots Exclusion Protocol",
"markdown": "# RFC 9309\n\n# Robots Exclusion Protocol\n\n## Abstract\n\nThis document specifies and extends ... (22,290 characters)",
"pageCount": 12,
"pagesProcessed": 12,
"wordCount": 3202,
"metadata": { "producer": "WeasyPrint 56.1", "createdAt": "2022-09-10T00:39:45.000Z" },
"processedAt": "2026-11-13T10:06:13.735Z"
}
What this one file shows:
| Element | Result in this run |
|---|---|
| Title | Kept, from the document metadata |
| Headings | Kept as # and ##, from font sizes |
| Body text | Kept: 3,202 words, 22,290 characters of Markdown |
| Pages | All 12 processed; page numbers kept when you turn on per-page output |
| Metadata | Producer and creation date kept |
This is one well-made, text-only PDF. It does not tell you how a scanned contract, a slide deck saved as PDF or a financial table with merged cells will come out. Test the documents you actually have before you trust any converter, ours included.
What does not survive, by design in our tool (from its documentation, verified 14 November 2026):
no_text_layer and are free. There is no OCR.Office files are easier, because the structure is stored, not guessed.
unsupported in our tool (free).If you have pandoc installed, it can also read Word and PowerPoint: its list of input formats includes docx and pptx, and it does not list PDF as an input format (Pandoc User’s Guide, read 15 November 2026). So pandoc is a good “DOCX to Markdown” answer and no answer at all for PDF.
pandoc -f docx -t gfm report.docx -o report.md
For retrieval-augmented generation (RAG), you rarely index a whole document as one block. You split it into chunks, embed each chunk and store it with metadata. Three things matter more than the converter brand:
chunkSize from 500 to 100,000 characters and a chunkOverlap in characters.includePages on, our tool returns one entry per page or slide.A real input that does all three:
{
"documentUrls": [{ "url": "https://www.rfc-editor.org/rfc/rfc9309.pdf" }],
"includePages": true,
"includeText": true,
"chunkSize": 2000,
"chunkOverlap": 200,
"maxPages": 500
}
Python libraries are the right choice when the files are on your machine, you convert often and you want full control.
A minimal MarkItDown call:
from markitdown import MarkItDown
md = MarkItDown()
result = md.convert("report.pdf")
print(result.text_content[:500])
A hosted tool is the right choice when the files are on the web, the list is long, or you do not want to run and patch converters yourself. Our PDF, Word and PowerPoint to Markdown takes links to files, or files you uploaded to an Apify key-value store, and converts each document on its own, with its own memory and time limit, so one broken file never stops the run. It costs from USD 3.00 per 1,000 converted documents (USD 4.00 on the Apify free plan), plus Apify’s own charge for starting a run. Failed, locked, scanned and unsupported files are free. Run it on the Apify Store.
Its limits: up to 1,000 documents per run, files up to 50 MB, up to 2,000 pages per document and at most 5 million characters per row. It reads public links only (no logins or cookies) and stops at CAPTCHAs and bot walls.
All read on 15 November 2026.
Four ways to turn a web page into Markdown: pandoc on the command line, Python libraries, a hosted API or a batch tool, with real commands, costs and limits.
Updated 15 November 2026
How the SEC EDGAR API serves 10-K filings and XBRL company facts: the free endpoints, the user-agent rule, the rate limit and the fields that matter.
Updated 15 November 2026