# PDF Table Extractor - PDF to CSV & Excel ($0.03/page) (`eastwoodapps/pdf-table-extractor`) Actor

Extract tables from PDF reports, statements and price lists into clean CSVs that open straight in Excel: one CSV per table plus a combined dataset ready for analysis or LLM pipelines. Batch URLs. Your documents stay yours - nothing stored. $0.03 per page.

- **URL**: https://apify.com/eastwoodapps/pdf-table-extractor.md
- **Developed by:** [Eastwood Apps](https://apify.com/eastwoodapps) (community)
- **Categories:** Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $30.00 / 1,000 table page processeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## PDF Table Extractor - Extract Tables from PDF to CSV & Excel

Extract tables from PDF reports, bank statements, price lists and invoices into clean
CSVs that open straight in Excel, import into any spreadsheet tool, or feed a data or
LLM pipeline. One CSV per table plus one combined dataset. Batch as many PDF URLs as you
like. $0.03 per page - no subscription.

### Quick start

1. Paste direct links to your PDF files into **PDF URLs**. Use direct-download links - a
   Google Drive or Dropbox *share page* link returns a web page, not the file.
2. Run. Each detected table becomes its own CSV in the run's key-value store
   (`doc1-page2-table1.csv`), and every row also lands in one combined dataset you can
   export as CSV, Excel, or JSON.

#### Example

A supplier price list with a 4-column table becomes:

```csv
Item,Qty,Unit,Amount
Cable 2.5mm TPS 100m drum,6,186.40,1118.40
Switchboard chassis 24 pole,1,412.75,412.75
```

### How it works

Tables are detected from the PDF's own text geometry: lines whose entries align into shared
column positions are recognised as tables, column by column, row by row. No AI guessing, no
hallucinated cells - if a value is in the CSV, it was on the page at that position.

### What it does

- One CSV per detected table, named by document, page and table number
- A combined dataset of every row (with page/table/row references) for bulk export
- Multi-page documents and multiple tables per page handled
- Honest flags: a document with no detectable tables is flagged `review` with the reason
  (unruled/irregular layouts and scanned PDFs are the usual causes), never padded with
  invented rows

### What it does NOT do

- No scraping, no logins, no third-party data. You supply your own documents, they are
  processed inside YOUR Apify account, and the developer never sees or stores them.
- Scanned (image-only) PDFs are not yet supported - they are flagged, not guessed.
- Heavily merged or borderless-irregular layouts may split imperfectly - check the `review`
  flags and open an issue with the document type; each added layout improves the product.

### Pricing

Pay-per-event: a few cents per page that actually yields a table. Documents that fail or
contain no detectable tables are not charged as processed. No subscription.

### Terms of use

Process only documents you own or are authorised to process. Not affiliated with or endorsed
by Microsoft Excel or any vendor named for compatibility.

# Actor input Schema

## `documentUrls` (type: `array`):

Direct links to your PDF files. Use your own documents only - direct-download links, not share-page links.

## Actor input object example

```json
{
  "documentUrls": [
    "https://api.apify.com/v2/key-value-stores/3Ju0h6fgJVG2q6TGv/records/sample-table-report.pdf"
  ]
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "documentUrls": [
        "https://api.apify.com/v2/key-value-stores/3Ju0h6fgJVG2q6TGv/records/sample-table-report.pdf"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("eastwoodapps/pdf-table-extractor").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "documentUrls": ["https://api.apify.com/v2/key-value-stores/3Ju0h6fgJVG2q6TGv/records/sample-table-report.pdf"] }

# Run the Actor and wait for it to finish
run = client.actor("eastwoodapps/pdf-table-extractor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "documentUrls": [
    "https://api.apify.com/v2/key-value-stores/3Ju0h6fgJVG2q6TGv/records/sample-table-report.pdf"
  ]
}' |
apify call eastwoodapps/pdf-table-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=eastwoodapps/pdf-table-extractor",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/lOBZrgDvJSd9nYvSI/builds/EkJC6cJeMDatnxIzQ/openapi.json
