PDF to Markdown, one row per page for RAG
Turns PDF and Word files into Markdown for retrieval-augmented generation (RAG), one dataset row per PDF page with its page number, so each chunk can cite its page. PDF headings are guessed from a bigger font size; Word headings, lists and tables come from the document. Headers, footers and page numbers are removed. Run it as it is: the built-in 3-page sample PDF gives 3 rows, the Word sample 1.
Input
Output fields
Sign up on Apify or log in
The PDF to Text & OCR - Scanned PDFs, Images, Word, Japanese Actor is ready to run with the inputs already set for "PDF to Markdown, one row per page for RAG". Sign up or log in and you'll land in Apify Console with a copy of this exact task.
Start the "PDF to Markdown, one row per page for RAG" task
The PDF to Text & OCR - Scanned PDFs, Images, Word, Japanese Actor will start running based on the input automatically. You can also change all the input fields, like file links, text format, and more, to match your specific use case.
Receive the "PDF to Markdown, one row per page for RAG" output
Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as status, file name, link number, and more.
Integrate into your workflow
The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also run the "PDF to Markdown, one row per page for RAG" task via API.

Integrate "PDF to Markdown, one row per page for RAG" into your workflow
Connect "PDF to Markdown, one row per page for RAG" with 100+ integrations, or run it via API or MCP.
Webhook
n8n
Make
Zapier
Airbyte
Keboola
IFTTT
Hubspot
GDrive
Gmail
Apify MCP
GitHub
Slack
LangChain
LlamaIndex
Flowise
Pinecone
OpenAI
Mastra
Clay
Each row of the PDF to Markdown task holds one PDF page: the Markdown text, pageFrom and pageTo, the page count of the whole file, the character count and the file name. A Word file stays one row, because DOCX has no pages.
The PDF to Markdown task guesses PDF headings from a bigger font size; Word headings, lists and tables come from the document. Tables in PDFs become lines with the cells separated by spaces, and complex layouts may come out in another order.
$0.003 per started 20 PDF pages with text or 50,000 DOCX characters; $0.004 per page read by AI OCR, plus the AI model billed to your account by apify/openrouter (no markup). Failed files, blank pages, garbled-looking text and samples are free.