Skip to content

dev26git/spoteafy

Repository files navigation

Spotify Saved Songs Backup

Export all your Spotify liked songs to JSON and CSV — with full metadata including title, artist, album, release date, ISRC, and more.


Spotify Developer Setup

You'll need to register an app on Spotify's developer portal to get API credentials.

  1. Go to developer.spotify.com/dashboard and log in
  2. Click Create app
  3. Fill in any name and description, then set the Redirect URI to:
    http://127.0.0.1:8888/callback
    
  4. Tick the "Web API" checkbox.
  5. Once created, open the app settings and copy your Client ID and Client Secret

Project Setup

1. Clone the repo

git clone https://github.com/dev26git/spoteafy.git
cd spoteafy

2. Create a virtual environment (optional but recommended)

# Using pip
python -m venv venv
source venv/bin/activate        # macOS/Linux
venv\Scripts\activate           # Windows

OR

# Using conda
conda create -n spoteafy-env python=3.11
conda activate spoteafy-env

3. Install dependencies

python -m pip install -r requirements.txt

4. Configure credentials

Create a .env file in the project root with your Spotify credentials:

SPOTIFY_CLIENT_ID=your_client_id_here
SPOTIFY_CLIENT_SECRET=your_client_secret_here

Running the Script

python download_spotify_saved_tracks.py

On first run, a browser window may open asking you to log in and authorize the app. Allow that.


Output

Two files are saved to the project directory:

File Format Contents
spotify_saved_songs_YYYYMMDD.json JSON Full structured data, easy to parse
spotify_saved_songs_YYYYMMDD.csv CSV Flat table, opens in Excel/Sheets

Each song entry contains:

  • title, artist, album, release_date
  • duration, duration_ms
  • spotify_id, spotify_url
  • added_at — when you liked the song
  • popularity — Spotify's 0–100 score
  • explicit, is_local
  • isrc — universal track ID, useful for migrating to other platforms

Notes

  • Local files saved to your Spotify library are included but will have empty fields for spotify_id, isrc, and popularity
  • The ISRC code can be used to find the same track on Apple Music, YouTube Music, Tidal, etc.
  • This script only reads your library — it makes no changes to your Spotify account

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages