Artists

This section of the API handles retrieval of artist data. All requests must be authenticated as covered in the introduction.

smp.artists.get

This method is used to get a specific artist based on a unique ID. The following URL will get the artist with the ID 285.

http://playlists.net/api/v2?method=smp.artists.get&id=285

It will return an array of results similar to the following.

{
    "status":"ok",
    "artist":{
        "id":"285",
        "image":"https:\/\/s3.amazonaws.com\/smpv2-artists-image-large\/285.jpg",
        "image_l":"https:\/\/s3.amazonaws.com\/smpv2-artists-image-large\/285.jpg",
        "image_m":"https:\/\/s3.amazonaws.com\/smpv2-artists-image-medium\/285.jpg",
        "image_s":"https:\/\/s3.amazonaws.com\/smpv2-artists-image-small\/285.jpg",
        "name":"Eminem",
        "summary":"Marshall Bruce Mathers III (born October 17, 1972),  better known by his stage name Eminem\/Slim Shady is an American rapper and record producer. Eminem learned his trade while growing up in Detroit, United States, and quickly gained popularity in 1999 with his major-label album, The Slim Shady LP, which won a Grammy Award for Best Rap Album. The following album, The Marshall Mathers LP, became the fastest-selling solo album in the United States history. The Marshall Mathers LP and his third album, The Eminem Show, also won Grammy Awards, making Eminem the first artist to win Best Rap Album for three consecutive LPs.",
        "summary_formatted":"Marshall Bruce Mathers III (born October 17, 1972),  better known by his stage name Eminem\/Slim Shady is an American rapper and record producer. Eminem learned his trade while growing up in Detroit, United States, and quickly gained popularity in 1999 with his major-label album, The Slim Shady LP, which won a Grammy Award for Best Rap Album. The following album, The Marshall Mathers LP, became the fastest-selling solo album in the United States history. The Marshall Mathers LP and his third album, The Eminem Show, also won Grammy Awards, making Eminem the first artist to win Best Rap Album for three consecutive LPs.",
        "spotify_uri":"spotify:artist:7dGJo4pcD2V6oG8kP0tJRR",
        "uri":"http:\/\/playlists.net\/artists\/Eminem"
    }
}

PHP SDK

require_once "ShareMyPlaylists.php";

$public = "{your_public_key}";
$private = "{your_private_key}";

$smp = new ShareMyPlaylists_Api($public, $private);

$parameters = array(
  "id" => 285
);

$get_artist = $smp->api("artists.get", $parameters);

$artist = $get_artist["artist"];

if( !empty($artist) )
{
  print "<a class=\"image\" href=\"\"><img src=\"".$artist["image_l"]."\" /></a>";
}

smp.artists.getList

The following URL will get the 15 artists, ordered A-Z.

http://playlists.net/api/v2?method=smp.artists.getList&page=1&per_page=2

It will return an array of results similar to the following.

{
    "status":"ok",
    "artists":[
        {
            "id":"1255",
            "image":"https:\/\/s3.amazonaws.com\/smpv2-artists-image-large\/1255.jpg",
            "image_l":"https:\/\/s3.amazonaws.com\/smpv2-artists-image-large\/1255.jpg",
            "image_m":"https:\/\/s3.amazonaws.com\/smpv2-artists-image-medium\/1255.jpg",
            "image_s":"https:\/\/s3.amazonaws.com\/smpv2-artists-image-small\/1255.jpg",
            "name":"\"Weird Al\" Yankovic",
            "summary":"Alfred Matthew \"Weird Al\" Yankovic (born October 23, 1959 in Downey, California) is an American singer-songwriter, music producer, actor, comedian, satirist, accordian player and kazooist. Yankovic is known in particular for his humorous songs that make light of popular culture and that often parody specific songs by contemporary musical acts. Since his first-aired song parody in 1976, he has sold more than 12 million albums--more than any other comedy act in history--recorded more than 150 parody and original songs, and has performed more than 1,000 live shows.His works have earned him three Grammy Awards among nine nominations, four gold records, and six platinum records in the United States. Yankovic's first top ten Billboard album (Straight Outta Lynwood) and single (\"White & Nerdy\") were both released in 2006, nearly three decades into his career.",
            "summary_formatted":"Alfred Matthew \"Weird Al\" Yankovic (born October 23, 1959 in Downey, California) is an American singer-songwriter, music producer, actor, comedian, satirist, accordian player and kazooist. Yankovic is known in particular for his humorous songs that make light of popular culture and that often parody specific songs by contemporary musical acts. Since his first-aired song parody in 1976, he has sold more than 12 million albums--more than any other comedy act in history--recorded more than 150 parody and original songs, and has performed more than 1,000 live shows.His works have earned him three Grammy Awards among nine nominations, four gold records, and six platinum records in the United States. Yankovic's first top ten Billboard album (Straight Outta Lynwood) and single (\"White & Nerdy\") were both released in 2006, nearly three decades into his career.",
            "spotify_uri":"spotify:artist:1bDWGdIC2hardyt55nlQgG",
            "uri":"http:\/\/playlists.net\/artists\/\"Weird Al\" Yankovic"
        } ,
        {
            "id":"12799",
            "image":"https:\/\/s3.amazonaws.com\/smpv2-artists-image-large\/12799.jpg",
            "image_l":"https:\/\/s3.amazonaws.com\/smpv2-artists-image-large\/12799.jpg",
            "image_m":"https:\/\/s3.amazonaws.com\/smpv2-artists-image-medium\/12799.jpg",
            "image_s":"https:\/\/s3.amazonaws.com\/smpv2-artists-image-small\/12799.jpg",
            "name":"'Til Tuesday",
            "summary":"After The break up of The Young Snakes, 'Til Tuesday,an American new wave band, was formed in Boston in 1982. Its original lineup was bassist\/vocalist Aimee Mann, guitarist\/vocalist Robert Holmes, keyboardist Joey Pesce, and drummer Michael Hausman. The group first gained fame six months after its formation when it won radio station WBCN's battle of the bands competition in 1983. Their original composition \"Love In A Vacuum\" (credited to all members of the group) received a fair amount of airplay on the station, and the group was eventually signed to Epic Records.",
            "summary_formatted":"After The break up of The Young Snakes, 'Til Tuesday,an American new wave band, was formed in Boston in 1982. Its original lineup was bassist\/vocalist Aimee Mann, guitarist\/vocalist Robert Holmes, keyboardist Joey Pesce, and drummer Michael Hausman. The group first gained fame six months after its formation when it won radio station WBCN's battle of the bands competition in 1983. Their original composition \"Love In A Vacuum\" (credited to all members of the group) received a fair amount of airplay on the station, and the group was eventually signed to Epic Records.",
            "spotify_uri":"spotify:artist:1L0y9srZMyh9XUnYGv37IP",
            "uri":"http:\/\/playlists.net\/artists\/'Til Tuesday"
        }
    ],
    "page":1,
    "per_page":"2",
    "total_records":11473
}

PHP SDK

require_once "ShareMyPlaylists.php";

$public = "{your_public_key}";
$private = "{your_private_key}";

$smp = new ShareMyPlaylists_Api($public, $private);

$parameters = array(
  "page" => 1,
  "per_page" => 2
);

$get_list = $smp->api("artists.getList", $parameters);

$artists = $get_list["artists"];

foreach( $artists as $artist )
{
  print "<a class=\"image\" href=\"\"><img src=\"".$artist["image_l"]."\" /></a><br />";
}

smp.artists.getPlaylists

This method is used to get a list of playlists based on the ID, of the artist, provided. Assuming ID 285 was supplied an array of playlists containing tracks by Eminem are returned, ordered by their popularity.

http://playlists.net/api/v2?method=smp.artists.getPlaylists&id=285&page=1&per_page=2

It will return an array of results similar to the following.

{
    "status":"ok",
    "playlists":[
        {
            "id":"31543",
            "title":"the ultimate blues by H",
            "playcount":"13",
            "created":"2010-10-27 20:32:58",
            "created_formatted":"27\/10\/2010",
            "uri":"http:\/\/playlists.net\/theultimatebluesbyh",
            "description":"a comprehensive colection of blues classics and modern music",
            "description_featured":"",
            "playlist_uri":"spotify:user:lhadass:playlist:1xaiF63WN8HG4Y2vaLs3EF",
            "slug":"theultimatebluesbyh",
            "total_tracks":"783",
            "duration":"186741",
            "duration_formatted":"3 days, 14 hours",
            "image":"https:\/\/s3.amazonaws.com\/smpv2-genres-artwork_image-large\/2.png",
            "image_l":"https:\/\/s3.amazonaws.com\/smpv2-genres-artwork_image-large\/2.png",
            "image_m":"https:\/\/s3.amazonaws.com\/smpv2-genres-artwork_image-medium\/2.png",
            "image_s":"https:\/\/s3.amazonaws.com\/smpv2-genres-artwork_image-small\/2.png"
        },
        {
            "id":"46762",
            "title":"The best playlist evarr",
            "playcount":"18",
            "created":"2010-12-21 23:20:44",
            "created_formatted":"21\/12\/2010",
            "uri":"http:\/\/playlists.net\/thebestplaylistevarr",
            "description":"It's good. Lol.",
            "description_featured":"",
            "playlist_uri":"spotify:user:george09:playlist:5dfGRic0scITj9ST1E2JSx",
            "slug":"thebestplaylistevarr",
            "total_tracks":"848",
            "duration":"208449",
            "duration_formatted":"4 days, 30 minutes",
            "image":"https:\/\/s3.amazonaws.com\/smpv2-playlists-image-large\/46762.jpg",
            "image_l":"https:\/\/s3.amazonaws.com\/smpv2-playlists-image-large\/46762.jpg",
            "image_m":"https:\/\/s3.amazonaws.com\/smpv2-playlists-image-medium\/46762.jpg",
            "image_s":"https:\/\/s3.amazonaws.com\/smpv2-playlists-image-small\/46762.jpg"
        }
    ],
    "page":1,
    "per_page":"2",
    "total_records":150
}

PHP SDK

require_once "ShareMyPlaylists.php";

$public = "{your_public_key}";
$private = "{your_private_key}";

$smp = new ShareMyPlaylists_Api($public, $private);

$parameters = array(
  "id" => 285,
  "per_page" => 1
);

$get_playlists = $smp->api("artists.getPlaylists", $parameters);

$playlists = $get_list["playlists"];

foreach( $playlists as $playlist )
{
  print "<a class=\"image\" href=\"\"><img src=\"".$playlist["image_l"]."\" /></a><br />";
}

smp.artists.getAlbums

This method is used to get a list of albums based on the ID, of the artist, provided. Assuming ID 285 was supplied an array of albums & singles by that artist would be returned ordered by it's release date.

http://playlists.net/api/v2?method=smp.artists.getAlbums&id=285&page=1&per_page=1

It will return an array of results similar to the following.

{
    "status":"ok",
    "albums":[
        {
            "id":"244180",
            "uri":"http:\/\/playlists.net\/artists\/Eminem\/album\/When+Im+Gone+%28Efidium+Extended+Mix%29+-+Single-244180",
            "image":"https:\/\/s3.amazonaws.com\/smpv2-albums-image-large\/244180.jpg",
            "image_l":"https:\/\/s3.amazonaws.com\/smpv2-albums-image-large\/244180.jpg",
            "image_m":"https:\/\/s3.amazonaws.com\/smpv2-albums-image-medium\/244180.jpg",
            "image_s":"https:\/\/s3.amazonaws.com\/smpv2-albums-image-small\/244180.jpg",
            "name":"When Im Gone (Efidium Extended Mix) - Single",
            "spotify_uri":"spotify:album:1JGN8gDifklGLyHubQFN2m",
            "artist":{
                "id":"285",
                "image":"https:\/\/s3.amazonaws.com\/smpv2-artists-image-large\/285.jpg",
                "image_l":"https:\/\/s3.amazonaws.com\/smpv2-artists-image-large\/285.jpg",
                "image_m":"https:\/\/s3.amazonaws.com\/smpv2-artists-image-medium\/285.jpg",
                "image_s":"https:\/\/s3.amazonaws.com\/smpv2-artists-image-small\/285.jpg",
                "name":"Eminem",
                "summary":"Marshall Bruce Mathers III (born October 17, 1972),  better known by his stage name Eminem\/Slim Shady is an American rapper and record producer. Eminem learned his trade while growing up in Detroit, United States, and quickly gained popularity in 1999 with his major-label album, The Slim Shady LP, which won a Grammy Award for Best Rap Album. The following album, The Marshall Mathers LP, became the fastest-selling solo album in the United States history. The Marshall Mathers LP and his third album, The Eminem Show, also won Grammy Awards, making Eminem the first artist to win Best Rap Album for three consecutive LPs.",
                "summary_formatted":"Marshall Bruce Mathers III (born October 17, 1972),  better known by his stage name Eminem\/Slim Shady is an American rapper and record producer. Eminem learned his trade while growing up in Detroit, United States, and quickly gained popularity in 1999 with his major-label album, The Slim Shady LP, which won a Grammy Award for Best Rap Album. The following album, The Marshall Mathers LP, became the fastest-selling solo album in the United States history. The Marshall Mathers LP and his third album, The Eminem Show, also won Grammy Awards, making Eminem the first artist to win Best Rap Album for three consecutive LPs.",
                "spotify_uri":"spotify:artist:7dGJo4pcD2V6oG8kP0tJRR",
                "uri":"http:\/\/playlists.net\/artists\/Eminem"
            }
        }
  ],
    "page":1,
    "per_page":"1",
    "total_records":36
}

PHP SDK

require_once "ShareMyPlaylists.php";

$public = "{your_public_key}";
$private = "{your_private_key}";

$smp = new ShareMyPlaylists_Api($public, $private);

$parameters = array(
  "id" => 285,
  "per_page" => 1
);

$get_albums = $smp->api("artists.getAlbums", $parameters);

$albums = $get_albums["albums"];

foreach( $albums as $album )
{
  print "<a class=\"image\" href=\"\"><img src=\"".$album["image_l"]."\" /></a><br />";
}

smp.artists.getChart

This method gets the last week's top 50 most listened to artists on Playlists.net.

http://playlists.net/api/v2?method=smp.artists.getChart

It will return an array of results similar to the following.

{
    "status":"ok",
    "artists":[
        {
            "id":"1255",
            "image":"https:\/\/s3.amazonaws.com\/smpv2-artists-image-large\/1255.jpg",
            "image_l":"https:\/\/s3.amazonaws.com\/smpv2-artists-image-large\/1255.jpg",
            "image_m":"https:\/\/s3.amazonaws.com\/smpv2-artists-image-medium\/1255.jpg",
            "image_s":"https:\/\/s3.amazonaws.com\/smpv2-artists-image-small\/1255.jpg",
            "name":"\"Weird Al\" Yankovic",
            "summary":"Alfred Matthew \"Weird Al\" Yankovic (born October 23, 1959 in Downey, California) is an American singer-songwriter, music producer, actor, comedian, satirist, accordian player and kazooist. Yankovic is known in particular for his humorous songs that make light of popular culture and that often parody specific songs by contemporary musical acts. Since his first-aired song parody in 1976, he has sold more than 12 million albums--more than any other comedy act in history--recorded more than 150 parody and original songs, and has performed more than 1,000 live shows.His works have earned him three Grammy Awards among nine nominations, four gold records, and six platinum records in the United States. Yankovic's first top ten Billboard album (Straight Outta Lynwood) and single (\"White & Nerdy\") were both released in 2006, nearly three decades into his career.",
            "summary_formatted":"Alfred Matthew \"Weird Al\" Yankovic (born October 23, 1959 in Downey, California) is an American singer-songwriter, music producer, actor, comedian, satirist, accordian player and kazooist. Yankovic is known in particular for his humorous songs that make light of popular culture and that often parody specific songs by contemporary musical acts. Since his first-aired song parody in 1976, he has sold more than 12 million albums--more than any other comedy act in history--recorded more than 150 parody and original songs, and has performed more than 1,000 live shows.His works have earned him three Grammy Awards among nine nominations, four gold records, and six platinum records in the United States. Yankovic's first top ten Billboard album (Straight Outta Lynwood) and single (\"White & Nerdy\") were both released in 2006, nearly three decades into his career.",
            "spotify_uri":"spotify:artist:1bDWGdIC2hardyt55nlQgG",
            "uri":"http:\/\/playlists.net\/artists\/\"Weird Al\" Yankovic"
        } ,
        {
            "id":"12799",
            "image":"https:\/\/s3.amazonaws.com\/smpv2-artists-image-large\/12799.jpg",
            "image_l":"https:\/\/s3.amazonaws.com\/smpv2-artists-image-large\/12799.jpg",
            "image_m":"https:\/\/s3.amazonaws.com\/smpv2-artists-image-medium\/12799.jpg",
            "image_s":"https:\/\/s3.amazonaws.com\/smpv2-artists-image-small\/12799.jpg",
            "name":"'Til Tuesday",
            "summary":"After The break up of The Young Snakes, 'Til Tuesday,an American new wave band, was formed in Boston in 1982. Its original lineup was bassist\/vocalist Aimee Mann, guitarist\/vocalist Robert Holmes, keyboardist Joey Pesce, and drummer Michael Hausman. The group first gained fame six months after its formation when it won radio station WBCN's battle of the bands competition in 1983. Their original composition \"Love In A Vacuum\" (credited to all members of the group) received a fair amount of airplay on the station, and the group was eventually signed to Epic Records.",
            "summary_formatted":"After The break up of The Young Snakes, 'Til Tuesday,an American new wave band, was formed in Boston in 1982. Its original lineup was bassist\/vocalist Aimee Mann, guitarist\/vocalist Robert Holmes, keyboardist Joey Pesce, and drummer Michael Hausman. The group first gained fame six months after its formation when it won radio station WBCN's battle of the bands competition in 1983. Their original composition \"Love In A Vacuum\" (credited to all members of the group) received a fair amount of airplay on the station, and the group was eventually signed to Epic Records.",
            "spotify_uri":"spotify:artist:1L0y9srZMyh9XUnYGv37IP",
            "uri":"http:\/\/playlists.net\/artists\/'Til Tuesday"
        }
    ],
    "page":1,
    "per_page":"2",
    "total_records":11473
}

PHP SDK

require_once "ShareMyPlaylists.php";

$public = "{your_public_key}";
$private = "{your_private_key}";

$smp = new ShareMyPlaylists_Api($public, $private);

$parameters = array();

$get_list = $smp->api("artists.getChart", $parameters);

$artists = $get_list["artists"];

foreach( $artists as $artist )
{
  print "<a class=\"image\" href=\"\"><img src=\"".$artist["image_l"]."\" /></a><br />";
}