Skip to main content
Glama

PDF Table Extractor: PDF to Excel & CSV Converter with OCR

pdf_table_extractor
Read-only

Extract tables from PDF files into structured rows, Excel, and CSV, with optional OCR for scanned pages. Use it when needed data is locked in reports, statements, or government PDFs.

Instructions

Extract every table from PDF files (by URL or from an Apify key-value store) into structured rows, Excel and CSV, with optional OCR for scanned pages. Unlike sec_financials_excel (standardized XBRL financials straight from SEC filings), this reads whatever tables a PDF contains. Use when the data you need is locked in PDF tables: reports, statements, government releases. Do not use for SEC-listed company financials (use sec_financials_excel, which is exact) or to find papers (use literature_search). Parameters: billing is per page analysed plus per table extracted, so pages and maxPagesPerPdf are the real cost levers; run_max_items does not cap pages. ocrScannedPages=false skips and lists scanned pages; turning it on adds the per-OCR-page price up to maxOcrPagesPerPdf, and is much slower. detection=auto tries ruled-grid then whitespace detection; force lattice or stream only if auto merges or splits columns. Files over 150 MB fail and are not charged. Returns per item (one per table): summary, pages, header, row and column counts and cell data; Excel/CSV files stay in the run's Apify key-value store.

Behavior: read-only; runs the Apify Actor pandadad0214/pdf-table-extractor (https://apify.com/pandadad0214/pdf-table-extractor) on your own Apify account. Price: $0.001 per page analysed; $0.003 per table extracted; $0.02 per scanned page ocr. Runs that find nothing are not charged per result, and spending is capped per call by run_max_charge_usd (default $0.50). run_max_items (default 50) limits items returned but does not limit what the Actor bills; use the tool's own limits and run_max_charge_usd. Most calls finish in 5-15 s for a few inputs; large inputs or crawls can take minutes, so raise run_timeout_secs (max 300) or shrink the input after a timeout error. Returns JSON {actor, count, items}; long text output is trimmed to whole items, with all items in structuredContent.

Input Schema

NameRequiredDescriptionDefault
pagesNoPages. Optional. Only these pages, e.g. 1-5, 8, 12-end. Leave empty for all pages (up to the page limit below).
pdfUrlsNoPDF URLs. Direct links to PDF files. Google Drive and Dropbox share links are converted to direct downloads automatically. Up to 150 MB per file.
pdfStoreNoKey-value store with PDFs. Optional. Pick a key-value store in your account that holds PDFs. The Actor gets read access to this store only.
detectionNoTable detection. Auto tries ruled-grid detection first and switches to whitespace (column alignment) detection when that recovers more of the table. Pick one mode if you know your PDF's style. Choices: auto = Auto (recommended); lattice = Ruled tables only (cell borders); stream = Whitespace tables only (no borders).auto
pdfStoreKeysNoRecord keys in that store. Optional. Keys of the PDFs to process (e.g. REPORT.pdf). Leave empty to process every PDF record in the store (up to 50).
run_max_itemsNoOptional. Most results to return from this call (default from PANDA_MAX_ITEMS, 50). Also limits how many results the Actor produces and charges for, unless you set its own max field.
maxPagesPerPdfNoMaximum pages per PDF. Caps cost and run time on very long documents. You pay per page analysed. Whole number, 1 to 2,000 pages; default 100.
headerDetectionNoHeader row. Auto finds header rows above the first data row (multi-line headers are joined). First row = always use row 1. None = generic Column 1, Column 2… names. Choices: auto = Auto-detect; firstRow = Always the first row; none = No header.auto
ocrScannedPagesNoOCR scanned pages (beta). Pages with no text layer (scans, photos) are always detected. Off (default): they are skipped, listed in SUMMARY and on the Index sheet, and cost nothing. On: they are read with Tesseract OCR (English) and their tables are marked 'verify'. OCR is slow (about a minute per page) and can misread digits and dot leaders, so use it for clean scans and check the numbers.
mergeAcrossPagesNoJoin tables that continue on the next page. When a table carries on over a page break with the same columns, output it as one table with a page range. Default: on.
mergeWrappedRowsNoMerge wrapped rows. Join labels that wrap onto a second line back into one row, so numbers stay on the right line. Default: on.
numbersAsNumbersNoNumbers as numbers in Excel. Write 1,234 / (56) / 4.2% as real Excel numbers (parentheses = negative) so you can sum and chart them. CSV and dataset keep the text exactly as printed. Default: on.
run_timeout_secsNoOptional. Seconds to wait for results (default from PANDA_TIMEOUT_SECS, 120; max 300).
maxOcrPagesPerPdfNoMaximum OCR pages per PDF. OCR has its own cap because it is slow and priced per page. Extra scanned pages are flagged, not charged. Whole number, 0 to 100 pages; default 10.
run_max_charge_usdNoOptional. Hard spending cap for this call in USD (default from PANDA_MAX_CHARGE_USD, 0.50).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well beyond the supplied annotations (readOnlyHint/openWorldHint/destructiveHint), disclosing the full cost model ($0.001/page, $0.003/table, $0.02/OCR page), the hard cap via run_max_charge_usd, the 150 MB failure-and-no-charge rule, and the 5-15 s typical / 300 s max runtime with timeout remediation. It also warns that OCR is slow and error-prone on digits. This is exactly the context annotations cannot carry.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose, differentiation, and use/don't-use routing before the operational detail, which is the right order. It is long but nearly every sentence carries distinct information; the main waste is pricing stated twice (prose 'billing is per page analysed plus per table extracted' then the explicit price list) and the run_max_items caveat repeated.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 15 optional parameters and no output schema, the description carries the burden well: it describes the return payload ({actor, count, items}, per-item summary/pages/header/row and column counts/cell data), notes that Excel/CSV artifacts remain in the run's key-value store, and mentions structuredContent trimming. An agent has enough to call it correctly and interpret the result without an output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is already 100%, yet the description adds cross-parameter meaning the schema cannot: which knobs actually drive cost ('pages and maxPagesPerPdf are the real cost levers'), that OCR cost scales up to maxOcrPagesPerPdf, and the detection-mode decision rule. It loses a point for conflicting with the schema on run_max_items, which the description says 'does not limit what the Actor bills' while the schema says it 'also limits how many results the Actor produces and charges for.'

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence gives a specific verb and resource ('Extract every table from PDF files ... into structured rows, Excel and CSV, with optional OCR'), plus both input sources (URL or Apify key-value store). It explicitly differentiates from named alternatives ('Unlike sec_financials_excel ... this reads whatever tables a PDF contains') and names literature_search, so an agent can place it against siblings without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

States the positive case ('Use when the data you need is locked in PDF tables: reports, statements, government releases') and two explicit exclusions with redirects ('Do not use for SEC-listed company financials (use sec_financials_excel) or to find papers (use literature_search)'). It also gives conditional selection guidance inside the tool, e.g. 'force lattice or stream only if auto merges or splits columns.'

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.