- Overview
- Requirements
- Quick Start
- Featured Analyses
- Limitations and Scope
- Support
- Contributing
- License
GraphMyTunes builds insightful visualizations using the metadata in your Apple Music (formerly known as iTunes) library. Its goal is to provide data to help you better understand your music listening and curation habits.
- Apple Music app for Mac
- Python (tested primarily with 3.13, but probably works fine with 3.9 and higher)
Follow these 3 steps to get started analyzing your music library.
-
Download and install Python.
-
Use pip to install GraphMyTunes:
pip install GraphMyTunes
-
In the Apple Music app for Mac, choose File > Library > Export Library.
[!NOTE] Note: Unfortunately, this option is not available in the Windows version of Apple Music.
-
Save the XML file to a convenient location.
[!TIP] Tip: I use a date-based filename like
2025-07-05.xmlso that I can save multiple snapshots of my library over time.
-
Provide the path to the XML you just saved to GraphMyTunes for analysis.
graphmytunes ~/Music/2025-07-05.xml --output ~/Music/GraphMyTunesOutput -
When processing is complete, view your graphs in the folder you specified in
--output.[!TIP] Tip: If you don't specify an output folder, GraphMyTunes will save your graphs alongside the xml file you provided.
GraphMyTunes includes 50+ built-in ways to analyze your music collection, including but not limited to:
-
At this time, GraphMyTunes development is focused around Apple Music only. There are likely other solutions that serve those with Spotify, Amazon, Pandora, or Last.fm libraries.
-
GraphMyTunes is limited by the metadata exported by the Music app. Specifically, the exported XML does not include every date/time you played a track; it only includes the most recent play date/time. Therefore, GraphMyTunes will not be able to surface some listening trends (for example, finding songs you used to listen to a lot but now listen to infrequently).
-
GraphMyTunes does not include single-metric metadata rankings that can easily be done in the Music app itself (for example, listing the top tracks by play count). If you want these, go to the Music app's "Songs" view, adjust the view options to include the desired columns, and sort ascending or descending by that column. GraphMyTunes aims to provide ways to aggregate or group data in ways that the Music app cannot do.
-
Although GraphMyTunes should run on Windows, there is no option to export the library as an XML file in the Windows version of Apple Music.
Found a bug or have a suggestion? First check to see if somebody has already opened a similar issue on GitHub. If not, feel free to open one.
Contributions are welcome! You may submit pull requests on GitHub. Please include a detailed description of the change being implemented, and consider including unit tests for any new features. See CONTRIBUTING.md for details.
This project is licensed under the Apache License, Version 2.0. See the LICENSE file for more details.






