🍿 @lorenzopant/tmdb

By ID

Find TMDB resources by external ID.

Find movies, TV shows, TV seasons, TV episodes, or people by external ID.

async by_id(params: FindByIDParams): Promise<FindResults>

TMDB Reference: Find By ID

Notes

  • The endpoint returns grouped result arrays: movie_results, tv_results, tv_season_results, tv_episode_results, and person_results.
  • Only one or some of these arrays may contain matches for a given external_id.
  • If the external_id and external_source combination is valid syntactically but does not match a TMDB record, TMDB returns empty arrays.

Supported external sources

SourceMoviesTV ShowsTV SeasonsTV EpisodesPeople
IMDb
Facebook
Instagram
TheTVDB
TikTok
Twitter
Wikidata
YouTube

Parameters

NameTypeRequiredDescription
external_idstringExternal identifier to look up, such as an IMDb ID.
external_sourceFindExternalSourceSource namespace the external ID belongs to.
languageLanguageLanguage used for localized result fields.

Returns

FindResults

Example

const result = await tmdb.find.by_id({
	external_id: "tt0137523",
	external_source: "imdb_id",
});

console.log(result.movie_results[0]?.title); // Fight Club
console.log(result.tv_results); // []

Types

On this page