PDF to Markdown RAG Chunks
Pricing
from $0.50 / 1,000 converted pdf pages
PDF to Markdown RAG Chunks
Turn text-layer PDFs into deterministic Markdown chunks with stable document, page and bounding-box references for retrieval and AI workflows.
Pricing
from $0.50 / 1,000 converted pdf pages
Rating
0.0
(0)
Developer
Poyraz Demir
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
a day ago
Last modified
Categories
Security
Limited permissionsShare
Turn text-layer PDFs into deterministic Markdown chunks with stable document, page and bounding-box references for retrieval and AI workflows.
What is PDF to Markdown RAG Chunks?
PDF to Markdown RAG Chunks converts text-based PDF documents into page-local Markdown and plain-text chunks. Text is grouped into paragraphs, and columns are read one after another instead of line by line across the page. Each chunk keeps a stable document ID, page number, chunk ID and source bounding box, so a retrieval pipeline can point an answer back to the exact part of the original document.
The Actor accepts public HTTP and HTTPS PDF URLs or base64 PDF data. It processes up to 10 documents in one run. A damaged or unsupported document returns a structured error without discarding chunks from the other documents.
How to use it
- Add one or more PDF sources to
sources. The example input contains a small synthetic PDF, so you can run it as it is. - For a URL, use a publicly accessible PDF that you are allowed to process. For base64 input, include the encoded bytes and a filename.
- Set the maximum file size, page limit and chunk size for your pipeline.
- Run the Actor and read one dataset record per chunk. Export the dataset as JSON, JSONL, CSV or another format supported by Apify.
Chunks never cross page boundaries. documentId is derived from the PDF SHA-256, and chunkId includes the document, page and chunk position. Repeating the same input produces the same IDs and text.
Input and output example
Input:
{"sources": [{"url": "https://example.com/report.pdf"},{"base64": "JVBERi0xLjQK...", "filename": "notes.pdf"}],"maxBytes": 20000000,"maxPages": 200,"chunkChars": 1800,"respectRobotsTxt": true}
A successful record has this shape:
{"documentId": "b2e6f24198dabef8fcc31f5f","source": "base64:synthetic.pdf","filename": "synthetic.pdf","page": 1,"pageCount": 1,"chunkId": "b2e6f24198dabef8fcc31f5f:p0001:c0001","markdown": "Synthetic PDF RAG chunk","text": "Synthetic PDF RAG chunk","bbox": [72.0, 62.484, 148.692, 90.484],"status": "success","error": null}
A failed document returns one record with status: "error" and an error code instead of chunks.
Document access and limits
This version reads the existing text layer. It does not perform OCR, reconstruct tables, detect headings or interpret formulas, and unusual layouts can still be read in an unexpected order. Scanned documents without a text layer return NO_TEXT_LAYER. Encrypted PDFs return ENCRYPTED_PDF. Each document can be up to 20 MB and 200 pages, and each chunk holds 500 to 4000 characters.
Each run processes only the submitted documents. There is no site discovery or crawling. URL downloads reject local and non-public network destinations, validate redirects and can enforce robots.txt rules. The Actor does not log in, bypass paywalls or DRM, solve CAPTCHAs or use your cookies.
Use the Actor only for documents you are allowed to access and process. Stop downloading files from a site if its terms or robots.txt rules disallow it, or if the site owner objects. You are responsible for how you use the extracted content and for complying with copyright and applicable law.
Pricing
Pay-per-event pricing: $0.0015 per Actor start plus $0.0005 per converted page. A page is charged once when it produces at least one text chunk, however many chunks it contains. Failed documents, blank pages and documents rejected by limits are not charged. If a run reaches your maximum cost per run, the Actor finishes the page it has already charged for and stops before the next page.
Troubleshooting and support
NOT_PDF: check that the source is a valid PDF rather than an HTML download page.NO_TEXT_LAYER: use a text-based PDF; OCR is not included.PDF_TOO_LARGEorRESPONSE_TOO_LARGE: reduce the file or adjustmaxByteswithin the documented limit.TOO_MANY_PAGES: split the document or adjustmaxPageswithin the documented limit.INVALID_BASE64: supply the raw base64 PDF bytes without a data-URL prefix.ROBOTS_DISALLOWED: the site's robots rules do not permit downloading this file.
For bug reports, use Actor Issues in Apify Console. Include the run ID and the returned error code. Do not post private documents, credentials or personal data.