US Bank Statements OCR

Full parsing of US bank statements, including customer information and line items for debits, credits, checks, fees, and daily balances.

ℹ️

Want access to this API ?

US Bank Statement is still a private API. Feel free to ask using the chat for an early access.

🚧

More supported banks will be added in the future

The supported banks are BANK OF AMERICA, CHASE, WELLS FARGO, US BANK, CITIBANK CBO SERVICES, REGIONS, TD BANK, CAPITAL ONE, TRUIST, NATIONAL BANK OF COMMERCE.

Mindee’s US Bank Statements OCR API uses deep learning to automatically, accurately, and instantaneously parse bank statements in your applications. It takes the API a few seconds to extract data from your PDFs or photos of bank statements. The API extracts data such as:

  • Account holder name
  • Account holder address
  • Account number
  • Account type
  • List of Account numbers
  • Account type
  • Beginning date
  • Beginning balance
  • Ending date
  • Ending balance
  • Total Monthly credit
  • Total monthly debit
  • List of Transactions (including for each item: Date, Amount, Description, Type (debit or credit), and Account number)
  • List of Checks paid (including for each item: Date, Description, Amount)
  • List of Daily balances (including for each item: Date, Amount)

Supported Banks

We officially support the following banks: BANK OF AMERICA, CHASE, WELLS FARGO, US BANK, CITIBANK CBO SERVICES, REGIONS, TD BANK, CAPITAL ONE, TRUIST, NATIONAL BANK OF COMMERCE

ℹ️

Want more banks supported?

More bank will be added in the future. Feel free to ask the chat about what you are looking for.

Set up the API

📘

Prerequisite

Before making any API calls, you need to have created your API key.

  1. You'll need to get a US bank statement. You can download a fake one here.

  2. Access your Invoice API by clicking on the US Bank Statement card in the Document catalog.

  3. From the left navigation, go to documentation > API reference, you'll find sample code in popular languages and command line.

curl -X POST \
  https://api.mindee.net/v1/products/mindee/us_bank_statements/v1/predict \
  -H 'Authorization: Token my-api-key-here' \
  -F document=@/path/to/your/file.pdf
import requests

url = "https://api.mindee.net/v1/products/mindee/us_bank_statements/v1/predict"

with open("/path/to/my/file.pdf", "rb") as myfile:
    files = {"document": myfile}
    headers = {"Authorization": "Token my-api-key-here"}
    response = requests.post(url, files=files, headers=headers)
    print(response.text)
// works for NODE > v10
const axios = require('axios');
const fs = require("fs");
const FormData = require('form-data')

async function makeRequest() {
    let data = new FormData()
    data.append('document', fs.createReadStream('./file.pdf'))
    const config = {
        method: 'POST',
        url: 'https://api.mindee.net/v1/products/mindee/us_bank_statements/v1/predict',
        headers: { 
          'Authorization':'Token my-api-key-here',
          ...data.getHeaders()
           },
        data
    }

    try {
      let response = await axios(config)
      console.log(response.data);
    } catch (error) {
      console.log(error)
    }

}

makeRequest()
# tested with Ruby 2.5
require 'uri'
require 'net/http'
require 'net/https'
require 'mime/types'

url = URI("https://api.mindee.net/v1/products/mindee/us_bank_statements/v1/predict")
file = "/path/to/your/file.pdf"

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Token my-api-key-here'
request.set_form([['document', File.open(file)]], 'multipart/form-data')

response = http.request(request)
puts response.read_body
<form onsubmit="mindeeSubmit(event)" >
  <input type="file" id="my-file-input" name="file" />
  <input type="submit" />
</form>

<script type="text/javascript">
const mindeeSubmit = (evt) => {
  evt.preventDefault()
  let myFileInput = document.getElementById('my-file-input');
  let myFile = myFileInput.files[0]
  if (!myFile) { return }
  let data = new FormData();
  data.append("document", myFile, myFile.name);

  let xhr = new XMLHttpRequest();

  xhr.addEventListener("readystatechange", function () {
    if (this.readyState === 4) {
      console.log(this.responseText);
    }
  });

  xhr.open("POST", "https://api.mindee.net/v1/products/mindee/us_bank_statements/v1/predict");
  xhr.setRequestHeader("Authorization", "Token my-api-key-here");
  xhr.send(data);
}
</script>
  • Replace my-api-key-here with your new API key, or use the select an API key feature and it will be filled automatically.
  • Copy and paste the sample code of your desired choice in your application, code environment, terminal etc.
  • Replace /path/to/your/file/pdf with the path to your bank statement.

❗️

API Key

Always remember to replace your API key!

  1. Run your code. You will receive a JSON response with the invoice details.

API Response

Below is the full sample JSON response you get when you call the API. Since the response is quite verbose, we will walk through the fields section by section.

{
  "api_request": {
    "error": {},
    "resources": [
      "document"
    ],
    "status": "success",
    "status_code": 201,
    "url": "http://api.mindee.net/v1/products/mindee/us_bank_statements/v1/predict"
  },
  "document": {
    "id":  "ecdbe7bd-1037-47a5-87a8-b90d49475a1f",
    "name": "bank_of_america_fake_bank_statement.pdf",
    "n_pages": 1,
    "is_rotation_applied": true,
    "inference": {
      "started_at": "2021-05-06T16:37:28",
      "finished_at": "2021-05-06T16:37:29",
      "processing_time": 1.125,
      "pages": [
        {
          "id": 0,
          "orientation": {"value": 0},
          "prediction": { .. },
          "extras": {}
        }
      ],
      "prediction": { .. },
      "extras": {}
    }
  }
}

You can find the prediction within the prediction key found in two locations:

  • In document > inference > prediction for document-level predictions: it contains the different fields extracted at the document level, meaning that for multi-pages PDFs, we reconstruct a single invoice object using all the pages.
  • In document > inference > pages[ ] > prediction for page-level predictions: it gives the prediction for each page independently. With images, there is only one element on this array, but with PDFs, you can find the extracted data for each PDF page.

Each predicted field may contain one or several values:

  • a confidence score
  • a polygon highlighting the information location
  • a page_id where the information was found (document level only)
{
  "prediction": {
    "bank_name": {
      "value": "Bank of America",
      "confidence": 0.99,
      "polygon": [
        [
          0.058,
          0.078
        ],
        [
          0.278,
          0.078
        ],
        [
          0.278,
          0.093
        ],
        [
          0.058,
          0.093
        ]
      ],
      "page_id": 0
    },
    "account_holder_name": {
      "value": "MR JOHN DOE",
      "confidence": 0.89,
      "polygon": [
        [
          0.055,
          0.438
        ],
        [
          0.26,
          0.438
        ],
        [
          0.26,
          0.45
        ],
        [
          0.055,
          0.45
        ]
      ],
      "page_id": 0
    },
    "account_holder_address": {
      "value": "2 POST ALLEY, SEATTLE, WA 98101",
      "confidence": 0.0,
      "polygon": [
        [
          0.055,
          0.438
        ],
        [
          0.26,
          0.438
        ],
        [
          0.26,
          0.45
        ],
        [
          0.055,
          0.45
        ]
      ],
      "page_id": 0
    },
    "account_number": {
      "value": "123456789",
      "confidence": 0.99,
      "polygon": [
        [
          0.292,
          0.033
        ],
        [
          0.388,
          0.033
        ],
        [
          0.388,
          0.047
        ],
        [
          0.292,
          0.047
        ]
      ],
      "page_id": 1
    },
    "beginning_date": {
      "value": "2021-02-01",
      "confidence": 0.99,
      "polygon": [
        [
          0.208,
          0.486
        ],
        [
          0.334,
          0.486
        ],
        [
          0.334,
          0.507
        ],
        [
          0.208,
          0.507
        ]
      ],
      "page_id": 0
    },
    "beginning_balance": {
      "value": "36234.96",
      "confidence": 0.0,
      "polygon": [],
      "page_id": null
    },
    "ending_date": {
      "value": "2021-02-28",
      "confidence": 0.99,
      "polygon": [
        [
          0.241,
          0.414
        ],
        [
          0.388,
          0.414
        ],
        [
          0.388,
          0.429
        ],
        [
          0.241,
          0.429
        ]
      ],
      "page_id": 0
    },
    "ending_balance": {
      "value": "24400.48",
      "confidence": 0.99,
      "polygon": [
        [
          0.499,
          0.604
        ],
        [
          0.563,
          0.604
        ],
        [
          0.563,
          0.62
        ],
        [
          0.499,
          0.62
        ]
      ],
      "page_id": 0
    },
    "total_monthly_credit": {
      "value": "24983.78",
      "confidence": 0.99,
      "polygon": [
        [
          0.489,
          0.51
        ],
        [
          0.565,
          0.51
        ],
        [
          0.565,
          0.529
        ],
        [
          0.489,
          0.529
        ]
      ],
      "page_id": 0
    },
    "total_monthly_debit": {
      "value": "-83436.21",
      "confidence": 0.97,
      "polygon": [
        [
          0.489,
          0.538
        ],
        [
          0.565,
          0.538
        ],
        [
          0.565,
          0.598
        ],
        [
          0.489,
          0.598
        ]
      ],
      "page_id": 0
    },
    "transactions": [... SNIP ...],
    "daily_balances": [
      {
        "amount": 691.91,
        "date": "2021-02-01",
        "confidence": 0.99,
        "polygon": [
          [
            0.056,
            0.186
          ],
          [
            0.331,
            0.186
          ],
          [
            0.331,
            0.198
          ],
          [
            0.056,
            0.198
          ]
        ],
        "page_id": 6
      },
      ... SNIP ...
    ]
  }
}

Depending on the field type specified, additional attributes can be extracted from the invoice object. Using the above invoice example, the following are the basic fields that can be extracted.

Transactions

  • transactions: In the JSON response below, we have the list of transactions included in the body of the bank statements. Each item may contain:
    • description (String): The description of the transaction
    • date (String): The date the transaction was done, returned as an ISO formatted string (yyyy-mm-dd)
    • value (number) Signed number representing the amount of the transaction
    • account_number: (String) Account number associated with the transaction
    • transaction_type (String) either "CREDIT", "DEBIT", or "UNCATEGORIZED"
    • transaction_type_raw (number): The type of transaction as written in the document
{
  "transactions": [
    {
      "description": "Zelle Transfer Conf# 580341df4; WILLIAMS, MYKEL",
      "transaction_type": "CREDIT",
      "account_number": "123456789",
      "transaction_type_raw": "Deposits and other credits",
      "value": 300.0,
      "date": "2021-02-01",
      "confidence": 0.97,
      "polygon": [
        [0.035, 0.501],
        [0.965, 0.501],
        [0.965, 0.537],
        [0.035, 0.537]
      ],
    },
... SNIP ...
    {
      "description": "MERCH BNKCD NSD DES:DEPOSIT ID:526219256884 INDN:KC UNLOCKING CO COMPANY ID:BXXXXXXXXX CCD",
      "transaction_type": "CREDIT",
      "transaction_type_raw": "Deposits and other credits - continued",
      "value": 100.0,
      "account_number": "123456789",
      "date": "2021-02-26",
      "confidence": 0.99,
      "polygon": [
        [0.035, 0.501],
        [0.965, 0.501],
        [0.965, 0.537],
        [0.035, 0.537]
      ]
    },
... SNIP ...
    {
      "description": "ROBINHOOD DES:Funds ID:XXXXXXXXX INDN:Mykel Williams CO ID:1464364776 WEB",
      "transaction_type": "DEBIT",
      "transaction_type_raw": "Withdrawals and other debits",
      "value": -2000.0,
      "account_number": "123456789",
      "date": "2021-02-08",
      "confidence": 0.99,
      "polygon": [
        [0.035, 0.501],
        [0.965, 0.501],
        [0.965, 0.537],
        [0.035, 0.537]
      ]
    }
  ]
} 

Checks

  • checks: List of checks paid. Each item contains:
    • amount: (number) Signed number representing the value of the balance
    • date: (String): The date of the daily balance item, returned as an ISO formatted string (yyyy-mm-dd)
    • description: (String): The description of the check
{
 "checks": [
   {
     "confidence": 0.99,
     "date": "2022-12-20",
     "description": "123456789*",
     "page_id": 10,
     "polygon": [
        [0.628, 0.374],
        [0.703, 0.374],
        [0.703, 0.383],
        [0.628, 0.383]
      ],
     "value": "-11000.0"
   },{
     "confidence": 0.99,
     "date": "2022-12-22",
     "description": "123445454*",
     "page_id": 10,
     "polygon": [
        [0.628, 0.374],
        [0.703, 0.374],
        [0.703, 0.383],
        [0.628, 0.383]
      ],
     "value": "-1450.0"
   }
 ] 
}

Daily balances

  • daily_balances: In the JSON response below, we have the list of transactions included in the body of the bank statements. Each item may contain:
    • amount (number) Signed number representing the value of the balance
    • date (String): The date of the daily balance item, returned as an ISO formatted string (yyyy-mm-dd)
{
	"daily_balances": [
    {
      "value": 691.91,
      "date": "2021-02-01",
      "confidence": 0.99,
      "polygon": [
        [0.628, 0.374],
        [0.703, 0.374],
        [0.703, 0.383],
        [0.628, 0.383]
      ],
    },
...  ...
    {
      "value": -135.54
      "date": "2021-02-09,
      "confidence": 0.99,
      "polygon": [
        [0.628, 0.374],
        [0.703, 0.374],
        [0.703, 0.383],
        [0.628, 0.383]
      ],
    },
...  ...
	]	
}

Account details

  • account_number: The primary account number of the bank statements containing only digits.
  • account_numbers: The list of all account numbers retrieved in the document
  • account_type: The type of account

    📘

    About account types

    This list of account types corresponds to the supported bank. It might not be exhaustive and new account types possible values can be added in the future.

    The possible values are:

    Business Advantage Fundamentals Banking, Business Advantage Relationship Banking, Business Advantage Relationship Banking Preferred Rewards for Bus Platinum, Business Advantage Relationship Banking Preferred Rewards for Bus Gold, Business Advantage Relationship Banking Preferred Rewards for Bus Platinum Honors, Business Advantage Relationship Banking Preferred Rewards for Bus Diamond, Adv Plus Banking Preferred Rewards Gold, Adv Plus Banking Preferred Rewards Platinum Honors, CitiBusiness Streamlined Checking, Spark Basic Checking, Spark Unlimited Checking, BUS ELITE CKG, BUSINESS CKG, Huntington Unlimited Checking, Huntington Business Checking 100, Business Checking 100, Chase Total Checking, Chase Business Complete Checking, Chase Performance Business Checking, Chase Platinum Business Checking, Key Business Reward Checking, KeyBank Basic Business Checking, LIFEGREEN BUSINESS SIMPLE CHECKING, LIFEGREEN BUSINESS CHECKING, TD Business Premier Checking, TD Business Simple Checking, TD Business Convenience Plus, TRUIST SIMPLE BUSINESS CHECKING, BUSINESS VALUE 200 CHECKING, TRUIST DYNAMIC BUSINESS CHECKING, BUSINESS VALUE 500 CHECKING, SILVER BUSINESS CHECKING, PLATINUM BUSINESS CHECKING, GOLD BUSINESS CHECKING, Initiate Business Checking, Navigate Business Checking, Chase Business Total Savings, Mbr Business Savings, ADVANTAGE BUSINESS CHECKING, Business Market Rate Savings, Business Checking Plus, Business Checking

{
  "account_number": {
    "confidence": 0.84,
    "page_id": 0,
    "polygon": [[0.035, 0.284], [0.098, 0.298], [0.098, 0.296], [0.035, 0.296]],
    "value": "1234567891"
  },
  "account_numbers": [
    {
      "confidence": 0.99,
      "page_id": 0,
    	"polygon": [[0.035, 0.284], [0.098, 0.298], [0.098, 0.296], [0.035, 0.296]],
      "value": "012345678"
    },
    {
      "confidence": 0.99,
      "page_id": 2,
    	"polygon": [[0.035, 0.284], [0.098, 0.298], [0.098, 0.296], [0.035, 0.296]],
      "value": "123456789"
    },
  ],
  "account_type": {
    "confidence": 1.0,
    "page_id": 3,
    "polygon": [[0.035, 0.284], [0.098, 0.298], [0.098, 0.296], [0.035, 0.296]],
    "value": "SILVER BUSINESS CHECKING"
  }
}

Bank name

  • bank_name: Name of the bank among Bank of America, Chase, Regions, Wells Fargo, Citibank, US Bank, Capital One, TD Bank, National Bank, Truist
{
  "bank_name": {
    "confidence": 0.84,
    "page_id": 0,
    "polygon": [[0.035, 0.284], [0.098, 0.298], [0.098, 0.296], [0.035, 0.296]],
    "value": "Bank of America"
  }
}

Statement period

  • beginning_date: (String): The beginning date of the statement, returned as an ISO formatted string (yyyy-mm-dd)
  • ending_date: (String): The ending date of the statement, returned as an ISO formatted string (yyyy-mm-dd)
{
  "ending_date": {
    "confidence": 0.84,
    "polygon": [[0.035, 0.284], [0.098, 0.298], [0.098, 0.296], [0.035, 0.296]],
    "value": "2021-02-28"
  },
  "beginning_date": {
    "value": "2021-02-01",
    "confidence": 0.99,
    "polygon": [[0.035, 0.284], [0.098, 0.298], [0.098, 0.296], [0.035, 0.296]],
  }
}

Statement balances

  • beginning_balance: (number): Signed number of the account balance at the beginning of the statement period
  • ending_balance: (number):: Signed number of the account balance at the end of the statement period
{
  "beginning_balance": {
    "confidence": 0.84,
    "polygon": [[0.035, 0.284], [0.098, 0.298], [0.098, 0.296], [0.035, 0.296]],
    "value": "-1244.01"
  },
  "ending_balance": {
    "value": "814.14",
    "confidence": 0.99,
    "polygon": [[0.035, 0.284], [0.098, 0.298], [0.098, 0.296], [0.035, 0.296]],
  }
}

Account holder information

  • account_holder_name: (String): Name of the account holder
  • account_holder_address: (String):: Address of the account holder
{
  "account_holder_name": {
    "confidence": 0.84,
    "polygon": [[0.035, 0.284], [0.098, 0.298], [0.098, 0.296], [0.035, 0.296]],
    "value": "MR JOHN DOE"
  },
  "account_holder_address": {
    "value": "2 POST ALLEY, SEATTLE, WA 98101",
    "confidence": 0.99,
    "polygon": [[0.035, 0.284], [0.098, 0.298], [0.098, 0.296], [0.035, 0.296]],
  }
}

Transactions summary

  • total_monthly_debit: (number): Signed total amount of debits during the statement period
  • total_monthly_credit: (number):: Signed total amount of credits during the statement period
{
  "total_monthly_debit": {
    "confidence": 0.84,
    "polygon": [[0.035, 0.284], [0.098, 0.298], [0.098, 0.296], [0.035, 0.296]],
    "value": "-24139.29"
  },
  "total_monthly_credit": {
    "value": "24983.78",
    "confidence": 0.99,
    "polygon": [[0.035, 0.284], [0.098, 0.298], [0.098, 0.296], [0.035, 0.296]],
  }
}