Go to example tasks

PDF to RAG chunks with page numbers

Split a PDF into heading-aware chunks for RAG. Every chunk carries its start and end page and its heading path, so answers can cite the exact page and section. Set chunk size and overlap in tokens and load the JSON straight into a vector database.

Try for free
PDF to Markdown Converter: OCR, Tables, RAG
PDF to Markdown Converter: OCR, Tables, RAGjcwilk/pdf-to-markdown
Source
Status
Title
Language
+5 fields
Text
Number
Boolean
List
Object

Input

PDF URLs
url:https://nvlpubs.nist.gov/nistpubs/CSWP/NIST.CSWP.29.pdf
Outputs:markdown+1
Chunk size (approx. tokens):512
Page range:1-4

Output fields

Source
Status
Title
Language
Processed pages
OCR pages
Word count
Error message
Markdown

How it works

Sign up on Apify or log in

The PDF to Markdown Converter: OCR, Tables, RAG Actor is ready to run with the inputs already set for "PDF to RAG chunks with page numbers". 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 with page numbers" task

The PDF to Markdown Converter: OCR, Tables, RAG Actor will start running based on the input automatically. You can also change all the input fields, like PDF URLs, outputs, and more, to match your specific use case.

Receive the "PDF to RAG chunks with page numbers" 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 source, status, title, 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 with page numbers" task via API.

Image

Integrate "PDF to RAG chunks with page numbers" into your workflow

Connect "PDF to RAG chunks with page numbers" with 100+ integrations, or run it via API or MCP.

Webhook

Webhook

n8n

n8n

Make

Make

Zapier

Zapier

Airbyte

Airbyte

Keboola

Keboola

IFTTT

IFTTT

Hubspot

Hubspot

GDrive

GDrive

Gmail

Gmail

Apify MCP

Apify MCP

GitHub

GitHub

Slack

Slack

LangChain

LangChain

LlamaIndex

LlamaIndex

Flowise

Flowise

Pinecone

Pinecone

OpenAI

OpenAI

Mastra

Mastra

Clay

Clay

Frequently asked questions

Each chunk from the PDF to RAG task has its text, start and end page, the heading path (such as 3 Model Architecture > 3.2 Attention), a character count and an approximate token count.

Use chunkSize and chunkOverlap in the PDF to RAG task. Both are approximate tokens, where one token is about 4 characters. The defaults are 512 and 64.

Yes. Set pageRange in the PDF to RAG task, for example 1-10 or 2,4,6-, and you only convert and pay for those pages.

Yes. The PDF to RAG chunks task runs from the Apify API, schedules and webhooks, and from n8n, Make or Zapier, and returns JSON, CSV or Excel.