How do I programatically download bank of America transactions?

3.4k Views Asked by At

I use quicken, which can automatically download bank of America transactions. However, it truncates all the payees so I lose data. I'd like to work around this and I'm thinking of downloading the transaction data and generating my own QFX file with the full payee info.

Is there a way that I can download transactions programmatically, or download something like a .qif (available on their website) programmatically? For the latter, I could convert the gif to a QFX myself.

If anyone has other ideas to download all of the transaction information without losing the payee info, I would welcome those ideas as well.

3

There are 3 best solutions below

1
On

There are two options that you have, neither of which is easy! Both require coding ability.

Option ONE is to figure out how to use Plaid.com and create an app that can connect and pull the transactions thru Plaid's system. And just an FYI, for Bank of America, you will need to apply to be approved for Production mode in order to use OAuth mode access. Production mode is not free, but is pretty cheap, like $0.30 per year per account. I started trying to work this out, but have not been able to figure out how to write the code to do the Linking and OAuth of account yet.

Option TWO is to write some code that can scrape the site for you, and automatically download the transactions. Python is usually the preferred language to do this in. I found the following (have not tried any of them):

https://www.neilgrogan.com/bank-tx-py/

https://github.com/search?q=bankofamerica&type=repositories

https://github.com/search?q=bank+of+america&type=repositories

https://github.com/Wllew4/bofa_scraper

https://github.com/rusdog2784/bank_of_america

1
On

It seems the API will return a JSON so you may need to find a tool to convert that to a qif or qfx if that part is important. After digging further, I can't test this without having a CashPro account but it seems what you need to do is...

Step 1:

  • Get an access token from here. You'll need to send this in the header of any requests

Step 2:

  • Send an http request with a header in the following format:

     {
     "accounts": [
       {
        "accountNumber": "xxxxxxx",
        "bankId": "xxxxxxx"
       }
      ],
     "fromDate": "yyyy-mm-dd",
     "toDate": "yyyy-mm-dd"
     }
    

to https://developer.bankofamerica.com/cashpro/reporting/v1/transaction-inquiries/previous-day

Step 3:

  • You should get a JSON as a response

As mentioned, I can't test this but here's the documentation of the specific API endpoint you need

0
On

A quick search for bank of america api yielded this BofA API. They even have many options for types of payment information you could query here as well as lots of individual account types that you can access it as.

It looks pretty comprehensive. If you don't see what you are looking for there I put another option below, just in case.

I don't use BofA. So I can't speak to what they have natively available. But you could always use a bot to scrape it if they present it anywhere in the User Interface.

I would agree with Meena that you should not be able to use curl. But selenium uses a browser to programmatically do just about anything that you would want to do with any website. They also have bindings for many languages. So you could just pick your favorite and go to town...