We can't let the Spotify users have all the fun! The great thing about this is that stats can be pulled at any time since Google has so much data! Music Stats from YouTube Music data via Google Takeout
No exteral libraries are needed for this to run
https://takeout.google.com/settings/takeout
- Click "Deselct All"
- Scroll to the bottom
- Click the checkbox next to "YouTube and YouTube Music"
- Click "Multiple Formats"
- Change "History" to "JSON" and Click "OK"
- (optional) Click "All YouTube Data Included" and select only History
- Click "Next Step"
- Click "Create Export"
- You will receive an email when the export is ready
iTunes API is inconsistent. Code is available, but not maintained by me at this time.