PDF to RAG Chunks: Heading-Aware, 512 Tokens
Converts a PDF into Markdown and splits it into heading-aware chunks of about 512 tokens with 64 tokens of overlap, each with page numbers. Ready to embed into a vector store.
Input
Output fields
Sign up on Apify or log in
The Document to Markdown for LLM & RAG (PDF, DOCX, PPTX, XLSX, OCR) Actor is ready to run with the inputs already set for "PDF to RAG Chunks: Heading-Aware, 512 Tokens". Sign up or log in and you'll land in Apify Console with a copy of this exact task.
Start the "PDF to RAG Chunks: Heading-Aware, 512 Tokens" task
The Document to Markdown for LLM & RAG (PDF, DOCX, PPTX, XLSX, OCR) Actor will start running based on the input automatically. You can also change all the input fields, like file urls, output format, and more, to match your specific use case.
Receive the "PDF to RAG Chunks: Heading-Aware, 512 Tokens" 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, type, 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 RAG Chunks: Heading-Aware, 512 Tokens" task via API.

Integrate "PDF to RAG Chunks: Heading-Aware, 512 Tokens" into your workflow
Connect "PDF to RAG Chunks: Heading-Aware, 512 Tokens" 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
$0.002 per converted document plus $0.0003 per page with text. OCR pages cost $0.0027 more. Failed, empty or unsupported files are free.
heading splits at section headings and only cuts long sections by size. tokens cuts purely by token count. Both respect chunkSize and chunkOverlap.
In the chunks field of each document row, and as a JSON file linked from chunks_url. Each chunk has its heading, page range, token count and text.
Yes. Paste direct file links, Google Drive, Dropbox or GitHub share links, or upload files in the input. You can also point it at a dataset of URLs from another actor.