Doc-to-Markdown/JSON RAG Prep - Convert PDF & DOCX for RAG
Pricing
from $30.00 / 1,000 document converteds
Doc-to-Markdown/JSON RAG Prep - Convert PDF & DOCX for RAG
Convert PDF, DOCX, PPTX and webpages to clean Markdown and RAG-ready JSON chunks for your embedding pipeline. No LLM cost. $0.03 per document.
Pricing
from $30.00 / 1,000 document converteds
Rating
0.0
(0)
Developer
Joseph Curry
Maintained by CommunityActor stats
0
Bookmarked
1
Total users
0
Monthly active users
a day ago
Last modified
Categories
Share
What does Doc-to-Markdown/JSON RAG Prep do?
Doc-to-Markdown/JSON RAG Prep is a document-to-Markdown converter that turns any URL, a webpage or a direct link to a document file (PDF, DOCX, PPTX, XLSX, CSV, HTML, and more), into clean Markdown plus a structured, RAG-ready JSON chunk breakdown, ready to feed straight into an embedding pipeline or vector database. Try it free on Apify: batch processing, scheduling, API access, and run monitoring are included at no extra cost.
Why use this PDF-to-Markdown RAG prep tool?
If you're building a RAG (Retrieval-Augmented Generation) pipeline, AI agent knowledge base, or semantic search index, the boring-but-critical first step is turning messy source documents into clean text your embedding model can actually use. Most "AI document cleaning" tools do this with an LLM call per page, which means paying model inference cost on every single document, every time you re-run your pipeline. This Actor never calls an LLM. It uses markitdown, Microsoft's free, open-source (MIT-licensed), deterministic conversion library, so the same input always produces the same output. Your only cost is Apify's platform pass-through plus this Actor's flat per-document fee, with no monthly rental and no per-token model bill.
Who this is for
- RAG and AI agent developers who need a fast, cheap, deterministic PDF-to-Markdown and DOCX-to-Markdown step before chunking and embedding.
- Data engineers building a document ingestion pipeline for a vector database (Pinecone, Weaviate, pgvector, or similar) who want batch conversion with structured output.
- No-code and low-code builders who want to convert a folder of PDFs, spreadsheets, or slide decks to Markdown without writing a parser.
- Anyone migrating legacy content (old PDFs, Word docs, PowerPoint decks) into a clean Markdown knowledge base or documentation site.
How to use Doc-to-Markdown/JSON RAG Prep
- Open the Input tab and add one or more URLs, webpages or direct document links.
- (Optional) Adjust Max characters per RAG chunk to match your embedding model's ideal chunk size (default 1500).
- Click Start. Each URL is converted independently; one bad URL in a batch never stops the others.
- Results appear in the Dataset tab: clean Markdown, a title (if found), and a heading-aware chunk breakdown for each successfully converted URL.
Input
- URLs (required): an array of URLs to convert. Max 25 per run.
- Max characters per RAG chunk (default 1500, minimum 200): chunk size ceiling; a single long paragraph is kept whole rather than cut mid-sentence.
Output
Each URL is a dataset item:
{"sourceUrl": "https://example.com/report.pdf","success": true,"error": null,"title": "Annual Report 2026","markdown": "# Annual Report 2026\n\n...","charCount": 38061,"chunkCount": 36,"chunks": [{"chunkIndex": 0,"headingPath": "Annual Report 2026 > Executive Summary","text": "...","charCount": 842}]}
You can download the dataset in various formats such as JSON, HTML, CSV, or Excel. Failed URLs are included in the same dataset with success: false and a plain-English error field, never a raw stack trace.
Data table
| Field | Description |
|---|---|
sourceUrl | The URL that was converted |
success | true/false |
error | Plain-English reason for failure, or null |
title | Extracted document title, if available |
markdown | Full converted Markdown |
charCount | Character count of the Markdown |
chunkCount | Number of RAG chunks produced |
chunks | Array of {chunkIndex, headingPath, text, charCount} |
Why not use an LLM to clean this up?
Because it would break the entire point of this Actor. An LLM pass adds real per-page cost, non-determinism (the same document can convert differently run to run), and latency. This Actor is built on markitdown, a rules-based, deterministic tool, not a model. Chunking (splitting Markdown into RAG-ready pieces) is likewise mechanical: it splits on heading and paragraph boundaries, not "semantic meaning," so it never requires a model call either.
How much does document-to-Markdown conversion cost?
This Actor uses Pay-Per-Event pricing, with no monthly rental fee:
| Event | Price | When it's charged |
|---|---|---|
| Document converted | $0.03 | Once per URL that successfully converts. Failed conversions are never charged. |
Converting 10 documents costs roughly $0.30. Apify's own small platform-usage charge for the first 5 seconds of every run is subsidized by Apify by default.
Tips for better conversion quality
- If a webpage returns messy Markdown (ads, navigation menus, etc.), try a more direct source URL, such as a PDF or DOCX version of the same content; structured document formats convert more cleanly than heavily-styled webpages.
- Tune Max characters per RAG chunk to your embedding model: smaller chunks (500 to 800 characters) work well for precise retrieval, larger chunks (1500 to 2500) preserve more context per chunk.
- Batch related URLs into a single run, up to 25 at once, rather than running this Actor once per URL.
FAQ, disclaimers, and support
Does this actually avoid LLM costs entirely? Yes. There is no LLM call anywhere in this Actor's conversion or chunking path. You can verify this yourself: the source code is a small, readable Python module with no API calls to any model provider.
Will every URL convert successfully? No, and this Actor is upfront about that. Some sites (for example, sites that block automated requests, return a 403, or require a login) will fail; failed URLs are reported honestly with a plain-English reason and are never charged. Complex scanned or image-heavy PDFs, or heavily-styled documents, may also convert with lower fidelity than clean text-based sources.
Is the chunking "smart" (semantic)? No, by design; it's mechanical, splitting on Markdown headings and paragraph boundaries. This keeps it deterministic and free. If you need semantic chunking, you'd add that as a separate step in your own pipeline (which may involve a model call on your end, a decision left to you).
What formats are supported? Whatever the underlying markitdown library supports: HTML, PDF, DOCX, PPTX, XLSX, CSV, and several others. If a format isn't supported, the URL fails with a clear error rather than producing garbage output.
How is this different from other document-to-Markdown Actors on Apify Store? Most comparable tools either charge a monthly rental fee on top of usage, or rely on an LLM/OCR model for conversion, which adds cost and non-determinism. This Actor is pure pay-per-event with no rental fee, and its deterministic conversion means the same document produces the same Markdown every time you run it.
Questions or issues? Use the Actor's Issues tab on Apify Store.