Document to Markdown Converter for RAG avatar

Document to Markdown Converter for RAG

Pricing

from $4.00 / 1,000 document converteds

Go to Apify Store
Document to Markdown Converter for RAG

Document to Markdown Converter for RAG

Convert PDF, DOCX, XLSX, PPTX, HTML and EPUB links to clean Markdown or RAG-ready chunks. No OCR, no browser. $4 per 1,000 documents plus page fees.

Pricing

from $4.00 / 1,000 document converteds

Rating

0.0

(0)

Developer

Ottomath

Ottomath

Maintained by Community

Actor stats

0

Bookmarked

3

Total users

2

Monthly active users

11 days ago

Last modified

Categories

Share

Document to Markdown Converter

Turn PDF, DOCX, XLSX, XLS, CSV, PPTX, HTML and EPUB files from URLs into clean Markdown for AI agents, RAG pipelines and search indexes. Headings, lists, tables and links are kept, pages, slides and sheets stay marked, and the output can be split into chunks that are ready for embedding. Plain HTTP and local parsing only: no browser, no OCR, no proxies and no AI model.

What it does

For every URL in your list the Actor downloads the file (50 MB by default), detects the format, converts it to Markdown and stores one dataset item per document, or one item per chunk. Detection looks at the file content first (magic bytes), then the content type, then the file name, so a PDF served as download.php is still a PDF.

FormatWhat you get
PDFThe text layer, page by page, with <!-- page N --> markers. Headings come from font sizes, tables from aligned columns. Lists, links, two-column reading order and de-hyphenation are handled, repeated page headers and footers are removed.
DOCXHeadings, paragraphs, bold and italic text, lists, tables and links.
XLSX, XLS, CSVOne heading and one Markdown table per visible sheet, with a row cap. A CSV file counts as one sheet.
PPTXOne section per slide in presentation order: title, bullet text, tables, links and, if you want them, the speaker notes.
HTMLThe main content only. Navigation, footers, cookie banners and scripts are dropped, headings, lists, tables and code are kept and links become absolute.
EPUBThe chapters in reading order, title from the book metadata.
Markdown, plain textPassed through after the character encoding is detected.

Chunks for embeddings. With outputMode set to chunks each document becomes several items of at most chunkSize characters. Text is cut at headings first, then at paragraphs, then at sentences and words. Every chunk carries the heading path (section) and, for PDFs, the page. Tables are split by rows with the header repeated, code blocks stay fenced, and the overlap is added only when a section has to be cut in the middle.

Safe by design. Files are parsed in worker threads with a time limit and a memory guard, so one broken file cannot stop a run. ZIP-based formats are protected against zip bombs (limits on entries and on the real decompressed size). Macros are never executed, and nothing a document refers to (images, remote templates, external links) is ever downloaded.

Use cases

  • RAG and vector search: turn manuals, reports and papers into chunks with section and page metadata, then embed them.
  • AI agents: give an agent a readable version of any document URL instead of raw bytes.
  • Knowledge base migration: move PDFs, slide decks and spreadsheets into a Markdown wiki or docs-as-code repository.
  • Research and monitoring: convert public papers, standards and government reports on a schedule and diff the text.
  • Data hand-over to LLMs: present spreadsheet sheets as Markdown tables that language models read well.

Input

FieldDefaultDescription
urlsrequiredDocument URLs, up to 1,000. Duplicates and #fragments are converted once.
outputModedocumentdocument gives one item per document, chunks one item per chunk.
chunkSize2000Maximum characters per chunk (200 to 20,000).
chunkOverlap200Characters repeated when a section is split; at most half of chunkSize.
maxPages500Maximum PDF pages, PPTX slides or sheets per document (1 to 5,000). Larger files are cut with a warning and only converted units are charged.
includeSlideNotestrueAdd PPTX speaker notes under each slide.
maxRowsPerSheet1000Row cap per sheet or CSV file (1 to 100,000).
respectRobotsTxttrueDownload only what the host's robots.txt allows this Actor.
maxFileSizeMb50Larger files are not converted (1 to 100).
requestTimeoutSecs60Download timeout (1 to 300).
maxConcurrency5Documents downloaded in parallel (1 to 20). At most 2 conversions run at once.
{
"urls": ["https://arxiv.org/pdf/1706.03762"],
"outputMode": "chunks",
"chunkSize": 1500,
"chunkOverlap": 150
}

Output example

One dataset item per document. A failed document gets an item with error set and costs nothing. This is a shortened result of a real run (the Markdown is cut):

{
"url": "https://arxiv.org/pdf/1706.03762",
"finalUrl": "https://arxiv.org/pdf/1706.03762",
"format": "pdf",
"title": "Attention Is All You Need",
"pageCount": 15,
"slideCount": null,
"sheetCount": null,
"wordCount": 5743,
"markdown": "<!-- page 1 -->\n\nProvided proper attribution is provided, Google hereby grants permission to ...\n\n# Attention Is All You Need\n\n| Ashish Vaswani∗ | Noam Shazeer∗ | ... |\n\n## Abstract\n\nThe dominant sequence transduction models are based on ...",
"warnings": ["Some rotated text (for example margin stamps or sideways labels) was skipped"],
"convertedAt": "2026-10-09T01:31:17.832Z",
"error": null
}

In chunks mode the markdown field is replaced by chunkIndex, chunkCount, text, section and page, and the document fields (url, format, title, page, slide or sheet count) are repeated on every chunk; wordCount then counts that chunk. The Console table shows URL, format, title, pages, words and error.

Pricing

Pay per event. You pay for documents that were converted, never for failures.

EventPriceWhen it is charged
Actor start$0.005Once per run.
Document converted$0.004Once per document that produced Markdown, whatever its size or format.
Extra page, slide or sheet converted$0.0005For each PDF page with text, PPTX slide or spreadsheet sheet after the first one.

Invalid URLs, HTTP errors, robots.txt blocks, files that are too large, unsupported or password-protected files, scanned PDFs without a text layer, empty documents and timeouts are free. Examples: 100 one-page documents cost about $0.41, one 15-page paper $0.016, and 1,000 documents of 10 pages on average about $8.51. The Actor never charges beyond the maximum total charge you set; it stops early and says so in the run status.

FAQ

Does it run OCR? No. A PDF that contains only scanned images has no text layer and returns the error "No text layer (OCR not supported)" at no charge.

Does it respect robots.txt? Yes. With respectRobotsTxt on, the Actor reads the host's robots.txt and downloads a document only if the file allows its own user agent, OttomathDocToMarkdown/1.0 (+https://apify.com), or *. If robots.txt cannot be read because of a server error, the document is skipped and not charged. It uses no proxies and does not pretend to be a browser.

How are pages counted? PDF pages that contain text, PPTX slides and spreadsheet sheets. Blank PDF pages are skipped and not charged. All other formats only pay the document event.

Can it open files behind a login? No. There is no way to send cookies or headers. Use publicly reachable URLs, for example presigned links.

Is my data stored somewhere else? No. Documents are downloaded into memory, converted and discarded. Results go to the run's dataset only. The Actor does not look for personal data and does not call any external service other than the document hosts.

What if a document is very large? Conversion stops after about 100 seconds with the pages read so far and a warning; after 120 seconds it is abandoned with a free error. Use maxPages to bound the work. A result larger than about 7.5 MB of Markdown is cut at a paragraph boundary with a warning.

Why are some words split or joined oddly? PDFs store positioned glyphs, not paragraphs. The Actor rebuilds lines and paragraphs from positions, which works well for ordinary text and is a best effort for unusual layouts.

Limitations

  • No OCR, no image or chart recognition. Pictures, charts, drawings and SmartArt are not converted or described.
  • PDF layout is reconstructed from text positions. Bold and italic are not detected, three or more columns are not separated, multi-line table cells can be split over several rows, formulas come out as plain text and rotated text is skipped.
  • Legacy .doc, .ppt and .rtf, OpenDocument, JSON and XML files are not supported and return a free error. Password-protected files cannot be opened.
  • Spreadsheets: hidden sheets are skipped, formulas are not evaluated (the stored values are shown) and long sheets are cut at maxRowsPerSheet.
  • Limits: 1,000 URLs per run, 50 MB per file by default (100 MB at most), 7.5 MB of Markdown per item, 120 seconds per document.
  • Hosts that block data-centre traffic answer with errors such as 403; those documents are free.
  • The Actor is not affiliated with any document format owner or software vendor.

Changelog

  • 1.0 (October 2026): first release.