🍿 @lorenzopant/tmdb

API Reference

This section lists all the available methods in @lorenzopant/tmdb

@lorenzopant/tmdb exposes the full TMDB API surface through a set of focused, typed client classes. You can use them in two ways: through the unified TMDB client, or as standalone classes when you only need a specific subset of functionality.

Using the unified client

The TMDB class bundles all APIs under a single instance. This is the recommended approach for most use cases.

import { TMDB } from "@lorenzopant/tmdb";

const tmdb = new TMDB("your-api-key", {
	language: "en-US",
	region: "US",
});

// Access any API namespace directly
const popular = await tmdb.movies.popular();
const trending = await tmdb.tvSeries.trending("day");
const results = await tmdb.search.movie({ query: "Inception" });

Using standalone API classes

Each API is also available as a standalone class — useful when you want to tree-shake or only import what you need.

import { MoviesAPI } from "@lorenzopant/tmdb";

const moviesApi = new MoviesAPI("your-api-key", {
	language: "it-IT",
	region: "IT",
});

const popular = await moviesApi.popular();
const details = await moviesApi.details(550);
import { SearchAPI } from "@lorenzopant/tmdb";

const searchApi = new SearchAPI("your-api-key");
const results = await searchApi.movie({ query: "The Godfather" });
import { TVSeriesAPI } from "@lorenzopant/tmdb";

const tvApi = new TVSeriesAPI("your-api-key", {
	language: "ja-JP",
	timezone: "Asia/Tokyo",
});

const airingToday = await tvApi.airingToday();

Available APIs

APIUnified client accessorStandalone classDescription
Discovertmdb.discoverDiscoverAPIDiscover movies and TV series with advanced TMDB filters, sorting, and pagination.
Findtmdb.findFindAPIFind movies, TV shows, seasons, episodes, and people by external IDs.
Watch Providerstmdb.watch_providersWatchProvidersAPIRetrieve movie/TV provider catalogs and supported watch-provider regions.
Keywordstmdb.keywordsKeywordsAPIRetrieve keyword details and the associated movie list by TMDB keyword ID.
Companiestmdb.companiesCompaniesAPIGet company details, alternative names, and logos for production companies.
Networkstmdb.networksNetworksAPIGet TV network details, alternative names, and logos by TMDB network ID.
Configurationtmdb.configurationConfigurationAPIRetrieve system-level configuration such as image base URLs and languages.
Genrestmdb.genresGenresAPIFetch the list of official movie and TV series genres.
Movie Liststmdb.movieListsMovieListsAPIAccess curated movie lists: popular, top rated, now playing, and upcoming.
Moviestmdb.moviesMoviesAPIGet movie details, credits, images, videos, recommendations, and more.
Searchtmdb.searchSearchAPISearch for movies, TV series, people, and keywords across the TMDB catalog.
TV Seriestmdb.tvSeriesTVSeriesAPIGet TV series details, episodes, seasons, credits, and recommendations.
TV Series Liststmdb.tvSeriesListsTVSeriesListsAPIAccess curated TV series lists: popular, top rated, airing today, and on the air.

Constructor signature

All standalone API classes share the same constructor signature:

new SomeAPI(apiKey: string, options?: TMDBOptions)
ParameterTypeDescription
apiKeystringYour TMDB API key.
optionsTMDBOptionsOptional default values for language, region, timezone and images.

See the Options reference for the full list of available configuration options.

On this page