Sync Audible listening data into Exist with Python. Uses the Audible Python API.
This script:
- authorizes with Audible in your browser and stores reusable device credentials locally
- authorizes with Exist in your browser and stores refreshable OAuth tokens locally
- creates the required Exist attributes if they do not already exist
- fetches today's Audible listening stats
- writes the values into Exist
Audible listeningas minutes (Media)Audible books finishedas an integer count (Media)
- Install dependencies:
pip install -r requirements.txt- Make a new Developer API Client on Exist.io (Account Settings -> Developer Clients -> Add a new client)
- Name = Whatever you want!
- Support Email = Whatever you want!
- Redirect URI = http://localhost:8000/
- OAuth2 client type = Confidential
You will use the resulting client ID and client secret for the OAuth environment variables below.
- Copy
.env.examplevalues into your shell environment.
Required variables:
EXIST_CLIENT_ID- From your Exist.io Developer API ClientEXIST_CLIENT_SECRET- From your Exist.io Developer API ClientAUDIBLE_LOCALE- Audible account Country code (https://audible.readthedocs.io/en/latest/marketplaces/marketplaces.html#country-codes)
Authorize Audible in your browser and save credentials:
python main.py authAuthorize Exist in your browser and save credentials, this also ensures the required Exist attributes exist and stores their resolved names for future syncs:
python main.py exist-authSync today's and yesterday's data:
python main.py syncSync a larger recent window including today:
python main.py sync --days 30Inspect the Audible daily stats and finished-book count for a specific day:
python main.py inspect --date 2026-05-03I'd recommend using Task Scheduler (or any equivalent) to run this script once a day just before midnight. The script uses the machine's local timezone when deciding what counts as "today".