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

Jump to: navigation, search

Video/Images

Returns links to movie and television program images.

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/images? video=video
cosmoid=cosmoid
iguideid=iguideid
&apikey=apikey&sig=sig [&format=format] [&country=country] [&language=language] [&localeresolution=localeresolution] [&formatid=formatid] [&imagecount=imagecount] [&imageoffset=imageoffset] [&imagesize=imagesize] [&imagesort=imagesort] [&imagetypeid=imagetypeid] [&zoomlevel=zoomlevel]

Request Example 1

Request images from The Simpsons television series.

Request Example 2

Request the first two images from the The Simpsons Movie.

Request Example 3

Request the first two images from the The Simpsons Movie in an XML response.

Request Example 4

Request images that are in the range of 70 to 100 pixels in both dimensions.

Request Example 5

Request two JPGs that fit a bounding box of 250 pixels in one or both dimensions.

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.
formatid No Size and file format of returned images. Select the format IDs you want from the Format IDs table.

Specify multiple format IDs in a comma-separated list, like this: formatid=36,44,51.

Returned images meet a combination of all of the following specified filters:

  • formatid
  • imagesize
  • imagetypeid
  • zoomlevel
imagecount No Number of images to be returned. If fewer images are available, the available images are returned without error. The default is 25.

Use imagecount and imageoffset to paginate the response.

imageoffset No Number of images at the start of the response to skip. The default is zero.

Use imagecount and imageoffset to paginate the response. These parameters execute last, after any filtering and sorting parameters.

imagesize No Image sizes to be returned. Images are not dynamically resized to fit, so only available sizes are returned.
  • Specify an exact size in width x height format, like this: imagesize=332x419.
  • Specify a size range in width x height format, like this: imagesize=60-80x80-100.
  • Specify multiple sizes in a comma-separated list, like this: imagesize=332x419,60-80x80-100.

Returned images meet a combination of all of the following specified filters:

  • formatid
  • imagesize
  • imagetypeid
  • zoomlevel
imagesort No Sort order of returned images. Images can be sorted in ascending or descending order by the following properties:
  • width
Image width.
  • height
Image height.
  • formatid
Image format ID, as shown in the Format IDs table.
  • author
Person or company that took the photo.
  • copyrightowner  
Company that owns the image copyright.
  • url
URL to the image (ASCII sort).
  • imageorder
Image type sequence, as shown in the Image Order table.
  • zoomlevel
How close up people in the image appear, as shown in the Image Zoom Level table.

Specify a descending sort order with a minus (-) sign, like this: imagesort=-width.
Specify a multilevel sort in highest-to-lowest order in a comma-separated list, like this: imagesort=formatid,-height,width.

Note: A request cannot include both the multi and imagesort parameters.

imagetypeid No Image type of returned images. Select the IDs you want from the Image Type IDs table.

Specify multiple image type IDs in a comma-separated list, like this: imagetypeid=2,14. To change the order in which image types are returned, use the imagesort parameter.

Returned images meet a combination of all of the following specified filters:

  • formatid
  • imagesize
  • imagetypeid
  • zoomlevel
language No Language of response data. Although this request currently returns only English responses, you can specify a preferred language to be ready for future language expansion. Valid language codes are:
  • 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.

multi No How to score images against multiple filters and multiple filter values. Applies to formatid, imagetype, and zoomlevel. Default is balanced.
This value . . .Decrements the score for each value in a list . . .
balancedIn equal proportion to the number of values. For four values, the score decrements by 25 percent. For three, by 33 percent.
fuzzyIn less than equal proportion to the number of values, decreasing the importance of the first value. For four values, the score decrements by less than 25 percent.
targetedIn more than equal proportion to the number of values, increasing the importance of the first value. For four values, the score decrements by more than 25 percent.
diminishedLess for the first parameter in the request and more for the last. For this option, list your parameters in order of importance.
zoomlevel No If you specify Images in the include parameter, zoomlevel specifies how close up people appear in the image. Select the zoom level you want from the Image Zoom Level table.

Specify multiple zoom levels in a comma-separated list, like this: zoomlevel=2,3. To change the order in which the image zoom levels are returned, use the imagesort parameter.

Returned images meet a combination of all of the following specified filters:

  • formatid
  • imagesize
  • imagetypeid
  • zoomlevel

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/Images

ResponseTypeDescription
images Image [ ] URLs to images of the movie or program specified in the request, along with information about the images.

Images are returned in image type sequence as shown in the Image Order table. If the program is an episode, then episode images appear before images of the series master.

JSON Response Example

Here's the response to Request Example 2, which asks for the first two images from the The Simpsons Movie. 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/images?apikey=apikey&sig=sig&cosmoid=6941396&
imagecount=2
.
{
   "status":"ok",
   "code":200,
   "messages":null,
   "build":"1.0",
   "parameters":{
      "apiKey":"4p1k3y",
      "id":"6941396",
      "imageOffset":0,
      "imageCount":2
   },
   "view":{
      "offset":0,
      "count":2,
      "total":332
   },
   "serverName":"tul1cssrcs2.corporate.local",
   "startTime":"2012-03-23T19:31:06Z",
   "endTime":"2012-03-23T19:31:06Z",
   "duration":55,
   "parentIds":{
      "cosmoId":"6941396"
   },
   "images":[
      {
         "height":2623,
         "width":1967,
         "formatid":0,
         "url":"http://actual-url-concealed.jpg",
         "author":"20th Century Fox",
         "copyrightOwner":null,
         "imageTypeId":27,
         "zoomLevel":3
      },
      {
         "height":128,
         "width":98,
         "formatid":1,
         "url":"http://actual-url-concealed.jpg",
         "author":"20th Century Fox",
         "copyrightOwner":null,
         "imageTypeId":27,
         "zoomLevel":3
      }
   ]
}

XML Response Example

Here's the response to Request Example 3, which asks for the first two images from the The Simpsons Movie in an XML response.
Requested with http://api.rovicorp.com/data/v1.1/video/images?apikey=apikey&sig=sig&cosmoid=6941396&
imagecount=2&format=xml
.
<VideoImages 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.0</build>
  <parameters>
    <apiKey>4p1k3y</apiKey>
    <id>6941396</id>
    <imageOffset>0</imageOffset>
    <imageCount>2</imageCount>
    <format>xml</format>
  </parameters>
  <view>
    <offset>0</offset>
    <count>2</count>
    <total>332</total>
  </view>
  <serverName>tul1cssrcs1.corporate.local</serverName>
  <startTime>2012-03-23T19:33:00Z</startTime>
  <endTime>2012-03-23T19:33:01Z</endTime>
  <duration>25</duration>
  <parentIds>
    <cosmoId>6941396</cosmoId>
  </parentIds>
  <images>
    <Image>
      <height>2623</height>
      <width>1967</width>
      <formatid>0</formatid>
      <url>http://actual-url-concealed.jpg</url>
      <author>20th Century Fox</author>
      <copyrightOwner i:nil="true"/>
      <imageTypeId>27</imageTypeId>
      <zoomLevel>3</zoomLevel>
    </Image>
    <Image>
      <height>128</height>
      <width>95</width>
      <formatid>1</formatid>
      <url>http://actual-url-concealed.jpg</url>
      <author>20th Century Fox</author>
      <copyrightOwner i:nil="true"/>
      <imageTypeId>27</imageTypeId>
      <zoomLevel>3</zoomLevel>
    </Image>
  </images>
</VideoImages>


See Also

↑ Top

Personal tools