MusicGraph API Documentation

Playlisting API

API calls for getting data about albums.

The base URL path for playlist queries is: http://api.v2.musicgraph.com/api/v2/playlist/

Playlist Endpoints

Resource URL Description
/playlist Return a playlist based on seed and optional tuning parameters

Artist/Track Name and ID Lookup

The API provides auto-complete suggestions — or, "predictions" – for artist and track names. Auto-complete minimizes the number of false positives for artist searches. You can search a list of suggested artists/tracks using a prefix; returning a list of potential matches based upon a query string.

Example for Artist:

Example for Track:

Playlist Search

You can perform playlist search operations using the parameters and filters detailed below.

Parameter Required Description Example
api_key yes The developer API key api_key=c8303e90962e3a5ebd5a1f260a69b138
limit no By default, the API will return 20 results. Use the limit query string parameter to return a custom number of results (max 100). &limit=40
offset no Use the offset query parameter to perform pagination on the results set. &offset=10
artist_ids no artist id's comma separated ex. e3109b71-a6b5-11e0-b446-00251188dd67
track_ids no track id's comma separated ex. f05e067b-a6c0-11e0-b446-00251188dd67
genres no 1 (max) genre value ex. rock (see Dictionary for list)
decades no 1 (max) decade value xx. 1990s (see Dictionary for list)

Notes:
1) Combinations (e.g. mixed seed types) are only applicable to genres and decades - max 1 each

Tuning and Filter Options.

Parameter Required Description Example
dmca no By default, DMCA is set to true &dmca=false
popularity no Track Popularity. By default, set to "any". Values range between 1-10 (Low to High) &popularity=5
similarity no Artist Similarity. By default, set to "any". Values range between 1-10 (Low to High) &similarity=5
tempo no Track Tempo. By default, set to "any". Values are slow, moderate, fast &tempo=slow
year no By default, set to retro,2014. Must pass a to,from date values. &year=2000,2014

Examples:

You can search for a playlist by Adele.

http://api.musicgraph.com/api/v2/playlist?api_key=c8303e90962e3a5ebd5a1f260a69b138&artist_ids=ee2564c7-a6b5-11e0-b446-00251188dd67

For multiple artists, you can search for a playlist by Adele & Amy Winehouse.

http://api.musicgraph.com/api/v2/playlist?api_key=c8303e90962e3a5ebd5a1f260a69b138&artist_ids=ee2564c7-a6b5-11e0-b446-00251188dd67,5489940a-7330-4173-20e5-f1492b3a490b

You can search for a playlist by Lynyrd Skynyrd's Sweet Home Alabama.

http://api.musicgraph.com/api/v2/playlist?api_key=c8303e90962e3a5ebd5a1f260a69b138&track_ids=95d46167-20d3-1612-7960-d54f15c7961c

For multiple tracks, create a playlist from Adel's "Rolling in the Deep" and Duffy's "Mercy"

http://api.musicgraph.com/api/v2/playlist?api_key=c8303e90962e3a5ebd5a1f260a69b138&track_ids=f05e067b-a6c0-11e0-b446-00251188dd67,4c77fa32-50b5-9f28-6c36-0db589ff6242

For a genre based playlist

http://api.musicgraph.com/api/v2/playlist?api_key=c8303e90962e3a5ebd5a1f260a69b138&genres=rock

For a decade based playlist

http://api.musicgraph.com/api/v2/playlist?api_key=c8303e90962e3a5ebd5a1f260a69b138&decades=1970s

In the case of combinations, select from genre and decade

http://api.musicgraph.com/api/v2/playlist?api_key=c8303e90962e3a5ebd5a1f260a69b138&genres=blues&decades=1960s

You can pass multiple tuning parameters such as popularity and similarity

http://api.musicgraph.com/api/v2/playlist?api_key=c8303e90962e3a5ebd5a1f260a69b138&artist_ids=ee2564c7-a6b5-11e0-b446-00251188dd67&popularity=8&similarity=5

Use the `limit` query string parameter to return a custom number of results (max 100).

http://api.musicgraph.com/api/v2/playlist?api_key=c8303e90962e3a5ebd5a1f260a69b138&artist_ids=ee2564c7-a6b5-11e0-b446-00251188dd67&limit=40

 

Try it out!