Data/music-api/v1.1/song/info

Jump to: navigation, search

Song/Info

Returns basic information about a song plus customized requests for all of the other Song content that is available. These customized requests are designed to make your programming easy and efficient: in a single step you both verify availability of data and capture the request. You just append the signature parameter and execute the request.

The song/info request also provides an optional argument to include responses from any or all of the other Song requests. This may return a large amount of data. To speed data transmission, do the following:

  • Request only data that you need to immediately display.
  • Request a compressed response by including Accept-Encoding: gzip,deflate in the HTTP header.

Note: For information about classical music performances, use Performance/Info instead. Rovi Music identifies classical music performances with performance IDs.

Syntax

song/info? track=track
isrcid=isrcid
muzeid=muzeid
trackid=trackid
amgpoptrackid=amgpoptrackid
amgclassicaltrackid=amgclassicaltrackid
&apikey=apikey&sig=sig [&include=include] [&format=format] [&country=country] [&language=language] [&artist=artist] [&priority=priority]

Request Example 1

Request basic information about Just Dance using the track ID.

Request Example 2

Also request information about appearances.

Request Example 3

Request information using the ISRC code.

Request Example 4

Request information about the Beatles song Yesterday as recorded by Frank Sinatra.

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.

amgclassicaltrackid Conditional All Media Guide (AMG) ID for a track on a classical music album, consisting of a ten-character string that starts with Y and is followed by 9 digits with leading spaces. AMG is a legacy database of entertainment information. When using an AMG Classical ID in a request, replace any spaces in the ID with plus (+) or percent20 (%20) symbols.

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

  • track
  • isrcid
  • muzeid    
  • trackid
  • amgpoptrackid
  • amgclassicaltrackid
amgpoptrackid Conditional All Media Guide (AMG) ID for a track on a popular music album, consisting of a ten-character string that starts with T and is followed by 9 digits with leading spaces. AMG is a legacy database of entertainment information. When using an AMG Pop ID in a request, replace any spaces in the ID with plus (+) or percent20 (%20) symbols.

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

  • track
  • isrcid
  • muzeid    
  • trackid
  • amgpoptrackid
  • amgclassicaltrackid
isrcid Conditional International Standard Recording Code (ISRC) for a song recording. Note: Because some recordings have the same ISRC code as another recording or have multiple ISRC codes, you need to verify results of requests that use ISRC codes that come from outside of Rovi Cloud Services. The song you want may be available under a different ISRC code.

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

  • track
  • isrcid
  • muzeid    
  • trackid
  • amgpoptrackid
  • amgclassicaltrackid
muzeid Conditional Legacy ID from the Muze database.

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

  • track
  • isrcid
  • muzeid    
  • trackid
  • amgpoptrackid
  • amgclassicaltrackid
track Conditional Keywords from the song title. This searches for the most popular title with that combination of words. To prioritize the search on title match instead of popularity, specify the priority parameter. To specify the artist or group that recorded the song, use the artist parameter. Replace spaces in parameter values with plus (+) or percent20 (%20) symbols.

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

  • track
  • isrcid
  • muzeid    
  • trackid
  • amgpoptrackid
  • amgclassicaltrackid
trackid Conditional Rovi Music ID for a popular song, consisting of the prefix MT followed by a ten-digit number. For example: MT0009472348. Your application can grab track IDs from responses to the following requests:

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

  • track
  • isrcid
  • muzeid    
  • trackid
  • amgpoptrackid
  • amgclassicaltrackid
artist No If you use the track parameter to specify a song title, artist specifies the name of the artist or group that performed the song.
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.
include No Other Song requests to include in the request. To include album appearances in the response, for example, add include=appearances.

You can specify multiple includes in either of the following ways:

  • In multiple arguments, like this: include=review&include=sample.
  • In a single argument as a comma-separated list, like this: include=review,sample.

You can also include all Song requests with include=all. The possible values are:

  • All
All of the data available.
Albums and videos the song appears on.
The most recent review of the song.
URL to an audio sample.

For information about a request, please see the documentation for the request.

Reminder: These options may return a large amount of data. To speed data transmission, do the following:

  • Request only data that you need to immediately display.
  • Request a compressed response by including Accept-Encoding: gzip,deflate in the HTTP header.
language No Language of the response data. This request supports only en (English).
priority No If you use the track parameter to specify a song title, priority=bestnamematch overrides the priority of popularity to focus on the best title match.

If you use both track and artist parameters to specify a song title, priority=original looks for the earliest release of the title.

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.
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.

Response for Song/Info

ResponseTypeDescription
appearances SongAppearance [ ] Albums and videos the song appears on, returned only if the request specified an include=appearances argument.
appearancesUri string The customized Song/Appearances request, returned only if the data is available.
attributes SongAttribute An audio analysis of the song, a response soon to be available to customers at an advanced subscription level.
attributesUri string A customized request for an audio analysis of the song, a response soon to be available to customers at an advanced subscription level.
genres Genre [ ] Musical genres the song falls into, along with a weighting that reflects the relative importance of each genre.

Genres are sorted in order of importance (highest to lowest weight) and, within the same weight, alphabetically by genre name.

ids ids All of the IDs that are recognized by the API for a song. The possible IDs are:
  • isrcId
  • trackId
  • muzeId
  • amgPopTrackId
  • amgClassicalTrackId
isPick Boolean Whether the song is recommended by Rovi: true or false.
primaryArtists AlbumArtist [ ] Names of the primary artists on the song, listed alphabetically by last name.
review Review The most recent review of the song, returned only if the request specified an include=review argument.
reviewUri string The customized Song/Review request, returned only if the data is available.
sample string URL to an audio sample, returned only if requested by an include argument. Song samples are 30-second MP3 clips encoded in stereo at 96 kbit/s. File size is approximately 357 kB.

Note: Access to music samples through the API is governed by your subscription level.

sampleUri string The customized Song/Sample request, returned only if a sample is available.
title string Title of the song.

JSON Response Example

Here's the response to Request Example 1, which asks for basic information about Just Dance using the track ID. 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/song/info?apikey=apikey&sig=sig&trackid=MT0009995109.
{
  "status":"ok",
  "code":200,
  "messages":null,
  "build":"1.5.1.9",
  "parameters":{
    "apiKey":"apikey",
    "id":"MT0009995109"
  },
  "serverName":"tul1cssw3",
  "startTime":"2011-04-28T17:08:42.0523257Z",
  "endTime":"2011-04-28T17:08:42.0523257Z",
  "duration":0,
  "song":{
    "ids":{
      "amgClassicalTrackId":null,
      "amgPopTrackId":"T 16139376",
      "isrcId":"USUM70807646",
      "muzeId":"17151455",
      "trackId":"MT0009995109"
    },
    "title":"Just Dance",
    "primaryArtists":[
      {
        "id":"MN0000994823",
        "name":"Lady Gaga"
      },
      {
        "id":"MN0000106145",
        "name":"Colby O'Donis"
      }
    ],
    "isPick":true,
    "genres":[
      {
        "id":"MA0000002613",
        "name":"Pop/Rock",
        "weight":7
      },
      {
        "id":"MA0000002809",
        "name":"R&B",
        "weight":7
      }
    ],
    "attributes":null,
    "attributesUri":null,
    "appearances":null,
    "appearancesUri":"http://api.rovicorp.com/data/v1.1/song/appearances?format=json&apikey=apikey&trackId=MT0009995109",
    "review":null,
    "reviewUri":null,
    "sample":null,
    "sampleUri":"http://api.rovicorp.com/data/v1.1/song/sample?format=json&apikey=apikey&trackId=MT0009995109"
  }
}

XML Response Example

Here's an XML response to Request Example 1, which asks for basic information about Just Dance.
Requested with http://api.rovicorp.com/data/v1.1/song/info?apikey=apikey&sig=sig&trackid=MT0009995109&
format=xml
.
<SongDetail 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>apikey</apiKey>
    <id>MT0009995109</id>
    <format>xml</format>
  </parameters>
  <serverName>tul1cssw2</serverName>
  <startTime>2011-04-28T17:09:07.0241603Z</startTime>
  <endTime>2011-04-28T17:09:07.0241603Z</endTime>
  <duration>0</duration>
  <song>
    <ids>
      <amgClassicalTrackId i:nil="true"/>
      <amgPopTrackId>T 16139376</amgPopTrackId>
      <isrcId>USUM70807646</isrcId>
      <muzeId>17151455</muzeId>
      <trackId>MT0009995109</trackId>
    </ids>
    <title>Just Dance</title>
    <primaryArtists>
      <AlbumArtist>
        <id>MN0000994823</id>
        <name>Lady Gaga</name>
      </AlbumArtist>
      <AlbumArtist>
        <id>MN0000106145</id>
        <name>Colby O&apos;Donis</name>
      </AlbumArtist>
    </primaryArtists>
    <isPick>true</isPick>
    <genres>
      <Genre>
        <id>MA0000002613</id>
        <name>Pop/Rock</name>
        <weight>7</weight>
      </Genre>
      <Genre>
        <id>MA0000002809</id>
        <name>R&B</name>
        <weight>7</weight>
      </Genre>
    </genres>
    <attributes i:nil="true"/>
    <attributesUri i:nil="true"/>
    <appearances i:nil="true"/>
    <appearancesUri>http://api.rovicorp.com/data/v1.1/song/appearances?format=xml&apikey=apikey&trackId=MT0009995109</appearancesUri>
    <review i:nil="true"/>
    <reviewUri i:nil="true"/>
    <sample i:nil="true"/>
    <sampleUri>http://api.rovicorp.com/data/v1.1/song/sample?format=xml&apikey=apikey&trackId=MT0009995109</sampleUri>
  </song>
</SongDetail>


See Also

↑ Top

 
 
Personal tools