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: Pull Spotify Ad Data into Sheets

For this example, we'll fetch some reporting data from the Spotify Ads API into Google Sheets.

  1. Open up Google Sheets and click Extensions > API Connector > Open > Create request.
  2. In the request form enter the following:
    • ApplicationCustom
    • MethodPOST
    • Request URL
    • OAuthSpotify Ads
    • Headers:
      • Content-Type: application/json
      • Accept: 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"]}
  3. When you select Spotify Ads from the OAuth menu, you'll see a blue Connect button if you haven't already authorized the connection. Click through and hit Agree to enable the connection.
  4. Create a new tab and click Set current to use that tab as your data destination.
  5. Name your request and click Run. A moment later you’ll see data populate your sheet.

To customize the request, choose any of the available metrics and breakdowns shown in the documentation.

Part 2: 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 3: API Documentation

Official API documentation:

To fully disconnect the application on Spotify's side, click (if that link doesn't work, navigate to Account > Apps > Mixed Analytics > Remove Access)

Leave a Comment