TV
Get trending TV shows on TMDB for a given time window.
Get the trending TV shows on TMDB. Each result item includes the media_type: "tv" discriminator.
async tv(params: TrendingParams): Promise<PaginatedResponse<TrendingTVResult>>TMDB Reference: Trending TV
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
time_window | TrendingTimeWindow | ✅ | Time window for trending data. "day" covers the last 24 hours, "week" covers the last 7 days. |
language | Language | ❌ | Language for localized results. Defaults to en-US. |
Returns
A PaginatedResponse<TrendingTVResult> containing
an array of TrendingTVResult objects.
Example
import { TMDB } from "@lorenzopant/tmdb";
const tmdb = new TMDB("your-api-key");
const { results } = await tmdb.trending.tv({ time_window: "day" });
console.log(results[0].name); // "The Mandalorian"
console.log(results[0].first_air_date); // "2019-11-12"
console.log(results[0].media_type); // "tv"