Skip to content

b0o/spotify-export

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spotify Export

Export a listing of your saved tracks as JSON.

Usage

  1. Install this tool locally
    1. git clone https://github.com/b0o/spotify-export
    1. cd spotify-export
    1. npm install
  1. Navigate to the Spotify Web Player and sign in

  2. Obtain your auth token

    1. Open your browser's devtools
    1. Select the Network tab
    1. Refresh the page
    1. Find any request to the domain api.spotify.com
    1. Select the request, then under Request Headers find the authorization: Bearer ... header
    1. Right click and copy the header
  1. Run index.js, passing your auth token, and redirect stdout to a file:
$ ./index.js "authorization: Bearer <token>" > spotify-saved-songs.json
  1. You can use jq to transform the JSON output as desired, e.g:
$ jq -r '.[] | "\(.track.artists | map(.name) | join(", ")) — \(.track.name)"' spotify-saved-songs.json
Photay — Warmth in the Coldest Acre
Photay — Existential Celebration
Photay — Pressure
Ol' Burger Beats — Bare Horisont - Instrumental
James Blake — Love What Happened Here
Eli Keszler — Measurement Doesn’t Change The System At All
Aphex Twin — Alberto Balsalm
Robbie Basho — Clair de lune (For Twelve-String) [Live]
Mount Kimbie, James Blake — How We Got By
Mount Kimbie — Delta
...

License

© 2020 Maddison Hellstrom

Released under the GNU General Public License, version 3.0 or later.

About

Export a listing of your saved tracks as JSON

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published