🍿 @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_idnumberTMDB movie identifier.
languageLanguageLanguage for localized results. Defaults to en-US.

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}`);

On this page