https://github.com/b0o/spotify-export
Export a listing of your saved tracks as JSON
https://github.com/b0o/spotify-export
Last synced: about 1 year ago
JSON representation
Export a listing of your saved tracks as JSON
- Host: GitHub
- URL: https://github.com/b0o/spotify-export
- Owner: b0o
- License: gpl-3.0
- Created: 2020-05-28T22:43:08.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-06-25T13:07:38.000Z (about 4 years ago)
- Last Synced: 2025-03-19T07:04:11.373Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 244 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
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`
- 2. `cd spotify-export`
- 3. `npm install`
2. Navigate to the [Spotify Web Player](https://open.spotify.com/) and sign in
3. Obtain your auth token
- 1. Open your browser's devtools
- 2. Select the Network tab
- 3. Refresh the page
- 4. Find any request to the domain `api.spotify.com`
- 5. Select the request, then under *Request Headers* find the `authorization: Bearer ...` header
- 6. Right click and copy the header
4. Run `index.js`, passing your auth token, and redirect stdout to a file:
```
$ ./index.js "authorization: Bearer " > spotify-saved-songs.json
```
5. You can use [jq](https://github.com/stedolan/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.