Tidewell Software

Apify actor · Document parsing for LLMs

Document to Markdown for LLM & RAG: PDF, Word, PowerPoint, Excel and OCR

Live$0.30 per 1,000 pagesFailed files free

Document to Markdown is an Apify actor that converts PDF, Word (DOCX), PowerPoint (PPTX), Excel (XLSX/XLS), HTML, EPUB, CSV and scanned images into clean Markdown, or into token-sized chunks with page and heading metadata, ready for embeddings, RAG, LangChain and LlamaIndex. Tesseract OCR runs only on scanned pages, in 25 languages. Digital pages cost $0.30 per 1,000, OCR pages $3 per 1,000, plus $0.002 per document; failed, encrypted and empty files are free.

Platform
Apify (cloud). Console, API, schedules, n8n/Make/Zapier, or AI assistants via MCP
Formats in
PDF (digital and scanned), DOCX, PPTX, XLSX/XLS, HTML, PNG/JPEG/TIFF/WebP/GIF/BMP, EPUB, CSV, JSON, XML, TXT, MD, IPYNB
Output
Markdown (whole document) or JSON chunks with page_start, page_end, heading_path, token count
OCR
Tesseract 5, only on pages without a text layer, 25 languages
Engines
pdfminer.six, pdfplumber, PDFium, Microsoft MarkItDown, mammoth, python-pptx, openpyxl, Tesseract
Price
$0.002 per document + $0.0003 per page; OCR pages $0.003 in total
Privacy
Runs inside the actor; no third-party AI services
Store listing
apify.com/tidewell/doc-to-markdown

Who it is for

  • Teams building a RAG knowledge base from PDFs, policies, manuals and contracts.
  • Developers giving LLM agents (Claude, GPT, Gemini) clean document context.
  • Anyone turning scanned archives (invoices, letters, faxes) into searchable text.
  • Automation builders in n8n, Make or Zapier who need a "file URL in, Markdown out" step.

What it does

  • Real structure: headings from font sizes and weights, lists stay lists, ruled tables become Markdown tables, columns are read in order, and running headers, footers and page numbers are removed.
  • OCR only where needed: pages with a text layer are read directly; scanned pages and images go through Tesseract. Rotated scans are corrected.
  • RAG-ready chunks: by heading or by N tokens with overlap, each with page and heading metadata.
  • Images can be saved to the key-value store and linked from the Markdown.
  • Batch inputs: file URLs, uploads, a key-value store, or a dataset from a crawler. Google Drive, Dropbox and GitHub share links are converted to direct downloads.

Quick start

Example input: three files to token-sized chunks.

{
  "fileUrls": [
    "https://arxiv.org/pdf/1706.03762v7",
    "https://example.com/handbook.docx",
    "https://example.com/scanned-invoice.png"
  ],
  "outputFormat": "json",
  "chunking": "tokens",
  "chunkSize": 512,
  "chunkOverlap": 64,
  "ocr": true,
  "ocrLanguages": ["eng"],
  "extractTables": true,
  "extractImages": false
}

Example output row (trimmed). The full .md file is always saved to the run's key-value store too.

{
  "doc_id": "doc-0001",
  "status": "succeeded",
  "source_url": "https://arxiv.org/pdf/1706.03762v7",
  "filename": "1706.03762v7.pdf",
  "title": "Attention Is All You Need",
  "pages": 15,
  "pages_processed": 15,
  "ocr_pages": 0,
  "word_count": 6025,
  "token_count": 9474,
  "markdown_url": "https://api.apify.com/v2/key-value-stores/.../records/doc-0001-1706.03762v7.md",
  "chunk_count": 24,
  "chunks": [
    {
      "chunk_id": "doc-0001#2",
      "text": "## 1 Introduction\n\nRecurrent neural networks, long short-term memory [13] ...",
      "token_count": 447,
      "page_start": 2,
      "page_end": 2,
      "heading": "1 Introduction",
      "heading_path": ["Attention Is All You Need", "1 Introduction"]
    }
  ],
  "errors": [],
  "warnings": []
}

One HTTP call, rows back synchronously:

curl -X POST "https://api.apify.com/v2/acts/tidewell~doc-to-markdown/run-sync-get-dataset-items?token=<APIFY_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"fileUrls": ["https://example.com/report.pdf"], "outputFormat": "markdown"}'

LangChain:

from apify_client import ApifyClient
from langchain_core.documents import Document

client = ApifyClient("<APIFY_TOKEN>")
run = client.actor("tidewell/doc-to-markdown").call(run_input={
    "fileUrls": ["https://arxiv.org/pdf/1706.03762v7"],
    "outputFormat": "json", "chunking": "tokens", "chunkSize": 512, "chunkOverlap": 64,
})

docs = [
    Document(page_content=c["text"],
             metadata={"source": row["source_url"], "page": c["page_start"], "heading": c["heading"]})
    for row in client.dataset(run["defaultDatasetId"]).iterate_items() if row["status"] == "succeeded"
    for c in row["chunks"]
]

Use it from Claude or ChatGPT (Apify MCP server)

Apify runs a hosted MCP server at https://mcp.apify.com. Add it to your AI assistant with this actor selected, and the assistant can run the actor and read the results for you. You need an Apify account (the free plan works); runs are billed to it at the prices on this page.

Server URL with only this actor loaded:

https://mcp.apify.com/?tools=tidewell/doc-to-markdown

Claude (claude.ai and Claude Desktop)

  1. Open Settings → Connectors.
  2. Choose Add custom connector, name it Apify and paste the URL above. (Apify is also in the connector directory; the custom URL loads only this actor.)
  3. Connect, sign in to Apify and approve access.

Claude Code

claude mcp add apify "https://mcp.apify.com/?tools=tidewell/doc-to-markdown" -t http

Claude Code opens the Apify sign-in page the first time it uses the server.

ChatGPT

Following Apify's current instructions: add a custom MCP server named Apify, enter the URL above and choose OAuth. In the ChatGPT desktop app this is Settings → MCP servers → Add server → Streamable HTTP. Business, Enterprise and Edu workspaces may need an admin to add it.

Cursor, VS Code and other MCP clients

{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com/?tools=tidewell/doc-to-markdown"
    }
  }
}

Clients that cannot sign in with OAuth can send your Apify API token (Apify Console → Settings → API & Integrations) instead:

{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com/?tools=tidewell/doc-to-markdown",
      "headers": { "Authorization": "Bearer <APIFY_TOKEN>" }
    }
  }
}

Example prompts

  • Use tidewell/doc-to-markdown to convert https://arxiv.org/pdf/1706.03762v7 to Markdown and summarise section 3.
  • Convert these five supplier PDFs to Markdown, then build a table of payment terms from them.
  • OCR this scanned German letter (ocrLanguages: deu) and translate it to English.

The actor appears to the assistant as the tool tidewell--doc-to-markdown. Setup steps checked against Apify's MCP documentation and the apify-mcp-server README on 8 November 2026; we also confirmed the tool loads with that URL.

Pricing

Pay per event
EventPriceWhen
Document converted$0.002Once per document that converts successfully
Page converted$0.0003Per page that produced text (PDF page, slide, image or TIFF frame)
OCR page+$0.0027Extra per page read with OCR, so an OCR page costs $0.003 in total

DOCX, HTML, XLSX, EPUB and text files have no fixed pages, so they are billed at one page per 500 words (minimum 1).

Example costs
ExampleCost
10-page digital PDF$0.005
100-page digital PDF$0.032
10-page scanned PDF (OCR)$0.032
1,000 one-page Word memos$2.30
1,000 photographed receipts (OCR)$5.00

Failed downloads, corrupt, encrypted, unsupported and empty files cost nothing, and neither do pages without text. The actor respects your maximum cost per run.

How it compares

Document-to-text actors on the Apify Store (store data fetched 6–8 Nov 2026)
ActorUsers (30 days)PriceFormats and output
tidewell/doc-to-markdown (this)New$0.002/doc + $0.0003/page; OCR page $0.003 totalPDF, DOCX, PPTX, XLSX, HTML, EPUB, images; Markdown + RAG chunks with metadata; OCR in 25 languages
memo23 / pdf-text-extractor190 (5.0★)$0.005/PDF + $0.005 start; $0.015/OCR pagePDF only; no chunking feature
automation-lab / pdf-text-extractor130$0.005 run start + $0.00345/PDFPDF only; no OCR, no Markdown, no chunking
nerolabs / bulk-ocr-image-pdf-to-text39$0.005/OCR page, $0.001/text page, $0.01/export filePDF and images; no Markdown, no chunking
lergassy / document-text-extractor24$0.0035/doc + $0.00015/page + $0.010/OCR pageMulti-format with chunks: the closest feature set, and cheaper per digital page than us

Where others fit better: long digital PDFs cost less on memo23's flat $0.005 per PDF (a 100-page PDF is $0.032 with us); lergassy is cheaper per digital page. If you can run Python yourself, open-source libraries such as Microsoft MarkItDown (MIT), Docling (MIT) and Marker (Apache-2.0) cost nothing but your own compute. We use MarkItDown inside the actor for Office formats.

Longer write-up: Best PDF to Markdown converters for RAG.

Frequently asked questions

Is the text from digital PDFs OCR'd?

No. Pages with a text layer are read directly, which is exact and about 10x faster. OCR runs only on pages without usable text, or on every page if you set forceOcr.

How good is table extraction?

Tables with ruling lines (Word, Excel and most business PDFs) come out as Markdown tables. Tables drawn with whitespace alone, as in many academic papers, come out as aligned text lines. Word, PowerPoint, Excel and HTML tables are always converted.

Does it handle two-column PDFs?

Yes. Reading order follows pdfminer's layout analysis, so columns are read one after the other.

Which OCR languages are available?

eng, deu, fra, spa, ita, por, nld, pol, ces, swe, dan, nor, fin, tur, rus, ukr, ell, ara, heb, hin, chi_sim, chi_tra, jpn, kor and vie. You can combine them.

How are chunks sized?

Split by heading, or by N tokens with overlap, counted with the cl100k_base tokenizer. Every chunk has page_start, page_end, heading_path and a token count.

Are my documents stored or sent to an AI service?

Only in your own Apify run storage, under your retention settings. Nothing is sent to third-party AI services; conversion runs entirely inside the actor.

How big can files be?

100 MB by default, and up to 1,000 MB with maxFileSizeMb. Each document runs in its own process with a timeout, so one broken file cannot stop the run.

What does it cost for a typical document?

A 10-page digital PDF costs $0.005, a 100-page digital PDF $0.032 and a 10-page scanned PDF $0.032. Failed documents cost nothing.

Last updated 8 November 2026. Questions or corrections: benjamin@benjaminbritton.co.uk.