PDF Table Extractor: PDF to JSON and Excel avatar

PDF Table Extractor: PDF to JSON and Excel

Pricing

from $5.00 / 1,000 pdf page with a tables

Go to Apify Store
PDF Table Extractor: PDF to JSON and Excel

PDF Table Extractor: PDF to JSON and Excel

Returns tables from PDF URLs as typed JSON rows, with an optional Excel file. When a table has a printed total row, each column's sum is checked against it. For invoice tables and reports. Text-based PDFs only.

Pricing

from $5.00 / 1,000 pdf page with a tables

Rating

0.0

(0)

Developer

Serhii Shevchenko

Serhii Shevchenko

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

Categories

Security

Limited permissions

Share

Extract tables from PDF files and get them back as clean JSON or an Excel file. Give it PDF URLs, and it returns every table as typed rows. When a table has a printed total row, it also adds up each numeric column and compares the sum with that total, so a mismatch gets flagged.

Useful for pulling invoice tables, price lists, reports and statements out of PDFs, for bookkeepers checking supplier invoices, and for AI agents that need numbers from a document instead of a wall of text.

This Actor reads text-based PDFs only. It doesn't do OCR, so scanned PDFs and photos of documents return no tables. Those pages are reported and not charged.

What you get

One dataset record per table:

FieldMeaning
recordTypetable, or issue for something that was not read or not charged
sourceUrlThe PDF the table came from
page, pagesFirst page of the table, and all its pages if it runs over several
columnsEach column's name and type: number, date, text or empty
rowsData rows in column order. Numbers are numbers, and dates are ISO dates
totalRowThe printed total row, kept apart from the data rows
totalsStatusCHECK if a column disagrees, OK if the printed totals match, NO_PRINTED_TOTAL if nothing could be compared
totalsCheckPer column: status, computedSum, printedTotal, difference, unparsedCells
detectionruled for tables with lines, text_alignment for tables worked out from text positions

The run also saves a SUMMARY record with pages read, pages charged and columns flagged. Turn on Excel file to get tables.xlsx, with a sheet per table and a Checks sheet.

The totals check

For each numeric column, the Actor adds up the rows and compares the sum with the printed total row. Labels such as Total, Grand total, Subtotal, Sum, Razem, Suma, Summe and Gesamt are recognized.

{
"column": "Net",
"status": "CHECK",
"computedSum": 4821.0,
"printedTotal": 4812.0,
"difference": 9.0,
"unparsedCells": 0
}
StatusMeaning
OKThe rows add up to the printed total
CHECKThey don't. Look at this column
NO_PRINTED_TOTALThe column has numbers but no printed total, so only the sum is given
TOO_FEW_ROWSOne number sits above a total, such as Tax above Total, so the two can't be compared

CHECK means the arithmetic doesn't match what the Actor read. It doesn't prove the document is wrong: check the source before acting on it. unparsedCells counts filled cells that were left out of the sum.

Input example

{
"pdfUrls": ["https://example.com/invoice-1042.pdf"],
"pages": "1-3",
"maxPages": 20,
"includeXlsx": true
}
  • pdfUrls: direct http or https links. Up to 100 per run.
  • pages: optional, such as 1-3,7. Applies to every PDF.
  • maxPages: most pages to read in the whole run, across all PDFs. It also caps the cost of a run.
  • includeXlsx: also save an Excel file.

The links must be reachable without logging in. Links to private or local addresses aren't accepted.

Pricing

You pay per page that returns a table, plus Apify's small start fee of $0.00005 per run. These pages are not charged:

  • scanned or blank pages
  • pages with no table on them
  • pages that couldn't be read
  • PDFs that failed to download or aren't PDFs

Each of these appears in the results as an issue record, with a reason and the page numbers. If your spending limit runs out, the Actor stops at that page and reports the pages it didn't read.

Limits

  • Text-based PDFs only. No OCR.
  • 20 MB per PDF, 60 seconds per download, and 2 minutes of processing per PDF.
  • Password-protected PDFs aren't supported.

What works well, and what doesn't

Tables with ruled lines work best, including tables that run over many pages. Borderless tables are worked out from text positions, which is less reliable, so those records say text_alignment.

Known weak spots:

  • Invoices: many invoices have no total row directly under their line items, so the check has nothing to compare. In our tests, 2 of 11 real invoices compared cleanly. The rest still returned their tables, with no totals verdict.
  • Headers: a header that spans several rows or merged cells can come back partly joined, or as Column 1, Column 2.
  • Close columns: two columns with a narrow gap can end up in one text cell, such as € 399,00 21%.
  • Financial statements: running subtotals like "Total current assets" aren't treated as printed totals, so those columns aren't checked.
  • Layout boxes: labels and amounts inside the same box, common in hotel and utility bills, can come back as text.
  • Number formats: 1.234 is read as 1.234, not 1234, unless the text shows otherwise. If that's wrong, the column shows CHECK, not a false OK.
  • Charts and forms: text inside line charts is ignored, but bar charts and other figures can still produce a table of stray labels.

Documents are processed in memory and aren't written to logs. The extracted tables are saved to your run's dataset, as with any Actor.

Built with Claude, an AI, and tested with real PDFs.