PDF to Text & Markdown for RAG - Page-Cited Chunks
Pricing
$0.40 / 1,000 pages processed
PDF to Text & Markdown for RAG - Page-Cited Chunks
Convert PDF URLs to per-page text, Markdown and RAG-ready chunks with page numbers. Pay per page with a text layer; scanned pages are flagged, not billed.
Pricing
$0.40 / 1,000 pages processed
Rating
0.0
(0)
Developer
Rinveta
Maintained by CommunityActor stats
0
Bookmarked
1
Total users
0
Monthly active users
2 days ago
Last modified
Categories
Features
Share
PDF to Text & Markdown for RAG – Page-Cited Chunks for LLMs
Turn PDF files into clean per-page text, Markdown and RAG-ready chunks with page numbers. Give it PDF URLs (or a dataset, or PDFs you stored in a key-value store) and get structured rows you can embed, index or feed to an LLM. Built for RAG pipelines, document search, AI agents and data cleaning.
No browser, no crawling: the Actor only downloads the PDF URLs you provide and reads their text layer. You pay per page with extractable text, so short documents cost very little.
What can you do with it?
- PDF to text, page by page: one row per page with text, word count and character count.
- PDF to Markdown: headings and lists are detected from font sizes, wrapped lines are joined into paragraphs, hyphenated line breaks are repaired.
- Chunk PDFs for RAG and LLMs: configurable chunk size and overlap; every chunk keeps
pageStartandpageEnd, so answers can cite the page. - Document metadata: title, author, producer, creation date, PDF version, page count, file size and a SHA-256 of the file (useful to skip duplicates).
- Detect scanned PDFs: pages without a text layer are flagged
needsOcrand are not charged. This version has no OCR. - Page ranges and safety limits:
firstPage,lastPage,maxPagesPerPdf,maxPdfSizeMB,maxPdfs.
Use cases
- Ingest reports, papers and manuals into a vector database: use
outputMode: chunksand send each row to your embedding step. - Build a knowledge base for an AI agent or chatbot from public documents, whitepapers and policies you are allowed to use.
- Extract the text of contracts, invoices or forms you own to search, tag or summarize them.
- Clean up a document archive: one row per PDF (
outputMode: document) with metadata and full text. - Pre-check a batch: the run summary tells you how many PDFs were scanned and need OCR elsewhere.
Input
| Field | Description |
|---|---|
pdfUrls | Direct URLs of PDF files. |
inputDatasetId + datasetUrlField | Alternative: a dataset (for example from another Actor) whose items contain a PDF URL. |
inputKeyValueStoreId + keyPrefix | Alternative: PDFs you uploaded to a key-value store (keys ending in .pdf). |
outputMode | pages (default), chunks (one row per RAG chunk) or document (one row per PDF). |
chunkSize, chunkOverlap | Characters per chunk (default 1000, 0 disables) and overlap (default 100). |
includeMarkdown, includePlainText | Choose which text fields you get (both on by default). |
firstPage, lastPage, maxPagesPerPdf | Page range and a safety limit (default 300 pages per PDF). |
maxPdfSizeMB, maxPdfs, concurrency, downloadTimeoutSecs | Limits (default 40 MB, 500 PDFs, 2 in parallel, 60 s). |
Example input:
{"pdfUrls": [{ "url": "https://arxiv.org/pdf/1706.03762" }],"outputMode": "chunks","chunkSize": 800,"chunkOverlap": 80}
Output
outputMode: chunks – one row per chunk:
{"type": "chunk","status": "ok","sourceUrl": "https://arxiv.org/pdf/1810.04805","documentTitle": null,"pageCount": 16,"chunkIndex": 12,"pageStart": 3,"pageEnd": 3,"charCount": 791,"text": "## 3 BERT\n\nWe introduce BERT and its detailed implementation in this section..."}
outputMode: pages – one row per page (pageNumber, pageCount, text, markdown, wordCount, charCount, needsOcr, plus the chunks that start on that page). outputMode: document – one row per PDF with text, markdown, chunks, metadata, likelyScanned, truncated.
Failed files produce a row with type: "error" and a clear message (HTTP error, not a PDF, password-protected, too large) and are not charged. The key-value store contains OUTPUT with run totals: PDFs processed/failed, pages charged, pages without text, chunks.
Pricing
Pay per event: $0.0004 per page processed (event page-processed, $0.40 per 1,000 pages). Only pages with an extractable text layer are charged; scanned pages, failed downloads and skipped files are free. A typical 15-page paper costs about $0.006.
FAQ
Does it do OCR? Not in this version. Scanned PDFs are detected and flagged (needsOcr, likelyScanned) and are not charged.
How are chunks built? Along paragraph boundaries up to chunkSize characters, with chunkOverlap characters repeated. Each chunk records the first and last page it covers.
Are tables extracted? Table text appears in reading order as plain text; structured table output is not part of this version.
Which PDFs work best? PDFs with a real text layer: papers, reports, manuals, statements, forms. Complex multi-column layouts are returned in the order stored in the file.
Password-protected files? Not supported; they return an error row.
Is the same PDF charged twice? Every run is charged separately. Use the sha256 in the metadata to skip files you already processed.
Good to know
- Only the URLs you supply are downloaded; private/internal network addresses are refused.
- You are responsible for having the right to process the documents you submit.
- Memory: 512 MB is enough for typical PDFs; use 1–2 GB for very large files or higher concurrency.
Recommended final step
For the cleanest data, use Dataset Merge, Dedupe & Transform as the final step of your pipeline: merge the datasets of several runs, remove duplicate chunks and export CSV, JSON or XLSX.
Run locally / integrate
npm installecho '{"pdfUrls":[{"url":"https://example.com/file.pdf"}]}' > storage/key_value_stores/default/INPUT.jsonnode src/main.js
Call it from the Apify API, the JavaScript/Python client, Make, Zapier, n8n or as a tool for AI agents (MCP).
Related Actors
More Actors by Rinveta for data pipelines:
- Image Compressor & Converter: batch conversion and compression of images to WebP, AVIF, JPEG or PNG.
- Dataset Merge, Dedupe & Transform: merge, deduplicate and convert datasets (CSV, JSON, XLSX).
Related searches: pdf to text, pdf to markdown, pdf extractor, pdf parser, pdf rag, pdf chunking, llm document ingestion, langchain pdf loader, vector database ingestion.