Rcs-eval-api/v2.1/similar

Jump to: navigation, search

Advanced Item-Based Recommendations

This request offers insight into some of the custom capabilities available from Rovi Advanced Recommendations. This is one of several requests that show how Rovi can generate entertainment recommendations for your customers.

Advanced Item-Based Recommendations returns items that are similar to an item specified in the request in order of similarity and the priorities specified in the request parameters, including the following which are unique to Rovi Advanced Recommendations:

  • Additional field-level filters
  • Priority settings such as hot, new, fresh, or all-time

Syntax

endpoint/similar? nameid=nameid
trackid=trackid
albumid=albumid
amgvideoid=
   amgvideoid
cosmoprogramid=
   cosmoprogramid
&apikey=apikey&sig=sig&entitytype=entitytype [&include=include] [&filter=filter] [&boost=boost] [&availableclu=availableclu] [&availablestart=availablestart] [&availableend=availableend] [&format=format] [&country=country] [&language=language] [&size=size]

Request Example 1

Request albums that are similar to Michael Jackson's Thriller with a focus on new albums, and include reviews.

Request Example 2

Request shows similar to House this week on Time Warner cable in Beverly Hills, CA, and show up to five viewing times each. To try this call, change the available-end date 20111120 to the date next Sunday.

Request Example 3

Request the hottest, most similar songs to Nick Lowe's Without Love.

Request Parameters

  Music-related requests      Movie-related requests    ⊑⊒  TV-related requests

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
entitytype Yes Type of content to look for.
For this endpoint . . . To find . . .Specify entitytype.   (And ID.)
music songssongtrackid
albumsalbumalbumid
people in musicartistnameid
amgvideo moviesmovieamgvideoid
TV seriestvseriesamgvideoid
video ⊑⊒moviesmoviecosmoprogramid
TV seriestvseriescosmoprogramid
A request can return data for only one entity type except for the combination of movie and tvseries. To do that, specify two entitytype parameters like this: entitytype=tvseries&entitytype=movie. The top results may come from just one of the entity types: order of results is determined by relevance and is not deliberately balanced across the searched entity types.
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.

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
  • 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
  • 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
  • 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
  • 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
  • albumid
  • amgvideoid
  • cosmoprogramid
available-clu No Service ID of a television service that has upcoming movies or TV series you want to match against. Service IDs for television services are available with calls to Services.

Broadcast times of programs are returned in availabilities objects. To return multiple broadcast times, specify the maximum number of broadcasts as serviceID,number like this: availableclu=360861,5.

Notes:

  • Requires an endpoint of video.
  • Requires an entitytype of movie or tvseries.
  • To check multiple television services, specify multiple parameters like this: availableclu=360861,5&availableclu=20494.
  • To limit the broadcast time window to less than the next two weeks, specify the availablestart or availableend parameters, or both.
  • To return only programs in the broadcast time window, add boost=availability or filter=availability to the request.
  • Here are some Service IDs you can use for evaluation tests:
    • 20419 — Chicago Area Broadcast TV
    • 890504 — CanalSat in Paris, France
    • 68809 — Shaw Cable in Moose Jaw, Saskatchewan
    • 60795 — Time Warner Cable in Southern Manhattan
    • 360861 — Time Warner Cable in Beverly Hills, California
available-end No If you specify the availableclu parameter, availableend specifies the end of the broadcast time window in one of the following formats:
  • UTC time: YYYYmmDDhhMMssZ. For example: 20120315140000Z for 2012-03-15 14:00:00 GMT.
  • Local time with a UTC offset: YYYYmmDDhhMMss + or - hhMM (positive or negative offset). For example, for the same time specified as US Pacific time: 201203150600000800.

If not specified, the end time is two weeks after the time of the request.

available-start No If you specify the availableclu parameter, availablestart specifies the start of the broadcast time window in one of the following formats:
  • UTC time: YYYYmmDDhhMMssZ. For example: 20120315140000Z for 2012-03-15 14:00:00 GMT.
  • Local time with a UTC offset: YYYYmmDDhhMMss + or - hhMM (positive or negative offset). For example, for the same time specified as US Pacific time: 201203150600000800.

If not specified, the start time is the time of the request.

boost No Sort-order priorities you can increase or decrease by a decimal value between -1 and 1. To boost the priority of new content by 50%, for example, specify boost=new:0.5. The priorities you can increase and decrease are:
  Factor  Meaning
  • hot
  • new
  • fresh
  • alltime

hot content
recent original release date
new episodes in a TV series
all-time popularity

To boost multiple factors, specify multiple parameters: boost=new:0.5&boost=alltime:0.4. Note:  The sum of the absolute values of all factors must be less than or equal to 1. That is, add all of the absolute values together and make sure the total is less than or equal to 1.

If you are using the available-clu parameter, you can also use the boost parameter to filter out results that are not available on the television service. Specified without a value, like this: boost=availability.

country No Country the language parameter applies to. The current release of the API supports only US.
filter No Field content that determines which results are returned. Like a WHERE clause in an SQL statement, this parameter selects only results with fields that meet your criteria. This parameter only filters content with a video endpoint.

Examples:

  • Specify filter=latestairing>20091231 to return only shows broadcast in 2010 or later.
  • Specify filter=ratingid:3|ratingid:4|ratingid:5 to return movies rated G, PG, or PG13.

The selection operators include:

Operator    Meaning
:Is equal to.
!:Is not equal to.
<Is less than.
<:Is less than or equal to.
>Is greater than.
>:Is greater than or equal to.
|Or.

For the And operation, specify another filter parameter like this: filter=releaseyear>:2004&
filter=releaseyear<2009
.

The following shows which fields you can select for each video entity type. If you specify a filter that does not apply to an entity type, no data will be returned for that entity type.

For . . .You can filter on . . .Description
movie
  • availability
Returns only results that are found in availableclu. Specified without a value, like this: filter=availability.
  • latestairing
Filters out content based on the most recent date the program was broadcast (YYYYMMDD).
  • ratingid
Includes only content that has a particular parental rating. See the IDs in the ratings table.
  • releaseyear
Filters content by release year.
tvseries
  • availability
Returns only results that are found in availableclu. Specified without a value, like this: filter=availability.
  • latestairing
Filters out content based on the most recent date the series was broadcast (YYYYMMDD).
  • ratingid
Includes only content that has a particular parental rating. See the IDs in the ratings table.
format No Format of the returned data: json or xml. The default is JSON.
include No Additional data to include in each result returned. To include cast members in movie results, for example, specify include=cast. For multiple includes, separate the values with commas like this: include=moods,crew. To include all data, specify include=all.
For endpointEntitytypeYou can include these results . . .
music album
  • All
  • ClassicalReview
  • Credits
  • Images
  • Moods
  • PrimaryReview
  • Releases
  • Similar
  • Styles
  • Themes
  • Tracks
music song
  • All
  • Appearances
  • Review
  • Sample
music artist
  • All
  • Aliases
  • AssociatedWith
  • ClassicalBio
  • CollaboratorWith
  • Compositions
  • Contemporaries
  • Credits*
  • Discography
  • Factsheets*
  • Filmography
  • Followers
  • GroupMembers
  • Images
  • Influencers
  • MemberOf
  • Moods
  • MovieBio
  • MovieStyles
  • MusicBio
  • MusicCredits
  • MusicStyles
  • Similars
  • Songs
  • Themes
  • Videos
  • Web
amgvideo movie
  • All
  • Cast
  • Crew
  • Images
  • Keywords
  • Moods
  • Related
  • Releases
  • Review
  • Similar
  • Synopsis
  • Themes
  • Tones
  • Types
  • Videos
amgvideo tvseries
  • All
  • Cast
  • Crew
  • Images
  • Keywords
  • Moods
  • Related
  • Releases
  • Review
  • Similar
  • Synopsis
  • Themes
  • Tones
  • Types
  • Videos
video ⊑⊒movie
  • All
  • Awards
  • Cast
  • Crew
  • Event
  • Images
  • Keywords
  • Review
  • Synopsis
  • Themes
  • Tones
video ⊑⊒tvseries
  • All
  • Awards
  • Cast
  • Crew
  • Images
  • Keywords
  • Review
  • Seasons
  • Synopsis
  • Themes
  • Tones
video ⊑⊒onetimeonly
  • All
  • Awards
  • Cast
  • Crew
  • Event
  • Images
  • Keywords
  • Review
  • Synopsis
  • Themes
  • Tones
language No Language of the response data. This request supports only en (English).
size No The number of items you want to be returned. The default is 20.

Response

Response Header

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

Response for Advanced Item-Based Recommendations

ResponseTypeDescription
results result [ ] Information about items that are similar to the items specified in the request, listed in order of similarity and the priorities specified in the request.

JSON Response Example

Here's the response to Request Example 1, requesting new albums that are similar to Michael Jackson's Thriller, with reviews. Just the top response is requested here to show as a sample.
Requested with http://api.rovicorp.com/snrpreview/v2.1/music/similar?apikey=apikey&sig=sig&
entitytype=album&albumid=MW0000056882&boost=new:0.9&include=primaryreview&size=1
.
{
   "similarItemsResponse":{
      "meta:id":"tul1cpgpsrapp29:gwy:3l4y5i",
      "controlSet":{
         "status":"ok",
         "code":200,
         "messages":null
      },
      "results":[
         {
            "type":"album",
            "relevance":[
               {
                  "code":"Score",
                  "value":0.8174994
               }
            ],
            "id":"MW0002578664",
            "messages":null,
            "album":{
               "ids":{
                  "albumId":"MW0002578664",
                  "amgClassicalId":null,
                  "amgPopId":"R 2830741"
               },
               "title":"Love to Love You Donna",
               "primaryArtists":[
                  {
                     "id":"MN0000661524",
                     "name":"Donna Summer"
                  }
               ],
               "guestArtists":null,
               "flags":[
                  "Compilation"
               ],
               "duration":4466,
               "originalReleaseDate":"2013-10-22",
               "rating":4,
               "isPick":false,
               "genres":[
                  {
                     "id":"MA0000002572",
                     "name":"Electronic",
                     "weight":9
                  },
                  {
                     "id":"MA0000011877",
                     "name":"Vocal",
                     "weight":5
                  }
               ],
               "headlineReview":{
                  "text":"Executive produced by Bruce Sudano, the late queen's longtime collaborator and husband, this is led by mixes from Holy Ghost! and Giorgio Moroder.",
                  "author":"Andy Kellman"
               },
               "classicalReview":null,
               "classicalReviewUri":"",
               "credits":null,
               "creditsUri":"http://api.rovicorp.com/data/v1.1/album/credits?format=json&apikey=4p1k3y&albumid=MW0002578664",
               "images":null,
               "imagesUri":"http://api.rovicorp.com/data/v1.1/album/images?format=json&apikey=4p1k3y&albumid=MW0002578664",
               "moods":null,
               "moodsUri":"http://api.rovicorp.com/data/v1.1/album/moods?format=json&apikey=4p1k3y&albumid=MW0002578664",
               "primaryReview":{
                  "text":"The late queen's longtime collaborator and husband, [roviLink=\"MN0000636306\"]Bruce Sudano[/roviLink], served as executive producer for this tribute, a varied collection of remixes from house pioneers ([roviLink=\"MN0000793821\"]Frankie Knuckles[/roviLink], [roviLink=\"MN0000383284\"]Masters at Work[/roviLink]), hipper left-of-center figures ([roviLink=\"MN0002459611\"]Holy Ghost![/roviLink], [roviLink=\"MN0000557191\"]Hot Chip[/roviLink], [roviLink=\"MN0002607560\"]Jacques Greene[/roviLink]), and current dance-music stars ([roviLink=\"MN0000997030\"]Duke Dumont[/roviLink], [roviLink=\"MN0000124248\"]Laidback Luke[/roviLink]). In some instances, it helps to not be much of a [roviLink=\"MN0000661524\"]Donna Summer[/roviLink] fan. [roviLink=\"MN0001582831\"]Afrojack[/roviLink] transforms \"I Feel Love\" into a graceless barrage of battering noise and reduces [roviLink=\"MN0000661524\"]Summer[/roviLink]'s vocal to pulp, while [roviLink=\"MN0002607560\"]Greene[/roviLink]'s \"On the Radio\" has [roviLink=\"MN0000661524\"]Summer[/roviLink] so heavily echoed and distant that it could be titled \"On the Radio (At the Bottom of a Deep Well).\" [roviLink=\"MN0000997030\"]Dumont[/roviLink] likewise treats [roviLink=\"MN0000661524\"]Summer[/roviLink] like a sample source, but he at least places her at the fore, over a characteristically spacious and relaxed house track. On the other side, [roviLink=\"MN0000383284\"]Masters at Work[/roviLink] update and sweeten \"Last Dance\" with live bass, guitar, and keyboards. [roviLink=\"MN0000793821\"]Knuckles[/roviLink], assisted by [roviLink=\"MN0000424580\"]Eric Kupper[/roviLink], also retains [roviLink=\"MN0000661524\"]Summer[/roviLink]'s essence for a version of \"Hot Stuff\" that trucks. At the end, there's a new song, \"La Dolce Vita,\" written by [roviLink=\"MN0000661524\"]Summer[/roviLink], [roviLink=\"MN0000660507\"]Moroder[/roviLink], and [roviLink=\"MN0000375579\"]Nathan DiGesare[/roviLink]. As enjoyable as anything off 2008's [roviLink=\"MW0000784991\"]Crayons[/roviLink], Italo-disco fanatics might not be able to hear it without thinking of [roviLink=\"MN0000280517\"]Ryan Paris[/roviLink]' 1983 hit of the same title, while younger listeners might think of it as a rip-off of [roviLink=\"MN0000667669\"]Daft Punk[/roviLink]'s \"Get Lucky.\" It's bittersweet to hear [roviLink=\"MN0000660507\"]Moroder[/roviLink]'s processed voice intone \"We miss her so.\" ~ Andy Kellman",
                  "author":"Andy Kellman"
               },
               "primaryReviewUri":"http://api.rovicorp.com/data/v1.1/album/primaryReview?format=json&apikey=4p1k3y&albumid=MW0002578664",
               "releases":null,
               "releasesUri":"http://api.rovicorp.com/data/v1.1/album/releases?format=json&apikey=4p1k3y&albumid=MW0002578664",
               "similar":null,
               "similarUri":"",
               "styles":null,
               "stylesUri":"http://api.rovicorp.com/data/v1.1/album/styles?format=json&apikey=4p1k3y&albumid=MW0002578664",
               "themes":null,
               "themesUri":"http://api.rovicorp.com/data/v1.1/album/themes?format=json&apikey=4p1k3y&albumid=MW0002578664",
               "tracks":null,
               "tracksUri":"http://api.rovicorp.com/data/v1.1/album/tracks?format=json&apikey=4p1k3y&albumid=MW0002578664"
            }
         }
      ]
   }
}

Error Codes

CodeDescription
400 Incorrect or invalid request. The reason is shown in the Message object in ControlSet.

See Also

↑ Top

Personal tools