People
Get trending people on TMDB for a given time window.
Get the trending people on TMDB. Each result item includes the media_type: "person" discriminator and a known_for array listing notable movies and TV shows.
async people(params: TrendingParams): Promise<PaginatedResponse<TrendingPersonResult>>TMDB Reference: Trending People
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<TrendingPersonResult> containing
an array of TrendingPersonResult objects.
Example
import { TMDB } from "@lorenzopant/tmdb";
const tmdb = new TMDB("your-api-key");
const { results } = await tmdb.trending.people({ time_window: "day" });
const person = results[0];
console.log(person.name); // "Ana de Armas"
console.log(person.known_for_department); // "Acting"
console.log(person.known_for[0].media_type); // "movie" | "tv"