Skip to main content

a screen-scraping API for

Project description

# mintapi

a screen-scraping API for [![Build Status](](

## Installation
Ensure you have Python 2 or 3 and pip (`easy_install pip`) and then:

pip install mintapi

If you do not want to manually find and provide your Mint session cookies, as described below, then please also install `selenium` and `chromedriver` (version 59+ if you want to use headless mode):
pip install selenium
brew cask install chromedriver # or sudo apt-get install chromium-chromedriver on Ubuntu/Debian

## Usage

### from Python

From python, instantiate the Mint class (from the mintapi package) and you can
make calls to retrieve account/budget information. We recommend using the
`keyring` library for persisting credentials.

import mintapi
mint = mintapi.Mint(
'', # Email used to log in to Mint
'password', # Your password used to log in to mint
# Optional parameters
mfa_method='sms', # Can be 'sms' (default) or 'email'.
# if mintapi detects an MFA request, it will trigger the requested method and prompt on the command line.
headless=False, # Whether the chromedriver should work without opening a
# visible window (useful for server-side deployments)
mfa_input_callback=None # A callback accepting a single argument (the prompt)
# which returns the user-inputted 2FA code. By default
# the default Python `input` function is used.

# Get basic account information

# Get extended account detail at the expense of speed - requires an
# additional API call for each account

# Get budget information

# Get transactions
mint.get_transactions() # as pandas dataframe
mint.get_transactions_csv(include_investment=False) # as raw csv data
mint.get_transactions_json(include_investment=False, skip_duplicates=False)

# Get net worth

# Initiate an account refresh

Run it as a sub-process from your favorite language; `pip install mintapi` creates a binary in your $PATH. From the command-line, the output is JSON:

usage: mintapi [-h] [--accounts] [--budgets] [--net-worth]
[--extended-accounts] [--transactions]
[--extended-transactions] [--start-date [START_DATE]]
[--include-investment] [--skip-duplicates] [--show-pending]
[--filename FILENAME] [--keyring] [--headless]
[--mfa-method {sms,email}]
[email] [password]

positional arguments:
email The e-mail address for your account
password The password for your account

optional arguments:
-h, --help show this help message and exit
--accounts Retrieve account information (default if nothing else
is specified)
--budgets Retrieve budget information
--net-worth Retrieve net worth information
--extended-accounts Retrieve extended account information (slower, implies
--transactions, -t Retrieve transactions
Retrieve transactions with extra information and
--start-date [START_DATE]
Earliest date for transactions to be retrieved from.
Used with --extended-transactions. Format: mm/dd/yy
--include-investment Used with --extended-transactions
--skip-duplicates Used with --extended-transactions
--show-pending Exclude pending transactions from being retrieved.
Used with --extended-transactions
--filename FILENAME, -f FILENAME
write results to file. can be {csv,json} format.
default is to write to stdout.
--keyring Use OS keyring for storing password information
--headless Whether to execute chromedriver with no visible
--mfa-method {sms,email}
The MFA method to automate.
>>> mintapi --keyring
"accountName": "Chase Checking",
"lastUpdatedInString": "25 minutes",
"accountType": "bank",
"currentBalance": 100.12,

If you need to avoid using pip or, you can also clone/download
this repository and run: ``python mintapi/``

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
mintapi-1.31.tar.gz (13.4 kB) Copy SHA256 hash SHA256 Source None Sep 9, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page