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: Pull Data from Spotify to Sheets

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, using any of the endpoints and parameters shown in the API documentation. For example:

  • ApplicationCustom
  • MethodGET
  • Request URLhttps://api.spotify.com/v1/me
  • OAuthSpotify


spotify-results

Part 4: API Documentation

To see more API endpoints and example responses, check 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/.

11 thoughts on “Import Spotify Data to Google Sheets”

  1. Can I get the entire music library this way? I want to compare which songs I have offline the same as ones present in Spotify and delete only them and probably add the rest as a separate playlist.

    Reply
    • As far as I know, Spotify's API doesn't provide stream count numbers. There are quite a few comments/complaints about it on their forum, e.g. here. Based on that thread, it seems some third party tools have found a way to offer this, maybe by scraping Spotify's interface (where it seems like this data is provided). So maybe you can try using an unofficial API for Spotify instead.

      Reply
  2. When trying to pull an artist's top tracks, I am getting an error saying "missing country parameter". However I don't see a place to enter the country id?

    Reply

Leave a Comment

Jump To...