Discover
Discover movies and TV series using TMDB's advanced filtering and sorting options.
The DiscoverAPI exposes TMDB's discover endpoints for movies and TV series.
These methods support rich filtering, sorting, and pagination for building catalog views.
import { TMDB } from "@lorenzopant/tmdb";
const tmdb = new TMDB("your-api-key");
const movies = await tmdb.discover.movie({ sort_by: "popularity.desc" });
const series = await tmdb.discover.tv({ sort_by: "vote_average.desc" });Methods
movie()— Discover movies using filters such as release dates, certifications, cast, watch providers, and sort order.tv()— Discover TV series using filters such as air dates, status, type, networks, watch providers, and sort order.
Building query parameters
Many discover filters (with_genres, vote_average.gte/.lte, etc.) expect a serialized
comma/pipe string or a .gte/.lte key pair rather than a plain value. See the
Discover Query Builder guide for standalone
helper functions and fluent builder classes that construct these params for you.