PDF to Markdown & Text Converter for LLMs and RAG avatar

PDF to Markdown & Text Converter for LLMs and RAG

Pricing

from $0.50 / 1,000 page converteds

Go to Apify Store
PDF to Markdown & Text Converter for LLMs and RAG

PDF to Markdown & Text Converter for LLMs and RAG

Convert PDFs (URLs or uploads) to clean Markdown or text for LLMs and RAG: headings, lists, tables, headers/footers and page numbers removed. One item per PDF, per page or RAG chunks with overlap. Pay per page; scans and failed files are free.

Pricing

from $0.50 / 1,000 page converteds

Rating

0.0

(0)

Developer

rj

rj

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

Security

Limited permissions

Share

Turn any public PDF (or one you upload) into clean, structured Markdown or plain text that LLMs, vector databases and RAG pipelines can actually use. Most PDF extractors give you a wall of text with page headers, page numbers and broken words mixed in. This Actor rebuilds the document's structure: # headings from the font sizes and section numbers, bullet and numbered lists, simple tables, two-column reading order, words re-joined at line-break hyphens, running headers, footers and page numbers removed. Get one item per PDF, one per page, or ready-to-embed chunks with overlap, a heading path and page numbers. You pay $0.50 per 1,000 converted pages, and only for pages that actually had text: scanned pages, failed downloads and protected files cost nothing.

What data can you get?

FieldExampleNotes
markdown# Attention Is All You Need\n\n## Abstract\n\nThe dominant…Headings, lists, tables. null if you chose plain text only
textAbstract\n\nThe dominant…Plain text without markup (choose "Plain text" or "Both")
typedocument / page / chunk / errorDepends on "One dataset item per"
pageFrom, pageTo, pageNumber1, 15, nullPage range of the item, for citations
chunkIndex, chunkCount, headingPath3, 42, ["3 Model Architecture", "3.1 Encoder and Decoder Stacks"]Chunk items: the section the chunk belongs to
charCount, wordCount, tokenEstimate40292, 6060, 10073Token estimate ≈ characters / 4
titleAttention Is All You NeedPDF title, or the first top-level heading, or the file name
isScanned, pagesWithoutTextfalse, []Image-only pages are flagged and never charged
metadatatitle, author, subject, keywords, creator, producer, creation/modification dates, page count, PDF version, encrypted flag, file size, SHA-256, languageFrom the PDF file itself
warnings, error, errorCodeNOT_FOUND, NOT_PDF, PASSWORD_PROTECTED, TOO_LARGE…Problems are reported per file; the run carries on
url, fileName, id, scrapedAthttps://arxiv.org/pdf/1706.03762, 1706.03762v7.pdfid is stable: based on the file's SHA-256

Use cases

  • RAG / chatbots over documents: chunk reports, manuals, papers and policies into overlapping, heading-aware pieces with page numbers for citations, then load them into Pinecone, Qdrant, Weaviate, pgvector or any vector store.
  • LLM prompts: give GPT, Claude or Gemini clean Markdown instead of raw PDF text: fewer tokens (no repeated headers, page numbers or dot leaders) and the structure stays intact.
  • Research and knowledge bases: convert arXiv papers, government reports, annual reports and standards into Markdown for Obsidian, Notion or a docs site.
  • Document pipelines: extract text plus metadata (author, dates, page count, SHA-256 for de-duplication) from batches of PDF links on a schedule.
  • Search indexing: one item per page with its page number for page-level search results.

How to use

  1. Paste one or more PDF links into PDF URLs (or upload a file in Or upload a PDF file).
  2. Choose Output format (Markdown, plain text or both) and One dataset item per (document, page or chunks).
  3. Click Start and download the results as JSON, CSV, Excel or Markdown from the Output tab, or fetch them through the API.

Links to arXiv abstract pages, GitHub file pages, Dropbox and Google Drive share links are rewritten to the direct download automatically. The file must be publicly downloadable (no login).

Input examples

Whole document as Markdown (the default):

{
"urls": ["https://arxiv.org/pdf/1706.03762"],
"outputFormat": "markdown",
"granularity": "document",
"maxPagesPerDocument": 20
}

RAG chunks of ~500 tokens with 50 tokens of overlap, in Markdown and plain text:

{
"urls": [
"https://nvlpubs.nist.gov/nistpubs/CSWP/NIST.CSWP.29.pdf",
"https://arxiv.org/abs/1512.03385"
],
"granularity": "chunks",
"chunkSize": 500,
"chunkOverlap": 50,
"outputFormat": "both"
}

One item per page, only pages 1-10 and 15:

{
"urls": ["https://example.com/annual-report.pdf"],
"granularity": "page",
"pageRange": "1-10, 15"
}
SettingDefaultWhat it does
urls–PDF links, one per line
uploadedFile–A PDF you upload (or a link to one)
outputFormatmarkdownmarkdown, text or both
granularitydocumentdocument, page or chunks
chunkSize / chunkOverlap500 / 50Approximate tokens (1 token ≈ 4 characters); chunks end at sentence, list-item or table-row boundaries and start fresh at headings
includePageMarkersfalseAdds <!-- page N --> where each page starts (document output; chunks and pages carry pageFrom/pageTo)
pageRangeall pagese.g. 1-10, 15, 20-
maxPagesPerDocument2000 = no limit
maxFileSizeMb50Larger files become an error item (not charged)
removeHeadersFooterstrueRemoves text repeated at the top/bottom of at least half the pages, and page numbers
pdfPassword–For your own password-protected PDFs
maxConcurrency3Parallel downloads (max 3 per website)
proxyConfigurationoffOnly needed if a website blocks downloads from Apify's servers. Apify datacenter proxy or your own proxy URLs; residential is not supported

Output example

A real result for https://arxiv.org/pdf/1706.03762 (the Markdown is shortened here; the full item has all 15 pages, ~40,000 characters):

{
"id": "pdf:bdfaa68d8984f0dc:document",
"type": "document",
"url": "https://arxiv.org/pdf/1706.03762",
"fileName": "1706.03762v7.pdf",
"title": "Attention Is All You Need",
"pageFrom": 1,
"pageTo": 15,
"markdown": "# Attention Is All You Need\n\n[…]\n\n## Abstract\n\nThe dominant sequence transduction models are based on complex recurrent or convolutional neural networks …\n\n## 1 Introduction\n\n…\n\n### 3.1 Encoder and Decoder Stacks\n\n…",
"text": null,
"charCount": 40292,
"wordCount": 6060,
"tokenEstimate": 10073,
"textPages": 15,
"hasTextLayer": true,
"isScanned": false,
"pagesWithoutText": [],
"metadata": {
"title": null,
"author": null,
"creator": "LaTeX with hyperref",
"producer": "pdfTeX-1.40.25",
"creationDate": "2024-04-10T21:11:43.000Z",
"modificationDate": "2024-04-10T21:11:43.000Z",
"pageCount": 15,
"pdfVersion": "1.5",
"isEncrypted": false,
"fileSizeBytes": 2215244,
"sha256": "bdfaa68d8984f0dc02beaca527b76f207d99b666d31d1da728ee0728182df697",
"language": "en",
"languageSource": "detected"
},
"warnings": ["Skipped 966 characters of rotated or diagonal text (margin stamps, watermarks)."],
"error": null,
"errorCode": null,
"scrapedAt": "2026-11-02T13:56:55.095Z"
}

A file that can't be converted gives an error item instead (free), and the other files are still converted:

{
"id": "error:405c6bb9bd24d428",
"type": "error",
"url": "https://nvlpubs.nist.gov/nistpubs/CSWP/NIST.CSWP.9999.pdf",
"markdown": null,
"error": "HTTP 404: the file was not found at this URL",
"errorCode": "NOT_FOUND"
}

More examples (page items, error items) are in samples/sample-output.json. A run summary with the status of every file is saved as RUN_SUMMARY in the run's key-value store.

Pricing

Pay-per-event pricing, one event:

EventPriceWhen it is charged
page$0.0005 per pageOnce per PDF page that was converted and had text

That is $0.50 per 1,000 pages. Examples:

  • A 15-page research paper: 15 × $0.0005 = $0.0075
  • 100 annual reports of 80 pages: 8,000 pages = $4.00
  • 1,000 pages chunked for RAG: $0.50, however many chunks they become

You are not charged for: pages without a text layer (scans, image-only or blank pages), files that fail (404, not a PDF, password-protected, too big, damaged), the same file given twice in one run, and pages outside your page range or page limit. Set "Maximum cost per run" in the run options to cap your spend: the Actor stops cleanly at the limit and tells you where.

Tips and limits

  • No OCR (yet). Scanned or image-only PDFs have no text to extract. They are detected (isScanned: true, pagesWithoutText: [...]), reported in warnings, and not charged. OCR is planned for a later version.
  • Tables are best-effort. Simple grids (one line per row, clear column gaps) become Markdown tables. Tables with merged cells, multi-line cells or very tight columns may come out as text lines or a rough grid.
  • Math and figures. Formulas come out as plain characters (no LaTeX), and images are not extracted. Labels inside vector charts can appear as short stray lines.
  • Layout. One- and two-column layouts are handled; three or more columns, magazine layouts and text boxes may be read in the wrong order. Bold/italic inside paragraphs is not marked up.
  • Headers/footers are detected when they repeat on at least half of the converted pages, so they need 3+ pages. Lone page numbers are always removed.
  • Rotated text in margins (such as arXiv side stamps) and diagonal watermarks are skipped; landscape pages are read normally.
  • Downloads: only public files. Pages that require a login, or Google Drive files too big for Google's virus scan, return a web page instead of the PDF: you get a clear NOT_PDF error. Use a direct link or upload the file.
  • Big files: the default limit is 50 MB per file (max 500 MB). For files over 100 MB, give the run 1,024 MB or more memory.
  • Speed: a 15-page paper converts in about one second after download.

FAQ

How is a page counted? One page event per PDF page that was converted and contained text. A 20-page PDF with a 5-page range is 5 pages. Scanned pages inside a mixed PDF are skipped and free.

Can it read scanned documents? Not in this version: it reads the PDF's text layer. Scanned pages are flagged so you can send them to an OCR tool, and you don't pay for them.

Which languages work? Any language whose PDF has a proper text layer, including accented Latin scripts, Cyrillic, Greek, Chinese, Japanese and Korean (CJK lines are joined without extra spaces). Right-to-left scripts (Arabic, Hebrew) are extracted, but words may come out in reversed order. The metadata.language field gives the PDF's declared language or a detected one.

What chunk size should I use? 300-800 tokens with 10-15% overlap works well for most embedding models. Each chunk carries headingPath and pageFrom/pageTo, so you can show "Section 3.1, page 4" next to an answer.

Can I use residential proxies? No. If you select a residential (or SERP) proxy group, the run logs a warning and uses Apify datacenter proxy instead. PDFs are large downloads (often 100-150 KB per page), and residential traffic would cost more than the per-page price, which would force a much higher price for everyone. Most PDF hosts (journals, arXiv, government and company sites) work without any proxy. If a site blocks Apify's servers, try datacenter proxy, add your own proxy URLs, or download the file and upload it in the input form.

Can I convert my own files? Yes: upload a PDF in the input form, or put it anywhere with a public link. Password-protected files you own can be opened with "PDF password".

Is it legal? The Actor only downloads files you point it to, the way a browser would, and converts them; it does not crawl or log in anywhere. Only process documents you have the right to use, respect copyright and the terms of the website you download from, and handle any personal data in the documents according to applicable laws (such as the GDPR). You are responsible for how you use the output.

Integrations

  • API: start runs and read results with the Apify API or the JavaScript/Python clients; get the dataset in JSON, CSV, Excel or XML.
  • Make, Zapier and n8n: use the Apify app/node to convert PDFs from a form, an email attachment link or a spreadsheet of URLs, and send the Markdown on to Notion, Google Docs or your LLM step.
  • LangChain and LlamaIndex: load the dataset with the Apify dataset loader and map markdown (or text) to the document content and the other fields to metadata.
  • MCP: AI agents can call this Actor as a tool through the Apify MCP server to read PDFs on demand.
  • Webhooks and schedules: run it on a schedule and get notified when results are ready.

Changelog

  • 0.1 (November 2026): First release. Markdown and plain text, document/page/chunk output, headings from font size, weight and section numbers, lists, simple tables, two-column reading order, header/footer and page-number removal, de-hyphenation, PDF metadata and language, scanned-page detection, uploads, page ranges and password-protected files.

More scrapers by the same developer

Browse all my Actors on my Apify Store profile.