Here we link to some simple examples that demonstrate the capabilities of the Spotify Web API and to wrapper libraries for various languages.
Web API Tutorial
Example App Code
This is the application code that goes with our Web API Tutorial. It includes three examples, one for each of our supported authorization flows.
Basic snippets
Users Endpoint Demo
Displays current user’s information such as display name, picture and email.
Search for an Artist (and Lookup) Demo
Searches for an artist, displaying their albums and making it possible to play a 30 second preview of the first track of each album.
Play a track using voice commands
A demo that recognizes voice commands and plays the desired song. Remember to enable your microphone and grant access to the web app to make it work.
Example apps
Thirtify
A Spotify web player built using the 30s audio previews from the Web API. Demo · Source on GitHub
Playlist Creation
This example creates a playlist based on the words of a sentence. Demo · Source on GitHub
30s Drum Machine
A simple drum machine using Spotify 30s preview mp3s as samples. Demo · Source on GitHub
Artist Explorer
Artists Explorer is a tool that helps music enthusiasts explore artist relationships and discover new music. It uses both the Spotify Web API and the Echo Nest APIs. Demo · Source on GitHub
For more examples of complete apps, see our Developer Showcase.
Echo Nest example apps
Together, the Echo Nest and Spotify APIs provide broad and deep data on millions of artists and songs, making it easy for you to build world-class music apps that take advantage of all of the capabilities provided by both APIs. You can find many excellent examples at the Echo Nest website, including:
| Example App | Description | |||
|---|---|---|---|---|
| Genre Browser | Learn about a new genres: read about the background and history of the genre, listen to its music, learn about the genre's key artists and more. | source code | demo | license |
| Similar Artist Browser | Given a seed artist, this app shows images of similar artists. | source code | demo | license |
| Simple Playlist | Creates an Echo Nest artist radio playlist with the Spotify Play Button | source code | demo | license |
| Simple Playlist with Web API | Creates an Echo Nest artist radio playlist using the Spotify Web API | source code | demo | license |
| Chill Radio | Creates an artist radio of low energy songs using the Spotify and Echo Nest APIs | source code | demo | license |
| Black History Month | Shows how important artists have influenced the music that we listen to today. | source code | demo | license |
| Sort Your Music | A web app that sorts your playlists by a wide range of Echo Nest parameters | source code | demo | license |
| My Saved Tracks | A web app that demonstrates how to retrieve the saved tracks for a Spotify User. | source code | demo | license |
In addition there are several more exciting and sophisticated demonstration apps at the Echo Nest site.
Libraries
Here we collect a list of libraries for integrating with the Spotify Web API using several programming languages and platforms.
Web API Wrappers
Go
Java/Android
Javascript (client-side)
- jmperez/spotify-web-api-js
- eddiemoore/angular-spotify (AngularJS service)
Python
OAuth2 integration
- Node.js Passport Strategy: jmperez/passport-spotify
- OmniAuth strategy for Spotify Web API (Ruby): icoretech/omniauth-spotify
- OAuth.io for a serverless OAuth solution