🍿 @lorenzopant/tmdb

Videos

Get trailers, teasers, and clips for a TV show.

Get the videos that belong to a TV show, including trailers, teasers, and featurettes.

async videos(params: TVVideosParams): Promise<TVVideos>

TMDB Reference: TV Series Videos

Parameters

NameTypeRequiredDescription
series_idnumber✅TMDB TV series 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

TVVideos

Example

const { results } = await tmdb.tv_series.videos({ series_id: 1396 });

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

On this page