# Bank Statement & Invoice PDF to CSV / Excel (`saksham_dev/bank-statement-invoice-pdf-to-csv`) Actor

Convert bank statement PDFs into clean transaction rows (date, description, debit, credit, balance) and invoice PDFs into invoice fields and line items. Works with Indian, US, UK and European formats. Export to CSV, Excel or JSON.

- **URL**: https://apify.com/saksham_dev/bank-statement-invoice-pdf-to-csv.md
- **Developed by:** [Saksham Singh](https://apify.com/saksham_dev) (community)
- **Categories:** Developer tools, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$10.00 / 1,000 page converteds

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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Bank Statement & Invoice PDF to CSV / Excel

Turn **bank statement PDFs** into clean transaction rows and **invoice PDFs** into structured invoice data, ready to download as **CSV, Excel or JSON**. There is no start fee: you pay a small price per page converted.

### What it does

**Bank statements:** one row per transaction:

| date | description | reference | debit | credit | amount | balance | currency |
|---|---|---|---|---|---|---|---|
| 2026-10-03 | UPI-SWIGGY-swiggy@icici-ORDER 8812 | 000004410 | 450.00 | | -450.00 | 24,550.00 | INR |
| 2026-10-07 | NEFT CR-ACME SOFTWARE PVT LTD-SALARY OCT 2026 | 000004411 | | 85,000.00 | 85,000.00 | 109,550.00 | INR |

- Reads the table header to find the date, description, withdrawal/debit, deposit/credit, amount and balance columns.
- Handles single "Amount" columns with signs, Dr/Cr, S/H (Soll/Haben) and brackets.
- Joins descriptions that wrap onto two or three lines.
- Number formats `1,234.56`, `1,23,456.00` (Indian), `1.234,56` and `1 234,56` (European).
- Dates such as `03/10/26`, `2026-10-03`, `15 Nov 2026`, `Nov 15, 2026`, `03.11.` and `10/02`. Day-first or month-first order is detected from the whole statement.
- **Balance check:** opening balance plus all transactions must equal the closing balance, so you know the conversion is complete. The result is in the run's `SUMMARY` record.
- Built for Indian, US, UK and German (Kontoauszug) statement layouts.

**Invoices:** invoice number, invoice date, due date, PO number, vendor, GSTIN / EU VAT IDs, subtotal, tax (CGST/SGST/IGST/VAT), total and line items (description, HSN/SAC, quantity, unit price, amount).

- **ZUGFeRD / Factur-X / XRechnung PDFs:** the exact data is read from the e-invoice XML embedded in the PDF.
- Choose **one row per invoice** or **one row per line item**. The second option works best for Excel and accounting imports.

### How to use

1. Paste direct links to your PDFs into **PDF URLs**. For Google Drive or Dropbox, use a direct-download link.
2. Leave **Document type** on Auto, or pick Bank statement or Invoice.
3. Run the actor, then open the **Output** tab → **Export** → CSV or Excel.

You can also call it from the API, Make, Zapier or n8n, for example to convert every statement that arrives by email.

### Pricing

Pay per event: **$0.01 per page converted**. Pages of files that fail, such as scanned images without text or wrong links, are not charged. Use *Max pages per PDF* to cap costs.

### Limits (please read)

- The PDF must have a **text layer**. Statements downloaded from net banking usually do. Scanned or photographed statements need OCR first and are reported as an error, not charged.
- Every bank layout is different. The column-based reader covers most statements, but check the balance check result. If a layout doesn't convert well, open an issue with an anonymised sample and we'll add support.
- Password-protected PDFs must be unlocked first.
- Invoice field detection on free-form PDF invoices is heuristic. E-invoices (ZUGFeRD/Factur-X) are exact.

### Privacy

Files are downloaded, processed in memory during your run and not stored anywhere except your own run's dataset. Delete the run to remove the data.

### Output fields

Bank rows: `file, documentType, date, valueDate, description, reference, debit, credit, amount, balance, page, currency`.
Invoice rows: `file, documentType, source, invoiceNumber, invoiceDate, dueDate, poNumber, vendor, buyer, gstins, vatIds, currency, subtotal, taxAmount, total, lineItems` (or `lineNo, description, hsn, quantity, unitPrice, taxRate, amount` per row).

Made by SSquared Labs.

# Actor input Schema

## `pdfUrls` (type: `array`):

Direct download links to bank statement or invoice PDFs (text-based PDFs, not scans). Google Drive / Dropbox links must be direct-download links.

## `documentType` (type: `string`):

Leave on auto to detect bank statements and invoices automatically.

## `dateFormat` (type: `string`):

Only matters for dates like 03/04/2026. Auto works out day-first or month-first from the whole document.

## `invoiceOutput` (type: `string`):

One row per invoice (line items as a list) or one row per line item (best for spreadsheets).

## `maxPagesPerFile` (type: `integer`):

Pages after this are ignored and not charged.

## `maxFileSizeMb` (type: `integer`):

Skip larger files.

## Actor input object example

```json
{
  "pdfUrls": [
    "https://api.apify.com/v2/key-value-stores/5W6rn4sNdmdBXTzJA/records/statement-india",
    "https://api.apify.com/v2/key-value-stores/5W6rn4sNdmdBXTzJA/records/invoice-gst"
  ],
  "documentType": "auto",
  "dateFormat": "auto",
  "invoiceOutput": "oneRowPerInvoice",
  "maxPagesPerFile": 50,
  "maxFileSizeMb": 30
}
```

# Actor output Schema

## `results` (type: `string`):

All transactions / invoice rows as JSON.

## `overview` (type: `string`):

Results in a table view.

# 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 = {
    "pdfUrls": [
        "https://api.apify.com/v2/key-value-stores/5W6rn4sNdmdBXTzJA/records/statement-india",
        "https://api.apify.com/v2/key-value-stores/5W6rn4sNdmdBXTzJA/records/invoice-gst"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("saksham_dev/bank-statement-invoice-pdf-to-csv").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 = { "pdfUrls": [
        "https://api.apify.com/v2/key-value-stores/5W6rn4sNdmdBXTzJA/records/statement-india",
        "https://api.apify.com/v2/key-value-stores/5W6rn4sNdmdBXTzJA/records/invoice-gst",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("saksham_dev/bank-statement-invoice-pdf-to-csv").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "pdfUrls": [
    "https://api.apify.com/v2/key-value-stores/5W6rn4sNdmdBXTzJA/records/statement-india",
    "https://api.apify.com/v2/key-value-stores/5W6rn4sNdmdBXTzJA/records/invoice-gst"
  ]
}' |
apify call saksham_dev/bank-statement-invoice-pdf-to-csv --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,saksham_dev/bank-statement-invoice-pdf-to-csv"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/VnZBuUhfSPCbU0ife/builds/an9naEbv9Taf2cDUn/openapi.json
