Video/Seasons
Returns links to information about seasons and episodes in a television series. An optional argument returns season information in the response instead of a link to the information.
A request with an episode ID returns information about the season the episode is in.
A request with a series ID returns links to all seasons in the series in reverse order, with the latest season first. If, however, the database contains episodes that have not been assigned to a season—unsequenced episodes—those episodes are labeled season 0 and that link is returned first.
The links returned are:
This request may return a large amount of data. To speed data transmission, do the following:
- Request one page of data at a time, requesting only what you want to immediately display.
- Request a compressed response by including Accept-Encoding: gzip,deflate in the HTTP header.
Syntax
video/seasons? |
video=video cosmoid=cosmoid iguideid=iguideid |
&apikey=apikey&sig=sig [&format=format] [&offset=offset] [&count=count] [&country=country] [&language=language] [&include=include] [&localeresolution=localeresolution] |
Request Example 1
- Request links to information about all seasons and all episodes of House M.D.
Request Example 2
- Request the last two seasons listed for House M.D.
Request Example 3
- Request the last two seasons listed for House M.D. and include the season information.
Request Example 4
- Return the response to Request Example 3 in XML format.
Request Example 5
- Request season information for an episode of The Simpsons.
Request Parameters
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. |
cosmoid | Conditional | Cosmo database ID for a television series or episode in a 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:
|
iguideid | Conditional | An ID for a television series or episode 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 | 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:
|
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, stated as a two-character ISO 3166 country code. Default is the default country of the language you specify (US if language is not specified). If an invalid combination of country and language is specified, US English will be returned.
Valid country codes are:
| Argentina | | El Salvador | | Nicaragua |
| Austria | | Finland | | Norway |
| Belgium | | France | | Panama |
| Bermuda | | Germany | | Peru |
| Bolivia | | Guatemala | | Poland |
| Brazil | | Honduras | | Portugal |
| Canada | | Ireland | | Spain |
| Chile | | Italy | | Sweden |
| Colombia | | Jamaica | | Switzerland |
| Costa Rica | | Luxembourg | | United Kingdom* |
| Denmark | | Mexico | | United States |
| Dominican Republic | | Netherlands | | Venezuela |
| Ecuador | | | | |
* Includes Wales, Scotland, and Northern Ireland. |
format | No | Format of the returned data: json or xml. The default is JSON. |
include | No | Specify include=all to include season information in the response instead of URLs to season information. |
language | No | Language of the response data, stated as a two-character ISO 639 language code:
| Danish | | French | | Portuguese |
| Dutch | | German | | Spanish |
| English | | Italian | | Swedish |
| Finnish | | Norwegian |
| Flemish | | Polish |
Default is en (English). If content is not available in the language requested, another language is chosen as determined by the Language Fallback Sequence table. |
localeresolution | No | How the language fallback rules should be applied for any content that is not available for the specified language and country. The values are:
| Return the content for the specified Cosmo ID. |
| Fall back to the next available language per the fallback rules. |
| If the program is available in the specified language, return content for that Cosmo ID instead, like Full. Otherwise, return the content for the specified Cosmo ID, like None. |
| Fall back to the next available language per the fallback rules like Full, but override the IDs and masterTitle values like None. |
Default is Full. |
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 | Type | Description |
build | string | The software release level of the API. |
code | integer | HTTP status code. See the status field for the text part of the code. |
duration | integer | Server processing time in milliseconds. The difference between startTime and endTime. |
endTime | string | When the server sent the response (UTC time). |
messages | Message [ ] | Elements of a multiple HTTP response status message. |
parameters | parameters | The parameters that were included in the request. |
parentIds | parentIds | All of the IDs for the requested movie or program that are recognized by the Video Service. |
serverName | string | Name of the server that processed the request. |
startTime | string | When the server received the request (UTC time). |
status | string | Text part of the HTTP status code, which is shown in the code field. |
view | view | Summary of items returned in a list of items. |
Response for Video/Seasons
Response | Type | Description |
number | VideoSeason [ ] | Links to season and episode information for the television series as specified in the request. |
Response Example 1
- Here's the response to Request Example 2, which asks for the last two seasons listed for House M.D.. 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/seasons?apikey=apikey&sig=sig&cosmoid=4180581&
count=2.
{
"status":"ok",
"code":200,
"messages":null,
"build":"1.6.1.12",
"parameters":{
"apiKey":"4p1k3y",
"id":"4180581",
"offset":0,
"count":2
},
"view":{
"offset":0,
"count":2,
"total":8
},
"serverName":"tul1cstw4",
"startTime":"2011-08-04T23:40:11.4588852Z",
"endTime":"2011-08-04T23:40:12.1776122Z",
"duration":718,
"parentIds":{
"cosmoId":"4180581"
},
"seasons":[
{
"number":"0",
"episodesUri":"http://api.rovicorp.com/data/v1.1/video/season/0/info?format=json&apikey=4p1k3y&cosmoid=4180581"
},
{
"number":"7",
"seasonInfoUri":"http://api.rovicorp.com/data/v1.1/video/season/7/info?format=json&apikey=4p1k3y&cosmoid=4180581",
"episodesUri":"http://api.rovicorp.com/data/v1.1/video/season/7/episodes?format=json&apikey=4p1k3y&cosmoid=4180581"
}
]
}
Response Example 2
- Here's the response to Request Example 3, which asks for the last two seasons listed for House M.D. along with the season information.
- Requested with http://api.rovicorp.com/data/v1.1/video/seasons?apikey=apikey&sig=sig&cosmoid=4180581&
include=all&count=2.
{
"status":"ok",
"code":200,
"messages":null,
"build":"1.6.1.12",
"parameters":{
"apiKey":"4p1k3y",
"id":"4180581",
"offset":0,
"count":2,
"include":"all"
},
"view":{
"offset":0,
"count":2,
"total":8
},
"serverName":"tul1cstw1",
"startTime":"2011-08-04T23:42:22.3414857Z",
"endTime":"2011-08-04T23:42:23.1539857Z",
"duration":812,
"parentIds":{
"cosmoId":"4180581"
},
"seasons":[
{
"number":"0",
"title":"Unsequenced",
"totalEpisodes":46,
"episodesUri":"http://api.rovicorp.com/data/v1.1/video/season/0/info?format=json&apikey=4p1k3y&cosmoid=4180581"
},
{
"number":"7",
"title":"Season 7",
"start":"2010",
"end":"2011",
"totalEpisodes":23,
"ids":{
"amgMovieId":null,
"cosmoId":"17971804",
"iguideId":null
},
"episodesUri":"http://api.rovicorp.com/data/v1.1/video/season/7/episodes?format=json&apikey=4p1k3y&cosmoid=4180581",
"parentalRatings":[
],
"associatedMedia":[
],
"streamable":1
}
]
}
XML Response Example 1
- Here's the response to Request Example 4, which asks for the last two seasons listed for House M.D. along with the season information in an XML response.
- Requested with http://api.rovicorp.com/data/v1.1/video/seasons?apikey=apikey&sig=sig&cosmoid=4180581&
include=all&count=2&format=xml.
<VideoSeasons 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>4180581</id>
<offset>0</offset>
<count>2</count>
<include>all</include>
<format>xml</format>
</parameters>
<view>
<offset>0</offset>
<count>2</count>
<total>8</total>
</view>
<serverName>tul1cstw2</serverName>
<startTime>2011-08-04T23:44:00.4586164Z</startTime>
<endTime>2011-08-04T23:44:00.9898766Z</endTime>
<duration>531</duration>
<parentIds>
<cosmoId>4180581</cosmoId>
</parentIds>
<seasons>
<VideoSeason>
<number>0</number>
<title>Unsequenced</title>
<totalEpisodes>46</totalEpisodes>
<episodesUri>http://api.rovicorp.com/data/v1.1/video/season/0/info?format=xml&apikey=4p1k3y&cosmoid=4180581</episodesUri>
</VideoSeason>
<VideoSeason>
<number>7</number>
<title>Season 7</title>
<start>2010</start>
<end>2011</end>
<totalEpisodes>23</totalEpisodes>
<ids>
<amgMovieId i:nil="true"/>
<cosmoId>17971804</cosmoId>
<iguideId i:nil="true"/>
</ids>
<episodesUri>http://api.rovicorp.com/data/v1.1/video/season/7/episodes?format=xml&apikey=4p1k3y&cosmoid=4180581</episodesUri>
<parentalRatings/>
<associatedMedia/>
<streamable>1</streamable>
</VideoSeason>
</seasons>
</VideoSeasons>
XML Response Example 2
- Here's the response to Request Example 5, which asks for season information for an episode of The Simpsons.
- Requested with http://api.rovicorp.com/data/v1.1/video/seasons?apikey=apikey&sig=sig&cosmoid=7840643&
include=all&format=xml.
<VideoSeasons 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.7.0.1</build>
<parameters>
<apiKey>4p1k3y</apiKey>
<id>7840643</id>
<include>all</include>
<format>xml</format>
</parameters>
<view>
<total>1</total>
</view>
<serverName>tul1cstw4</serverName>
<startTime>2011-08-11T22:33:55.1492656Z</startTime>
<endTime>2011-08-11T22:33:55.1961391Z</endTime>
<duration>46</duration>
<parentIds>
<cosmoId>7840643</cosmoId>
</parentIds>
<seasons>
<VideoSeason>
<number>20</number>
<title>Season 20</title>
<start>2008</start>
<end>2009</end>
<totalEpisodes>22</totalEpisodes>
<ids>
<amgMovieId i:nil="true"/>
<cosmoId>13378115</cosmoId>
<iguideId i:nil="true"/>
</ids>
<episodesUri>http://api.rovicorp.com/data/v1.1/video/season/20/episodes?format=xml&apikey=4p1k3y&cosmoid=7840643</episodesUri>
<parentalRatings/>
<associatedMedia/>
<streamable>1</streamable>
</VideoSeason>
</seasons>
</VideoSeasons>
See Also
-
↑ Top
-