Skip to content
Download scrobble history from
R Python
Branch: develop
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Project Status: Active - The project has reached a stable, usable state and is being actively developed. codecov Build Status


scrobbler is an R package intended to help people download their scrobbles from and run an analysis on their listening history.

What on earth are scrobbles?

Scrobbling is a way of tracking the history of all the songs you listen to online or locally by using the service. While scrobbling originated as a way of recorded what you had listened to on the platform, scrobbling is now possible on a range of platforms such as Spotify, Youtube, iTunes, Soundcloud, and most other listening platforms. In all these cases, any scrobbles are still stored on's platform. If you use multiple services for listening to music, you can set up scrobbling on all of them, and use as the central hub of your entire listening history.

For example, if your a spotify user you can create a account, navigate to, and click the option to conncet your spotify account. Now, anytime you listen to music on spotify, the song, artist, album, and time will be recorded on

Why scrobbler?'s webpage is pretty good at providing you some summary statistics about what you've been listening to, and who your most played artists are. However, I wanted to be able to get the raw data to analyse myself. Unfortunately, does not provide any way for you to automatically download your scrobbles.

How to use scrobbler

You can download scrobbler from github as follows



scrobbler relies on you having a python installation on your computer. It can support python 2 and 3, but I highly recommend you get a python 3 installation and attach it to your PATH variable. For instructions with this, please check the vignette.

Once you've determined whether you want to run the python 2 or 3 script, you can use

scrobbler::install_scrobble_script(version = )

where version equals either "2" or "3".

This will install the python script in your working directory. You can then run

scrobbler::fetch_tracks(username = "username", out_file = "scrobbles.txt")

where username equals your username. This will download a txt file called "scrobbles.txt" containing your scrobbles. This is quite a slow process (it takes me about 4 mins to download ~10,000 scrobbles) so don't worry if it looks like your computer is hanging.

Once the tracks are downloaded, you can use


to read in your txt file as a formatted dataframe. read_scrobbles also has a convert_time argument to specify what format you want the scrobbles timestamp to be.

Once this is completed, you now have a clean dataframe of your listening history to analyse as you please.

Scrobbling via the API

If you do not want to setup a python installation on your computer, you can also fetch your scrobbles by using the API.

This requires you to get an API key from This takes less than 5 mins, and can be done here

Once you have your key, you can use the collect_tracks function to create a dataframe of your scrobbled songs

my_data <- scrobbler::collect_tracks(username = "your_username", api_key = "your_api_key")


This package is completely dependent on the fantastic '' python script that is found here:, and the '' script that is found here: All credit for the python code in this package goes to the authors of those repos.

You can’t perform that action at this time.