PDF to Markdown — Text, Tables & RAG Chunks for LLMs avatar

PDF to Markdown — Text, Tables & RAG Chunks for LLMs

Pricing

from $2.00 / 1,000 pdf page converteds

Go to Apify Store
PDF to Markdown — Text, Tables & RAG Chunks for LLMs

PDF to Markdown — Text, Tables & RAG Chunks for LLMs

Convert PDFs from URLs or uploads into clean Markdown and plain text with headings, lists, paragraphs and basic tables. Page ranges, optional token-sized chunks with overlap, metadata. Pure text extraction, no OCR, no browser.

Pricing

from $2.00 / 1,000 pdf page converteds

Rating

0.0

(0)

Developer

Upton & Partners

Upton & Partners

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

20 hours ago

Last modified

Categories

Share

Give it PDF links. Get back clean Markdown and plain text — with headings, paragraphs, lists and basic tables rebuilt from the page layout — plus title, author and creation date. Optionally split into token-sized chunks with overlap, ready for embeddings and retrieval.

What it does

  • Rebuilds structure, not just text: headings (from font size, weight and numbering such as 3.2.1), paragraphs, bullet and numbered lists, reference lists, and simple tables
  • Cleans the noise: removes repeating page headers, footers and page numbers, joins words hyphenated across line breaks, fixes ligatures, merges paragraphs that continue across pages
  • Reads multi-column layouts such as academic papers in the right order
  • Page ranges: convert only 1-5, 8, 10- if that is all you need
  • Chunking for RAG: split on paragraph and heading boundaries into chunks of about N tokens with overlap, each with its page range and index. A heading is never stranded at the end of a chunk
  • Metadata: title, author, creation date, page count
  • Honest about scans: image-only PDFs are reported as no_extractable_text instead of returning an empty or invented result. There is no OCR
  • No browser, no proxies — pure text extraction, so it's fast and cheap

Use cases

  • Building a RAG knowledge base from reports, papers, manuals and policy documents
  • Feeding long documents to an LLM as clean Markdown
  • Archiving and searching a library of PDFs
  • Extracting a section of a long report by page range

Input

FieldDescription
pdfUrlsDirect links to PDF files.
keyValueStoreKeysOptional keys of PDF files stored in the run's default key-value store.
pageRangeOptional, e.g. 1-5, 8, 10-. Empty converts every page.
outputModemarkdown (default), text or both.
enableChunkingReturn one row per chunk instead of one per document. Default off.
chunkSizeTokensTarget maximum chunk size. Default 500. Tokens are estimated at about 4 characters each.
chunkOverlapTokensOverlap between consecutive chunks. Default 50.
{
"pdfUrls": ["https://arxiv.org/pdf/1706.03762"],
"pageRange": "1-5",
"outputMode": "both",
"enableChunking": true,
"chunkSizeTokens": 500,
"chunkOverlapTokens": 50
}

Output

One row per document, or per chunk when chunking is on.

{
"sourceUrl": "https://arxiv.org/pdf/1706.03762",
"status": "ok",
"error": null,
"title": "Attention Is All You Need",
"author": null,
"createdDate": "2024-04-10T21:11:43.000Z",
"pageCount": 15,
"pagesConverted": 15,
"pagesWithoutText": [],
"pageStart": 3,
"pageEnd": 4,
"chunkIndex": 5,
"chunkCount": 24,
"tokenEstimate": 490,
"markdown": "follows this overall architecture using stacked self-attention and point-wise, fully connected layers…",
"text": "follows this overall architecture using stacked self-attention and point-wise, fully connected layers…"
}

status is ok, no_extractable_text or error (with the reason in error). Documents that are not a PDF, are password-protected, or fail to download get an error row and are not charged.

Pricing

Pay per page converted. Only pages that contain extractable text are charged; blank, image-only and failed pages are free.

Notes

  • Works on PDFs that contain real text. Scanned documents need OCR, which this Actor does not do.
  • Layout reconstruction is heuristic. Typical reports, papers and forms convert well. Complex multi-column designs, equations and tables without ruling or clear alignment are best-effort: expect equations to come out as plain text fragments and some tables as paragraphs.
  • The title comes from the PDF's metadata when it is meaningful, otherwise from the largest heading on page 1 (only when page 1 is included).
  • Limits: 100 MB per file and 10 minutes per document.
  • This Actor was built and is maintained with AI assistance, with human review. Issues are answered within a few days.