Search API Connector Documentation

Print

Import Spotify Data to Google Sheets

premium

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

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.

  1. Select Spotify from the drop-down list of applications
    spotify-application
  2. Under Authorization, click Connect to Spotify
    spotify-authorization
  3. You will be directed to spotify.com and asked to authorize the connection. Click Agree.spotify-img2
  4. You’ll then be returned to your Google Sheet, and can verify that your Spotify connection is active.
    spotify-authorization-connected

Part 2: Fetch Data from Spotify

Now that we’re connected, let’s pull some data into Sheets.

  1. Under Endpoint, choose /search to search Spotify’s catalog of music.
    spotify-endpoints
  2. Fill out the required q and type parameters to indicate your search query and the type of resource to search.
  3. Select a destination sheet, name your request, and click Run.
    spotify-response

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.
spotify-results

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/.

Previous Import Shopify Data to Google Sheets
Next Import Strava Data to Google Sheets

Leave a Comment

Table of Contents