Data/video-api/v1.1/video/season-episodes

Jump to: navigation, search

Video/Season/Episodes

Returns Video/Info requests for episodes in a season of a TV series. An optional argument includes episode titles in the response.

Syntax

video/season/season/episodes? video=video
cosmoid=cosmoid
iguideid=iguideid
&apikey=apikey&sig=sig [&format=format] [&offset=offset] [&count=count] [&country=country] [&language=language] [&include=include]

Request Example 1

Request the Video/Info requests to the episodes in season 20 of The Simpsons.

Request Example 2

Request the Video/Info requests to just the first two episodes.

Request Example 3

Request the Video/Info requests to just the first two episodes and include titles of each episode.

Request Example 4

Request an XML response to Request Example 3.

Request Parameters

Sort none.gif  Click to re-sort

Parameter Required Description
apikey Yes Access code that authorizes your request for data from Rovi.
season Yes Season number of the television series.
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.

cosmoid Conditional Cosmo database ID for a television series. Cosmo is a database of television information. You can grab Cosmo IDs from responses to the following requests:

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

  • video
  • cosmoid
  • iguideid
iguideid Conditional An ID for a television series used by the i‑Guide™ interactive digital cable TV program guide. You can get i‑Guide IDs from responses to the following requests:

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

  • video
  • cosmoid
  • iguideid
video Conditional Name of a television series. This returns the top search result for that name. Replace any spaces with plus (+) or percent20 (%20) symbols.

Note: This parameter currently returns only US-English results. Support for other countries and languages will be added in the future.

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

  • video
  • cosmoid
  • iguideid
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.
include No Specify include=all to include title information for each episode in the response.
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 movie or program that are recognized by the Video Service.
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 Video/Season/Episodes

ResponseTypeDescription
episodes VideoEpisode [ ] Video/Info requests for the episodes specified in the request and, if requested, information about the episodes.

Response Example 1

Here's the response to Request Example 2, which asks for the Video/Info requests to the first two episodes in season 20 of The Simpsons. 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/video/season/20/episodes?apikey=apikey&sig=sig&
cosmoid=7903&count=2
.
{
   "status":"ok",
   "code":200,
   "messages":null,
   "build":"1.6.1.12",
   "parameters":{
      "apiKey":"4p1k3y",
      "id":"7903",
      "offset":0,
      "count":2
   },
   "view":{
      "offset":0,
      "count":2,
      "total":22
   },
   "serverName":"tul1cssw2",
   "startTime":"2011-08-09T21:40:04.6982326Z",
   "endTime":"2011-08-09T21:40:04.7138575Z",
   "duration":15,
   "parentIds":{
      "cosmoId":"7903"
   },
   "episodes":[
      {
         "number":1,
         "episodeInfoUri":"http://api.rovicorp.com/data/v1.1/video/info?format=json&apikey=4p1k3y&cosmoid=8114433"
      },
      {
         "number":2,
         "episodeInfoUri":"http://api.rovicorp.com/data/v1.1/video/info?format=json&apikey=4p1k3y&cosmoid=7840643"
      }
   ]
}

Response Example 2

Here's the response to Request Example 3, which asks for Video/Info requests to the first two episodes in season 20 of The Simpsons along with episode titles.
Requested with http://api.rovicorp.com/data/v1.1/video/season/20/episodes?apikey=apikey&sig=sig&
cosmoid=7903&count=2&include=all
.
{
   "status":"ok",
   "code":200,
   "messages":null,
   "build":"1.6.1.12",
   "parameters":{
      "apiKey":"4p1k3y",
      "id":"7903",
      "offset":0,
      "count":2,
      "include":"all"
   },
   "view":{
      "offset":0,
      "count":2,
      "total":22
   },
   "serverName":"tul1cssw4",
   "startTime":"2011-08-09T21:42:25.7600663Z",
   "endTime":"2011-08-09T21:42:25.7756912Z",
   "duration":15,
   "parentIds":{
      "cosmoId":"7903"
   },
   "episodes":[
      {
         "ids":{
            "amgMovieId":null,
            "cosmoId":"8114433",
            "iguideId":"8114433"
         },
         "seriestitle":"The Simpsons",
         "title":"Sex, Pies and Idiot Scrapes",
         "number":1,
         "episodeInfoUri":"http://api.rovicorp.com/data/v1.1/video/info?format=json&apikey=4p1k3y&cosmoid=8114433"
      },
      {
         "ids":{
            "amgMovieId":null,
            "cosmoId":"7840643",
            "iguideId":"7840643"
         },
         "seriestitle":"The Simpsons",
         "title":"Lost Verizon",
         "number":2,
         "episodeInfoUri":"http://api.rovicorp.com/data/v1.1/video/info?format=json&apikey=4p1k3y&cosmoid=7840643"
      }
   ]
}

XML Response Example

Here's the response to Request Example 4, which asks for Video/Info requests to the first two episodes in season 20 of The Simpsons along with episode titles in an XML response.
Requested with http://api.rovicorp.com/data/v1.1/video/season/20/episodes?apikey=apikey&sig=sig&
cosmoid=7903&count=2&include=all&format=xml
.
<VideoEpisodes 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.6.1.12</build>
  <parameters>
    <apiKey>4p1k3y</apiKey>
    <id>7903</id>
    <offset>0</offset>
    <count>2</count>
    <include>all</include>
    <format>xml</format>
  </parameters>
  <view>
    <offset>0</offset>
    <count>2</count>
    <total>22</total>
  </view>
  <serverName>tul1cssw3</serverName>
  <startTime>2011-08-09T21:43:57.7784925Z</startTime>
  <endTime>2011-08-09T21:43:57.7941169Z</endTime>
  <duration>15</duration>
  <parentIds>
    <cosmoId>7903</cosmoId>
  </parentIds>
  <episodes>
    <VideoEpisode>
      <ids>
        <amgMovieId i:nil="true"/>
        <cosmoId>8114433</cosmoId>
        <iguideId>8114433</iguideId>
      </ids>
      <seriestitle>The Simpsons</seriestitle>
      <title>Sex, Pies and Idiot Scrapes</title>
      <number>1</number>
      <episodeInfoUri>http://api.rovicorp.com/data/v1.1/video/info?format=xml&apikey=4p1k3y&cosmoid=8114433</episodeInfoUri>
    </VideoEpisode>
    <VideoEpisode>
      <ids>
        <amgMovieId i:nil="true"/>
        <cosmoId>7840643</cosmoId>
        <iguideId>7840643</iguideId>
      </ids>
      <seriestitle>The Simpsons</seriestitle>
      <title>Lost Verizon</title>
      <number>2</number>
      <episodeInfoUri>http://api.rovicorp.com/data/v1.1/video/info?format=xml&apikey=4p1k3y&cosmoid=7840643</episodeInfoUri>
    </VideoEpisode>
  </episodes>
</VideoEpisodes>


See Also

↑ Top

nbsp;
Personal tools