Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

a screen-scraping API for Mint.com

Project Description

a screen-scraping API for Mint.com.

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:

pip install selenium
brew 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
# ius_session and thx_guid are optional, and will be automatically extracted if possible (see above for installing selenium/chromedriver)
mint = mintapi.Mint(email, password, ius_session, thx_guid)

# Get basic account information
mint.get_accounts()

# Get extended account detail at the expense of speed - requires an
# additional API call for each account
mint.get_accounts(True)

# Get budget information
mint.get_budgets()

# 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
mint.get_net_worth()

# Initiate an account refresh
mint.initiate_account_refresh()

You will notice the login step requires an ius_session and thx_guid. These are session cookies that must persist. If you choose not to install selenium and chromedriver, you must obtain these values by searching your browser’s cookies. In Chrome, for example, visit chrome://settings/cookies and type intuit (not mint). Alternatively, you can login to Mint manually with your browser in inspect mode and poke around in the network tab. Providing these two cookies eliminates the need to 2-step authenticate. Mint requires this with all new browsers attempting to connect.

from anywhere

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] [--session SESSION] [--thx_guid THX_GUID]
          [email] [password]

positional arguments:
  email                 The e-mail address for your Mint.com account
  password              The password for your Mint.com 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
                        --accounts)
  --transactions, -t    Retrieve transactions
  --extended-transactions
                        Retrieve transactions with extra information and
                        arguments
  --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
  --session SESSION     ius_session cookie
  --thx_guid THX_GUID   thx_guid cookie
>>> mintapi --keyring email@example.com
[
  {
    "accountName": "Chase Checking",
    "lastUpdatedInString": "25 minutes",
    "accountType": "bank",
    "currentBalance": 100.12,
    ...
  },
  ...
]

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

Release History

Release History

This version
History Node

1.27

History Node

1.26

History Node

1.25

History Node

1.24

History Node

1.23

History Node

1.22

History Node

1.21

History Node

1.20

History Node

1.19

History Node

1.18

History Node

1.17

History Node

1.16

History Node

1.15

History Node

1.14

History Node

1.13

History Node

1.12

History Node

1.11

History Node

1.10.2

History Node

1.10.1

History Node

1.10

History Node

1.9

History Node

1.8

History Node

1.7

History Node

1.6

History Node

1.5

History Node

1.4

History Node

1.3.2

History Node

1.3.1

History Node

1.3

History Node

1.2

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
mintapi-1.27.tar.gz (11.6 kB) Copy SHA256 Checksum SHA256 Source Aug 25, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting