PDF Table, Invoice & Statement Extractor (XLSX/CSV + MCP)
Pricing
from $4.20 / 1,000 pdfs analyzed for tables/invoices
PDF Table, Invoice & Statement Extractor (XLSX/CSV + MCP)
Extract geometric multi-page PDF tables to JSON, Markdown, CSV, and formula-safe XLSX plus deterministic invoice and bank statement fields with arithmetic reconciliation and Standby MCP.
Pricing
from $4.20 / 1,000 pdfs analyzed for tables/invoices
Rating
0.0
(0)
Developer
James Edmans
Maintained by CommunityActor stats
0
Bookmarked
1
Total users
0
Monthly active users
15 hours ago
Last modified
Categories
Features
Share
PDF Structured Table & Invoice/Statement Extractor (JSON, CSV, XLSX + MCP)
Apify Store Actor:
forgekit/pdf-table-invoice-extractor| Runtime: Node.js 22 (pdfjs-dist+xlsx+csv-stringify) | Billing: Pay-Per-Event (PPE) + Standby MCP Server
Overview
PDF Structured Table & Invoice/Statement Extractor converts digital PDF tables, invoices, receipts, and bank statements into structured JSON records, Markdown tables, formula-safe .csv files, and multi-sheet .xlsx workbooks — completely deterministically at zero LLM token cost and zero external third-party OCR dependency.
Using geometric X/Y text coordinate projection via pdfjs-dist, it accurately aligns sparse/empty cells, stitches wrapped multi-line descriptions, merges tables spanning consecutive pages, parses US ($1,234.56) and EU (€1.250,00) currencies, and runs automated mathematical reconciliation (sum(lineItems) === subtotal, subtotal + tax === total, and bank statement running balances) so finance and automation workflows immediately distinguish 100%-balanced invoices from exceptions.
Feature Comparison vs. Top Competitors
- Zero-Charge on Unreadable & HTML-Viewer Failures: Verifies
%PDF-magic bytes before parsing; HTML login walls return explicitstatus: "error"witherrorCode: "HTML_INSTEAD_OF_PDF"and zeropdf-analyzedorpage-parsedbilling — never returning silent 0-row"Succeeded"runs. - Automatic Cloud Link Normalization (
normalizeCloudPdfUrl): Converts public Google Drive (/file/d/<ID>/view), Dropbox (dl=0->dl=1), and OneDrive share links into direct binary PDF downloads automatically. - Geometric Multi-Page Table Stitching (
mergeContinuedTables): Clusters X/Y text coordinates into column projections, preserves empty cells, stitches wrapped lines, and seamlessly merges continued multi-page tables without duplicating headers. - Deterministic Invoice & Bank Statement Reconciliation: Extracts vendor, invoice number, PO number, issue/due dates, VAT ID, IBAN, currency, subtotal, tax rate/amount, total, and line items, then checks arithmetic balance within
±0.02(reconciliation.passed,discrepancy,confidenceScore). - Formula-Safe Excel (
.xlsx) & CSV Export: Neutralizes spreadsheet formula injection (=,+,-,@) before writing multi-tab.xlsxworkbooks (1 sheet per table) and.csvfiles to Apify Key-Value Store. - Native Standby MCP Server: Exposes
extract_pdf_tablesandextract_invoice_fieldsfor finance AI agents.
| Capability | PDF Table & Invoice Extractor (Ours) | lergassy/pdf-text-extractor | actorzlab/docling-pdf-converter | formnexa/invoice-receipt-data-extractor |
|---|---|---|---|---|
| Geometric Multi-Page Table Stitching | Yes (X-projection + header dedupe) | Basic heuristics | Partial (4 GB RAM, 90.2% success) | No arbitrary multi-page tables |
| Invoice + Bank Statement Schema | Yes (US & EU formats, IBAN, VAT) | No | No | Invoices only (no bank statements) |
| Arithmetic Balance Reconciliation | Yes (reconciliation.passed + discrepancy) | No | No | No |
| Formula-Safe XLSX & CSV Export | Yes (multi-sheet .xlsx + .csv) | No | No | No |
Cloud Share Rewriter + %PDF- Guard | Yes (Drive/Dropbox/OneDrive) | No | No | No |
| Standby MCP Server | Native (/mcp — 2 tools) | No | No | No |
| Pricing (FREE Tier) | $0.002 start + $0.006/pdf + $0.002/page | $0.003/doc + $0.0001/page | $0.005/page + $0.002/table | $0.01/item |
Input Configuration
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
urls | string[] | No* | [] | Public PDF URLs (SSRF-protected, up to 200). |
normalizeCloudPdfUrl | boolean | No | true | Auto-convert public Google Drive, Dropbox, and OneDrive share links to direct PDF downloads. |
base64Pdfs | object[] | No* | [] | Inline PDFs [{ "filename": "invoice.pdf", "dataBase64": "..." }] (up to 50). |
kvsKeys | string[] | No* | [] | Binary PDF keys in Apify Key-Value Store (up to 200). |
sourceKeyValueStoreId | string | No | "" | Optional external Apify KVS ID for kvsKeys. |
inputDatasetId | string | No* | "" | Upstream Apify Dataset ID to pull PDF URLs from. |
datasetUrlField | string | No | "url" | URL field inside inputDatasetId. |
mode | string | No | "both" | "tables-only", "invoice-statement", or "both". |
pageRange | string | No | "" | Optional 1-indexed page subset e.g. "1-10". |
maxPages | integer | No | 100 | Maximum pages parsed per PDF (1–1000). |
password | string | No | "" | Optional secret password for encrypted PDFs (isSecret: true). |
rowTolerancePt | number | No | 3.5 | Vertical Y-clustering tolerance in PDF points (1–20). |
columnGapThresholdPt | number | No | 12 | Minimum horizontal gap in points separating adjacent columns (3–100). |
minTableRows | integer | No | 2 | Minimum rows required to emit a table (2–50). |
minTableColumns | integer | No | 2 | Minimum columns required to emit a table (2–30). |
mergeContinuedTables | boolean | No | true | Merge tables continuing across consecutive pages with matching column geometry. |
exportTablesToXlsx | boolean | No | true | Write formula-safe multi-sheet .xlsx workbook to KV store. |
exportTablesToCsv | boolean | No | false | Write each table as a formula-safe .csv file to KV store. |
maxConcurrency | integer | No | 4 | Concurrent PDF workers (1–15). |
maxPdfSizeMb | number | No | 30 | Maximum PDF download/base64 size in MB (1–150). |
timeoutSecs | integer | No | 30 | Per-PDF timeout in seconds (5–180). |
*At least one input source (urls, base64Pdfs, kvsKeys, or inputDatasetId) is required.
Output Example
Below is an exact real output record captured from running this Actor locally:
{"source": "invoice-2026-0042.pdf","filename": "invoice-2026-0042.pdf","status": "ok","pageCount": 1,"pagesParsed": 1,"tablesCount": 1,"tables": [{"tableIndex": 0,"pages": [1],"headers": ["Description", "Qty", "Unit Price", "Amount"],"rows": [["Cloud Hosting", "2", "$150.00", "$300.00"],["Support Plan", "1", "$200.00", "$200.00"]],"records": [{ "Description": "Cloud Hosting", "Qty": "2", "Unit Price": "$150.00", "Amount": "$300.00" },{ "Description": "Support Plan", "Qty": "1", "Unit Price": "$200.00", "Amount": "$200.00" }],"markdown": "| Description | Qty | Unit Price | Amount |\n| --- | --- | --- | --- |\n| Cloud Hosting | 2 | $150.00 | $300.00 |\n| Support Plan | 1 | $200.00 | $200.00 |"}],"invoiceData": {"documentType": "invoice","invoiceNumber": "INV-2026-0042","poNumber": null,"issueDate": "2026-11-15","dueDate": "2026-12-15","currency": "USD","vendorName": "Acme Cloud Ltd","vendorVatId": "GB123456789","iban": "DE89370400440532013000","subtotal": 500,"taxRate": 20,"taxAmount": 100,"totalAmount": 600,"lineItems": [{ "description": "Cloud Hosting", "quantity": 2, "unitPrice": 150, "lineTotal": 300 },{ "description": "Support Plan", "quantity": 1, "unitPrice": 200, "lineTotal": 200 }],"transactions": [],"reconciliation": {"lineItemsSum": 500,"expectedTotal": 600,"passed": true,"discrepancy": 0,"checks": ["lineItemsSum (500) == subtotal (500)","expectedTotal (600) == totalAmount (600)"]},"confidenceScore": 1},"exportedXlsxKey": "tables-invoice-2026-0042-0.xlsx","exportedCsvKeys": [],"errorCode": null,"error": null}
Pay-Per-Event (PPE) Pricing
| Event Key | Event Title | Price (USD) | Billing Trigger |
|---|---|---|---|
actor-start | Actor run start | $0.002 | Charged once per batch run that analyzes at least one valid PDF. |
pdf-analyzed | PDF analyzed for tables/invoices | $0.006 | Charged per valid PDF successfully parsed (never billed on HTML pages or corrupt files). |
page-parsed | PDF page parsed for tables | $0.002 | Charged per page parsed from a valid PDF. |
mcp-tool-call | Standby MCP tool execution | $0.005 | Charged per successful Standby MCP tool call. |
Illustrative Cost Example: Extracting tables & invoices from 100 two-page PDFs (200 pages) costs $0.002 + (100 * $0.006) + (200 * $0.002) = $1.002 USD.
Standby MCP Server & AI Agent Integration
Connect forgekit/pdf-table-invoice-extractor in Apify Standby Mode (APIFY_META_ORIGIN=STANDBY) to expose two structured finance tools over Streamable HTTP / SSE:
- Health endpoint:
GET /health - MCP endpoint:
POST /mcpandGET /mcp - Exposed MCP tools:
extract_pdf_tables,extract_invoice_fields
{"mcpServers": {"pdf-table-invoice-extractor": {"url": "https://forgekit--pdf-table-invoice-extractor.apify.actor/mcp","headers": {"Authorization": "Bearer YOUR_APIFY_TOKEN"}}}}
Error Handling, Rate Limits & Limitations
- SSRF & Payload Hardening: Only public
http:/https:URLs are allowed (loopback, RFC1918, and cloud metadata IPs are blocked before connect and across redirects). Download size is capped bymaxPdfSizeMb. - Zero-Charge Partial Resilience: Corrupt PDFs, 404 URLs, and HTML viewer pages emit
status: "error"with expliciterrorCode(HTML_INSTEAD_OF_PDF,INVALID_PDF_HEADER,HTTP_ERROR,SSRF_BLOCKED) and zeropdf-analyzed/page-parsedcharges. - Scope: Designed for digital text-layer PDFs (invoices, accounting exports, bank statements, reports). For image-only scanned PDFs, run our Bulk Image & Scanned-PDF OCR Engine first.
Quick Start & Example Input
1. Run in Apify Console (No Code)
- Open
forgekit/pdf-table-invoice-extractorin Apify Console and click Try for free. - Paste or adjust the ready-to-run input JSON below (safe defaults are pre-filled).
- Click Start and export results as JSON, CSV, Excel, or NDJSON from the Output tab.
{"mode": "both"}
2. Run via API (apify-client — Node.js & Python)
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: process.env.APIFY_TOKEN });const run = await client.actor('forgekit/pdf-table-invoice-extractor').call({"mode":"both"});const { items } = await client.dataset(run.defaultDatasetId).listItems();console.log(items);
from apify_client import ApifyClientimport osclient = ApifyClient(os.environ["APIFY_TOKEN"])run = client.actor("forgekit/pdf-table-invoice-extractor").call(run_input={"mode":"both"})items = list(client.dataset(run["defaultDatasetId"]).iterate_items())print(items)
3. Connect to n8n, Make, Zapier & Webhooks
- n8n / Make / Zapier: Add the official Apify module, choose Run Actor, select
forgekit/pdf-table-invoice-extractor, and pass the JSON payload above. - Schedules & Webhooks: Attach an Apify Schedule for recurring runs and trigger downstream webhooks automatically on
ACTOR.RUN.SUCCEEDED.
Use Cases — What Can You Do With This Data?
- Document & Invoice Ingestion Pipelines: Automate PDF, OCR, table, or media extraction with PDF Structured Table & Invoice/Statement Extractor (JSON, CSV, XLSX + MCP) to feed accounting systems, ERPs, legal archives, and AI knowledge bases.
- E-Commerce & Content Operations: Process product images, generate pixel-perfect PDFs/screenshots, transcode media, or create/decode barcodes at scale via API without managing local FFmpeg or Chromium servers.
- AI Vision & Multimodal Agent Workflows: Convert raw PDFs, videos, podcasts, or webpages into clean Markdown, keyframes, transcripts, or optimized thumbnails ready for multimodal LLMs.
- Automated QA & Visual Monitoring: Schedule recurring captures or document checks and export structured metadata + KV Store artifacts directly into Slack, S3, Make, or n8n.
Frequently Asked Questions (FAQ)
How much does PDF Structured Table & Invoice/Statement Extractor (JSON, CSV, XLSX + MCP) cost to run?
You only pay for actual output via transparent Pay-Per-Event billing (starting at $0.006 per pdf-analyzed (PDF analyzed for tables/invoices); see the PPE Pricing table above). Runs that produce zero billable results or fail upstream incur $0.00 — including zero actor-start fee — and Apify's built-in Max total charge (ACTOR_MAX_TOTAL_CHARGE_USD) hard-caps spend automatically.
Does this Actor require proxies, logins, or CAPTCHA solving?
No. This Actor executes deterministic document/media processing locally inside the Apify container (Node.js 22, Sharp, PDF engines, FFmpeg, or Chromium where required) on files and URLs you supply, with strict SSRF protection blocking private/metadata IP ranges.
What export formats and integrations are supported?
Every run stores structured results in an Apify Dataset downloadable as JSON, CSV, Excel (XLSX), NDJSON, XML, or HTML Table via Console or REST API, plus native connectors for n8n, Make, Zapier, Google Sheets, Airtable, Slack, and webhooks.
Can AI agents (Claude Desktop, Cursor, ChatGPT, LangChain) call this Actor directly via MCP?
Yes! PDF Structured Table & Invoice/Statement Extractor (JSON, CSV, XLSX + MCP) includes a built-in Standby MCP Server at https://forgekit--pdf-table-invoice-extractor.apify.actor/mcp supporting JSON-RPC 2.0 (initialize, ping, tools/list, tools/call) with Claude-compliant ^[a-zA-Z0-9_.-]{1,64}$ tool schemas.
Do I need to provide an API key (password)?
All sensitive key fields (password) are optional BYOK upgrades marked isSecret: true — they are encrypted at rest by Apify and never echoed into datasets, KV summaries, or logs.
How fast and lightweight is it compared to browser scrapers?
It runs on lightweight Node.js 22 (256–512 MB RAM, zero headless browser) so typical runs finish in seconds with high reliability and low platform compute cost.
Related forgekit Actors
Explore companion Actors in Media, Document & PDF Processing and core ETL utilities to chain end-to-end pipelines:
| Actor | Store Slug | Mode |
|---|---|---|
| PDF-to-Markdown, Clean Text & Metadata Extractor (LLM & RAG Ready + MCP) | forgekit/pdf-to-markdown-text-extractor | ✅ Standby MCP |
| PDF Toolkit: Bulk Merge, Split, Compress, Watermark, Rotate & Form Reader | forgekit/pdf-toolkit-merge-split-watermark | Batch REST API |
| Bulk Image & Scanned-PDF OCR Engine (Multi-Language + Word Bounding Boxes + MCP) | forgekit/bulk-image-pdf-ocr-engine | ✅ Standby MCP |
| HTML, Markdown & URL to Pixel-Perfect PDF & Invoice Renderer | forgekit/html-markdown-url-to-pdf-renderer | Batch REST API |
| Multi-Device Website Screenshot API (Desktop/Tablet/Mobile Matrix, Dark Mode, Visual Diff + MCP) | forgekit/multi-device-website-screenshot-api | ✅ Standby MCP |
| Dataset Merge, Fuzzy Dedupe & Cross-Join Pro | forgekit/dataset-merge-dedupe-pro | ✅ Standby MCP |
| Dataset Diff & Change Detector (Added / Removed / Modified) | forgekit/dataset-diff-change-detector | ✅ Standby MCP |