PDF, Word & Web Page to Markdown + RAG Chunks avatar

PDF, Word & Web Page to Markdown + RAG Chunks

Pricing

from $3.00 / 1,000 file converteds

Go to Apify Store
PDF, Word & Web Page to Markdown + RAG Chunks

PDF, Word & Web Page to Markdown + RAG Chunks

Turn PDFs, Word .docx files and web pages into clean Markdown with real tables, plus chunks for AI search with heading paths and page numbers. Reads scanned PDFs with OCR. $0.003 per file.

Pricing

from $3.00 / 1,000 file converteds

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

20 minutes ago

Last modified

Security

Limited permissions

Share

Give it links to PDF files, Word (.docx) files or web pages. It turns each one into clean Markdown, ready for ChatGPT, Claude, a vector database or your notes. It can also cut each file into chunks for AI search (RAG), with the heading and page number saved on every chunk.

  • 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

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
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://example.com/handbook.pdf" },
{ "url": "https://example.com/policy.docx" },
{ "url": "https://example.com/help/returns" }
],
"chunks": true,
"outputMode": "documents",
"chunkSize": 1500,
"chunkOverlap": 200
}

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'" }

For AI agents

  • Use when: you have public links to PDF, .docx or HTML files and need clean Markdown or RAG chunks with page and heading info.
  • Don't use when: the file is behind a login, has a password, or is a format other than PDF, .docx or HTML (no .doc, .pptx, .xlsx).
  • Input: fileUrls (list of {"url": "..."}), optional chunks (true/false), outputMode (documents, chunks), chunkSize, chunkOverlap, pages like 1,3-5, tables (lines, text, off), ocr (auto, never), keepPageMenus, maxPagesPerPdf.
  • Output: one item per file with markdown, title, type, chunks, markdownFile; or one item per chunk. A failed link gives {sourceUrl, error}.
  • Cost: $0.003 per file (20 PDF pages included), $0.0003 per extra PDF page, $0.005 per OCR page. Failed files are free. The run never goes over your max cost.

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.

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.