PDF Text Extractor - Text, Tables & Metadata from PDFs avatar

PDF Text Extractor - Text, Tables & Metadata from PDFs

Pricing

Pay per event

Go to Apify Store
PDF Text Extractor - Text, Tables & Metadata from PDFs

PDF Text Extractor - Text, Tables & Metadata from PDFs

Extract text, tables, links and metadata from PDF links or uploaded files. One row per PDF, flags scans with no text layer, clear errors for broken or locked files. Pay only for PDFs with text.

Pricing

Pay per event

Rating

0.0

(0)

Developer

Josh Zoerner

Josh Zoerner

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

Features

Limited permissions

Share

Paste PDF links (or upload files) and get one row per PDF. Each row has the full text in reading order and the tables as rows and cells. It also has every clickable link with its page, and the document's title, author, dates and page count. You pay only for PDFs that actually had text: 1,000 PDFs cost $5, however many pages they have (up to 500 pages each by default, 5,000 at most).

  • Proof: the sample table below comes from real runs on Nov 16, 2026 (UTC) on three US government PDFs (107 pages, 3.2 MB). On the Apify platform, the two example PDFs (45 pages) were read in about 2 seconds.
  • Guarantee: some files can't be read. Scanned PDFs with no text layer, password-locked files and broken files are examples. So are links that turn out to be web pages, and files a site's robots.txt does not allow. All of them come back with the reason and a next step, free. Each PDF is read on its own with a time limit and a memory cap. That includes a stop for "zip bomb" files that expand to gigabytes. So a bad PDF ends as a free error row instead of stopping the run.
  • Next step: click Try for free. The example input reads two real PDFs (an IRS form and the BLS jobs report) in under a minute.

Who it's for

  • Analysts and researchers pulling numbers and text out of reports, filings and statistical releases, without copy-pasting from a PDF viewer.
  • Teams building search indexes or document pipelines that need clean text, page-by-page content and document dates from large batches of PDFs.
  • Operations and compliance teams checking a list of PDFs for title, author, creation date, page count and encryption. Or finding the scans that still need text recognition.
  • Developers who want a predictable, per-document PDF parsing step they can call from the API, Make, Zapier, n8n or an MCP client.

What you get

One row per PDF, the same shape for every file:

FileStatusPagesWordsTablesLinksTitleCreated
fw9.pdfok66,30100Form W-9 (Rev. March 2024)2024-03-06
empsit.pdfok3916,3811145The Employment Situation - October 20262026-11-03
p60-279.pdfok6236,2297572Income in the United States: 20222023-08-30

Tables are best-effort: large report tables can come back in a few pieces (see "How good is table detection?" below).

Every row also has:

  • The author, subject and keywords.
  • The creator and producer apps.
  • The modified date, the PDF version and the declared language.
  • Whether the file is encrypted.
  • hasTextLayer, which is false for scans.
  • How many pages had no text.
  • The file size and the final address after redirects.
  • A status, and an error with the next step when something went wrong.
  • A charged flag, so you can see exactly what you paid for.

Full example item (real run, Nov 16, 2026; text, tables and links shortened here):

{
"url": "https://www.bls.gov/news.release/pdf/empsit.pdf",
"source": "url",
"fileName": "empsit.pdf",
"fileSizeBytes": 576822,
"status": "ok",
"error": null,
"pageCount": 39,
"pagesProcessed": 39,
"title": "The Employment Situation - October 2026",
"producer": "Adobe Acrobat (64-bit) 26.2.22031",
"createdAt": "2026-11-03T22:33:56.000Z",
"modifiedAt": "2026-11-05T16:53:32.000Z",
"encrypted": false,
"hasTextLayer": true,
"pagesWithoutText": 0,
"wordCount": 16381,
"text": "Transmission of material in this news release is embargoed until USDL-26-1632\n8:30 a.m. (ET) Friday, November 6, 2026\nTechnical information: ...",
"tableCount": 114,
"tables": [
{ "page": 5, "rowCount": 23, "columnCount": 5, "rows": [["Total nonfarm", "-140", "186", "60", "165"], ["Total private", "13", "142", "78", "159"]] }
],
"linkCount": 5,
"links": [{ "page": 6, "url": "https://www.bls.gov/web/empsit/cesbmart.htm" }],
"charged": true,
"extractedAt": "2026-11-16T05:49:27.540Z"
}

Turn on Include text per page to also get a pages list (page number, text, word count, and whether the page had text).

Safe to open in Excel and Google Sheets: some text starts with =, +, - or @. That text gets a leading apostrophe ('), so a spreadsheet shows it as text instead of running it as a formula. This covers the text, the PDF properties, file names and table cells. Plain numbers such as -140 are left as they are.

Statuses

statusMeaningCharged?
okText was extractedYes
no-text-layerThe PDF holds only images (usually a scan). Metadata and page count are still returnedNo
errorThe file could not be read: password-locked, damaged, not a PDF (for example a login page), too large, too slow, refused by robots.txt, not found, or not a valid link. errorCode and error say which, and what to do nextNo

How to use it

  1. Add your PDFs in any of three ways. Paste links into PDF links (one per line). Upload files with Upload PDF files. Or pick a key-value store that already holds PDFs (for example files saved by another Actor). Duplicates are removed for you.
  2. Choose what you need: tables and links are on by default. Turn on Include text per page for the text of each page. Pick a Text order: natural reading order, or a top-to-bottom layout with a tab between table cells.
  3. Run it and download the results as JSON, CSV or Excel, or send them to Google Sheets. For search indexes, use the text or pages fields directly.

No login or API key is needed for public PDFs. You only need your Apify account.

Pricing

Pay per PDF: one charge for each PDF the Actor got text out of, no matter how many pages it has.

  • 1,000 PDFs with text = $5.00 ($0.005 per PDF), plus Apify's small standard charge for starting a run. Send many PDFs per run rather than one run per PDF, so you pay that start charge once.
  • Free: scans without a text layer, locked, damaged and oversized files, web pages posing as PDFs, robots.txt refusals and dead links. They are still in your results with the reason.
  • Why per PDF and not per page? You know the price before you click Start. A 300-page annual report costs the same as a 2-page invoice. To keep this fair for everyone, each PDF is read up to Max pages per PDF (default 500, up to 5,000) and the row says so with pagesTruncated when a file is longer.
  • Hard limits: a maximum number of charged PDFs, a run time limit, a time limit per PDF and a file size limit. You can also set a maximum cost per run in Apify. The Actor stops cleanly when it is reached. PDFs it did not get to are listed (not charged), so you can run them later.

Scheduling & integrations

  • Schedules: read a list of report links again every week or month to pick up new editions. The modifiedAt date shows when a file changed.
  • API: start runs and fetch results with the Apify API or the JavaScript and Python clients.
  • Make, Zapier, n8n: send PDF links from email attachments, forms or a CRM to this Actor, and write the text and metadata back.
  • Google Sheets: export each run straight to a sheet.
  • MCP clients: any tool that connects to Apify's MCP server can call this Actor to read PDFs by link.
  • Other Actors: point Key-value store with PDFs at the store where a crawler saved its PDF files.

Tested to the Gold Standard

Gold Standard Web built this Actor and tests it with Gold Standard QA, our three-layer quality process.

  • Every change must pass the full test suite before it is saved.
  • We plant bugs in the code on purpose, and the tests must catch at least 90% of them.
  • A reviewer who did not write the code tries to break it before each release.

See every check we run.

FAQ

Is this legal to use? The Actor downloads only the PDF links you give it (it does not crawl other pages), the way your browser would: no login, no bot-check bypass, no proxies. It identifies itself honestly (GoldStandardWeb-Apify/1.0) and follows each site's robots.txt, including crawl-delay. Use it for documents you are allowed to read and process, such as public reports, your own files, or files you have rights to. The example input uses public US government documents (IRS and Bureau of Labor Statistics).

What about scanned PDFs? A scan is a picture of a page, so there is no text to extract. The Actor detects this, returns the page count and metadata with status: "no-text-layer", and does not charge for it. Text recognition (OCR) for scans is planned for a later version.

How good is table detection? It is best-effort. The Actor finds tables from the position of the text: lines with several cells that line up in shared columns over at least 3 rows. It works well on clean report and statistical tables (like the BLS example above) and returns each table as rows and cells. It does not understand merged cells, tables drawn as images, or tables that span pages. A table with a header over several lines, or with section headings inside it (for example "Race" and "Age" blocks in a Census table), comes back as several smaller tables, with the header as its own table. A table of contents can come back as a 2- or 3-column table. Always check tables you rely on.

Why does a link come back as "a web page (HTML), not a PDF"? Many "PDF links" open a viewer or a login page first. Open the link in your browser, then copy the address of the PDF file itself (it usually ends in .pdf). Dropbox share links are changed to their direct download automatically.

Can it read Google Drive links? No. Google's robots.txt does not allow automated downloads of Drive files, and this Actor respects that. Download the file and use Upload PDF files, or host it at a direct link.

Where do uploaded files go? Upload PDF files saves each file in a key-value store in your own Apify account. If your storage is private (the default for new Apify accounts), the Actor may only read stores you pick for it, so do this: in the upload window choose New permanent storage or Existing storage, then pick that same store under Key-value store with PDFs. Each file is read once and charged once, even when it is in both fields. If a run cannot read an upload, its row is free and names the store and the record key to pick.

What about password-protected PDFs? PDFs that open without a password (even if they are encrypted against printing or copying) are read normally and flagged with encrypted: true. PDFs that need a password to open come back with errorCode: "PASSWORD", free.

What about Chinese, Japanese, Korean and other languages? The Actor ships the standard PDF character maps, so text in these languages is extracted when the PDF has a text layer. Word counts treat each run of CJK characters as one word.

What happens with huge files? Files above Max file size (default 50 MB, up to 100 MB) are skipped for free. A PDF whose text is too large for one dataset row (about 8 MB) keeps a shortened text with textTruncated: true; the full text, pages and tables are saved in the run's key-value store under the key in fullTextKey. One compressed part of a PDF may expand to at most about 100 MB at the default 1 GB of memory; a file that goes past that (usually a damaged or hostile "zip bomb") stops with errorCode: "TOO_COMPLEX", free. Give the run more memory if a real file needs more.

What happens if the run hits my time limit or maximum cost? It stops starting new PDFs, finishes cleanly, and lists the PDFs it did not read in the log and in the run's key-value store (record UNPROCESSED). Those were not charged; run them again. If Apify moves the run to another server mid-run, it continues there and no PDF is charged twice.

Limitations

  • No OCR yet: scans and image-only pages return no text (free).
  • Tables are best-effort (see the FAQ); form field values typed into fillable PDFs are not extracted.
  • Text order: "natural" follows the order stored in the PDF. That is right for most files, including articles with several columns. Some PDFs store text out of order, and "layout" (top to bottom) can read those better.
  • Up to 10,000 PDFs per run, 5,000 pages and 100 MB per PDF, 500 tables and 2,000 links per PDF. Links are web and email links only.
  • Google Drive and pages that need a login cannot be read; upload those files instead.

Input reference

FieldTypeDefaultDescription
pdfUrlsarray-PDF links, one per line (up to 10,000; duplicates removed). startUrls ([{ "url": "..." }]) is accepted too
uploadedFilesarray-Files uploaded in the input form (or more links)
keyValueStoreIdstring-A key-value store in your account that holds PDFs
keyValueStoreKeysarrayall recordsOnly read these record keys of that store
extractTablesbooleantrueDetect tables (best-effort)
extractLinksbooleantrueList web and email links with their page
includePagesbooleanfalseAdd per-page text in pages
textLayoutstringnaturalnatural (stored reading order) or layout (top to bottom, tab between cells)
maxPagesPerDocumentinteger500Pages read per PDF (1-5,000)
maxFileSizeMbinteger50Skip larger files (1-100 MB)
perFileTimeoutSecondsinteger120Time limit per PDF (10-600 s)
maxResultsinteger1000Stop after this many charged PDFs (up to 10,000)
maxRunMinutesinteger60Run time limit (1-600)

At least one of pdfUrls, uploadedFiles or keyValueStoreId is needed.

Output fields

  • File: url, source, fileName, finalUrl, fileSizeBytes
  • Result: status, error, errorCode, charged, extractedAt
  • Pages: pageCount, pagesProcessed, pagesTruncated, pagesWithoutText, hasTextLayer
  • PDF properties: title, author, subject, keywords, creator, producer
  • More properties: createdAt, modifiedAt, pdfVersion, language, encrypted
  • Text: text, wordCount, charCount, textTruncated, fullTextKey
  • Tables and links: tableCount, linkCount, tables (optional), links (optional)
  • Per page: pages (optional)

How it works

For each link, the Actor reads the site's robots.txt and downloads the file. It follows up to 5 redirects and checks each one again. It checks that the file really is a PDF. Then it reads it with pdf.js, the open-source PDF engine used by Firefox. Each PDF is read in its own worker with a time limit and a memory cap. Every compressed part is cut off once it expands past half that cap. So a damaged or hostile file ends as an error row instead of stopping the run. PDF scripts (JavaScript) are never run. Uploaded files are read through the key-value store you pick, or by their link when your storage is public. Up to 3 PDFs are read at the same time, one download at a time per website (with the site's crawl-delay). Internal and private network addresses are refused, both as input and after redirects and DNS lookups. Files above the size limit are refused before they are downloaded when the server reports their size, and cut off while downloading when it does not.