Data/music-api/v1.1/album/similar

Jump to: navigation, search

Album/Similar

Returns a list of albums that are similar to an album named in the request as chosen by comparing moods, styles, themes, and type of album.

Notice: This request is deprecated and will be removed from the API on a date to be announced. Please use the Recommendations Similar request instead.

Syntax

album/similar? album=album
albumid=albumid
amgpopid=amgpopid
amgclassicalid=amgclassicalid
&apikey=apikey&sig=sig [&format=format] [&offset=offset] [&count=count] [&country=country] [&language=language]

Request Example 1

Request albums similar to The Doors.

Request Example 2

Request the first album in the list.

Request Example 3

Request the second album.

Request Parameters

Sort none.gif  Click to re-sort

Parameter Required Description
apikey Yes Access code that authorizes your request for data from Rovi.
sig Yes A calculated, 32-hex-digit authorization code. To perform the calculation, execute the MD5 function on the concatenation of the following three ASCII strings:
  • Your API key.
  • The secret key you received with your API key.
  • The Unix time. Unix time is a timestamp supported in most development environments, and is generally defined as the number of seconds since January 1, 1970 00:00:00 GMT.

Express the alpha hex digits as lower case.

Perform the calculation at the time of each request to be sure it's within a five-minute window of the server time. If you're testing the call in a browser, use our online signature generator to perform the calculation.

album Conditional Keywords from the album title. This searches for the most popular title with that combination of words. Replace spaces with plus (+) or percent20 (%20) symbols.

Condition: The request must contain just one of these parameters:

  • album
  • albumid
  • amgpopid
  • amgclassicalid
albumid Conditional Rovi Music ID for an album, consisting of the prefix MW followed by a ten-digit number. For example: MW0000056882. You can grab album IDs from responses to the following requests:

Condition: The request must contain just one of these parameters:

  • album
  • albumid
  • amgpopid
  • amgclassicalid
amgclassicalid Conditional All Media Guide (AMG) ID for a classical music album, consisting of a ten-character string that starts with W and is followed by nine digits with leading spaces. For example: W   180317. When using an AMG Classical ID in a request, replace any spaces in the ID with plus (+) or percent20 (%20) symbols, like this: W+++180317. AMG is a legacy database of entertainment information.

Condition: The request must contain just one of these parameters:

  • album
  • albumid
  • amgpopid
  • amgclassicalid
amgpopid Conditional All Media Guide (AMG) ID for a popular music album, consisting of a ten-character string that starts with R and is followed by nine digits with leading spaces. For example: R  1805889. When using an AMG Pop ID in a request, replace any spaces in the ID with plus (+) or percent20 (%20) symbols, like this: R++1805889.

Condition: The request must contain just one of these parameters:

  • album
  • albumid
  • amgpopid
  • amgclassicalid
count No Number of items to be returned. The default is zero, which returns all items after the offset.
country No Country the language parameter applies to. The current release of the API supports only US.
format No Format of the returned data: json or xml. The default is JSON.
language No Language of the response data. This request supports only en (English).
offset No Number of items at the start of the available data to skip. The default is zero.

Use count and offset to paginate the data that is available to be returned.

Response

Response Header

ResponseTypeDescription
buildstringThe software release level of the API.
codeintegerHTTP status code. See the status field for the text part of the code.
durationintegerServer processing time in milliseconds. The difference between startTime and endTime.
endTimestringWhen the server sent the response (UTC time).
messagesMessage [ ]Elements of a multiple HTTP response status message.
parametersparametersThe parameters that were included in the request.
parentIdsparentIdsAll of the IDs for the requested object that are recognized by the API.
serverNamestringName of the server that processed the request.
startTimestringWhen the server received the request (UTC time).
statusstringText part of the HTTP status code, which is shown in the code field.
viewviewSummary of items returned in a list of items.

Response for Album/Similar

ResponseTypeDescription
similar AlbumSimilar [ ] Albums similar to the one specified in the request, sorted by ratings from highest to lowest:
  • First sort order: value of the isPick element in descending order (true before false).
  • Second sort order: value of the rating element in descending order.

JSON Response Example

Here's the response to Request Example 3, which asks for a second album that is similar to The Doors. The response is formatted with extra spaces and carriage returns to make it easy to read.
Requested with http://api.rovicorp.com/data/v1.1/album/similar?apikey=apikey&sig=sig&
albumid=MW0000650088&offset=1&count=1
.
{
  "status":"ok",
  "code":200,
  "messages":null,
  "build":"1.5.1.9",
  "parameters":{
    "apiKey":"4p1k3y",
    "id":"MW0000650088",
    "offset":1,
    "count":1,
    "format":"json"
  },
  "view":{
    "offset":1,
    "count":1,
    "total":26
  },
  "serverName":"tul1cssw3",
  "startTime":"2011-05-05T22:30:19.6716827Z",
  "endTime":"2011-05-05T22:30:19.6873111Z",
  "duration":15,
  "parentIds":{
    "albumId":"MW0000650088",
    "amgPopId":"R 6209"
  },
  "similar":[
    {
      "id":"MW0000022405",
      "title":"The Velvet Underground",
      "performers":[
        {
          "id":"MN0000840402",
          "name":"The Velvet Underground"
        }
      ],
      "genres":[
        {
          "id":"MA0000002613",
          "name":"Pop\/Rock",
          "weight":10
        }
      ],
      "styles":[
        {
          "id":"MA0000012230",
          "name":"Alternative\/Indie Rock",
          "weight":9
        },
        {
          "id":"MA0000002583",
          "name":"Experimental Rock",
          "weight":9
        },
        {
          "id":"MA0000005021",
          "name":"Proto-Punk",
          "weight":9
        },
        {
          "id":"MA0000002829",
          "name":"Rock & Roll",
          "weight":9
        },
        {
          "id":"MA0000004443",
          "name":"Contemporary Pop\/Rock",
          "weight":8
        },
        {
          "id":"MA0000002855",
          "name":"Singer\/Songwriter",
          "weight":8
        },
        {
          "id":"MA0000002593",
          "name":"Folk-Rock",
          "weight":6
        },
        {
          "id":"MA0000002800",
          "name":"Psychedelic\/Garage",
          "weight":6
        },
        {
          "id":"MA0000002422",
          "name":"Alternative Pop\/Rock",
          "weight":5
        }
      ],
      "origReleaseDate":"1969-??-??",
      "rating":9,
      "isPick":true,
      "hasReview":true,
      "images":[
        {
          "height":74,
          "width":75,
          "formatid":71,
          "url":"http:\/\/actual-url-concealed.jpg",
          "author":null,
          "copyrightOwner":null
        },
        {
          "height":168,
          "width":170,
          "formatid":63,
          "url":"http:\/\/actual-url-concealed.jpg",
          "author":null,
          "copyrightOwner":null
        },
        {
          "height":247,
          "width":250,
          "formatid":44,
          "url":"http:\/\/actual-url-concealed.jpg",
          "author":null,
          "copyrightOwner":null
        },
        {
          "height":396,
          "width":400,
          "formatid":64,
          "url":"http:\/\/actual-url-concealed.jpg",
          "author":null,
          "copyrightOwner":null
        },
        {
          "height":495,
          "width":500,
          "formatid":16,
          "url":"http:\/\/actual-url-concealed.jpg",
          "author":null,
          "copyrightOwner":null
        },
        {
          "height":1069,
          "width":1080,
          "formatid":62,
          "url":"http:\/\/actual-url-concealed.jpg",
          "author":null,
          "copyrightOwner":null
        }
      ]
    }
  ]
}

XML Response Example

Here's an XML response to Request Example 3, which asks for a second album that is similar to The Doors.
Requested with http://api.rovicorp.com/data/v1.1/album/similar?apikey=apikey&sig=sig&
albumid=MW0000650088&offset=1&count=1&format=xml
.
<AlbumSimilars xmlns="com.rovicorp.metadataservice" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <status>ok</status>
  <code>200</code>
  <messages i:nil="true"/>
  <build>1.5.1.9</build>
  <parameters>
    <apiKey>4p1k3y</apiKey>
    <id>MW0000650088</id>
    <offset>1</offset>
    <count>1</count>
    <format>xml</format>
  </parameters>
  <view>
    <offset>1</offset>
    <count>1</count>
    <total>26</total>
  </view>
  <serverName>tul1cssw4</serverName>
  <startTime>2011-05-05T22:43:53.9336692Z</startTime>
  <endTime>2011-05-05T22:43:53.9492943Z</endTime>
  <duration>15</duration>
  <parentIds>
    <albumId>MW0000650088</albumId>
    <amgPopId>R 6209</amgPopId>
  </parentIds>
  <similar>
    <AlbumSimilar>
      <id>MW0000022405</id>
      <title>The Velvet Underground</title>
      <performers>
        <AlbumArtist>
          <id>MN0000840402</id>
          <name>The Velvet Underground</name>
        </AlbumArtist>
      </performers>
      <genres>
        <Genre>
          <id>MA0000002613</id>
          <name>Pop/Rock</name>
          <weight>10</weight>
        </Genre>
      </genres>
      <styles>
        <Style>
          <id>MA0000012230</id>
          <name>Alternative/Indie Rock</name>
          <weight>9</weight>
        </Style>
        <Style>
          <id>MA0000002583</id>
          <name>Experimental Rock</name>
          <weight>9</weight>
        </Style>
        <Style>
          <id>MA0000005021</id>
          <name>Proto-Punk</name>
          <weight>9</weight>
        </Style>
        <Style>
          <id>MA0000002829</id>
          <name>Rock &amp; Roll</name>
          <weight>9</weight>
        </Style>
        <Style>
          <id>MA0000004443</id>
          <name>Contemporary Pop/Rock</name>
          <weight>8</weight>
        </Style>
        <Style>
          <id>MA0000002855</id>
          <name>Singer/Songwriter</name>
          <weight>8</weight>
        </Style>
        <Style>
          <id>MA0000002593</id>
          <name>Folk-Rock</name>
          <weight>6</weight>
        </Style>
        <Style>
          <id>MA0000002800</id>
          <name>Psychedelic/Garage</name>
          <weight>6</weight>
        </Style>
        <Style>
          <id>MA0000002422</id>
          <name>Alternative Pop/Rock</name>
          <weight>5</weight>
        </Style>
      </styles>
      <origReleaseDate>1969-??-??</origReleaseDate>
      <rating>9</rating>
      <isPick>true</isPick>
      <hasReview>true</hasReview>
      <images>
        <Image>
          <height>74</height>
          <width>75</width>
          <formatid>71</formatid>
          <url>http://actual-url-concealed.jpg</url>
          <author i:nil="true"/>
          <copyrightOwner i:nil="true"/>
        </Image>
        <Image>
          <height>168</height>
          <width>170</width>
          <formatid>63</formatid>
          <url>http://actual-url-concealed.jpg</url>
          <author i:nil="true"/>
          <copyrightOwner i:nil="true"/>
        </Image>
        <Image>
          <height>247</height>
          <width>250</width>
          <formatid>44</formatid>
          <url>http://actual-url-concealed.jpg</url>
          <author i:nil="true"/>
          <copyrightOwner i:nil="true"/>
        </Image>
        <Image>
          <height>396</height>
          <width>400</width>
          <formatid>64</formatid>
          <url>http://actual-url-concealed.jpg</url>
          <author i:nil="true"/>
          <copyrightOwner i:nil="true"/>
        </Image>
        <Image>
          <height>495</height>
          <width>500</width>
          <formatid>16</formatid>
          <url>http://actual-url-concealed.jpg</url>
          <author i:nil="true"/>
          <copyrightOwner i:nil="true"/>
        </Image>
        <Image>
          <height>1069</height>
          <width>1080</width>
          <formatid>62</formatid>
          <url>http://actual-url-concealed.jpg</url>
          <author i:nil="true"/>
          <copyrightOwner i:nil="true"/>
        </Image>
      </images>
    </AlbumSimilar>
  </similar>
</AlbumSimilars>


See Also

↑ Top

Personal tools