Export a listing of your saved tracks as JSON.
- Install this tool locally
-
git clone https://github.com/b0o/spotify-export
-
cd spotify-export
-
npm install
-
Navigate to the Spotify Web Player and sign in
-
Obtain your auth token
-
- Open your browser's devtools
-
- Select the Network tab
-
- Refresh the page
-
- Find any request to the domain
api.spotify.com
- Find any request to the domain
-
- Select the request, then under Request Headers find the
authorization: Bearer ...
header
- Select the request, then under Request Headers find the
-
- Right click and copy the header
- Run
index.js
, passing your auth token, and redirect stdout to a file:
$ ./index.js "authorization: Bearer <token>" > spotify-saved-songs.json
- 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
...
© 2020 Maddison Hellstrom
Released under the GNU General Public License, version 3.0 or later.