PDF & Documents to Markdown / JSON
Pricing
from $1.75 / 1,000 converted pages
PDF & Documents to Markdown / JSON
Convert public PDF, Word, PowerPoint, Excel and HTML documents into clean Markdown and per-page JSON with headings, tables and metadata. Optional OCR. Pay per page.
Pricing
from $1.75 / 1,000 converted pages
Rating
0.0
(0)
Developer
Badr Bouargan
Maintained by CommunityActor stats
0
Bookmarked
1
Total users
0
Monthly active users
a day ago
Last modified
Categories
Features
Share
What is PDF & Documents to Markdown / JSON?
PDF & Documents to Markdown / JSON turns public PDF, Word, PowerPoint, Excel and HTML documents into clean Markdown and structured JSON, so you can feed them to an LLM, a RAG pipeline, a search index or a spreadsheet. You pay per converted page, with no start fee.
- Convert PDFs to Markdown with real headings, joined paragraphs, bullet lists and ruled tables as Markdown tables.
- Get per-page JSON (optional): text, Markdown, headings and tables of every page, ready for chunking.
- Read Word (.docx), PowerPoint (.pptx), Excel (.xlsx), HTML and text files too. The format is read from the file itself, not from the address. Web page menus, language lists and tables of contents are left out, so you do not pay for them.
- Extract metadata: title, author, subject, keywords, creation and modification dates (ISO 8601) and language.
- Read scanned PDFs with OCR (optional, open-source Tesseract engine, 7 languages).
- Use your own files: point the Actor to one of your Apify key-value stores instead of public URLs.
- Stay polite: each host's robots.txt is respected, no login, no CAPTCHA solving, no anti-bot bypass.
Use cases: AI and RAG teams loading reports and papers into a vector store, analysts pulling tables out of public filings, researchers batch-reading papers, no-code builders turning documents into rows for Make, n8n or Zapier.
What data can you extract from a PDF or document?
| Field | Description | Example |
|---|---|---|
📄 title | Document title (metadata, else the biggest heading, else the file name) | Form W-9 (Rev. March 2024) |
🔗 url | Address of the document | https://www.irs.gov/pub/irs-pdf/fw9.pdf |
🧾 format | pdf, docx, pptx, xlsx, html or text (read from the bytes) | pdf |
📑 pages / pagesConverted | Pages in the file / pages converted | 6 / 6 |
✍️ markdown | The whole document as Markdown | Form W-9 (Rev. March 2024) ... |
📊 tablesFound | Tables written as Markdown tables | 1 |
🧩 pagesData | Optional per-page JSON: text, Markdown, headings, tables, OCR flag | [{"page": 1, ...}] |
👤 metadata.author | Author from the file (null when the file has none) | SE:W:CAR:MP |
📅 metadata.createdAt | Creation date, ISO 8601 UTC | 2024-03-06T13:18:13Z |
🌐 metadata.language | ISO 639-1 language, from the file or detected | en |
✅ status | OK, BLOCKED, CUSTOMER_ERROR, UNSUPPORTED or FAILED | OK |
💵 billablePages / billableOcrPages | Pages billed for this row (0 for errors and duplicates) | 6 / 0 |
A value the document does not contain stays null; nothing is guessed.
How to convert a PDF to Markdown
- Click Try for free and create a free Apify account if you do not have one.
- Paste one or more document addresses into Document URLs (
documentUrls), or pick one of your key-value stores in Your key-value store (keyValueStoreId). The Actor gets read-only access to that store only. - Set Maximum pages per document (
maxPagesPerDocument) and turn on Per-page JSON (outputPages) or OCR for scanned pages (ocr) if you need them. - Click Start and wait a few seconds: a 15-page paper takes about one second to convert.
- Open the Overview or Markdown tab, or download the dataset as JSON, CSV, Excel or HTML.
Try it free: run with the default input. It converts two public IRS forms, W-9 and W-4 (11 pages), in under a minute.
How much does it cost to convert PDFs to Markdown?
Pay per event, no start fee. One "Converted page" is one PDF page or PowerPoint slide with text, or 3,000 characters of Markdown for DOCX, XLSX, HTML and text files (they have no fixed pages). A scanned page read with OCR is one "OCR page" instead.
| Event | Free | Starter | Scale | Business |
|---|---|---|---|---|
| Converted page (per 1,000) | $2.50 | $2.25 | $2.00 | $1.75 |
| OCR page (per 1,000) | $16.00 | $14.40 | $12.80 | $11.20 |
Examples on the Free plan:
- A 15-page research paper: 15 converted pages = about $0.04.
- 100 reports of 20 pages: 2,000 converted pages = about $5.00.
- A 10-page scanned contract with OCR: 10 OCR pages = about $0.16.
Never charged: errors, refusals (BLOCKED), unsupported files, empty pages, scanned pages left without OCR, and the same file twice in one run. Set Maximum cost per run in the run options: the Actor keeps only the pages that fit, marks the row truncated: true and stops cleanly. Apify's free plan gives you monthly platform credits to try it.
⬇️ Input
{"documentUrls": ["https://www.irs.gov/pub/irs-pdf/fw9.pdf","https://www.irs.gov/pub/irs-pdf/fw4.pdf"],"maxPagesPerDocument": 200,"outputPages": false,"extractTables": true,"ocr": false}
| Field | What it does | Default |
|---|---|---|
documentUrls | Public PDF, DOCX, PPTX, XLSX, HTML or text addresses | prefilled demo |
keyValueStoreId / keyValueStoreKeys | Your own Apify store with files, read-only (all non-JSON records when no key is given) | empty |
maxDocuments | Documents converted at most | 100 |
maxPagesPerDocument | First pages converted per document | 200 |
maxFileSizeMb | Larger files are skipped (CUSTOMER_ERROR, free) | 50 |
outputPages | Adds pagesData, one JSON object per page (PDF and PPTX) | false |
extractTables | Ruled PDF tables become Markdown tables | true |
pageMarkers | Adds <!-- page N --> before each page | false |
ocr / ocrLanguage | Reads scanned pages with Tesseract (eng, fra, deu, spa, ita, por, nld) | false / eng |
failRunOnError | Ends the run FAILED when a document is not converted | false |
proxyConfiguration | Direct connection by default; datacenter or your own proxies allowed | no proxy |

Real run nr2Ie0vxRs2zlBzJt · Nov 30, 2026 · two document URLs: an arXiv paper and the IRS Form W-9
⬆️ Output
One dataset row per document (shortened real row):
{"url": "https://www.irs.gov/pub/irs-pdf/fw9.pdf","title": "Form W-9 (Rev. March 2024)","format": "pdf","pages": 6,"pagesConverted": 6,"billablePages": 6,"billableOcrPages": 0,"characters": 38053,"tablesFound": 1,"markdown": "Form W-9\n\n(Rev. March 2024)\n\nRequest for Taxpayer ...","metadata": {"author": "SE:W:CAR:MP","subject": "Request for Taxpayer Identification Number and Certification","createdAt": "2024-03-06T13:18:13Z","language": "en","languageSource": "document"},"status": "OK","errorCode": null}

Real run NrasG4WQpZwljoqwQ · Nov 30, 2026 · 14 inputs: PDF, Word, PowerPoint, Excel, HTML, a robots.txt-disallowed page, a 404, an image, a duplicate file and 3 files from a key-value store
Rows that could not be converted are kept, free, with a clear code:
| status | When | Charged |
|---|---|---|
OK | Document converted | Yes, per page |
BLOCKED | robots.txt forbids it, HTTP 401 / 403 / 429, CAPTCHA, anti-robot or login page | No |
CUSTOMER_ERROR | Invalid URL, 404, unknown host, file too large, damaged file | No |
UNSUPPORTED | Image, old .doc / .xls / .ppt, password-protected PDF, scanned PDF without OCR | No |
FAILED | Host down or timing out, also after 2 new tries | No |
The run summary (RUN_SUMMARY in the key-value store) lists documents by status and code, pages converted and charged, and the stop reason. Rows larger than the 9 MB dataset limit keep a link (markdownUrl, pagesDataUrl) to the full content in the key-value store.
Integrations and API
Call the Actor from your code with the official apify-client for Python or Node.js (API reference).
from apify_client import ApifyClientclient = ApifyClient("<YOUR_APIFY_TOKEN>")run = client.actor("badr_xba/pdf-documents-to-markdown").call(run_input={"documentUrls": ["https://www.irs.gov/pub/irs-pdf/fw4.pdf"],"outputPages": True,})for doc in client.dataset(run["defaultDatasetId"]).iterate_items():print(doc["title"], doc["pagesConverted"], len(doc["markdown"]))
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });const run = await client.actor('badr_xba/pdf-documents-to-markdown').call({documentUrls: ['https://www.irs.gov/pub/irs-pdf/fw9.pdf'],});const { items } = await client.dataset(run.defaultDatasetId).listItems();console.log(items[0].markdown.slice(0, 500));
- No-code: connect it to Make, n8n, Zapier, Google Sheets, Google Drive, Slack or Airbyte.
- Webhooks: start your next step (embedding, indexing) when a run finishes.
- Schedules: convert a list of reports every day or week.
- MCP: use it from Claude, ChatGPT or Cursor through the Apify MCP server.
Other Actors you may like
- Website Contact Scraper: e-mails, phones and social links from company websites.
- Website Technology Detector: CMS, analytics and tech stack of any website.
- Ultimate SEO Audit: page-by-page SEO checks.
- AI Document & Web Analyzer (Claude): ask questions about documents and pages with your own Claude key.
- AI Document & Web Analyzer (OpenAI): the same with your own OpenAI key.
- AI Multimodal Analyzer (Gemini): images, PDFs and video with your own Gemini key.
❓ FAQ
Is it legal to convert public PDFs with this Actor?
The Actor only downloads documents that anyone can open without an account, and only when the host's robots.txt allows it. Copyright still applies to the content: check the licence of the documents you convert and how you reuse them. This is not legal advice.
What happens if a host blocks a request?
A refusal (HTTP 401, 403 or 429, a CAPTCHA, an anti-robot or login page) gives a BLOCKED row, is never charged and is not retried, except a 429 that asks to wait 10 seconds or less (one new try). Network errors, timeouts and HTTP 5xx get at most 2 new tries. The run still succeeds unless you turn on failRunOnError.
Does it work with scanned PDFs?
Yes, with OCR for scanned pages (ocr: true). Pages without a text layer are rendered and read with Tesseract, then billed as "OCR page". Without OCR they stay empty, free, and the row says NO_TEXT_LAYER or SCANNED_PAGES. OCR quality depends on the scan; handwriting is not supported.
How fast is it?
Text PDFs convert in about 10-70 ms per page; a 15-page paper takes about one second after download. OCR is much slower: about 12-14 seconds per scanned page with the default 512 MB memory (measured on 37 real scanned pages).
Can I use it with Python or through an MCP server?
Yes: see the Python and Node.js examples above, or add the Actor to the Apify MCP server for Claude, ChatGPT or Cursor.
Do I need a proxy?
No. The default is a direct connection, which is the cheapest and works for most public hosts. You can choose the Apify datacenter proxy or your own proxies; the residential proxy is not used (it is replaced by the datacenter proxy).
Can it read password-protected or login-only documents?
No. Password-protected PDFs return UNSUPPORTED (ENCRYPTED) and pages behind a login are never opened.
Limits
- Not available yet: old binary Office formats (.doc, .xls, .ppt), images (PNG, JPG), handwriting OCR, JavaScript-rendered HTML pages.
- Heading levels in PDFs come from font sizes, so documents that use one font size for everything get paragraphs without headings.
- Tables are detected when they have ruling lines; borderless tables stay as text lines.
- Files up to 50 MB and 2,000 pages per document.
Your feedback
Found a document that converts badly, or need a new format? Open an issue in the Issues tab with the URL and what you expected.
Not affiliated with Adobe, Microsoft, arXiv or the IRS. The document names are only used to describe compatibility.