Spotify Public API Profile: Surf a Giant Musical Database

Lindsey at RapidAPI
The Era of APIs
Published in
3 min readDec 28, 2016

Need a side project for the new year? We’ve got #12DaysOfAPIs to give you project inspiration. Today, we’re highlight Spotify’s Public API and what you can build with it. Read on or go straight to the Spotify package page to get started.

screen-shot-2016-12-28-at-10-23-03-am

What can I do with the Spotify Public API?

Spotify has over 30 million songs in their catalogue (organized by artist and genre), not to mention countless playlists. That makes for one robust musical database. Spotify’s Public API lets you call data based on artist, album, song, playlist or related artist. Not bad for a music lover!

bart-music

We’ve built an API package that lets you call the Spotify Public API right from your browser, then export the code (in the language of your choice, obvs) into your script.

How to call the Spotify Public API

First step, head over to the Spotify Public API package page! Next, pick the endpoint you’d like to call. Finally, fill in the parameters and click “Test Function.” Bam! You’ve just called the Spotify API.

Some endpoints require a Spotify ID for a certain artist. You can get the Spotify ID for an artist by calling the searchArtists endpoint and getting the Spotify ID from the results of the API call. Here’s how to do it:

Need more functionality?

Not all projects needs will be filled with our Spotify Public API package alone. If you want to build something using user information (ex. pull a Spotify user’s followed artists), we have a Spotify User API package that includes that functionality. While Spotify actually doesn’t separate the User and Public into two APIs, we built two packages to separate the methods that require an API key (User API) from those that don’t (Public API).

To use the Spotify User API package, you’ll need to get the client_ID and client_Key from Spotify directly. Here’s how to get them:

Go to Spotify Developers section

Login or sign up to create new applications and manage your Spotify credentials to authenticate your requests.

Create new app

When you register an application on your account, two credentials are created for you — Client ID and Client Secret. You can see the credentials on the application’s details page.

Project Ideas

The Spotify Developer Showcase has some very cool projects built with the Spotify API for your inspiration. We had a few ideas of our own as well! One of the biggest reasons we built RapidAPI is so developers could call multiple APIs from one endpoint. Here are some cool project ideas connecting the Spotify Public API to others on the marketplace.

Let us know about any cool stuff you build in the comments below! We’d love to see anything you come up with.

Want more ideas?

Follow along our #12DaysOfAPIs series on the blog, Facebook or Twitter! Happy coding 😁

--

--

Lindsey at RapidAPI
The Era of APIs

Director of Content at RapidAPI, a platform that helps developers find and connect directly to the world’s top APIs.