MusicGraph API Documentation

Artists API

API calls for getting data about artists.

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

Artist Endpoints

Resource URL Description
/search Returns results based on search operations; described in more detail below
/suggest Returns a list of artists based on a partial name passed, begins with
/{id} Return meta about an artist
/{id}/albums Returns a list of an artist's albums
/{id}/tracks Returns a list of an artist's tracks
/{id}/similar Returns a list of similar artists

Artist IDs can be obtained by performing text based artist searches, as outlined in the section below.

Artist Name and ID Lookup

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

Parameter Required Description Example
api_key yes The developer API key api_key=c8303e90962e3a5ebd5a1f260a69b138
prefix yes Contains &prefix=gree
genre no Use to filter the suggest results. Values here &genre=rock
decade no Use to filter the suggest results. Values here &decade=2000s
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=20
offset no Use the offset query parameter to perform pagination on the results set. &offset=10

Examples:

Artist Search

You can perform simple to complex search operations using the parameters detailed below.
Artist IDs are included in the response for each call.

Parameter Required Description Example
api_key yes The developer API key api_key=c8303e90962e3a5ebd5a1f260a69b138
name no Return artists who match the name; exact, case insensitive &name=John+Lennon
similar_to no Return artists who are similar to the given name; exact, case insensitive &similar_to=Pink+Floyd
decade no Return artists who were active during a given decade; case insensitive. Values here &decade=1990s
genre no Return artists filtered by genre; contains, case insensitive. Values here &genre=rock
gender no Return artists filtered by gender; contains, case insensitive. Values here &gender=female
country no Return artists filtered by country; contains, case insensitive. &country=america
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=20
offset no Use the offset query parameter to perform pagination on the results set. &offset=10

Examples:

You can search for artists who are similar to Pearl Jam.

You can search for female artists who are similar to Madonna.

You can search for artists from France that were active in the 1930s.

Let's find other rock male artists from the 1960's who are similar to Jimi Hendrix.

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

Artist Edges

Property Name Description
/{id} Return the metadata of the artist
/{id}/similar Return similar artists
/{id}/albums Return an artist's albums
/{id}/tracks Return an artist's tracks

Examples for the artist Adele:

Property Name Example
Metadata /api/v2/artist/ee2564c7-a6b5-11e0-b446-00251188dd67
Similar /api/v2/artist/ee2564c7-a6b5-11e0-b446-00251188dd67/similar
Albums /api/v2/artist/ee2564c7-a6b5-11e0-b446-00251188dd67/albums
Tracks /api/v2/artist/ee2564c7-a6b5-11e0-b446-00251188dd67/tracks

Choosing Fields:

By default, all the fields are returned when you make a query. You can choose the fields you want returned with the "fields" query parameter. This is really useful for making your API calls more efficient and fast.

Try it out!