# BAI2 Corporate Bank Statement Parser to JSON & CSV (`finops_studio/bai2-bank-statement-parser`) Actor

Convert corporate treasury BAI2 bank statement files (J.P. Morgan, BofA, Wells Fargo, Citi, HSBC, SVB) into clean, cent-exact JSON and CSV with decoded BAI transaction codes and 88 continuation stitching.

- **URL**: https://apify.com/finops_studio/bai2-bank-statement-parser.md
- **Developed by:** [FinOps Studio](https://apify.com/finops_studio) (community)
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 bai2 transaction 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

## Corporate `BAI2` Bank Statement Parser to JSON & CSV

Convert cryptic **Bank Administration Institute (`BAI2`)** corporate cash-management files from **J.P. Morgan Access, Bank of America CashPro, Wells Fargo CEO, CitiDirect, HSBCnet, PNC, and SVB** into clean, cent-exact **JSON and Excel/ERP-ready CSV**.

***

### Key Capabilities for Treasury, NetSuite, QuickBooks & AI Agents

- **Full `01/02/03/16/88/49/98/99` Record Engine:** Automatically stitches multi-line `88` continuation remittance records onto their parent `03` account or `16` transaction detail lines.
- **Implied-Decimal Multi-Currency Precision:** Accurately formats 2-decimal (`USD`, `EUR`, `GBP`, `CAD`, `AUD`), 0-decimal (`JPY`, `KRW`), and 3-decimal (`KWD`, `BHD`) corporate accounts without floating-point errors.
- **Built-In BAI Type Code Dictionary:** Translates cryptic codes (`165` Preauthorized ACH Credit, `195` Incoming Wire, `455` Preauthorized ACH Debit, `475` Check Paid, `275`/`575` ZBA Sweeps) and flags `credit` vs `debit` signed amounts.
- **Ready for `n8n`, `Make.com`, `Zapier` & MCP Servers:** Ideal for daily SFTP-to-ERP cash reconciliation pipelines.

***

### Companion Financial Automation Tools by FinOps Studio

- **[Interactive Web Hub & Free Browser Preview](https://geornaden.github.io/finops-studio/)** — Browser-local demo & `n8n` workflow templates
- [US NACHA ACH File Generator & Parser](https://apify.com/finops_studio/nacha-ach-file-generator) — 94-Char US Payroll & Vendor ACH Batches
- [SEPA XML Generator (`pain.001` & `pain.008`)](https://apify.com/finops_studio/sepa-xml-generator) — European Bulk Payments & Direct Debits
- [EU E-Invoice XML Generator (`Peppol`, `XRechnung` & `Factur-X`)](https://apify.com/finops_studio/eu-einvoice-xml-generator) — Mandatory 2026 EN 16931 E-Invoices
- [German `DATEV Buchungsstapel` CSV Generator](https://apify.com/finops_studio/datev-buchungsstapel-generator) — DATEV EXTF v700 Export
- [Australian `ABA` Direct Entry File Generator](https://apify.com/finops_studio/aba-cemtex-file-generator) — Australian BECS `.aba` Bank Files
- [ISO 20022 `pain.002` Bank Status Decoder](https://apify.com/finops_studio/iso20022-pain002-status-parser) — Decode Bank Rejection Reports

> **Disclaimer:** Technical BAI2 file parser provided "as-is". Verify reconciled balances against official bank statements.

# Actor input Schema

## `bai2Text` (type: `string`):

Paste raw BAI2 records (leave empty to run a realistic J.P. Morgan corporate demo statement).

## `includeInlineCsv` (type: `boolean`):

Include ready-to-import CSV string directly inside the JSON dataset output.

## Actor input object example

```json
{
  "includeInlineCsv": true
}
```

# Actor output Schema

## `csvFile` (type: `string`):

Downloadable CSV spreadsheet of all decoded BAI2 bank transactions.

## `jsonDataset` (type: `string`):

JSON dataset containing account balances, summaries, and decoded transactions.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("finops_studio/bai2-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("finops_studio/bai2-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 '{}' |
apify call finops_studio/bai2-bank-statement-parser --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,finops_studio/bai2-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/2it5tgMNxfGL9Eqtu/builds/Vxg1xwkART8dYhgzX/openapi.json
