How to get data from Spotify into Power BI

Introduction

Spotify Web API exposes rich data for artists, albums, tracks, playlists, and categories. If you want to build dashboards from this data, you can connect Spotify to Power BI through an ODBC layer and query API responses using SQL.

In this tutorial, you will learn how to configure the ZappySys ODBC Driver for REST APIs for Spotify, test the connection, and load Spotify data into Power BI.

Prerequisites

To access your data in your app using the ODBC Driver, ensure the following requirements are met. Download and install ZappySys ODBC PowerPack

Steps

Create a Spotify Developer App

  1. Open the Spotify Developer Dashboard and sign in with any free or premium Spotify account.
  2. Click Create app, then enter an app name, description, and a redirect URL (for example: http://127.0.0.1:3000).

    Spotify – Create app

  3. Open app Settings and copy your Client ID and Client Secret.
  4. Store these credentials securely.

Create a New ODBC DSN Using ZappySys JSON Driver

  1. Search for ODBC in the Windows Start menu and open ODBC Data Source Administrator.
  2. In User DSN or System DSN, click Add.
  3. Select ZappySys JSON Driver and click Continue.

Configure the Connection and API Settings

  1. Enter a Spotify endpoint URL. Example:
  2. In Connection Type, select OAuth and click Configure.
  3. Set Credential Type to OAuth2 / Client Credentials Grant and fill in the following values:
    • Client ID: Your Spotify Client ID
    • Client Secret: Your Spotify Client Secret
    • Access Token URL: https://accounts.spotify.com/api/token
    • Scopes/Permissions: (leave empty)
  4. Click OK to save HTTP authentication settings.

    Spotify ODBC OAuth connection

  5. Set HTTP Request Method to GET.
  6. Add the following HTTP Header:
    • Accept: application/json
  7. Set JSON Path Filter to:
  8. Click Test Connection, then click OK to save the DSN.

    Spotify – ODBC JSON driver configuration

Preview Spotify Data in ODBC Driver

  1. Open the Preview tab in the DSN configuration window.
  2. Generate a query and click Preview Data.
  3. Confirm rows are returned. If not, recheck credentials, endpoint URL, and JSON Path Filter.

    Spotify – ODBC preview data

Connect Power BI to Spotify via ODBC

  1. Open Power BI Desktop.
  2. Go to Home > Get Data > More….
  3. Search for ODBC and click Connect.

    Power BI – Get data from ODBC connection

  4. Select your Spotify DSN from the data source list.
  5. Optionally enter a custom SQL query in Advanced options.

    Power BI – Enter query Spotify

  6. Click OK, review the preview, and click Load.

    Power BI – Spotify Result

  7. In the Navigator, select fields or tables you want to import into your model.

Query Spotify Data with SQL

Use custom SQL queries in the ODBC driver or Power BI to shape data before loading.

Example 1: List All Artists


Example 2: Filter Highly Popular Artists


Example 3: Artists with Large Followings


Example 4: Search by Genre

Conclusion

Connecting Spotify to Power BI using the ZappySys ODBC Driver gives you a fast way to analyze music catalog trends and artist metrics with SQL and dashboards. Once your DSN is configured, you can reuse the same pattern for tracks, albums, playlists, categories, and market-specific reporting.

Explore more connectors and API integrations with the ZappySys ODBC Drivers.

Need Help?

If you encounter any issues, our support team is here to help:

  1. Live Chat: Open the chat widget (bottom right of this page)
  2. Email: support@zappysys.com
  3. Support Center: Support | ZappySys
Posted in Uncategorized.