« Spotify Data Scraper

Export Playlists from Spotify to Excel


Sign Up to Scrape Spotify Data

Steve Spagnola
Written by Steve Spagnola
Last updated May 10, 2024

Export Spotify Playlists to Excel

You can export playlists from Spotify to Excel using the Official Spotify API Get Playlist Tracks Endpoint without writing any code. All you need is a free Spotify account to use the Spotify API.

Spotify API Get Playlist Tracks Endpoint

You can either use the API explorer on the right side of the web page linked above to download JSON track data from the streaming service into a text file or read on to see how to extract playlist track data into Excel.

Exporting JSON Data for a Playlist

Using the Spotify API, you can provide the playlist_id to get back the complete list of tracks from as a JSON object. Below is some sample data that the Spotify API returns for each track in the selected playlist, containing references to each track’s album & artists as well as with extensive metadata for each track in the playlist:

# https://developer.spotify.com/documentation/web-api/reference/get-playlists-tracks
{
  "album": {
    "album_type": "compilation",
    "total_tracks": 9,
    "available_markets": [
      "CA",
      "BR",
      "IT"
    ],
    "external_urls": {
      "spotify": "string"
    },
    "href": "string",
    "id": "2up3OPMp9Tb4dAKM2erWXQ",
    "images": [
      {
        "url": "https://i.scdn.co/image/ab67616d00001e02ff9ca10b55ce82ae553c8228",
        "height": 300,
        "width": 300
      }
    ],
    "name": "string",
    "release_date": "1981-12",
    "release_date_precision": "year",
    "restrictions": {
      "reason": "market"
    },
    "type": "album",
    "uri": "spotify:album:2up3OPMp9Tb4dAKM2erWXQ",
    "artists": [
      {
        "external_urls": {
          "spotify": "string"
        },
        "href": "string",
        "id": "string",
        "name": "string",
        "type": "artist",
        "uri": "string"
      }
    ]
  },
  "artists": [
    {
      "external_urls": {
        "spotify": "string"
      },
      "followers": {
        "href": "string",
        "total": 0
      },
      "genres": [
        "Prog rock",
        "Grunge"
      ],
      "href": "string",
      "id": "string",
      "images": [
        {
          "url": "https://i.scdn.co/image/ab67616d00001e02ff9ca10b55ce82ae553c8228",
          "height": 300,
          "width": 300
        }
      ],
      "name": "string",
      "popularity": 0,
      "type": "artist",
      "uri": "string"
    }
  ],
  "available_markets": [
    "string"
  ],
  "disc_number": 0,
  "duration_ms": 0,
  "explicit": false,
  "external_ids": {
    "isrc": "string",
    "ean": "string",
    "upc": "string"
  },
  "external_urls": {
    "spotify": "string"
  },
  "href": "string",
  "id": "string",
  "is_playable": false,
  "linked_from": {},
  "restrictions": {
    "reason": "string"
  },
  "name": "string",
  "popularity": 0,
  "preview_url": "string",
  "track_number": 0,
  "type": "track",
  "uri": "string",
  "is_local": false
}

Converting JSON Data to Excel Files

Once you have the JSON, you still need to convert it into a format that Excel can understand, such as into a CSV file. You can use a popular JSON to CSV converter tool to do this and then import the CSV file into Excel. You can also use our freemium Spotify Playlist Tracks Scraper which will automatically transform the JSON data into CSV files you can start using right away:

Downloadable Spotify Playlist Tracks

Finding the Playlist ID

Since you’ll need a Playlist ID to start with, you can browse Spotify’s Public Web Library and search for or browse any playlist you’re interested in. Once you find the playlist you want to export the tracks for, look at the URL in your web browser; it will look something like this:

https://open.spotify.com/playlist/37i9dQZF1DX7yt1EN3vjWR

Get the Spotify Playlist ID from the URL

Here, the last part: 37i9dQZF1DX7yt1EN3vjWR is the playlist_id you can use with the Spotify API Get Playlist Tracks Endpoint or our Spotify Playlist Tracks Scraper to export the tracks for the given playlist.

User Playlists

If you have a particular user in mind (or yourself), you can use our Spotify User Playlist Scraper to quickly export a list of playlists by username. Under the hood, this is using the Spotify API Get User Playlists Endpoint which you can also check out if you’d prefer to access it directly.

Playlists Over 50 Tracks

The Spotify API will export up to 50 tracks per request (when you set the limit parameter to 50), which may be fine if you have a small playlist you need to export to Excel. However, if your playlist exceeds this size then you’ll need to see the pagination options within the Spotify API Get Playlist Tracks Endpoint.

Specifically, you’ll want to make subsequent requests and increase the offset parameter by 50 each time to keep loading subsequent pages of playlist track results. The Spotify API will continue paginating until it exhausts all items in the playlist, which may be several thousand tracks.

Automatically Exporting Large Playlists

If you’re trying to export a very large playlist with thousands of tracks (or export playlists to Excel CSV from multiple sources), you may want to see our Spotify Playlist Tracks Workflow, which will export an unlimited number of tracks from a list of playlist IDs into a single CSV file automatically, which you can easily import into Excel. See the above video for a more detailed walkthrough on how our service works.

Sign Up to Scrape Spotify Data