Data/video-api/v1.1/video/schedule

Jump to: navigation, search

Video/Schedule

Returns a list of upcoming television broadcasts of a movie or program.

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/schedule? video=video
cosmoid=cosmoid
iguideid=iguideid
&apikey=apikey&sig=sig&serviceid=serviceid [&format=format] [&offset=offset] [&count=count] [&country=country] [&language=language] [&localeresolution=localeresolution] [&starttime=starttime] [&duration=duration] [&inprogress=inprogress] [&copytexttype=copytexttype] [&titletype=titletype] [&sourceid=sourceid] [&sourceinclude=sourceinclude] [&sourceexclude=sourceexclude]

Request Example 1

Request the broadcasts of Breaking Bad over the next two weeks on Time Warner Cable in Beverly Hills, California, but return just the first one in the list.

Request Example 2

Request the broadcasts of The Simpsons over the next 12 hours on Digital Plus satellite in Barcelona, Spain, but return just the first one in the list in an XML response.

Request Example 3

Look for HD broadcasts of The Terminator on any of the movie channels on Time Warner Cable in Southern Manhattan over the next six hours, and include broadcasts that are currently on.

Request Example 4

Request a schedule of broadcasts of Cowboys & Aliens this weekend starting Friday at 6:00pm local time on SaskTel Max Cable in Moose Jaw, Saskatchewan.

Request Parameters

Sort none.gif  Click to re-sort

Parameter Required Description
apikey Yes Access code that authorizes your request for data from Rovi.
serviceid Yes Database ID of a television service. You can get service IDs of local television services with the REST call Listings/Services or the SOAP call GetServices. For US national services, you can use any of the following service IDs:
Time ZoneComplete (87+ Listings)Widget (30+ Listings)
Eastern8000184801
Central8000284800
Pacific8000484798

You can limit a returned schedule with the following optional parameters:

  • duration
  • starttime
  • inprogress
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 movie, program, episode, or 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 program used by the i‑Guide™ interactive digital cable TV program guide. You can get i‑Guide IDs from i‑Guide and from responses to the following requests:

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

  • video
  • cosmoid
  • iguideid
video Conditional Title of a movie, television program, or television series, or keywords from the title. This searches for the most popular title with that combination of words. 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
copytexttype No Type of description you want returned for the program, movie, or TV series. If you specify a copy type that has no content, no description is returned.
  • 1
Chrono Long. Objective, straightforward description with up to 500 characters. Includes cast members, but not regular cast members in a series unless it is a series premiere.
  • 2
Promo. A subjective and positive description. Created for pay-per-view programs and for movies that have critical (negative) Chrono Long copy.
  • 3
NoCast. Excludes cast members. Up to 400 characters for movies, or 500 characters for a series.
  • 4
Chrono Short. A shortened version of Chrono Long with up to 254 characters and cutting positions that can be used to shorten the text.
  • 5
Grid Copy. Short plot description with up to 254 characters and cutting positions that can be used to shorten the text.
  • 54
Short Synopsis. A program description with up to 150 characters.
  • 55
Synopsis. The short synopsis plus further description up to 420 characters.
  • 10001  
AMG Movie Review. A professional movie review, which may be long, and the name of the author of the review, from All Media Guide (AMG).

If you do not specify a copy type, the description chosen is based on category, shown below, and the first copy type in the category that is available:

CategoryCopy Type Fallback Sequence
Movie

1
4
55
54
3
5

Chrono Long
Chrono Short
Synopsis
Short Synopsis
No Cast
Grid

Series Master

3
55
54

No Cast
Synopsis
Short Synopsis

Series Episode

1
55
54
4
5

Chrono Long
Synopsis
Short Synopsis
Chrono Short
Grid

One Time Only

1
55
54
4
5

Chrono Long
Synopsis
Short Synopsis
Chrono Short
Grid

Season

36
38
39

Season description (for select series and seasons)
Critical description (not currently written)
Season essay (not currently written)

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:

  • AR
Argentina
  • SV
El Salvador
  • NI
Nicaragua
  • AT
Austria
  • FI
Finland
  • NO
Norway
  • BE
Belgium
  • FR
France
  • PA
Panama
  • BM
Bermuda
  • DE
Germany
  • PE
Peru
  • BO
Bolivia
  • GT
Guatemala
  • PL
Poland
  • BR
Brazil
  • HN
Honduras
  • PT
Portugal
  • CA
Canada
  • IE
Ireland
  • ES
Spain
  • CL
Chile
  • IT
Italy
  • SE
Sweden
  • CO
Colombia
  • JM
Jamaica
  • CH
Switzerland
  • CR
Costa Rica
  • LU
Luxembourg 
  • GB
United Kingdom*
  • DK
Denmark
  • MX
Mexico
  • US
United States
  • DO
Dominican Republic 
  • NL
Netherlands
  • VE
Venezuela
  • EC
Ecuador

* Includes Wales, Scotland, and Northern Ireland.

duration No The number of minutes the schedule will cover, from 1 to 20160. Default is 20160 (14 days).

Note: The schedule is determined by starttime, duration, and inprogress. A duration shorter than 5 minutes may miss shows starting just before or after a half-hour point.

format No Format of the returned data: json or xml. The default is JSON.
inprogress No Whether shows in progress at the time specified for starttime are included in the schedule: true or false. Default is false.

Note: The schedule is determined by starttime, duration, and inprogress.

language No Language of the response data, stated as a two-character ISO 639 language code:
  • da
Danish
  • fr
French
  • pt
Portuguese
  • nl
Dutch
  • de
German
  • es
Spanish
  • en
English
  • it
Italian
  • sv
Swedish
  • fi
Finnish
  • no
Norwegian    
  • fl
Flemish    
  • pl
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. Currently we offer a single value that gives you the option to override the fallback rules and return the the content in the language of the specified Cosmo ID instead:
  • None
Return the content for the specified Cosmo ID.
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.

sourceexclude No If you specify sourceid to select the television sources to be returned, sourceexclude specifies attributes of the channels in the source ID list that you want to eliminate from the channels returned. The possible values are:
  • HD
  • PPV
  • Music

You can specify multiple sourceexclude values in either of the following ways:

  • In multiple arguments, like this: sourceexclude=HD&sourceexclude=PPV.
  • In a single argument as a comma-separated list, like this: sourceexclude=HD,PPV.
sourceid No Channel sources to be included in the results. You can get source IDs from responses to a GetServiceDetails request. Note: a single television source may supply content to multiple channels.

You can specify multiple source IDs in either of the following ways:

  • In multiple arguments, like this: sourceid=14019&sourceid=11284&sourceid=10395.
  • In a single argument as a comma-separated list, like this: sourceid=14019,11284,10395.
You can filter these source IDs further with sourceinclude or sourceexclude.
sourceinclude No If you specify sourceid to select the television sources to be returned, sourceinclude specifies an attribute of the channels in the source ID list that you want to include in the list of channels returned. The possible values are:
  • HD
  • PPV
  • Music
Only channels in the source ID list that meet that attribute will be returned.
starttime No Beginning of the time period covered by the schedule, specified as a DateTime value that is between the time of the request and two weeks in the future. The default is the time of the request.

Note: The schedule is determined by duration, inprogress, and starttime.

titletype No Type of program title to return as described in the TitleType table. Most programs do not carry all title types, so we recommend using the default unless another type is required. If a program does not have the type specified, the default title is 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/Schedule

ResponseTypeDescription
airings VideoAiring [ ] Broadcasts of the movie or program.
duration integer Number of minutes the broadcast schedule covers.
locale string Language and country code of the response.
name string Name of the television service in less than 50 characters.
serviceId integer Database ID of the television service.
serviceType string Type of television service.
startDateTime string Starting date and time of the broadcast schedule.
timeZones TimeZoneInfo [ ] UTC offset applicable to a television service and when the offset begins and ends. Television broadcast times are returned in UTC time, and you need to apply the offset to calculate the local time. UTC offsets change with daylight savings time.

JSON Response Example

Here's the response for Request Example 1, which asks for broadcasts of Breaking Bad over the next two weeks on Time Warner Cable in Beverly Hills, California, but returning just the first one in the list. 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/schedule?apikey=apikey&sig=sig&cosmoid=7221538&
serviceid=360861&count=1
.
{
   "status":"ok",
   "code":200,
   "messages":null,
   "build":"1.7.0.1",
   "parameters":{
      "apiKey":"4p1k3y",
      "id":"7221538",
      "offset":0,
      "count":1,
      "serviceid":"360861"
   },
   "view":{
      "offset":0,
      "count":1,
      "total":8
   },
   "serverName":"tul1cstw3",
   "startTime":"2011-08-17T23:24:27.4361890Z",
   "endTime":"2011-08-17T23:24:29.4361890Z",
   "duration":2000,
   "parentIds":{
      "cosmoId":"7221538"
   },
   "schedule":{
      "locale":"en-US",
      "serviceId":360861,
      "name":"Beverly Hills - Time Warner Cable- Walnut/Diamond Bar",
      "serviceType":"Cable",
      "startDateTime":"2011-08-17T23:24:27.4361890Z",
      "duration":20160,
      "timezones":[
         {
            "startDateTime":"2011-03-13T10:00:00.0000000Z",
            "endDateTime":"2011-11-06T09:00:00.0000000Z",
            "offset":-420
         }
      ],
      "airings":[
         {
            "ids":{
               "amgMovieId":null,
               "cosmoId":"19597636",
               "iguideId":null
            },
            "time":"2011-08-22T03:04:00.0000000Z",
            "type":0,
            "aspectRatio":"4:3 Fullscreen",
            "callLetters":"AMC",
            "category":"Other",
            "atts":289,
            "channel":"38",
            "colorType":"Color",
            "desc":"Mike gets some surprise help from Jesse; a shocking discovery unsettles Skyler; Walter Jr. leans on his father to make a special purchase.",
            "descSource":null,
            "duration":62,
            "episodeTitle":"Cornered",
            "hdLevel":0,
            "ratings":{
               "tv":"TV-14@L",
               "movie":null
            },
            "parentNetworkId":38,
            "seriesId":"7221538",
            "serviceId":360861,
            "showingType":0,
            "sourceDisplayName":"AMC-E",
            "sourceId":433,
            "sourceFullName":"American Movie Classics (East)",
            "sourceName":"AMC",
            "subcategory":"comedy-drama",
            "subtitleLanguage":"",
            "title":"Breaking Bad"
         }
      ]
   }
}

XML Response Example

Here's the response to Request Example 2, which asks for broadcasts of The Simpsons over the next 12 hours on Digital Plus satellite in Barcelona, Spain, but return just the first one in the list in an XML response.
Requested with http://api.rovicorp.com/data/v1.1/video/schedule?apikey=apikey&sig=sig&cosmoid=7903&
serviceid=890508&duration=720&country=es&language=es&count=1&format=xml
.
<VideoSchedule 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>1</count>
    <format>xml</format>
    <country>es</country>
    <language>es</language>
    <duration>720</duration>
    <serviceid>890508</serviceid>
  </parameters>
  <view>
    <offset>0</offset>
    <count>1</count>
    <total>28</total>
  </view>
  <serverName>tul1cssw3</serverName>
  <startTime>2011-08-18T00:03:03.5554616Z</startTime>
  <endTime>2011-08-18T00:03:03.5867114Z</endTime>
  <duration>31</duration>
  <parentIds>
    <cosmoId>15782574</cosmoId>
  </parentIds>
  <schedule>
    <locale>ES-ES</locale>
    <serviceId>890508</serviceId>
    <name>Digital Plus with Spain Area Channels (Central Europe)</name>
    <serviceType>Satellite</serviceType>
    <startDateTime>2011-08-18T00:03:03.5554616Z</startDateTime>
    <duration>20160</duration>
    <timezones>
      <TimeZoneInfo>
        <startDateTime>2011-03-27T01:00:00.0000000Z</startDateTime>
        <endDateTime>2011-10-30T00:00:00.0000000Z</endDateTime>
        <offset>120</offset>
      </TimeZoneInfo>
    </timezones>
    <airings>
      <VideoAiring>
        <ids>
          <amgMovieId i:nil="true"/>
          <cosmoId>15782574</cosmoId>
        </ids>
        <time>2011-08-18T12:00:00.0000000Z</time>
        <type>Unknown</type>
        <aspectRatio>4:3 Fullscreen</aspectRatio>
        <callLetters>AN3</callLetters>
        <category>Other</category>
        <atts>0</atts>
        <channel>13</channel>
        <colorType>Color</colorType>
        <desc>Los Simpson&apos; son una peculiar familia norteamericana de clase media. Homer, el padre, trabaja en la central nuclear de la ciudad, y es desordenado y gruñón, mientras que Marge, la madre, es sensata, comprensiva y algo ingenua. En cuanto a los hijos, se trata de tres &apos;adorables&apos; criaturas cuya principal afición es protestar por todo: Bart, Lisa y Maggie.</desc>
        <descSource>
          <sourceId>25451</sourceId>
          <sourceName>Fox (Spain)</sourceName>
        </descSource>
        <duration>30</duration>
        <episodeTitle i:nil="true"/>
        <hdLevel>Unknown</hdLevel>
        <ratings>
          <tv>None</tv>
          <movie i:nil="true"/>
        </ratings>
        <parentNetworkId>0</parentNetworkId>
        <seriesId i:nil="true"/>
        <serviceId>890508</serviceId>
        <showingType>Unknown</showingType>
        <sourceDisplayName>AN3</sourceDisplayName>
        <sourceId>24802</sourceId>
        <sourceFullName>Antena 3</sourceFullName>
        <sourceName>AN3</sourceName>
        <subcategory>animated comedy</subcategory>
        <subtitleLanguage/>
        <title>Los Simpson</title>
      </VideoAiring>
    </airings>
  </schedule>
</VideoSchedule>


See Also

↑ Top

Personal tools