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

Jump to: navigation, search

Video/Synopsis

Returns the best available synopsis associated with a movie or program.

Syntax

video/synopsis? video=video
cosmoid=cosmoid
iguideid=iguideid
&apikey=apikey&sig=sig [&format=format] [&country=country] [&language=language] [&localeresolution=localeresolution]

Request Example 1

Request the synopsis for the movie Indiana Jones and the Kingdom of the Crystal Skull.

Request Example 2

Request an XML response for the synopsis for Indiana Jones and the Kingdom of the Crystal Skull.

Request Example 3

Request the synopsis for the movie The English Patient.

Request Parameters

Sort none.gif  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 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
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.

format No Format of the returned data: json or xml. The default is JSON.
language No Language of program titles, synopses, and keywords, 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. The values are:
  • None
Return the content for the specified Cosmo ID.
  • Full
Fall back to the next available language per the fallback rules.
  • Exact   
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.
  • Targeted
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.

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.

Response for Video/Synopsis

ResponseTypeDescription
cuttingPositions string Character positions at which you can end the text to conserve space. A cutting position is the number of the last character to include, not the first character to cut. Add a period if needed (plus, for a quote, a closing single or double quotation mark).
language URL Language of the synopsis.
source string Source of the synopsis.
synopsis string The synopsis.

JSON Response Example

Here's the response to Request Example 1, which asks for the synopsis for the movie Indiana Jones and the Kingdom of the Crystal Skull. 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/synopsis?apikey=apikey&sig=sig&cosmoid=7967407.
{
   "status":"ok",
   "code":200,
   "messages":null,
   "build":"1.7.0.1",
   "parameters":{
      "apiKey":"apikey",
      "id":"7967407",
      "format":"json"
   },
   "serverName":"tul1cstw1",
   "startTime":"2011-09-12T19:09:24.0732481Z",
   "endTime":"2011-09-12T19:09:25.7607265Z",
   "duration":1687,
   "synopsis":{
      "synopsis":"Swashbuckling archaeologist Indiana Jones (Harrison Ford) returns to keep a weird artifact out of communist hands. Old friends return, new enemies appear and elaborate action sequences abound. Shia LaBoeuf, Ray Winstone, John Hurt.",
      "source":null,
      "language":"English",
      "cuttingPositions":"65,114,192,205,219"
   }
}

XML Response Example

Here's the response to Request Example 2, which asks for the synopsis for the movie Indiana Jones and the Kingdom of the Crystal Skull in an XML response.
Requested with http://api.rovicorp.com/data/v1.1/video/synopsis?apikey=apikey&sig=sig&cosmoid=7967407&
format=xml
..
<VideoSynopsis 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>apikey</apiKey>
      <id>7967407</id>
      <format>xml</format>
   </parameters>
   <serverName>tul1cstw1</serverName>
   <startTime>2011-09-12T19:13:59.4915977Z</startTime>
   <endTime>2011-09-12T19:13:59.7884689Z</endTime>
   <duration>296</duration>
   <synopsis>
      <synopsis>Swashbuckling archaeologist Indiana Jones (Harrison Ford) returns to keep a weird artifact out of communist hands. Old friends return, new enemies appear and elaborate action sequences abound. Shia LaBoeuf, Ray Winstone, John Hurt.</synopsis>
      <source i:nil="true"/>
      <language>English</language>
      <cuttingPositions>65,114,192,205,219</cuttingPositions>
   </synopsis>
</VideoSynopsis>


See Also

↑ Top

 
Personal tools