PDF to Text & Markdown Extractor – PDF Parser API avatar

PDF to Text & Markdown Extractor – PDF Parser API

Pricing

from $3.00 / 1,000 files converted

Go to Apify Store
PDF to Text & Markdown Extractor – PDF Parser API

PDF to Text & Markdown Extractor – PDF Parser API

Extract text from PDFs into full text and clean Markdown, with tables kept. Also reads Word and web pages. Send links or base64. $0.003 per file, same price on every plan (20 PDF pages included; extra $0.0003/page). OCR $0.005/page if on. Failed files free. Works from Apify MCP and the API.

Pricing

from $3.00 / 1,000 files converted

Rating

0.0

(0)

Developer

Tidy Byte Tools

Tidy Byte Tools

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

12 days ago

Last modified

Features

Limited permissions

Share

Extract text from PDF files into clean text and Markdown. Send a link or a base64 file. Tables stay as tables. It also reads Word (.docx) files and web pages, and can cut the text into chunks for AI search (RAG), with the heading and page number saved on every chunk. No browser, no login. $0.003 per file, same price on every plan (a PDF's first 20 pages included). Failed files are free.

  • Keeps headings (#, ##, ###). In PDFs it finds them by font size and bold text
  • Tables come out as real Markdown tables, not a jumble of words
  • Joins paragraphs back together and fixes words split by a hyphen at the end of a line
  • Keeps bullet and numbered lists, bold, italic and links (Word and web pages)
  • Drops web page junk: menus, side bars, footers, scripts
  • Reads scanned (picture-only) PDF pages with OCR, built in
  • A bad link doesn't stop the run. You get an item with an error field and it moves on

Try it free: Apify gives every account $5 of free credit each month (no card), which covers about 1,600 one-file runs of this tool (a PDF of 20 pages or fewer, without OCR).

Use cases

  • Turn manuals, reports, policies, and help PDFs into Markdown
  • Make RAG chunks that keep the heading path and page number
  • Keep tables from PDFs as real Markdown tables, not a jumble of words
  • Read scanned PDFs with OCR when you turn it on

Last tested: Nov 18, 2026 (America/Chicago). Run JTH0bVt7DOcrAahFe converted the W3C example table PDF (1 page, 1 table, 819 characters of Markdown). Charged 1 file. No extra pages and no OCR.

Also searched as: ES: convertir PDF a Markdown, extraer texto de PDF / PT: converter PDF para Markdown, extrair texto de PDF / DE: PDF in Markdown umwandeln, Text aus PDF extrahieren / FR: convertir un PDF en Markdown, extraire le texte d'un PDF / JA: PDFをMarkdownに変換、PDFからテキスト抽出 / ZH: PDF转Markdown、PDF文字提取

Example

From a saved help page, an actual run wrote this Markdown (tables stay tables):

# How returns work
You can send back most items within **30 days**. See the [full policy](https://example.com/policy).
## Steps
1. Open your order.
2. Pick *Return item*.
- Print the label.
3. Drop it off.
## Refund times
| Paid with | Refund time |
| --- | --- |
| Card | 3-5 days |
| Gift card | 1 day |
### Code for developers
```bash
curl https://example.com/api/returns
```

The free local tool, doc2md-lite, does the same for a text PDF or a saved HTML file on your computer. The Apify version also reads Word files and live web page links.

Website and local versions

Pricing

EventPriceWhen
File converted$0.003One PDF, Word file or web page turned into Markdown. A PDF's first 20 pages are included
Extra PDF page$0.0003Each PDF page after the first 20
Scanned page read with OCR$0.005One picture-only PDF page we read with OCR and got text from

Apify also adds its small standard start fee per run. Chunks are free.

You don't pay for:

  • links that fail, or aren't a PDF, Word file or web page
  • files where we found no text
  • scanned pages when OCR is off

You're charged only after a file's results are saved. Set a maximum cost per run and the Actor stops before your limit and tells you in the dataset.

What you runCost
1 web page$0.003
100 Word files$0.30
A 100-page PDF$0.003 + 80 x $0.0003 = $0.027
1,000 PDFs of 10 pages each$3.00
A 10-page scanned PDF$0.003 + 10 x $0.005 = $0.053

Input

FieldWhat it means
File linksLinks to PDF files, Word .docx files or web pages
Base64 filesOptional. Files sent as base64 text (plain, a data: URI, or {"name": "report.pdf", "data": "..."}) when the file is not online. Up to 50 MB each
Make chunks for AI searchOn by default. Each chunk keeps its heading path and pages
Dataset layoutOne item per file, or one item per chunk (best for vector databases)
Chunk size / overlapDefault 1,500 and 200 characters (about 375 and 50 tokens)
PDF pagesLike 1,3-5. Leave empty for all pages
Tables in PDFsTables with border lines (default), also tables lined up by spacing, or off
Scanned PDF pages (OCR)On by default
Keep web page menus and footersOff by default
Max pages per PDFDefault 300

Example input:

{
"fileUrls": [
{ "url": "https://www.w3.org/WAI/WCAG21/working-examples/pdf-table/table.pdf" }
],
"chunks": true,
"outputMode": "documents",
"chunkSize": 1500,
"chunkOverlap": 200
}

No link? Send the file as base64 instead:

{
"base64Files": [
{ "name": "report.pdf", "data": "JVBERi0xLjQK..." }
]
}

Output

With "One item per file" you get one dataset item per file:

{
"sourceUrl": "https://example.com/store-report.pdf",
"fileName": "store-report.pdf",
"type": "pdf",
"title": "Spring Store Report",
"pageCount": 2,
"pagesRead": 2,
"ocrPages": [],
"tables": 1,
"headings": 4,
"characters": 608,
"markdownFile": "doc-1.md",
"markdown": "# Spring Store Report\n\n...",
"chunkCount": 2,
"chunks": [
{
"id": "store-report.pdf#1",
"chunk": 1, "of": 2,
"page": 1, "page_start": 1, "page_end": 1,
"heading_path": ["Spring Store Report", "Sales"],
"chars": 412, "approx_tokens": 103,
"text": "..."
}
],
"charged": { "document-converted": 1 }
}

The full Markdown of each file is also saved in the run's key-value store as doc-1.md, doc-2.md and so on. Very long files (over 1 million characters) are cut short inside the dataset item (markdownCut: true), but the .md file is always complete.

With "One item per chunk" each chunk is its own dataset item, with title and type added. Export it as JSON or CSV and load it straight into a vector database.

A link that fails gives an item like this, and the run carries on:

{ "sourceUrl": "https://example.com/missing.pdf", "error": "Client error '404 Not Found' for url 'https://example.com/missing.pdf'" }

Agent-ready

Use when you have public links (or base64) to PDF, .docx, or HTML files and need clean Markdown or RAG chunks with page and heading info. Do not use it when the file is behind a login, has a password, or is another format (no .doc, .pptx, .xlsx).

Agents can pay per run through Apify (x402). Same price on every plan. Failed files are free.

MCP call example (tool call-actor on https://mcp.apify.com):

{
"actor": "tidybytetools/doc-to-markdown",
"input": {
"fileUrls": [
{ "url": "https://www.w3.org/WAI/WCAG21/working-examples/pdf-table/table.pdf" }
],
"chunks": false,
"outputMode": "documents",
"ocr": "never"
}
}

API call example:

curl -X POST "https://api.apify.com/v2/acts/tidybytetools~doc-to-markdown/runs?token=YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"fileUrls":[{"url":"https://www.w3.org/WAI/WCAG21/working-examples/pdf-table/table.pdf"}],"chunks":false,"outputMode":"documents","ocr":"never"}'

Output is one item per file with markdown, title, type, and markdownFile, or one item per chunk. A failed link gives {sourceUrl, error}. Cost is $0.003 per file (20 PDF pages included), $0.0003 per extra PDF page, and $0.005 per OCR page.

Run it on a schedule

If a help center, policy page or report changes often, create a Task with your links, then open Schedules in Apify Console and run it daily or weekly. Connect the run to Make, Zapier, n8n, a webhook or the API to send fresh Markdown and chunks to your AI app or vector database.

Example (before and after)

Before: a PDF, a Word (.docx) file, or a web page. After: clean Markdown with headings and tables kept as tables, not a jumble of words. If you turn chunks on, each chunk also has its heading path, ready for RAG.

FAQ

How good is OCR? It reads clear scans well. Blurry or handwritten pages can come out with mistakes, so check them. OCR text comes out as plain paragraphs (no headings or tables). The item lists the pages read with OCR in ocrPages.

Can it crawl a whole website? No. It converts the links you give it. Give it a list of page links (for example from a sitemap).

Does it work with JavaScript-heavy pages? It reads the HTML the server sends. Pages that only show text after JavaScript runs may come out empty. Those are free.

Can it open password-protected PDFs or old .doc files? No. Save .doc files as .docx first. The offline version below opens password-protected PDFs.

Do you keep my files? Files are downloaded into the run and processed. Only your results stay in your own Apify storage, under your storage retention settings.

Prefer to run it on your own computer?

The same converter is available as a Python tool you run offline, with no per-file cost: doc2md on Gumroad. There's also a free version, doc2md-lite (pip install doc2md-lite, GitHub), with a free MCP server for AI apps.

More tools from Tidy Byte Tools

These Actors work well together:

Free local tools (no Apify account needed): pdf-table-pull-lite, doc2md-lite, link-check-lite, md-chunk-lite, json-shaper-lite.

Website: https://tidybytetools.github.io. All Actors: apify.com/tidybytetools.