Converts your Spotify streaming history JSON files into a CSV format suitable for importing into Universal Scrobbler, allowing you to add it to your Last.fm profile.
-
Spotify Data Request: Request your personal Spotify data in the data rights and privacy settings. Instructions can be found here: https://www.spotify.com/account/privacy/ (availability may vary by region).
-
Python 3.6+: Ensure you have Python 3.6 or a later version installed.
-
Clone the repository (or download the script): Download the
converter.py
script and place it in a directory of your choice. -
Install Dependencies: Navigate to the directory containing the script in your terminal and run:
pip install -r requirements.txt
-
Place JSON Files: Put all the
Streaming_History*.json
files from your Spotify data export in the same directory as theconverter.py
script. -
Run the Conversion: Open a terminal, navigate to the script's directory, and run the script. You can customize the minimum playback time using the
--threshold
argument:python converter.py --threshold 30000 --max_scrobbles 2800
-
--threshold
: Specifies the minimum play time in milliseconds for a song to be included in the output. The default value is 30000 (30 seconds). -
--max_scrobbles
: Specifies the maximum number of scrobbles (rows) per CSV file. If set to a value greater than 0, the output will be split into multiple CSV files, each with at mostmax_scrobbles
rows. Useful for complying with daily scrobble limits. If 0, no splitting occurs.
-
-
Output File: The script will generate a file named
output.csv
(or multiple files namedoutput_1.csv
,output_2.csv
, etc. if--max_scrobbles
is specified) in the same directory. This file(s) contains your Spotify history in a format suitable for Universal Scrobbler. -
Process Multiple Files: The script automatically processes all files matching the pattern
Streaming_History*.json
in the directory. No need to rename or move files individually.
-
Universal Scrobbler: Go to https://universalscrobbler.com.
-
Manual Scrobbling: Choose "Scrobble manually in bulk".
-
Connect Last.fm: Connect your Last.fm profile.
-
Premium Subscription: You'll need a premium subscription for Universal Scrobbler (approximately $1 per month). One month should be sufficient for a one-time import.
-
Copy and Paste: Copy the contents of the
output.csv
file(s) into the bulk scrobbler. If you generated multiple files, import them one at a time. -
Scrobble: Submit the scrobbles. Be aware of the daily limit (approximately 2800 scrobbles).
The imported songs won't automatically be attributed to their respective albums. To solve this, you can upgrade to a Last.fm Pro subscription and follow the steps described here: https://github.com/RudeySH/lastfm-bulk-edit