Build a Music Discovery API

Build a Music Discovery API

By Dan Zeitman

In this Step-By-Step Guide we'll show you how to build an API wrapper for multiple web services in order to create a music discovery service backend.

We're going to build a series of api endpoints that will be hosted on Auth0's Webtask. The design pattern is based off Express so it will be familiar to many.

Let's get started:

Setting Up Cloudinary

The first thing you’re going to have to do is set up a Cloudinary account.

So, go ahead and pop on over to the signup pagearrow-up-right.

Screenshot of the signup page

Once you’ve filled out the form (don’t forget to customize your cloud name, if you’re so inclined!) and clicked through a little customer survey, you’re all set. Feel free to click around and check out your new account – there’s a lot of interesting stuff here to see. Today, however, we’re going to be using almost none of it.

Setting Auth0 / Webtask

Signup for Auth0's Webtask servicearrow-up-right

Once you've logged in create an empty task and run it to get familiar with the platform and editor.

Create a new task called:

sxsw-music-discovery-service

Copy the source code of our Music Discovery Service APIarrow-up-right

You will want to store your api and access keys in the context.secrets

Add the NPM Modules

Test The service:

https://(your-cloud-url)/music-discovery-service/(api-end-point)/(paramsarrow-up-right)

APIS:

Browse

/browse/(letter)

Returns artists id.

/search/(name)

Returns Artist Info:

Releases

/releases/(artistid)

Returns releases by that Artist.

tracks

/tracks/(released)

Returns all the tracks for that release:

Lyrics

/lyrics/(ssrc)

Returns lyrics and a NLP reduced keyword list

Last updated