« Spotify Data Scraper

Get Your Spotify Client ID & API Access Token


Sign Up to Scrape Spotify Data

Steve Spagnola
Written by Steve Spagnola
Last updated April 14, 2024

Spotify Client ID, Secret & API Token

In order to use the Spotify API Endpoints with our Spotify Data Scraper (or similar Spotify client), you’ll need to obtain & provide a Spotify API Access Token from the Spotify developer dashboard.

And in order to get a Spotify API Token, you’ll need your Client ID and Client Secret, which you can find in the Spotify Developer Dashboard. In this article, we’ll show you how to obtain these values and then exchange them for an API Token.

1. Log in to Spotify’s Developer Dashboard

Head to the Spotify Developer Dashboard and click the “Login” button on the bottom of the screen (just use your normal Spotify login). You can also create a free Spotify account using the link on the screen if needed:

Log in to Spotify API Developer Dashboard

2. Create an App

Select the “Create an App” button and provide a brief name and app description. If you’re just looking to scrape data from Spotify, these won’t matter too much as no one else will see them. You will also need to carefully read and accept the Spotify Developer Terms of Service.

Create an App

You may be prompted to provide Redirect URIs, but you should be able to ignore these and leave these blank since you’re only using the developer app for data scraping. If required, you should be able to enter in something like http://localhost to use for developer testing.

3. Copy Client ID & Client Secret

Once your app is created, you should see the Client ID and Client Secret. Simply copy these values into a secure location like a password manager, so you don’t need to keep logging in to the Spotify Developer Dashboard to retrieve these.

Copy Client ID & Client Secret

4. Generate a Spotify API Token

You’ll now need to follow the steps to exchange your Client ID & Secret for an Access Token (or “API Token” as we call it).

You can follow the official Spotify Authorization Guide, but you essentially need to make a POST request to https://accounts.spotify.com/api/token and pass in grant_type=client_credentials&client_id={{client_id}}&client_secret={{client_secret}} as the request body.

If this is too complicated, you can use the Spotify Authentication Endpoint on the Spotify Scraper and simply paste in your Client ID and Client Secret:

Paste in Client ID & Client Secret

You’ll then see the API Token under the access_token field in the response:

Copy the Access Token

Simply copy this value and you’re done! This token will last for 1 hour, and after that you’ll need to re-generate the token again (just follow this Step, no need to repeat Steps 1 - 3).

Scraping Spotify Data

Once you have your API token, you can use it to scrape data from the Spotify API. To get started, we can use the Spotify Search Results Scraper and paste in your Spotify API Token from Step 4 when prompted. You can then enter a search term like hip hop and execute the endpoint, where you’ll be able to download the results as CSV files:

Scraped Spotify Search Results

📝 Related Articles

Sign Up to Scrape Spotify Data