A user-friendly tool to export all your Splitwise transaction data—including any/all receipts—into a single spreadsheet (CSV/XLSX). Designed for both technical and non-technical users.
- Export all expenses (optionally by group/date)
- Download and link all available receipts
- Output a single spreadsheet with all relevant data and clickable receipt links
- Easy-to-use CLI
- Cross-platform (Windows, Mac, Linux)
Note You must create a Splitwise app to obtain your API keys before using this tool. This is a one-time setup required by Splitwise for all third-party tools.
Steps:
- Go to https://secure.splitwise.com/apps/new and create a new app.
- Set the callback URL to anything (e.g.,
http://localhost:8080
).- After creating the app, copy your Consumer Key and Consumer Secret.
- When you run this tool for the first time, you will be prompted to enter these keys and complete the authorization process in your browser.
- Your credentials will be saved securely in
~/.splitwise_auth.json
for future use.
- Install dependencies (in a virtual environment):
python3 -m venv .venv source .venv/bin/activate python -m pip install --upgrade pip python3 -m pip install -r requirements-lock.txt
Note:
- For reproducible installs, use
requirements-lock.txt
(recommended for most users). requirements.txt
contains version ranges and is intended for development or as a reference.
- For reproducible installs, use
- Run the tool:
python src/splitwise_export_receipts.py
- Authenticate with Splitwise:
- Enter your Consumer Key and Secret when prompted.
- Open the provided authorization URL in your browser.
- After authorizing, you will see a browser error (page not found).
Important: Getting the OAuth Verifier
- This is expected! Splitwise will redirect you to your callback URL (e.g.,
http://localhost:8080
) and the page will not load.- Look at the URL in your browser's address bar.
- Find the part that says
oauth_verifier=...
and copy the value after the=
.- Paste this value into the terminal when prompted for the verification code.
Example:
http://localhost:8080/?oauth_token=...&oauth_verifier=YOUR_CODE_HERE
Copy
YOUR_CODE_HERE
and paste it into the script prompt.
-
Choose output options:
- The script will prompt you for the output file path (default:
splitwise_export.csv
). - You can choose
.csv
(recommended) or.xlsx
. - You can also specify the receipts directory (default:
receipts
).
- The script will prompt you for the output file path (default:
-
Open your exported spreadsheet:
- For CSV: Open in Excel or Google Sheets. The
Receipt
column contains a clickable link for each transaction with a receipt. Click "View Receipt" to open the local file (if it exists on your machine). - For XLSX: The
Receipt
column contains the local file path.
- For CSV: Open in Excel or Google Sheets. The
-
Receipts are saved in the specified directory.
You can control where the spreadsheet and receipts are saved using command-line options:
-
Spreadsheet output file:
- Use
--output
(or-o
) to set the spreadsheet file path:python src/splitwise_export_receipts.py --output /path/to/your/spreadsheet.csv
- Example:
python src/splitwise_export_receipts.py --output ~/Desktop/splitwise_export.csv
- Use
-
Receipts directory:
- Use
--receipts-dir
to set the receipts folder:python src/splitwise_export_receipts.py --receipts-dir /path/to/receipts_folder
- Example:
python src/splitwise_export_receipts.py --receipts-dir ~/Desktop/splitwise_receipts
- Use
-
Combine both:
python src/splitwise_export_receipts.py --output ~/Desktop/splitwise_export.csv --receipts-dir ~/Desktop/splitwise_receipts
-
If you don't specify these options:
- The script will prompt you for the output file path (default:
splitwise_export.csv
in the current directory). - Receipts will be saved in the
receipts
folder in your current directory by default.
- The script will prompt you for the output file path (default:
-
See all options:
python src/splitwise_export_receipts.py --help
- If you see a browser error after authorizing Splitwise, this is normal. Just copy the
oauth_verifier
from the URL as described above. - If you get a
ModuleNotFoundError
, make sure you installed all dependencies in your virtual environment. - If the receipt links do not work, make sure the receipt files are present at the specified paths on your computer.
- Python 3.10+
- Splitwise account (you will need to create an API app for OAuth)
- Splitwise API authentication
- Expense fetching
- Receipt downloading
- Data export to spreadsheet
- CLI improvements
- Documentation
MIT