🍿 @lorenzopant/tmdb

Videos

Get trailers, teasers, and clips for a movie.

Get the available videos for a movie, including trailers, teasers, featurettes, and clips.

async videos(params: MovieVideosParams): Promise<MovieVideos>

TMDB Reference: Movie Videos

Parameters

NameTypeRequiredDescription
movie_idnumber✅TMDB movie identifier.
languageLanguage❌Language for localized results. Defaults to en-US.
include_video_languagestring❌Comma-separated ISO 639-1 codes of extra video languages to include (e.g. "it,en,null"). Without it, only videos tagged with language are returned.

By default TMDB only returns videos tagged with language, which is often nothing for non-English languages. Pass include_video_language to widen the set, e.g. "it,en,null" for Italian, English and untagged videos.

Returns

MovieVideos

Example

const { results } = await tmdb.movies.videos({ movie_id: 550 });

const trailer = results.find((v) => v.type === "Trailer");
console.log(`https://www.youtube.com/watch?v=${trailer?.key}`);

// Italian videos plus the English trailers
const { results: all } = await tmdb.movies.videos({ movie_id: 550, language: "it-IT", include_video_language: "it,en" });

On this page