Search API Connector Documentation
Import Spotify Data to Google Sheets
In this guide, we’ll walk through how to pull Spotify music data directly into Google Sheets, using the API Connector add-on for Sheets.
Contents
- Before You Begin
- Part 1: Connect to the Spotify API
- Part 2: Fetch Data from Spotify
- Part 3: Pull Spotify API Data into Sheets
- Part 4: More Example API URLs
- Part 5: API Documentation
Before You Begin
Click here to install the API Connector add-on from the Google Marketplace.
Part 1: Connect to the Spotify API
The easiest way to get started with the Spotify API is through API Connector’s built-in integration.
- Select Spotify from the drop-down list of applications
- Under Authorization, click Connect to Spotify
- You will be directed to spotify.com and asked to authorize the connection. Click Agree.
- You’ll then be returned to your Google Sheet, and can verify that your Spotify connection is active.
Part 2: Fetch Data from Spotify
Now that we’re connected, let’s pull some data into Sheets.
- Under Endpoint, choose
/search
to search Spotify’s catalog of music. - Fill out the required
q
andtype
parameters to indicate your search query and the type of resource to search. - Select a destination sheet, name your request, and click Run.
Part 3: Create a Custom API Request
Alternatively, you can create a custom request instead of using API Connector’s built-in integration. When you create a custom request, you add your complete URL into the request URL field, and choose Spotify from the OAuth menu.
Part 4: More Example API URLs
Here are some more examples of custom API URLs. Check the documentation for the full set of available requests.
- Get your own most played tracks
https://api.spotify.com/v1/me/top/tracks?time_range=long_term
- Search for tracks matching a keyword
https://api.spotify.com/v1/search?q=radio&type=track
- Get audio features of a list of track IDs
https://api.spotify.com/v1/audio-features?ids=7ouMYWpwJ422jRcDASZB7P,4VqPOruhp5EdPBeR92t6lQ,37R0bQOQj5a7DOqh1TGzvB
Part 5: API Documentation
To see more API endpoints and example responses, I suggest checking out out the Spotify Web API reference located at https://developer.spotify.com/documentation/web-api/reference
To view/disconnect API Connector on Spotify’s side, navigate to https://www.spotify.com/us/account/apps/.