A Python/Jupyter notebook to import historical streams from an Apple Music data export to Listenbrainz
- Apple Music Play Activity.csv from a data export - A history of all your listening activity from apple music
- Your Listenbrainz user key - to authenticate with the API and associate with your account
- Knowing your time zone. You need your time zone in TZ format.
- You can easily find it here. Zoom out and click on your location. The time zone will appear on the top left next to a globe, like
America/Los_Angeles
. Click on it to copy.
- You can easily find it here. Zoom out and click on your location. The time zone will appear on the top left next to a globe, like
Never used python? Don't have whatever a "Jupyter Notebook" program is? Follow these directions!
- Copy the URL for this page:
https://github.com/s-crypt/AppleMusic-to-Listenbrainz-Import
- Go to https://colab.research.google.com/ and sign in
- Click
Upload
, thenGithub
on the popup (or File->Upload if there is no popup) - Paste the URL and hit enter
- Click on
COLAB-ImportAppleMusicToListenbrainz.ipynb
- At the top left, click Runtime->Run All
- After a few seconds, a text box will show up below the code block (the rectangle with the word import a bunch of times). Paste your User Token in the text box after
Please enter your user token:
and hit enter - Another text box will appear. Type or paste your timezone (you can find this above)
- A
Browse...
button will appear. Click it and select your freshly unzippedApple Music Play Activity.csv
from your data export- Wait until it uploads. It may take a while depending on how large your music history is.
- Wait until the program is done processing
- Done! Your listen history from Apple Music is now in Listenbrainz
- Download the notebook
- Place in a folder containing the CSV, freshly extracted from the data export
- Open in a Jupyter notebook program (VSCode, Jupyter)
- Run all cells and answer the prompts