Rcs-eval-api/v2.1/item-vector

Jump to: navigation, search

ItemVector

This is one of several requests that demonstrates how Rovi can generate personalized entertainment recommendations for your customers. To understand this feature, we suggest working with these calls in this order:

This Request . . .       Demonstrates . . .

How an item taste profile gets added to a user taste profile.

What an item taste profile looks like.

What a user taste profile looks like.

How personalized recommendations are generated from a user taste profile.

ItemVector returns the taste profile of an item. A taste profile consists of normalized scores of Rovi entertainment categories, which are used to populate a user taste profile when a user performs an action on the item.

Note: You won't see the results of this call in an actual implementation of our personalized recommendations. This call and ProfileVector give you an inside look at how our personalization engine works.

Syntax

endpoint/itemvector? nameid=nameid
trackid=trackid
albumid=albumid
amgvideoid=amgvideoid
cosmoprogramid=cosmoprogramid
&apikey=apikey&sig=sig [&size=size]

Request Example 1

Request the top six categories of the taste profile for Michael Jackson's Thriller.

Request Example 2

Request the top 20 categories of the taste profile for the television series House M.D..

Request Example 3

Request the taste profile for the group The Doors.

Request Example 4

Request the taste profile for the movie When Harry Met Sally.

Request Parameters

ParameterRequiredDescription
apikey Yes Access code that authorizes your request for data from Rovi.
endpoint Yes Database of the item.
For this type of item . . .Specify this endpoint.
musicmusic
movies and TV seriesamgvideo
television (movies and TV programs)video
sig Yes A calculated authorization code. To perform the calculation, execute the MD5 function on the concatenation of the following three 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.

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.

albumid Conditional Rovi Music ID for an album, consisting of the prefix MW followed by a ten-digit number. For a request with an album ID, specify an endpoint of music. Here are some album IDs you can use for evaluation tests:
  • MW0002136254 — 4 (BeyoncĂ©)
  • MW0000056882 — Thriller (Michael Jackson)
  • MW0000111184 — Birth of the Cool (Miles Davis)
  • MW0001946960 — Beethoven: Symphony 9 (Leonard Bernstein)

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

  • nameid
  • trackid
  • albumid
  • amgvideoid
  • cosmoprogramid
amgvideoid Conditional All Media Guide (AMG) database ID for a movie or TV series, consisting of a ten-character string that starts with V and is followed by 9 digits with leading spaces. For a request with an amgvideo ID, specify an endpoint of amgvideo. Here are some amgvideo IDs you can use for evaluation tests:
  • V+++352199 — Avatar
  • V+++317815 — House
  • V+++175345 — The Simpsons
  • V++++49101 — The Terminator
  • V+++346517 — The Simpsons Movie

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

  • nameid
  • trackid
  • albumid
  • amgvideoid
  • cosmoprogramid
cosmoprogramid Conditional Cosmo database ID for a movie or television series. For a request with a Cosmo ID, specify an endpoint of video. Here are some Cosmo IDs you can use for evaluation tests:
  • 4180581 — House
  • 7903 — The Simpsons
  • 62991 — The Terminator
  • 7221538 — Breaking Bad
  • 6941396 — The Simpsons Movie
  • 55394 — Terminator 2: Judgment Day

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

  • nameid
  • trackid
  • albumid
  • amgvideoid
  • cosmoprogramid
nameid Conditional Rovi Name ID for a person or group that has worked in music, consisting of the prefix MN followed by a ten-digit number. For a request with a name ID, specify an endpoint of music. Here are some name IDs you can use for evaluation tests:
  • MN0000775877 — Coldplay
  • MN0000994823 — Lady Gaga
  • MN0000187478 — Eric Clapton
  • MN0000239859 — Leonard Bernstein

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

  • nameid
  • trackid
  • albumid
  • amgvideoid
  • cosmoprogramid
trackid Conditional Rovi Music ID for a song, consisting of the prefix MT followed by a ten-digit number. For a request with a track ID, specify an endpoint of music. Here are some track IDs you can use for evaluation tests:
  • MT0000136981 — Speed of Sound (Coldplay)
  • MT0040645959 — Born This Way (Lady Gaga)
  • MT0000149626 — Billie Jean (Michael Jackson)
  • MT0041013551 — Concierto de Aranjuez (Miles Davis)

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

  • nameid
  • trackid
  • albumid
  • amgvideoid
  • cosmoprogramid
size No Number of categories to return. Default is 20.

Response

Response Header

ResponseTypeDescription
controlSet ControlSet The HTTP response status.
id string Server transaction ID for the response.

Response for ItemVector

ResponseTypeDescription
results result [ ] Taste profile of the item requested.

Response Example 1

Here's the response for Request Example 1, requesting the top six categories for Michael Jackson's Thriller.
Requested with http://api.rovicorp.com/snrpreview/v2.1/music/itemvector?apikey=apikey&sig=sig&
albumid=MW0000056882&size=6
.
{
   "ItemVectorResponse":{
      "meta:id":"tul1cpgssrapp2:gwy:2wz8o",
      "controlSet":{
         "status":"ok",
         "code":200,
         "messages":null
      },
      "results":[
         {
            "id":"MA0000002969",
            "score":0.427648,
            "name":"Musical Genre: Contemporary R&B"
         },
         {
            "id":"XA0000001120",
            "score":0.287768,
            "name":"Mood: Theatrical"
         },
         {
            "id":"XA0000000770",
            "score":0.287768,
            "name":"Mood: Steamy"
         },
         {
            "id":"XA0000001133",
            "score":0.282968,
            "name":"Mood: Urgent"
         },
         {
            "id":"XA0000000733",
            "score":0.282968,
            "name":"Mood: Melancholic/Longing"
         },
         {
            "id":"XA0000000708",
            "score":0.282968,
            "name":"Mood: Dramatic"
         }
      ]
   }
}

Response Example 2

Here's the response for Request Example 2, requesting the top 20 categories for the television series House M.D.
Requested with http://api.rovicorp.com/snrpreview/v2.1/video/itemvector?apikey=apikey&sig=sig&
cosmoprogramid=4180581
.
{
   "ItemVectorResponse":{
      "meta:id":"tul1cpgssrapp2:gwy:2wzae",
      "controlSet":{
         "status":"ok",
         "code":200,
         "messages":null
      },
      "results":[
         {
            "id":5001526,
            "score":0.57746,
            "name":"Misc. :: Drama - Mental Illness and addiction"
         },
         {
            "id":5001073,
            "score":0.42813998,
            "name":"Style :: Medical Show [TV]"
         },
         {
            "id":5000732,
            "score":0.42703998,
            "name":"Style :: Medical Drama"
         },
         {
            "id":5001004,
            "score":0.42593998,
            "name":"Style :: Prime-Time Drama [TV]"
         },
         {
            "id":5000978,
            "score":0.42484,
            "name":"Style :: Procedural Show [TV]"
         },
         {
            "id":5000106,
            "score":0.36672002,
            "name":"Theme :: Doctors and Patients"
         },
         {
            "id":5000287,
            "score":0.36512,
            "name":"Theme :: Battling Illness"
         },
         {
            "id":5000166,
            "score":0.36431998,
            "name":"Theme :: Work Ethics"
         },
         {
            "id":5000296,
            "score":0.36271998,
            "name":"Theme :: Drug Addiction"
         },
         {
            "id":5000519,
            "score":0.3037,
            "name":"Mood :: Biting"
         },
         {
            "id":5000524,
            "score":0.3032,
            "name":"Mood :: Cerebral"
         },
         {
            "id":5000049,
            "score":0.3032,
            "name":"Mood :: Wry"
         },
         {
            "id":5000029,
            "score":0.3032,
            "name":"Mood :: Matter-of-Fact"
         },
         {
            "id":5000359,
            "score":0.30269998,
            "name":"Mood :: Moody"
         },
         {
            "id":5000494,
            "score":0.30269998,
            "name":"Mood :: Cynical"
         },
         {
            "id":5000025,
            "score":0.3022,
            "name":"Mood :: Irreverent"
         },
         {
            "id":5000043,
            "score":0.3022,
            "name":"Mood :: Talky"
         },
         {
            "id":5000952,
            "score":0.28215998,
            "name":"Genre :: Mystery"
         },
         {
            "id":5001389,
            "score":0.22054,
            "name":"Subject :: hospital"
         },
         {
            "id":5001232,
            "score":0.22054,
            "name":"Subject :: science"
         }
      ]
   }
}


See Also

↑ Top

Personal tools