Guide

How to pull tables out of thousands of PDF reports

Which tools read digital and scanned PDFs, what breaks when the reports number in the thousands, and how to get every one into a single table you can check.

The short answer

A few files, digital PDFs: use an open-source library. Camelot, pdfplumber and Tabula read the text layer of a PDF and return each table as rows, on your own machine. They do not read scanned pages.

Scanned pages, or a managed API: use a cloud document service. Amazon Textract, Azure AI Document Intelligence and Google Document AI run OCR and return table cells with confidence scores and page coordinates. Adobe PDF Extract API returns a PDF's structure, tables included, as JSON.

Thousands of reports in different layouts: reading each table is no longer the hard part. The hard part is mapping every table, from every layout, into one schema and checking the numbers. That is the job sieve does: you name the columns in plain language, send the PDFs through the API or the app, and get one CSV or JSON table back, with automated checks on every run. The Excel add-in pulls single figures from a PDF into a cell.

Send us three reports and the columns you need

Pick three reports with different layouts and describe the table you want. We will send back one table, usually overnight.

Reading one table is easy. Reading ten thousand the same way is not.

A script that works on one publisher's PDF breaks on the next one. Across thousands of reports from different sources, every layout difference becomes a special case in your code, and a wrong number can sit in the output until someone uses it.

  • •Layouts differ: each publisher, and each year of the same publisher, puts the table somewhere else and names the columns differently.
  • •Tables break across pages: the header repeats or disappears, and rows split at the page break.
  • •Headers and footnotes carry meaning: a merged header cell holds the year or the unit, and a footnote can change what a number means.
  • •Errors are silent: a column shifted by one still produces a valid CSV. Nothing fails; the numbers are just wrong.

How it works

1

Name the columns

Describe the table you want in plain language: "company, fiscal period, segment, revenue in USD millions". Add the definitions your team already uses.

One description for every layout.

2

Send the reports

Upload PDFs through the API or the app, or point at links. Digital and scanned pages go through the same pipeline.

One file per request, or send us the archive.

3

Get one table back

CSV or JSON in your columns, with automated checks on every run. Refine the result with a follow-up instruction instead of starting over.

API, app, spreadsheet or Excel add-in.

One schema across every layout

The agent reads each table by what it contains, not where it sits, and maps it into the columns you asked for. A new layout does not need a new template.

Built for awkward tables

Tables that span pages, merged and nested headers, footnotes that change a unit, and scanned pages with stamps over the text.

Checked before you use it

Automated checks run on every extraction and report coverage gaps and outliers on the run. On enterprise plans, reviewers compare each value with the source document before delivery.

In your code or in Excel

Call the REST API from a script and get CSV or JSON, or use =SIEVE.GET_DATA() in Excel to pull a figure from a PDF into a cell and =SIEVE.GET_LOCATION() to see the page it came from.

Three ways to do it

A comparison of approaches, not of any one product's feature list. Each is the right choice for some jobs; the descriptions of the libraries and APIs follow their own documentation.

What it is

Open-source libraries

Code you run on your own machines, free and open source

Cloud document APIs

Managed services that read each page and return its structure

sieve

A service that returns the finished table in the columns you name

Digital PDFs

Open-source libraries

Yes. Reads the text layer; you tune settings per layout (Camelot's lattice and stream modes, pdfplumber's table settings)

Cloud document APIs

Yes

sieve

Yes

Scanned pages

Open-source libraries

Not on their own. Camelot and Tabula read text-based PDFs only; add a text layer with an OCR tool such as OCRmyPDF first

Cloud document APIs

Textract, Azure and Google run OCR as part of the call

sieve

Yes, through the same pipeline as digital PDFs

What you get back

Open-source libraries

Each table as rows (a DataFrame or CSV), laid out as it is on the page

Cloud document APIs

JSON with cells, row and column spans, confidence scores and page coordinates; Adobe can also save tables as CSV or XLSX

sieve

CSV or JSON in your columns, the same schema for every report

Tables across pages, merged headers, footnotes

Open-source libraries

Your code joins the parts, flattens the headers and reads the footnotes

Cloud document APIs

Merged cells are reported; joining pages and applying units is your code

sieve

Handled in the extraction and mapped into your columns

Many layouts into one schema

Open-source libraries

Per-layout code you write and maintain

Cloud document APIs

Mapping code you write, or custom models you train per document type

sieve

One plain-language description; a new layout needs no template

Checking the numbers

Open-source libraries

Yours to build

Cloud document APIs

Confidence scores per cell; the checks are yours to build (on AWS, Amazon Augmented AI can route low-confidence Textract results to reviewers)

sieve

Automated checks on every run; reviewer verification on enterprise plans

Best fit

Open-source libraries

Digital files in a handful of stable layouts, and an engineer to tune them

Cloud document APIs

High page volumes of standard documents, teams already on that cloud, engineers to build the pipeline

sieve

Thousands of reports in changing layouts that have to land in one checked table for analysts or a model

A workflow that holds up at thousands of files

Whichever tool reads the pages, the same steps decide whether the output can be trusted. If you build the pipeline yourself, this is the checklist. If you use sieve, it is what to look at in the first results before the full run.

  1. 1

    Sort digital from scanned first

    A digital PDF has a text layer; a scanned one is a picture of a page. Check each file before choosing a tool: if pdfplumber or PyMuPDF finds no text on a page, that page needs OCR. Route those pages to an OCR step or to a cloud API that runs OCR itself.

  2. 2

    Pick the tables you need, not every table

    A long report can hold dozens of tables, and libraries and OCR APIs return all of them. Select by the table title or the header words ("Revenue by segment"), not by page number, because the page moves from issue to issue.

  3. 3

    Join tables that run across pages

    A long table continues on the next page, sometimes with the header repeated, sometimes without it, sometimes with a "continued" label. Join the parts when the columns match, drop the repeated header rows, and check that no row was split at the page break.

  4. 4

    Flatten merged and stacked headers

    A header cell that spans several columns usually holds the year, the currency or the unit. Carry it into each column name ("2024 revenue, USD m") before the header rows are dropped. Cloud APIs report these spans (Textract as merged cells, Azure as row and column spans); libraries leave them to you.

  5. 5

    Read the footnotes and number formats

    Watch for units in a title or footnote ("in thousands"), markers stuck to numbers ("1,234(a)"), negatives in parentheses, dashes for zero or not reported, and restated figures. Strip the markers before parsing, record the unit next to each value, and keep "not reported" apart from zero.

  6. 6

    Map every table into one schema

    Publishers name the same metric differently, and rename it between years. Keep one target schema, for example entity, period, metric, value, unit, source file and page, and a mapping from each source name to it. A long table like this takes new metrics without new columns.

  7. 7

    Check the numbers

    Recompute totals and subtotals from their parts and compare them with the reported total. Compare each period with the previous one and look at large jumps. Count rows against what you expect per report, and keep the source file and page for every value so anyone can check it against the PDF.

  8. 8

    Re-run when new reports arrive

    Run the same extraction on each new issue and append to the same table, so history and new data share columns. Check the first issue after a publisher changes its layout.

Broker research and financial reports

Sell-side research, earnings decks, annual reports and industry bulletins add problems of their own.

  1. 1

    Exhibits are often images

    Tables and charts in research notes are often pasted in as pictures, so a digital PDF can still need OCR on the pages that matter. Check the exhibit pages, not just the first page.

  2. 2

    Estimates sit next to actuals

    Columns headed 2024A and 2025E mix reported and forecast numbers. Keep the A or E as its own field instead of dropping it with the year.

  3. 3

    Every broker has its own template

    The same metric appears under different names and in different places from one broker to the next, and moves when a template is redesigned. This is where per-layout code grows fastest.

  4. 4

    Units and currency hide in titles

    "USD m unless stated" in an exhibit title or footnote applies to the whole table. Record it with every value taken from that table.

  5. 5

    Check your research agreements

    Broker research is licensed. Before sending reports to any outside service, check that your agreements with the brokers allow it.

What teams pull out of PDF reports with sieve

  • Monthly hashrate and bitcoin mined per miner from sell-side analyst reports
  • Production volumes from industry publications, backfilled for years into one series
  • Country export statistics from national statistics releases, extracted when they are published
  • Segment tables and footnotes from 10-K and 10-Q filings
  • Port throughput (TEU) records in several languages, normalized into one series

A folder of PDFs, one table

Upload each report with the same plain-language instruction. The instruction carries the schema, so every file comes back with the same columns. Setup and full examples

import pathlib

INSTRUCTION = (
    "Extract the revenue by segment table. "
    "One row per segment and fiscal period. "
    "Columns: company, fiscal_period, segment, revenue, unit. "
    "Take the unit from the table title or footnotes."
)

sessions = {}
for pdf in sorted(pathlib.Path("reports").glob("*.pdf")):
    with open(pdf, "rb") as f:
        start = requests.post(
            f"{BASE_URL}/api/scrapes",
            headers={"Authorization": f"Bearer {API_KEY}"},
            data={"instruction": INSTRUCTION},
            files={"file": f},
        )
    start.raise_for_status()
    sessions[pdf.name] = start.json()["session_id"]
# Poll GET /api/scrapes/{session_id} for each run until status == "done",
# then download each CSV and append it to one table.

Our investors

Backed by the best

backed by world-class investors who believe in our vision

Y Combinator logo

Questions people ask

Treat it as two jobs. Reading the tables: open-source libraries (Camelot, pdfplumber, Tabula) work on digital PDFs, and cloud document APIs (Amazon Textract, Azure AI Document Intelligence, Google Document AI) also read scanned pages. Making the output usable: map every table into one schema, join tables that span pages, take units from headers and footnotes, and check totals against their parts. With thousands of reports in varying layouts, the second job is most of the work. sieve does both: describe the columns once, send the PDFs through the API or the app, and get one CSV or JSON table, with automated checks on every run.

For table structure from high volumes of similar documents, use a cloud document API: Amazon Textract (its Tables feature), Azure AI Document Intelligence (the layout model), Google Document AI (Form Parser or Layout Parser) or Adobe PDF Extract API. They return cells, spans, confidence scores and coordinates as JSON, and you write the mapping to your schema. If you want the finished table in your own columns instead, the sieve API takes a PDF and a plain-language description of the columns and returns CSV or JSON.

First check whether the exhibits are text or images: many research notes paste tables in as pictures, which need OCR. pdfplumber or Camelot work on text tables from one broker's template; Textract, Azure or Google Document AI read image tables. Across many brokers, keep estimate and actual markers (2025E, 2024A), take units from exhibit titles, and map metrics that each broker names differently into one schema. sieve is built for this case: it reads tables by meaning, maps them into your columns, and delivers through the API, a spreadsheet or the Excel add-in. Check your research agreements before sending reports to any outside service.

None of the three runs OCR: they read the text layer, so they work on digital PDFs, not scans. Camelot has two modes: lattice for tables drawn with ruling lines and stream for tables laid out with whitespace. pdfplumber gives access to the characters, lines and rectangles on a page, with table settings you can tune, and its visual debugging shows why a table was misread. Tabula has a desktop app for picking tables by hand, and tabula-py wraps it for Python (it needs Java). Try each on a sample of your hardest layouts.

Yes. Scanned pages, low-quality images, stamps over text and tables that span pages go through the same pipeline as digital PDFs.

Check them the way an analyst would: totals against their parts, each period against the last, row counts against what you expect, and every value traceable to its page. In sieve, automated checks run on every extraction and report coverage gaps and outliers on the run, and on enterprise plans reviewers compare each value with the source document before delivery. In Excel, =SIEVE.GET_LOCATION() returns the page and section a value came from.

Yes. Download the CSV from the app or the API, or install the sieve Excel add-in and use =SIEVE.GET_DATA() with a link to the PDF and a short description of the figure you want.

How to pull tables out of thousands of PDF reports

2025 Sieve Data Inc. All Rights Reserved.