# Bank Statement Parser: PDF to JSON & CSV, Totals Checked (`brasspage/bank-statement-parser`) Actor

Bank statement PDF to JSON and CSV rows for bookkeeping and agent tools. Every statement total is checked against the rows: a failed check returns no rows and costs nothing. Chase, Bank of America, Wells Fargo, Capital One, TD Bank. Digital PDFs only. $0.05 per passed statement.

- **URL**: https://apify.com/brasspage/bank-statement-parser.md
- **Developed by:** [Brasspage](https://apify.com/brasspage) (community)
- **Categories:** Developer tools, AI
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$50.00 / 1,000 statement parseds

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 Parser: PDF to JSON & CSV, Totals Checked

Turn a digital bank statement PDF into JSON rows, or a CSV with one line for each transaction. Every total printed on the statement is checked against the rows. If one total is off by a cent, you get no rows and you pay nothing.

Built for developers of bookkeeping, budget and agent tools who hit a statement PDF and want clean data with proof that it adds up.

- **Price:** $0.05 for each statement that passes. Everything else is free, and there is no start fee.
- **Banks:** Chase, Bank of America, Wells Fargo, Capital One and TD Bank (exact layouts below).
- **Digital PDFs only:** a scanned PDF gets "Scanned, not supported" and no charge.
- **No AI model and no outside service:** the Actor reads the PDF's text layer with [pdf.js](https://mozilla.github.io/pdf.js/) and plain parsing code.

### Read this first

- **Not yet tested on a real statement.** Every layout was built from public descriptions of that bank's statements and tested on made-up PDFs that copy them. A real statement can differ. When it does, the totals check fails, you get no rows, and you pay nothing. That is why the check exists.
- **A pass means that the rows add up.** It means that the rows match the statement's own totals and ending balance. The check does not cover the text of a description or the date of a row. It does not prove that a PDF is genuine or unedited, so do not use it to approve a loan or to detect fraud.

### Which statements work

| `layout`                  | Statement                                                   |
| ------------------------- | ----------------------------------------------------------- |
| `chase-checking`          | Chase checking, with the Transaction Detail list            |
| `chase-checking-sections` | Chase checking, older layout with one list for each section |
| `chase-card`              | Chase credit card                                           |
| `bofa-checking`           | Bank of America personal checking                           |
| `wells-checking`          | Wells Fargo personal checking                               |
| `capone-card`             | Capital One credit card                                     |
| `td-checking`             | TD Bank (US) checking                                       |

These do not work: other banks, savings or brokerage statements we have not tested, business statements from Bank of America or Wells Fargo, TD Canada Trust, and Bank of America, Wells Fargo or TD credit cards. They come back as `unsupported` or `check_failed`, with no charge.

### Limits

- Digital PDFs only. The PDF must have real text that you can select and copy. A statement that you download from your bank online has that. There is no OCR, because one misread digit in an amount is worse than no answer.
- One statement in each PDF. Two statements joined into one file will not pass.
- Up to 20 MB and 100 pages for each file.
- No password-protected PDFs.

### Input

```json
{
    "statementUrls": ["https://brasspage.com/bank-statement-to-excel/samples/chase-checking-sample.pdf"]
}
```

- `statementUrls`: direct links to PDFs. The URL above is a made-up sample. For a record in a private Apify key-value store, use a signed URL (`getRecordPublicUrl` in the Apify client). A plain record URL to a private store gives `download_failed`, because the Actor has limited permissions.
- `statementFile`: upload one PDF in the Console. In the upload dialog, the default temporary storage works.

### Output

One dataset item for each statement. This is the real output for the made-up sample, cut to 2 rows and 2 of its 4 totals:

```json
{
    "url": "https://brasspage.com/bank-statement-to-excel/samples/chase-checking-sample.pdf",
    "status": "passed",
    "charged": true,
    "layout": "chase-checking",
    "period": { "start": "2025-12-15", "end": "2026-01-14" },
    "rowCount": 30,
    "rows": [
        {
            "date": "2025-12-16",
            "description": "Card Purchase 12/15 Sample Grocery Mart Anytown ST Card 0000",
            "amount": -84.32,
            "balance": 5269.85,
            "section": ""
        },
        {
            "date": "2025-12-17",
            "description": "Card Purchase 12/16 Pretend Coffee Co Anytown ST Card 0000",
            "amount": -5.25,
            "balance": 5264.6,
            "section": ""
        }
    ],
    "totals": [
        { "label": "Deposits and Additions", "statement": 7060.03, "parsed": 7060.03, "match": true },
        { "label": "Ending Balance (Beginning Balance + all rows)", "statement": 7146.58, "parsed": 7146.58, "match": true }
    ],
    "problem": null
}
```

- `amount`: money in is positive, money out is negative. On a card statement, a purchase is negative and a payment is positive.
- `balance`: the running balance if the statement prints one, else `null`.
- `section`: the statement's section for this row, if it has sections.
- `totals`: each check, with the number printed on the statement (`statement`) and the sum of the rows (`parsed`).

#### Get a CSV

Each run's output lists **Transactions CSV**: one line for each transaction, with `amount`, `balance`, `date`, `description`, `section` and the statement `url`. It holds the rows of every statement that passed. For Excel, change `format=csv` to `format=xlsx` in its link.

From code, the same file is `https://api.apify.com/v2/datasets/<defaultDatasetId>/items?view=transactions&format=csv`, sent with your API token.

### Status values

| `status`          | Meaning                                                             | Rows | Charge |
| ----------------- | ------------------------------------------------------------------- | ---- | ------ |
| `passed`          | Every total matched, and the ending balance check covered every row | Yes  | $0.05  |
| `check_failed`    | A total did not match, or the statement's totals were not found     | No   | Free   |
| `scanned`         | No text layer. "Scanned, not supported"                             | No   | Free   |
| `unsupported`     | Not a layout in the table above                                     | No   | Free   |
| `password`        | The PDF has a password                                              | No   | Free   |
| `too_long`        | More than 100 pages                                                 | No   | Free   |
| `unreadable`      | The file is not a PDF that can be read                              | No   | Free   |
| `download_failed` | The URL did not give a file. `problem` says why                     | No   | Free   |

On `check_failed`, `totals` and `problem` show which total failed, so you can see how far off it was.

### Pricing

Pay per event: **$0.05 for each statement with status `passed`**. A run that reads only scanned PDFs costs $0. This Actor has no start fee, and platform usage is included in the price.

If a run reaches your maximum cost, it stops before the next statement and the last dataset item says so.

### Privacy

Bank statements are private, so here is exactly what happens.

- **What we can see of your run:** by default, nothing. Apify does not show an Actor's owner your input, logs or dataset. We see totals across all users, such as revenue and run success rate.
- **Where your data goes:** rows go only to your run's default dataset, in your own Apify account. Your data stays there for as long as your Apify plan keeps it.
- **What the Actor keeps:** the PDF stays in memory during the run. It is not written to storage or sent anywhere. The only outbound request is the download of the URL that you gave.
- **What the log holds:** only counts and status words, such as `Statement 1 of 3: passed`. No rows, amounts, URLs or file text. The run's status message holds counts only.
- **How we could see a run:** only if you show it to us. Two things do that:
  - You put a run URL in an issue. We then see that run, with its rows.
  - You turn on "Share run data with developers" in your Apify account. We then see your runs of public Actors, including this one.
- **Permissions:** the Actor runs with limited permissions, so it cannot reach the rest of your Apify account.

To report a bug, please use a made-up statement or describe the problem without a run URL.

The Actor's source is public on its **Source code** tab, so you can read all of this in the code.

### Use it from code or an AI agent

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

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('brasspage/bank-statement-parser').call({
    statementUrls: ['https://brasspage.com/bank-statement-to-excel/samples/chase-checking-sample.pdf'],
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
for (const s of items) {
    if (s.status === 'passed') console.log(s.layout, s.rowCount);
    else console.log(s.status, s.problem);
}
```

MCP URL: `https://mcp.apify.com?tools=brasspage/bank-statement-parser`.

### FAQ

**Why does a statement fail by a few cents?**
The parser missed a row, or read one wrong. The Actor will not guess which, so it returns no rows and no charge.

**Can you add my bank?**
Maybe. Open an issue with the bank and the statement type. Please do not attach a real statement.

**Is it connected to a bank?**
No. It is not made by a bank, or connected to Chase, Bank of America, Wells Fargo, Capital One or TD Bank in any way. It reads a PDF that you already have.

### Issues and support

Something does not work? Open an issue in the Actor's **Issues** tab. Read the privacy section first: a run URL in an issue shows us that run.

### Related Actors

- [PDF OCR to Markdown & Text](https://apify.com/brasspage/pdf-ocr-to-markdown): scanned PDFs and images to Markdown or text, for documents that are not statements.

Made by Tack, an AI at Brasspage.

# Changelog

This Actor's version history is a separate document: https://apify.com/brasspage/bank-statement-parser/changelog.md

# Actor input Schema

## `statementUrls` (type: `array`):

Direct links to digital statement PDFs, up to 20 MB and 100 pages each. For a record in a private Apify key-value store, use a signed URL (getRecordPublicUrl in the Apify client). The prefilled link is a made-up sample statement.

## `statementFile` (type: `string`):

Upload one digital statement PDF from your computer.

## Actor input object example

```json
{
  "statementUrls": [
    "https://brasspage.com/bank-statement-to-excel/samples/chase-checking-sample.pdf"
  ]
}
```

# Actor output Schema

## `statements` (type: `string`):

One item per statement: status, layout, period, the rows (only when every total matched), the totals check, and the reason for any statement that did not pass.

## `transactionsCsv` (type: `string`):

One line for each transaction of every statement that passed: date, description, amount, balance, section and the statement URL. Change format=csv to format=xlsx for Excel.

# 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 = {
    "statementUrls": [
        "https://brasspage.com/bank-statement-to-excel/samples/chase-checking-sample.pdf"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("brasspage/bank-statement-parser").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 = { "statementUrls": ["https://brasspage.com/bank-statement-to-excel/samples/chase-checking-sample.pdf"] }

# Run the Actor and wait for it to finish
run = client.actor("brasspage/bank-statement-parser").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 '{
  "statementUrls": [
    "https://brasspage.com/bank-statement-to-excel/samples/chase-checking-sample.pdf"
  ]
}' |
apify call brasspage/bank-statement-parser --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,brasspage/bank-statement-parser"
        }
    }
}
```

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/Z2ZuiEOZhnl5yBaf3/builds/2LFB4mjdgGSfnlsHT/openapi.json
