PDF Text Extractor - Tables, Markdown, RAG Chunks & OCR avatar

PDF Text Extractor - Tables, Markdown, RAG Chunks & OCR

Pricing

from $2.55 / 1,000 pdf extracted (up to 20 pages)s

Go to Apify Store
PDF Text Extractor - Tables, Markdown, RAG Chunks & OCR

PDF Text Extractor - Tables, Markdown, RAG Chunks & OCR

Extract text from PDF files by URL: clean text, Markdown with headings, tables as rows, metadata, bookmarks, one row per document, per page or per RAG chunk. Optional OCR for scanned PDFs in 20 languages. Google Drive, Dropbox and arXiv links work. Failed files are free.

Pricing

from $2.55 / 1,000 pdf extracted (up to 20 pages)s

Rating

0.0

(0)

Developer

Scrapewise Data

Scrapewise Data

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

a day ago

Last modified

Share

PDF Text Extractor

PDF Text Extractor turns PDF files into clean text, Markdown, tables and RAG chunks, from a list of links or from files in your Apify storage, without a browser, an API key or any setup. Each PDF comes back with its full text, a Markdown version with headings and lists rebuilt from the layout, every table as rows and columns, the document metadata (title, author, dates, page count) and its bookmarks. Pick one row per document, per page or per chunk ready for a vector database. Scanned PDFs can be read with optional OCR in 20 languages.

US$ 3 per 1,000 PDFs of up to 20 pages. Longer files: US$ 0.001846 per extra 10 pages. OCR: US$ 0.001154 per scanned page, only when you turn it on. No monthly fee, no start fee. Failed files are free.

At a glance

  • Input: PDF links (direct, arXiv, Google Drive, Dropbox, GitHub), an uploaded file, or the PDFs in one of your key-value stores
  • Text: in reading order, two-column papers included
  • Markdown: headings from font sizes, joined paragraphs, bullet lists, tables in place, running headers and footers removed
  • Tables: each one as a list of rows, plus a Markdown table, with its page number
  • RAG chunks: paragraph-aware chunks with overlap, section path, page range and token estimate
  • Metadata: title (from the file or, when missing, from the first page), author, subject, keywords, created and modified dates, PDF version, page count, bookmarks
  • OCR: optional, only on pages without a text layer, 20 languages, charged per page actually read
  • Error rows: free, with an errorCode that says what to fix

One real row

Input https://arxiv.org/pdf/2005.11401 in Document mode (collected on 2026-10-03; text, markdown, tables and outline trimmed here):

{
"type": "document",
"url": "https://arxiv.org/pdf/2005.11401",
"fileName": "2005.11401v4.pdf",
"title": "Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks",
"titleSource": "content",
"author": null,
"creator": "LaTeX with hyperref",
"producer": "pdfTeX-1.40.21",
"createdAt": "2021-04-13T00:48:38Z",
"modifiedAt": "2021-04-13T00:48:38Z",
"pdfVersion": "1.5",
"pageCount": 19,
"pagesExtracted": 19,
"fileSizeBytes": 885323,
"wordCount": 9868,
"charCount": 69137,
"text": "Retrieval-Augmented Generation for\nKnowledge-Intensive NLP Tasks\n...",
"markdown": "# Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks\n\n...\n\n## Abstract\n\nLarge pre-trained language models have been shown to store factual knowledge in their parameters, and achieve state-of-the-art results when fine-tuned on downstream NLP tasks. ...",
"tables": [
{
"page": 8,
"index": 1,
"rows": 6,
"columns": 3,
"data": [
["", "Factuality", "Specificity"],
["BART better", "7.1%", "16.8%"],
["RAG better", "42.7%", "37.4%"],
["Both good", "11.7%", "11.8%"],
["Both poor", "17.7%", "6.9%"],
["No majority", "20.8%", "20.1%"]
],
"markdown": "| | Factuality | Specificity |\n| --- | --- | --- |\n| BART better | 7.1% | 16.8% |\n..."
}
],
"tableCount": 7,
"outline": [
{ "level": 1, "title": "1 Introduction", "page": 1 },
{ "level": 1, "title": "2 Methods", "page": 2 },
{ "level": 2, "title": "2.1 Models", "page": 3 }
],
"ocrPages": 0,
"scannedPages": 0,
"extraPageBlocks": 0,
"warning": null,
"scrapedAt": "2026-10-03T13:24:18Z",
"errorCode": null
}

The same file in RAG chunk mode gives 88 rows like this one:

{
"type": "chunk",
"url": "https://arxiv.org/pdf/2005.11401",
"title": "Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks",
"chunkIndex": 9,
"chunkCount": 88,
"text": "For FEVER [56] fact verification, we achieve results within 4.3% of state-of-the-art pipeline models which use strong retrieval supervision.\n\n...\n\n## 2 Methods\n\nWe explore RAG models, which use the input sequence x to retrieve text documents z and use them as additional context when generating the target sequence y. ...",
"section": "Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks > 1 Introduction",
"pageStart": 2,
"pageEnd": 3,
"charCount": 1095,
"tokenEstimate": 274,
"overlapChars": 140
}

What you can do with it

  • RAG and AI agents: turn reports, papers, manuals and contracts into chunks with section and page numbers, and load them into Pinecone, Weaviate, Qdrant, Chroma or pgvector. The page range of each chunk lets your app cite the source.
  • Tables to spreadsheets: pull the tables out of financial reports, government statistics and research papers as rows you can open in Excel or load into a database.
  • Search and archives: make a folder of PDFs searchable, with title, author and dates as filters. Scanned files included, with OCR.
  • Document pipelines: run it after a crawler that collects PDF links, on a schedule, or from Make, n8n and Zapier, and get JSON back.

Input

FieldWhat it does
urlsPDF links. Direct .pdf links, arxiv.org/abs/..., Google Drive and Dropbox share links, GitHub file links
pdfFileOne PDF uploaded in the Console
storeId, keyValueStoreKeysRead PDFs saved in one of your key-value stores (pick it in the Console, or pass its ID): every .pdf record, or only the keys you list
outputModedocument (default), pages or chunks
includeMarkdownAdd the markdown field. Default on
extractTablesFind tables. Default on. Turning it off makes long files many times faster
includePagesIn Document mode, add a pages list with the text of each page
removeHeadersFootersLeave running headers, footers and page numbers out of Markdown and chunks. Default on
chunkSize, chunkOverlapCharacters per chunk (default 1000) and repeated from the previous chunk (default 150)
pageRangeFor example 1-5, 8, 12-
maxPagesPerPdfStop after this many pages of each file
pdfPasswordPassword for protected PDFs
ocroff (default), auto (only pages without text) or force (every page)
ocrLanguageeng, deu, fra, spa, por, ita, nld, pol, swe, rus, ukr, tur, ara, hin, jpn, kor, chi_sim, chi_tra, vie, ind. Join two with +
ocrMaxPagesPerPdfOCR stops after this many pages of each file. Default 50
maxPdfs, maxPdfSizeMbLimits per run and per file (default 100 MB)
proxyConfigurationOptional. Blocked downloads are retried once through Apify datacenter proxy on their own

Chunks for a vector database, from two reports:

{
"urls": [
"https://nvlpubs.nist.gov/nistpubs/CSWP/NIST.CSWP.29.pdf",
"https://www.irs.gov/pub/irs-pdf/p17.pdf"
],
"outputMode": "chunks",
"chunkSize": 1200,
"chunkOverlap": 200
}

A scanned document, first 10 pages, with OCR:

{
"urls": ["https://www.archives.gov/files/research/jfk/releases/docid-32204484.pdf"],
"ocr": "auto",
"ocrLanguage": "eng",
"pageRange": "1-10"
}

Output fields

Document rows: type, url, fileName, title, titleSource (metadata or content), author, subject, keywords, creator, producer, createdAt, modifiedAt, pdfVersion, pageCount, pagesExtracted, fileSizeBytes, wordCount, charCount, text, markdown, tables (each with page, index, rows, columns, data, markdown), tableCount, outline (bookmarks with level, title, page), pages (optional), ocrPages, scannedPages, extraPageBlocks, warning, scrapedAt.

Page rows: type, url, fileName, title, pageCount, page, text, markdown, tables, tableCount, wordCount, charCount, ocr, scanned, author, createdAt, warning, scrapedAt.

Chunk rows: type, url, fileName, title, pageCount, chunkIndex, chunkCount, text, section, pageStart, pageEnd, charCount, tokenEstimate, overlapChars, author, createdAt, scrapedAt.

Error codes (never charged)

errorCodeMeaning
NOT_FOUNDThe link answers 404 or the host does not exist
NOT_A_PDFThe link returns a web page or another file type. Use the direct link to the file
BLOCKEDThe server refused the download (login needed, or it blocks cloud servers)
DOWNLOAD_FAILEDThe download broke after 3 tries
FILE_TOO_LARGEAbove maxPdfSizeMb
PASSWORD_REQUIRED, WRONG_PASSWORDSet or fix pdfPassword
CORRUPTED_PDF, PDF_TOO_COMPLEXThe file is damaged, or needs more memory than the run has
NO_TEXTScanned or blank PDF and OCR is off (or OCR found nothing). The row still carries the title, page count and how many pages are scans
DUPLICATESame file as another link of the run
STORE_NOT_FOUNDThe key-value store could not be opened. Pick it in the storeId field
FREE_PLAN_LIMITThe Free plan page limit of the run was reached before this file
INVALID_URL, INVALID_INPUTA link or option the Actor does not understand
EXTRACTION_TIMEOUT, NOT_REACHED, UNEXPECTEDTime ran out, the spending limit of the run was reached, or something unforeseen broke. Only that file is lost

Pricing

EventPrice
PDF extracted, up to 20 pagesUS$ 0.003 (US$ 3 per 1,000 PDFs; US$ 2.55 on Gold and above)
Each extra 10 pages after page 20US$ 0.001846
OCR page (only with ocr on, only pages OCR turned into text)US$ 0.001154

Examples: a 12-page paper costs US$ 0.003. A 60-page report costs US$ 0.003 + 4 x 0.001846 = about US$ 0.0104. An 8-page scan with OCR costs US$ 0.003 + 8 x 0.001154 = about US$ 0.0122. Tables, Markdown, chunks and metadata are included, and the three output modes cost the same. There is no start fee and no Apify compute bill on top. Error rows are free. On the Apify Free plan a run reads up to 300 pages and 20 OCR pages.

How to run it

  • Console: paste the links and press Start. Download the dataset as JSON, CSV or Excel.
  • API: POST https://api.apify.com/v2/acts/<actor>/run-sync-get-dataset-items?token=<token> with the input JSON as the body returns the rows in the same call.
  • Schedules and integrations: run it on a schedule, or from Make, n8n, Zapier and LangChain through the Apify integrations, and send the dataset to your database or vector store.
  • From another Actor: save PDFs to a key-value store and pass its ID in storeId.

FAQ

How good is the Markdown? Headings come from font sizes and bold lines, so documents that set headings in a larger or bolder font come out well (papers, reports, manuals). A PDF has no real structure inside, so slides, forms and magazine layouts come out as plain paragraphs. Text inside charts and diagrams is kept as text.

Which tables are found? Tables drawn with lines and research-paper tables with horizontal rules. Tables with no lines at all (columns separated only by spaces) are returned as text, not as rows. Merged cells come back as empty cells next to the value.

Does OCR read tables or handwriting? No. OCR pages give text only, and it is tuned for printed or typed pages. Quality follows the scan: a clean 300 dpi scan reads well, an old fax does not.

Do I pay for a PDF that fails? No. A dead link, a web page instead of a file, a wrong password and a scan with OCR off are free rows that say what happened.

How fast is it? A 19-page paper and a 32-page report together finish in about 8 seconds. At the default 1 GB of memory, pages without tables take a few milliseconds each, pages with tables 1 to 2 seconds and OCR about 7 seconds per page. With 4 GB, table pages take about half a second and OCR about 2 seconds per page.

Can I control the cost of long files? Yes: pageRange, maxPagesPerPdf and ocrMaxPagesPerPdf cap each file, and the maximum charge you set for the run is respected (the Actor reads only the pages the limit covers).

Limitations

  • Text comes in the order stored in the file. That is the reading order in most PDFs, but some design tools store text boxes out of order.
  • Formulas come out as loose symbols. Images and charts are not described.
  • Right-to-left scripts and vertical text are extracted but Markdown structure is best on left-to-right text.
  • Rows above the dataset size limit (very long books) keep the first 200,000 characters in the row and link to the full text and Markdown files (textUrl, markdownUrl).
  • Files above 300 MB are not read. Long files with table detection on take time at the default 1 GB of memory (a 142-page tax guide with 65 tables: about 4 and a half minutes). Run with 4 GB to read them about 4 times faster (the same guide: about 1 minute), or turn off extractTables. The price is the same.
  • Free plan: up to 300 pages and 20 OCR pages per run.

This Actor reads only files you point it to. Make sure you have the right to process them. If something breaks, open an issue on the Actor page with the link of the PDF.

Changelog

  • 2026-10-03, 0.1: first release. Links, upload and key-value store input; text, Markdown, tables, metadata and bookmarks; document, page and RAG chunk rows; page ranges and passwords; optional OCR in 20 languages; free error rows.