PDF Tables Extractor — Tables Out of Any PDF avatar

PDF Tables Extractor — Tables Out of Any PDF

Pricing

from $4.00 / 1,000 results

Go to Apify Store
PDF Tables Extractor — Tables Out of Any PDF

PDF Tables Extractor — Tables Out of Any PDF

Pull real tables out of PDFs as rows you can use, with a confidence score on every table. Outputs one item per row for spreadsheets, or Markdown and CSV for docs and LLM prompts. Says plainly when a PDF is a scan with no text layer instead of returning silent nonsense.

Pricing

from $4.00 / 1,000 results

Rating

0.0

(0)

Developer

alaudin burki

alaudin burki

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

6 days ago

Last modified

Share

Getting a table out of a PDF is one of the genuinely hard, genuinely common manual jobs. A single Stack Overflow question about it has been read 131,000+ times, and "merge/convert PDFs" over 1.3 million.

The reason it's hard: a PDF has no concept of a table. It stores characters at coordinates. The rows and columns you see are an illusion your eye assembles, and software has to reconstruct them.

What you get

One dataset item per table row, ready to drop into a spreadsheet — or one item per table with rows nested, if you prefer. Plus Markdown (for docs, issues and LLM prompts) and optional CSV.

FieldDescription
rowThe row as an object keyed by the table's header
confidence0–1: how sure we are this is a real table, not a diagram
header · hasHeaderDetected header row; duplicate and blank names are made unique
page · tableIndex · rowIndexExactly where it came from
markdown · csvThe whole table, ready to paste
fillRatio · columnConsistency · numericRatio · symbolRatio · singleCharRatioThe signals behind the score, so you can filter on your own terms

Why confidence exists — and why you should use it

Table detection is genuinely ambiguous. A boxed diagram is geometrically identical to a table. Any tool claiming perfect extraction is either lying or hasn't tested on messy documents.

So every table is scored on five signals, and low scorers are dropped rather than presented as fact:

  • fill ratio — sparse grids are usually layout artefacts
  • column consistency — a real column is populated on most rows
  • average cell length — one-character cells mean a diagram
  • numeric ratio — real tables carry data
  • symbol / single-character ratio — catches keyboard layouts and glyph charts

Measured honestly on a deliberately hostile test: on a PDF containing a keyboard diagram, the naive approach reported 4 tables. With scoring, that drops to 2 — while a genuine table in another PDF is kept at 0.81 confidence and extracted with correct headers and cells.

It is not zero. Two false positives survive on that document. For financial or statistical work, raise minConfidence to 0.7+ and check header before trusting a row. A wrong table is worse than no table, and this actor is built to let you make that call rather than make it for you.

Input

{
"pdfUrls": [{ "url": "https://example.com/annual-report.pdf" }],
"pages": "12-30",
"minConfidence": "0.45",
"outputMode": "rows"
}

Sample output

[
{
"sourceUrl": "https://css4.pub/2015/textbook/somatosensory.pdf",
"page": 3,
"tableIndex": 1,
"confidence": 0.81,
"hasHeader": true,
"header": "column_1, Rapidly adapting, Slowly adapting",
"rowIndex": 1,
"row": {
"column_1": "Surface receptor / small receptive field",
"Rapidly adapting": "Hair receptor, Meissner's corpuscle: detect an insect or a very fine vibration.",
"Slowly adapting": "Merkel's receptor: used for spatial details, e.g. a round surface edge."
},
"status": "ok"
}
]

Run summary

Every completed run also writes a SUMMARY record in the default key-value store. It reports PDFs opened, pages processed, tables detected/kept/rejected, returned items, scan detection, and the safe next action. Use it to distinguish “no usable table” from a successful extraction before consuming dataset rows downstream.

Typical uses

  • Financial reports → spreadsheet — pull the tables out of a 10-K or an annual report.
  • Scientific and government data — statistical releases publish tables as PDFs and nothing else.
  • Invoices and statements — line items into a ledger.
  • Feeding an LLM — the Markdown output is the format models handle best.
  • Migrating legacy documents — years of PDF-only reports into a database.

Pricing

$4.00 / 1,000 rows ($0.004 per result), plus a near-zero start fee. Priced above the simple scrapers because the work is real — PDF parsing is CPU-bound, not a fetch. Never charged beyond maxItems.

⚠️ Read before you rely on it

  • Scanned PDFs will not work. If a page is an image of a document, there is no text to extract. This is detected and reported as little_or_no_text_layer in the QUALITY_REPORT — you get an explicit answer, not silent nonsense. OCR is not performed.
  • Borderless tables are harder than ruled ones and score lower. Lowering minConfidence finds more of them and also more false positives. That trade-off is yours to make.
  • Merged cells and multi-row headers flatten. Complex layouts may need a manual pass.
  • Check confidence before trusting financial figures. Genuinely — that is what it is for.

FAQ

  • Does it do OCR? No. Scanned documents are detected and reported, not guessed at.
  • Why is this actor Python when the rest are Node? Because pdfplumber has no real JavaScript equivalent. It was tried in Node first with pdfjs-dist: that produced both false positives (a keyboard diagram read as a table) and false negatives (a real table missed entirely). Language chosen per job, not by preference.
  • Can it handle password-protected PDFs? No.
  • What if my PDF has no tables? You get an explicit no_tables_found row explaining what to try.
  • PDF Text Extractor — whole-document or per-page text when you don't need tables.
  • Docs to Answers Pack — turn documentation into citable, AI-ready chunks.