Search API Connector Documentation


Import Spotify Ads Data to Google Sheets


In this guide, we’ll walk through how to pull Spotify Ads data directly into Google Sheets, using the API Connector add-on for Sheets.


Before You Begin

Click here to install the API Connector add-on from the Google Marketplace.

Part 1: Get OAuth Credentials

A preset Spotify connector is currently in development, and can be used instead of getting your own OAuth credentials. For beta access please message support.

Spotify Ads uses OAuth, which means we need to set up an “app” through their developers console.

  1. While logged into Spotify, navigate to and click Create An App
  2. You’ll be prompted to give your app a name and description. Click Create
  3. You’ll now be in the main apps dashboard. Click Edit Settings.
  4. Under Redirect URLs, enter
  5. Scroll down and click Save.
  6. On the left you’ll see your client ID and secret, copy those down as we’ll need them in a moment.

Part 2: Set up Custom OAuth Connection

  1. Back in Google Sheets, navigate to Extensions > API Connector > Manage Connections
  2. Scroll down to the Custom Connections section and click Add Custom OAuth
  3. In the Custom OAuth Manager, enter and save the following:
    • Name: Spotify Ads
    • Authorization Base URL:
    • Token URL:
    • Client ID: enter the value from the developer console
    • Client Secret: enter the value from the developer console
  4. Click Manage Connections to return to the Connections screen. Scroll down and you should see your new connection listed. Click Connect
  5. You’ll be prompted to approve the connection. Click Agree
  6. You’ll be redirected into your Google Sheet and can verify that the connection is now active.

Part 3: Pull Spotify Ad Data into Sheets

We’re now ready to fetch some data from the Spotify Ads API into Google Sheets. Open up Google Sheets and click Extensions > API Connector > Open > Create Request, and enter the following:

  • Method: POST
  • Request URL:
  • OAuth: Spotify Ads
  • Headers: Key = Content-Type, Value = application/json, Key = Accept, Value = application/json
  • Request body: {"filters":{"report_datetime_range":{"report_start":"2022-01-24T00:00:00Z","report_end":"2022-08-24T00:00:00Z"}},"dimensions":["CAMPAIGN"],"fields":["IMPRESSIONS","SERVE_REACH","SERVE_FREQ","SPEND","CLICKS","CTR","FIRST_QUARTILES","THIRD_QUARTILES","MIDPOINTS","COMPLETES"]}

For more available metrics and breakdowns, please check the documentation.

Part 4: Flatten Fields to Headers

By default, Spotify’s API sends back data where field headers are in one column and field values are in the next. To convert those field headers into column titles, you can flatten fields to headers, like this:

  • path to header: page.rows.fields.type
  • path to value: page.rows.fields.value

While you’re at it, select “Truncate headers” to clean up the titles even further. The end result should look like this:

Part 5: API Documentation

Official API documentation:

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

Leave a Comment

Table of Contents