The Movie Database Support

Is there a way to display trailers via the API?

4 replies (on page 1 of 1)

Jump to last post

Hi @prywaretechnologies,

We only store YouTube and Vimeo IDs, which is to say, we provide a way for you to find the trailer to play, but it's up to you to integrate the YouTube player according to their own terms of service.

Request

curl -v "https://api.themoviedb.org/3/movie/545611/videos?api_key=###"

*   Trying 18.65.229.12:443...
* Connected to api.themoviedb.org (18.65.229.12) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_128_GCM_SHA256
* ALPN, server accepted to use h2
* Server certificate:
*  subject: CN=*.themoviedb.org
*  start date: Oct 21 00:00:00 2021 GMT
*  expire date: Nov 18 23:59:59 2022 GMT
*  subjectAltName: host "api.themoviedb.org" matched cert's "*.themoviedb.org"
*  issuer: C=US; O=Amazon; OU=Server CA 1B; CN=Amazon
*  SSL certificate verify ok.
* Using HTTP2, server supports multiplexing
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* h2h3 [:method: GET]
* h2h3 [:path: /3/movie/545611/videos?api_key=###]
* h2h3 [:scheme: https]
* h2h3 [:authority: api.themoviedb.org]
* h2h3 [user-agent: curl/7.82.0]
* h2h3 [accept: */*]
* Using Stream ID: 1 (easy handle 0x7fcd08810200)
> GET /3/movie/545611/videos?api_key=### HTTP/2
> Host: api.themoviedb.org
> user-agent: curl/7.82.0
> accept: */*
>
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* Connection state changed (MAX_CONCURRENT_STREAMS == 128)!
< HTTP/2 200
< content-type: application/json;charset=utf-8
< content-length: 1189
< date: Fri, 20 May 2022 14:12:31 GMT
< server: openresty
< access-control-allow-origin: *
< access-control-allow-methods: GET, HEAD, POST, PUT, DELETE, OPTIONS
< access-control-expose-headers: ETag, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, Retry-After, Content-Length, Content-Range
< cache-control: public, max-age=28800
< x-memc: HIT
< x-memc-key: 813f0cda21ab682e441547ae70d7739cabc91fc0
< x-memc-age: 3680
< x-memc-expires: 11070
< etag: W/"40d5981fa849a7765c4abfe7e0cde2ed"
< vary: Accept-Encoding,Accept-Encoding,Accept-Encoding
< x-cache: Miss from cloudfront
< via: 1.1 e95ec8f1dc02e32f0cb9e113963ceb4e.cloudfront.net (CloudFront)
< x-amz-cf-pop: SEA73-P1
< x-amz-cf-id: BojIzizFsSwsWEqpa-fmSNdjdiMZPuDPkXy_Eb-6paHUg_bdKT6SyA==
<
* Connection #0 to host api.themoviedb.org left intact

Response

{
  "id": 545611,
  "results": [
    {
      "iso_639_1": "en",
      "iso_3166_1": "US",
      "name": "Everything Everywhere All At Once | Meet the Filmmakers | Official Featurette HD | A24",
      "key": "A7DgDpURLRY",
      "site": "YouTube",
      "size": 1080,
      "type": "Featurette",
      "official": true,
      "published_at": "2022-04-15T21:38:48.000Z",
      "id": "627eb89263d71300a2079f90"
    },
    {
      "iso_639_1": "en",
      "iso_3166_1": "US",
      "name": "Clip - Love Bomb",
      "key": "a5X-2dhFvEQ",
      "site": "YouTube",
      "size": 1080,
      "type": "Clip",
      "official": false,
      "published_at": "2022-03-24T13:00:00.000Z",
      "id": "623c706ea34911005dc7f6ba"
    },
    {
      "iso_639_1": "en",
      "iso_3166_1": "US",
      "name": "Official Promo 2",
      "key": "mQPlarSkdZ8",
      "site": "YouTube",
      "size": 1080,
      "type": "Teaser",
      "official": true,
      "published_at": "2022-03-17T17:40:24.000Z",
      "id": "6235e7a7894ed60046754532"
    },
    {
      "iso_639_1": "en",
      "iso_3166_1": "US",
      "name": "Official Promo 1",
      "key": "p2FEhTw7XWk",
      "site": "YouTube",
      "size": 1080,
      "type": "Teaser",
      "official": true,
      "published_at": "2022-03-17T17:40:14.000Z",
      "id": "6235e74ed7cd06001cdf6c7b"
    },
    {
      "iso_639_1": "en",
      "iso_3166_1": "US",
      "name": "Official Trailer",
      "key": "wxN1T1uxQ2g",
      "site": "YouTube",
      "size": 1080,
      "type": "Trailer",
      "official": true,
      "published_at": "2021-12-14T13:57:38.000Z",
      "id": "61b8a5399d8939008f74f7b8"
    }
  ]
}

Thanks

Thanks

Can't find a movie or TV show? Login to create it.

Global

s focus the search bar
p open profile menu
esc close an open window
? open keyboard shortcut window

On media pages

b go back (or to parent when applicable)
e go to edit page

On TV season pages

(right arrow) go to next season
(left arrow) go to previous season

On TV episode pages

(right arrow) go to next episode
(left arrow) go to previous episode

On all image pages

a open add image window

On all edit pages

t open translation selector
ctrl+ s submit form

On discussion pages

n create new discussion
w toggle watching status
p toggle public/private
c toggle close/open
a open activity
r reply to discussion
l go to last reply
ctrl+ enter submit your message
(right arrow) next page
(left arrow) previous page

Settings

Want to rate or add this item to a list?

Login