V1.Metadata.MovieService.Movie:Videos

Jump to: navigation, search

Movie/Videos

Returns data you can use to construct links to movie trailers hosted by Video Detective, a provider of videos and movie trailers. Trailers are available in all of the formats you need to guarantee high quality previews on web, mobile, iPad, and IPTV.

This request requires the following:

  • Our Video Experience subscription package.
  • A developer account with Internet Video Archive, a Video Detective site.
  • Use of an Internet Video Archive API.

Syntax

movie/videos? movie=movie
movieid=movieid
cosmoid=cosmoid
&apikey=apikey&sig=sig [&format=format] [&offset=offset] [&count=count] [&country=country] [&language=language]

Request Example 1

Request data for links to movie trailers for Grease using the movie ID.

Request Example 2

Request the data using the title of the movie.

Request Example 3

Request the data for the first movie trailer in the list.

Request Example 4

Request the data for the second movie trailer in the list.

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 authorization code. To perform the calculation, execute the MD5 function on the concatenation of the following three 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.

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 or television series. Cosmo is a database of television information.

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

  • movie
  • movieId
  • cosmoId
movie Conditional Keywords from the title of the movie or TV series. This searches for the most popular title with that combination of words. Replace spaces with plus (+) or percent20 (%20) symbols.

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

  • movie
  • movieId
  • cosmoId
movieid Conditional AMG ID of a movie or TV series, consisting of the letter V followed by 9 digits with leading spaces. When using an AMG Video ID in a request, replace any spaces in the ID with plus (+) or percent20 (%20) symbols, like this: V+++295550. Your application can grab movie IDs from responses to the following requests:

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

  • movie
  • movieId
  • cosmoId
count No Number of items to be returned. The default is zero, which returns all items after the offset.

Use count and offset to paginate the response.

country No Country of the language of the response. The current release of the API supports only US.
format No Format of the returned data: json or xml. The default is JSON.
language No Language of the response data. This request supports only en (English).
offset No Number of items at the start of the returned list to skip. The default is zero.

Use count and offset to paginate the response.

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.
parametersparametersList of the parameters included in the request.
parentIdsparentIdsAll of the IDs for the requested object that are recognized by the API.
serverNameStringName of the server that processed the request.
startTimeStringWhen the server received the request (UTC time).
statusStringText part of the HTTP status code that is shown in the code field.
viewviewSummary of items returned in a list of items.

Response for Movie/Videos

ResponseTypeDescription
videos Video [ ] Data for constructing links to trailers of the movie specified in the request.

JSON Response Example

Here's the response to Request Example 2. It is formatted with extra spaces and carriage returns to make it easy to read.
{
  "status":"ok",
  "code":200,
  "messages":null,
  "build":"1.5.1.9",
  "parameters":{
    "apiKey":"apikey",
    "id":"grease"
  },
  "view":{
    "total":2
  },
  "serverName":"tul1cssw2",
  "startTime":"2011-04-27T17:13:39.2764160Z",
  "endTime":"2011-04-27T17:13:40.0576710Z",
  "duration":781,
  "parentIds":{
    "cosmoId":"262068",
    "movieId":"V   20546"
  },
  "videos":[
    {
      "id":"720",
      "screenshot":"http:\/\/actual-url-concealed.jpg",
      "provider":"Video Detective",
      "title":"Grease"
    },
    {
      "id":"943537",
      "screenshot":"http:\/\/actual-url-concealed.jpg",
      "provider":"Video Detective",
      "title":"Grease"
    }
  ]
}

XML Response Example

Here's an XML response to Request Example 2.
<MovieVideos 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.5.1.9</build>
  <parameters>
    <apiKey>apikey</apiKey>
    <id>grease</id>
    <format>xml</format>
  </parameters>
  <view>
    <total>2</total>
  </view>
  <serverName>tul1cssw1</serverName>
  <startTime>2011-04-27T17:14:43.8552783Z</startTime>
  <endTime>2011-04-27T17:14:43.8709034Z</endTime>
  <duration>15</duration>
  <parentIds>
    <cosmoId>262068</cosmoId>
    <movieId>V 20546</movieId>
  </parentIds>
  <videos>
    <Video>
      <id>720</id>
      <screenshot>http://actual-url-concealed.jpg</screenshot>
      <provider>Video Detective</provider>
      <title>Grease</title>
    </Video>
    <Video>
      <id>943537</id>
      <screenshot>http://actual-url-concealed.jpg</screenshot>
      <provider>Video Detective</provider>
      <title>Grease</title>
    </Video>
  </videos>
</MovieVideos>


See Also

↑ Top

Personal tools