Skip to content
@deckyard/tmdb

Cheatsheet

Every export, by topic. Call them through the module alias: movie(c as Client, movieId as int) here is tmdb.movie($c, 550) in code. The docblocks in src/topics/ and the guides give the details.

  • Ids must be positive and pages run from 1 to MAX_PAGE (500); both are checked before the request.
  • A null or missing field reads as "", 0, false or [].
  • Every failure is Error{kind: "tmdb"}; see Errors.

Client and plumbing

Building and configuring a client, and the escape hatches for endpoints without a typed verb. Guide: Installing and importing.

constantvaluemeaning
API_BASE"https://api.themoviedb.org"Host both API generations answer on.
APPROVAL_BASE"https://www.themoviedb.org/auth/access"Page where a user approves a v4 request token.
DEFAULT_TIMEOUT_MS15000Per-request idle timeout of a fresh client, in milliseconds.
DEFAULT_RETRIES2Times a fresh client retries a 429 or 5xx before giving up.
DEFAULT_BACKOFF_MS500Base delay of a fresh client before a retry, in milliseconds.
MAX_RESPONSE_BYTES16777216Largest response body the client reads, in bytes (16 MiB).
DEFAULT_LANGUAGE"en-US"The language a fresh client sends.
MAX_PAGE500Highest page number TMDB serves.
functionreturnswhat it does
client(readAccessToken as string)ClientBuild a client around a TMDB API read access token.
clientFromApiKey(apiKey as string)ClientBuild a v3-only client around the legacy API key.
clientFromEnv()ClientBuild a client from the TMDB_* environment variables.
withLanguage(c as Client, language as string)ClientA copy of the client that asks for another language.
withRegion(c as Client, region as string)ClientA copy of the client pinned to a release region.
withUserToken(c as Client, userToken as string)ClientA copy of the client acting for a signed-in user.
withAdult(c as Client, enabled as bool)ClientA copy of the client that includes or excludes adult titles.
withTimeout(c as Client, timeoutMs as int)ClientA copy of the client with another per-request idle timeout.
withRetries(c as Client, retries as int)ClientA copy of the client with another retry budget for a 429 or 5xx.
withBackoff(c as Client, backoffMs as int)ClientA copy of the client with another base delay between retries.
setVerbose(c as Client, enabled as bool)ClientA copy of the client that prints every request it makes.
isVerbose(c as Client)boolWhether the client prints its requests.
hasBearer(c as Client)boolWhether the client can reach the v4 endpoints.
hasUser(c as Client)boolWhether the client acts for a signed-in user.
call(c as Client, path as string, params as map of string to string)json.ValueGET any TMDB path and return the decoded body.
callPost(c as Client, path as string, body as json.Value)json.ValuePOST a JSON body to any TMDB path and return the decoded reply.
callPut(c as Client, path as string, body as json.Value)json.ValuePUT a JSON body to any TMDB path and return the decoded reply.
callDelete(c as Client, path as string, body as json.Value)json.ValueDELETE any TMDB path with a JSON body and return the decoded reply.
mediaKindName(kind as MediaKind)stringThe media_type string TMDB writes for a media kind.
parseMediaKind(name as string)MediaKindRead a TMDB media_type string as a media kind.
year(date as string)stringThe year of a TMDB YYYY-MM-DD date, or "" when there is none.

MediaKind

The kind of a row in a mixed result set.

variant
Movie
Show
Person
Episode
Season
Unknown

Client

A configured TMDB caller.

fieldmeaning
token as stringthe API read access token, "" when unset
apiKey as stringthe legacy v3 API key, "" when unset
userToken as stringa v4 user access token, "" when unset
language as stringthe language parameter, e.g. "en-US"
region as stringtwo-letter release region, e.g. "US"; "" to omit
includeAdult as boolwhether search and discovery return adult titles
timeoutMs as intper-request idle timeout in milliseconds
retries as intretry budget for a 429 / 5xx
backoffMs as intbase delay between retries, in milliseconds
verbose as boolprint each request, credentials redacted

Shared entities

Structs several topics return, and helpers over them.

functionreturnswhat it does
genderName(gender as int)stringThe name of a TMDB gender code: 1 female, 2 male, 3 non-binary.
morePages(page as int, totalPages as int)boolWhether a paginated result set has a page after this one.
isMovie(item as MediaItem)boolWhether a mixed row is a film.
isShow(item as MediaItem)boolWhether a mixed row is a series.
isPerson(item as MediaItem)boolWhether a mixed row is a person.
onlyMovies(items as list of MediaItem)list of MediaItemThe films of a mixed page, in order.
onlyShows(items as list of MediaItem)list of MediaItemThe series of a mixed page, in order.
onlyPeople(items as list of MediaItem)list of MediaItemThe people of a mixed page, in order.
genreIndex(genres as list of Genre)map of string to stringIndex a genre list by id, for resolving genreIds.
genreNames(index as map of string to string, ids as list of int)list of stringThe genre names of a row, looked up in a genreIndex.

Genre

A genre id and its name.

fieldmeaning
id as intthe genre id, as used by withGenres in discovery
name as stringthe name, in the client's language

Company

A production company, as embedded in a film or series.

fieldmeaning
id as intthe company id
name as stringthe company name
logoPath as stringan image path for imageUrl, "" when there is none
originCountry as stringa two-letter country code, "" when unknown

Network

A television network.

fieldmeaning
id as intthe network id
name as stringthe network name
logoPath as stringan image path for imageUrl, "" when there is none
originCountry as stringa two-letter country code, "" when unknown

Country

A country from a production list, the configuration list or a region list.

fieldmeaning
code as stringthe two-letter ISO 3166-1 code
name as stringthe best available name
englishName as stringthe English name, "" when not given
nativeName as stringthe endonym, "" when not given

Language

A language, in either shape TMDB writes one.

fieldmeaning
code as stringthe ISO 639-1 code
name as stringthe endonym ("Deutsch"), "" when not given
englishName as stringthe English name ("German"), "" when not given

CollectionRef

The collection a film belongs to, as embedded in its record.

fieldmeaning
id as intthe collection id, 0 when the film is in none
name as stringthe collection name
posterPath as stringan image path for imageUrl
backdropPath as stringan image path for imageUrl

MovieSummary

A film as a row of a paginated movie list.

fieldmeaning
id as intthe movie id
title as stringthe title, in the client's language
originalTitle as stringthe title in its original language
overview as stringthe synopsis, "" when untranslated
posterPath as stringan image path for posterUrl
backdropPath as stringan image path for backdropUrl
releaseDate as stringYYYY-MM-DD, "" when unknown
genreIds as list of intgenre ids, resolvable with movieGenres
originalLanguage as stringan ISO 639-1 code
popularity as floatTMDB's popularity score
voteAverage as floatthe mean user rating, 0 to 10
voteCount as intnumber of ratings behind the mean
adult as boolwhether the title is adult
video as boolTMDB's flag for a direct-to-video release

ShowSummary

A series as a row of a paginated series list.

fieldmeaning
id as intthe series id
name as stringthe series name, in the client's language
originalName as stringthe name in its original language
overview as stringthe synopsis, "" when untranslated
posterPath as stringan image path for posterUrl
backdropPath as stringan image path for backdropUrl
firstAirDate as stringYYYY-MM-DD, "" when unknown
genreIds as list of intgenre ids, resolvable with showGenres
originalLanguage as stringan ISO 639-1 code
originCountry as list of stringthe producing countries
popularity as floatTMDB's popularity score
voteAverage as floatthe mean user rating, 0 to 10
voteCount as intnumber of ratings behind the mean
adult as boolwhether the series is adult

PersonSummary

A person as a row of a paginated people list.

fieldmeaning
id as intthe person id
name as stringthe name TMDB files them under
originalName as stringthe name in its original script
profilePath as stringan image path for profileUrl
knownForDepartment as stringe.g. "Acting", "Directing"
gender as int0 unknown, 1 female, 2 male, 3 non-binary - see genderName
popularity as floatTMDB's popularity score
adult as boolwhether the person is filed as adult
knownFor as list of MediaItemthe titles they are known for

MediaItem

One row of a mixed result set: a film, series, person, season or episode.

fieldmeaning
kind as MediaKindwhat this row is
id as intthe id, in the id space of kind
title as stringtitle for a film, name for a series or person
originalTitle as stringthe same, in the original language
overview as stringthe synopsis, "" for a person
posterPath as stringan image path for posterUrl
backdropPath as stringan image path for backdropUrl
profilePath as stringan image path for profileUrl, people only
releaseDate as stringthe first date given, "" for a person
genreIds as list of intgenre ids, empty for a person
originalLanguage as stringan ISO 639-1 code
originCountry as list of stringthe producing countries, series only
knownForDepartment as stringe.g. "Acting", people only
popularity as floatTMDB's popularity score
voteAverage as floatthe mean user rating, 0 to 10
voteCount as intnumber of ratings behind the mean
adult as boolwhether the row is adult
video as boolthe direct-to-video flag, films only

MoviePage

One page of films.

fieldmeaning
page as intthe page number, 1-based
totalPages as intthe page count TMDB reports, which may exceed MAX_PAGE
totalResults as intthe row count over all pages
results as list of MovieSummarythis page's rows

ShowPage

One page of series.

fieldmeaning
page as intthe page number, 1-based
totalPages as intthe page count TMDB reports, which may exceed MAX_PAGE
totalResults as intthe row count over all pages
results as list of ShowSummarythis page's rows

PersonPage

One page of people.

fieldmeaning
page as intthe page number, 1-based
totalPages as intthe page count TMDB reports, which may exceed MAX_PAGE
totalResults as intthe row count over all pages
results as list of PersonSummarythis page's rows

MediaPage

One page of mixed rows, from multi-search, trending or a custom list.

fieldmeaning
page as intthe page number, 1-based
totalPages as intthe page count TMDB reports, which may exceed MAX_PAGE
totalResults as intthe row count over all pages
results as list of MediaItemthis page's rows

Image

A still, poster, backdrop, logo or profile image.

fieldmeaning
filePath as stringthe image path, e.g. "/pB8BM7pdSp6B6Ih7QZ4DrQ3PmJK.jpg"
aspectRatio as floatwidth divided by height
width as intthe original width in pixels
height as intthe original height in pixels
language as stringthe ISO 639-1 code of any text in it, "" for none
voteAverage as floatthe mean user rating of this image
voteCount as intnumber of ratings behind the mean

Images

Every image attached to one object, by kind.

fieldmeaning
id as intthe object the images belong to
backdrops as list of Imagewide artwork
posters as list of Imagetall artwork
logos as list of Imagetitle treatments, usually transparent
stills as list of Imageepisode frames
profiles as list of Imagephotographs of a person

Video

A trailer, teaser, clip or featurette hosted on YouTube or Vimeo.

fieldmeaning
id as stringTMDB's id for this video record
name as stringthe video's title
key as stringthe id on site, e.g. a YouTube video id
site as stringthe host, "YouTube" or "Vimeo"
size as intthe vertical resolution, e.g. 1080
kind as stringTMDB's type: "Trailer", "Teaser", "Clip", ...
language as stringan ISO 639-1 code
region as stringan ISO 3166-1 code
official as boolwhether it comes from the rights holder
publishedAt as stringan ISO 8601 timestamp

CastMember

Someone in front of the camera.

fieldmeaning
id as intthe person id
name as stringthe performer's name
originalName as stringthe name in its original script
character as stringwho they played
creditId as stringthe credit's own id, for credit
order as intbilling order, 0 first
castId as intTMDB's per-film cast row id, 0 when not given
gender as intsee genderName
knownForDepartment as stringe.g. "Acting"
popularity as floatTMDB's popularity score
profilePath as stringan image path for profileUrl
adult as boolwhether the person is filed as adult

CrewMember

Someone behind the camera.

fieldmeaning
id as intthe person id
name as stringtheir name
originalName as stringthe name in its original script
job as stringthe specific job, e.g. "Director of Photography"
department as stringthe department the job sits in, e.g. "Camera"
creditId as stringthe credit's own id, for credit
gender as intsee genderName
knownForDepartment as stringwhat they are usually credited for
popularity as floatTMDB's popularity score
profilePath as stringan image path for profileUrl
adult as boolwhether the person is filed as adult

Credits

The cast and crew of one title.

fieldmeaning
id as intthe film, series, season or episode the credits belong to
cast as list of CastMemberperformers, in billing order
crew as list of CrewMembereveryone else

ExternalIds

The same object's ids on other sites.

fieldmeaning
imdbId as stringe.g. "tt0076759" for a title, "nm0000158" for a person
tvdbId as intTheTVDB's id, series and episodes only
tvrageId as intthe retired TVRage id
wikidataId as stringe.g. "Q17738"
facebookId as stringa Facebook page or username
instagramId as stringan Instagram handle
twitterId as stringan X / Twitter handle
tiktokId as stringa TikTok handle, people only
youtubeId as stringa YouTube channel, people only
freebaseId as stringthe retired Freebase id
freebaseMid as stringthe retired Freebase machine id

Keyword

A keyword: TMDB's free-form subject tag.

fieldmeaning
id as intthe keyword id
name as stringthe keyword

Review

A user review.

fieldmeaning
id as stringthe review id
author as stringthe display name on the review
username as stringthe reviewer's TMDB username
name as stringthe reviewer's full name, "" when not set
avatarPath as stringan image path or an absolute Gravatar URL
rating as floatthe reviewer's own score out of 10, 0 when unrated
content as stringthe review body, as Markdown
url as stringthe review's page on TMDB
createdAt as stringan ISO 8601 timestamp
updatedAt as stringan ISO 8601 timestamp
language as stringan ISO 639-1 code
mediaId as intthe reviewed title, 0 unless fetched by review
mediaTitle as stringthe reviewed title's name, "" unless fetched by review
mediaKind as MediaKindwhat was reviewed, Unknown unless fetched by review

ReviewPage

One page of reviews.

fieldmeaning
id as intthe title the reviews belong to, 0 when not given
page as intthe page number, 1-based
totalPages as intthe page count
totalResults as intthe review count over all pages
results as list of Reviewthis page's reviews

WatchProvider

A streaming, rental or purchase service.

fieldmeaning
providerId as intthe provider id, as used by withWatchProviders
providerName as stringthe service's name, e.g. "Netflix"
logoPath as stringan image path for logoUrl
displayPriority as intTMDB's suggested ordering, lower first

WatchOffers

The ways to watch a title in one country.

fieldmeaning
region as stringthe two-letter country code
link as stringa TMDB page listing the offers, "" when not given
flatrate as list of WatchProviderincluded in a subscription
rent as list of WatchProviderrentable
buy as list of WatchProviderpurchasable
ads as list of WatchProviderfree with advertising
free as list of WatchProviderfree outright

Translation

One translation of a title's text.

fieldmeaning
region as stringthe ISO 3166-1 code the translation is filed under
language as stringthe ISO 639-1 code
name as stringthe endonym of the language
englishName as stringthe English name of the language
title as stringthe translated title or name
overview as stringthe translated synopsis
tagline as stringthe translated tagline, films and series only
homepage as stringthe localized homepage

AlternativeTitle

A title a work is released under in another country.

fieldmeaning
region as stringthe two-letter country code
title as stringthe title used there
kind as stringTMDB's type note, e.g. "working title"; often ""

StatusResponse

TMDB's answer to a write.

fieldmeaning
success as boolwhether the write happened
statusCode as intTMDB's status code, e.g. 1 success, 13 deleted
statusMessage as stringTMDB's sentence about the outcome
id as intthe id of the thing created, 0 when nothing was

Configuration, images and videos

Guide: Images and videos.

constantvaluemeaning
SIZE_ORIGINAL"original"The size that asks for the image as uploaded.
DEFAULT_IMAGE_BASE"https://image.tmdb.org/t/p/"The HTTPS image host TMDB has published for years.
functionreturnswhat it does
configuration(c as Client)ConfigurationFetch the image configuration from /configuration.
defaultConfiguration()ConfigurationA snapshot of TMDB's published image configuration, built without a request.
imageUrl(cfg as Configuration, path as string, size as string)stringBuild an image URL at any size that appears in any of the configuration's lists.
posterUrl(cfg as Configuration, path as string, size as string)stringBuild the URL of a poster.
backdropUrl(cfg as Configuration, path as string, size as string)stringBuild the URL of a backdrop.
profileUrl(cfg as Configuration, path as string, size as string)stringBuild the URL of a person's profile photograph.
stillUrl(cfg as Configuration, path as string, size as string)stringBuild the URL of an episode still.
logoUrl(cfg as Configuration, path as string, size as string)stringBuild the URL of a company, network or title logo.
videoUrl(video as Video)stringThe watch URL of a video on YouTube or Vimeo.
videoThumbnailUrl(video as Video)stringThe thumbnail URL of a YouTube video (hqdefault.jpg).
countries(c as Client)list of CountryThe countries TMDB knows, with their English and native names.
languages(c as Client)list of LanguageThe languages TMDB knows, with their English names and endonyms.
primaryTranslations(c as Client)list of stringThe language-region tags TMDB has translations for, e.g. "de-DE".
jobs(c as Client)list of DepartmentThe crew jobs TMDB recognizes, grouped by department.
timezones(c as Client)list of TimezoneGroupThe time zones TMDB knows, grouped by country.

Configuration

The image hosts, the size lists per image kind, and the change keys.

fieldmeaning
baseUrl as stringthe plain-HTTP image host
secureBaseUrl as stringthe HTTPS image host, preferred
backdropSizes as list of stringsizes valid for a backdrop
logoSizes as list of stringsizes valid for a logo
posterSizes as list of stringsizes valid for a poster
profileSizes as list of stringsizes valid for a profile photo
stillSizes as list of stringsizes valid for an episode still
changeKeys as list of stringthe fields the change endpoints report on

Department

A department and the jobs filed under it.

fieldmeaning
department as stringthe department name, e.g. "Camera"
jobs as list of stringthe jobs in it, e.g. "Director of Photography"

TimezoneGroup

A country and the time zones in it.

fieldmeaning
code as stringthe two-letter ISO 3166-1 code
zones as list of stringIANA zone names, e.g. "Europe/Berlin"

Guide: Searching.

functionreturnswhat it does
searchMovies(c as Client, query as string, page as int)MoviePageSearch for films by title.
searchMoviesInYear(c as Client, query as string, year as int, page as int)MoviePageSearch for films whose primary release falls in one year.
searchShows(c as Client, query as string, page as int)ShowPageSearch for series by name.
searchShowsInYear(c as Client, query as string, year as int, page as int)ShowPageSearch for series that first aired in one year.
searchPeople(c as Client, query as string, page as int)PersonPageSearch for people by name.
searchMulti(c as Client, query as string, page as int)MediaPageSearch films, series and people at once, in one ranked list.
searchCollections(c as Client, query as string, page as int)CollectionPageSearch for collections, TMDB's franchise groupings.
searchCompanies(c as Client, query as string, page as int)CompanyPageSearch for production companies.
searchKeywords(c as Client, query as string, page as int)KeywordPageSearch for keywords, TMDB's subject tags.
searchMoviesAll(c as Client, query as string, maxPages as int)list of MovieSummaryEvery film matching a query, up to a page budget.
searchShowsAll(c as Client, query as string, maxPages as int)list of ShowSummaryEvery series matching a query, up to a page budget.

Discovery

Guide: Discovery.

constantvaluemeaning
SORT_POPULARITY_DESC"popularity.desc"Sort: most popular first.
SORT_POPULARITY_ASC"popularity.asc"Sort: least popular first.
SORT_RATING_DESC"rating.desc"Sort: best rated first (vote_average.desc).
SORT_RATING_ASC"rating.asc"Sort: worst rated first (vote_average.asc).
SORT_VOTES_DESC"votes.desc"Sort: most ratings first (vote_count.desc), a rough proxy for most watched.
SORT_NEWEST"date.desc"Sort: newest first, by primary release date (films) or first air date (series).
SORT_OLDEST"date.asc"Sort: oldest first, by primary release date (films) or first air date (series).
SORT_TITLE_ASC"title.asc"Sort: alphabetical, title.asc for films and name.asc for series.
SORT_TITLE_DESC"title.desc"Sort: reverse alphabetical, title.desc for films and name.desc for series.
SORT_REVENUE_DESC"revenue.desc"Sort: highest box office first.
SHOW_STATUS_RETURNING0with_status for a series still being made.
SHOW_STATUS_PLANNED1with_status for a series that is announced but not shooting.
SHOW_STATUS_IN_PRODUCTION2with_status for a series currently in production.
SHOW_STATUS_ENDED3with_status for a series that finished on its own terms.
SHOW_STATUS_CANCELLED4with_status for a series that was cancelled.
SHOW_STATUS_PILOT5with_status for a pilot that never became a series.
SHOW_TYPE_DOCUMENTARY0with_type for a documentary series.
SHOW_TYPE_NEWS1with_type for a news programme.
SHOW_TYPE_MINISERIES2with_type for a miniseries: a closed run with no second season.
SHOW_TYPE_REALITY3with_type for reality television.
SHOW_TYPE_SCRIPTED4with_type for scripted drama and comedy.
SHOW_TYPE_TALK_SHOW5with_type for a talk show.
SHOW_TYPE_VIDEO6with_type for a video release filed as a series.
MONETIZATION_FLATRATE"flatrate"Monetization: included in a subscription.
MONETIZATION_FREE"free"Monetization: free to watch, no advertising.
MONETIZATION_ADS"ads"Monetization: free to watch, advertising-supported.
MONETIZATION_RENT"rent"Monetization: rentable.
MONETIZATION_BUY"buy"Monetization: purchasable.
functionreturnswhat it does
discoverFilter()DiscoverFilterAn empty filter: everything, most popular first.
sortedBy(f as DiscoverFilter, sort as string)DiscoverFilterA copy of the filter with a different ordering.
withGenres(f as DiscoverFilter, genreIds as list of int)DiscoverFilterA copy of the filter narrowed to titles in every listed genre.
withAnyGenre(f as DiscoverFilter, genreIds as list of int)DiscoverFilterA copy of the filter narrowed to titles in any listed genre.
withoutGenres(f as DiscoverFilter, genreIds as list of int)DiscoverFilterA copy of the filter excluding every listed genre.
withKeywords(f as DiscoverFilter, keywordIds as list of int)DiscoverFilterA copy of the filter narrowed to titles carrying every keyword.
withAnyKeyword(f as DiscoverFilter, keywordIds as list of int)DiscoverFilterA copy of the filter narrowed to titles carrying any keyword.
withoutKeywords(f as DiscoverFilter, keywordIds as list of int)DiscoverFilterA copy of the filter excluding every listed keyword.
withCompanies(f as DiscoverFilter, companyIds as list of int)DiscoverFilterA copy of the filter narrowed to titles from any listed company.
withoutCompanies(f as DiscoverFilter, companyIds as list of int)DiscoverFilterA copy of the filter excluding every listed company.
withPeople(f as DiscoverFilter, personIds as list of int)DiscoverFilterA copy of the filter narrowed to films involving any listed person.
withCast(f as DiscoverFilter, personIds as list of int)DiscoverFilterA copy of the filter narrowed to films any listed person appears in.
withCrew(f as DiscoverFilter, personIds as list of int)DiscoverFilterA copy of the filter narrowed to films any listed person worked on.
withNetworks(f as DiscoverFilter, networkIds as list of int)DiscoverFilterA copy of the filter narrowed to series on any listed network.
inOriginalLanguage(f as DiscoverFilter, code as string)DiscoverFilterA copy of the filter narrowed to one original language.
fromCountry(f as DiscoverFilter, code as string)DiscoverFilterA copy of the filter narrowed to one country of origin.
releasedBetween(f as DiscoverFilter, earliest as string, latest as string)DiscoverFilterA copy of the filter narrowed to a release window.
releasedInYear(f as DiscoverFilter, year as int)DiscoverFilterA copy of the filter narrowed to one release year.
ratedAtLeast(f as DiscoverFilter, score as float)DiscoverFilterA copy of the filter narrowed to titles rated at or above a score.
ratedAtMost(f as DiscoverFilter, score as float)DiscoverFilterA copy of the filter narrowed to titles rated at or below a score.
withMinVotes(f as DiscoverFilter, votes as int)DiscoverFilterA copy of the filter narrowed to titles with at least this many ratings.
runningBetween(f as DiscoverFilter, minMinutes as int, maxMinutes as int)DiscoverFilterA copy of the filter narrowed to a runtime window, in minutes.
availableOn(f as DiscoverFilter, providerIds as list of int, watchRegion as string)DiscoverFilterA copy of the filter narrowed to titles offered by a service, in a country.
notAvailableOn(f as DiscoverFilter, providerIds as list of int)DiscoverFilterA copy of the filter excluding titles offered by listed services.
withMonetization(f as DiscoverFilter, kinds as list of string)DiscoverFilterA copy of the filter narrowed to how a title is paid for.
ratedFor(f as DiscoverFilter, country as string, certification as string)DiscoverFilterA copy of the filter narrowed to one age rating, in one country.
ratedUpTo(f as DiscoverFilter, country as string, certification as string)DiscoverFilterA copy of the filter narrowed to an age rating or a gentler one, in one country.
withShowStatus(f as DiscoverFilter, status as int)DiscoverFilterA copy of the filter narrowed to series in one production state.
withShowType(f as DiscoverFilter, kind as int)DiscoverFilterA copy of the filter narrowed to one kind of series.
filterParams(f as DiscoverFilter, forShows as bool)map of string to stringThe TMDB query parameters a filter becomes on one catalogue, without a request.
discoverMovies(c as Client, f as DiscoverFilter, page as int)MoviePageFind films matching a filter, from /discover/movie.
discoverShows(c as Client, f as DiscoverFilter, page as int)ShowPageFind series matching a filter, from /discover/tv.
discoverMoviesAll(c as Client, f as DiscoverFilter, maxPages as int)list of MovieSummaryEvery film matching a filter, up to a page budget.
discoverShowsAll(c as Client, f as DiscoverFilter, maxPages as int)list of ShowSummaryEvery series matching a filter, up to a page budget.

DiscoverFilter

A set of discovery criteria, independent of the catalogue it runs on.

fieldmeaning
criteria as map of string to stringthe criteria, by deck key name

Movies

Guide: Movies.

constantvaluemeaning
RELEASE_PREMIERE1Release type: the festival or press premiere.
RELEASE_THEATRICAL_LIMITED2Release type: a limited theatrical run.
RELEASE_THEATRICAL3Release type: the wide theatrical release, the usual "release date".
RELEASE_DIGITAL4Release type: digital (streaming or download).
RELEASE_PHYSICAL5Release type: physical media.
RELEASE_TV6Release type: a television broadcast.
functionreturnswhat it does
movie(c as Client, movieId as int)MovieRead a film's record.
movieBundle(c as Client, movieId as int)MovieBundleRead a film and nine of its sub-resources in one request.
movieCredits(c as Client, movieId as int)CreditsRead a film's cast and crew.
movieImages(c as Client, movieId as int)ImagesRead a film's artwork.
movieVideos(c as Client, movieId as int)list of VideoRead a film's trailers, teasers and clips.
movieKeywords(c as Client, movieId as int)list of KeywordRead a film's subject keywords.
movieRecommendations(c as Client, movieId as int, page as int)MoviePageRead what TMDB recommends after a film.
movieSimilar(c as Client, movieId as int, page as int)MoviePageRead films that share genres and keywords with a film.
movieReviews(c as Client, movieId as int, page as int)ReviewPageRead a film's user reviews.
movieReleaseDates(c as Client, movieId as int)list of ReleaseGroupRead every dated release of a film, by country, with age ratings.
movieExternalIds(c as Client, movieId as int)ExternalIdsRead a film's ids on other sites.
movieTranslations(c as Client, movieId as int)list of TranslationRead a film's translated titles and synopses.
movieAlternativeTitles(c as Client, movieId as int)list of AlternativeTitleRead the titles a film is released under elsewhere.
movieWatchProviders(c as Client, movieId as int)list of WatchOffersRead where a film can be watched, country by country.
nowPlaying(c as Client, page as int)MoviePageRead the films in cinemas now.
popularMovies(c as Client, page as int)MoviePageRead the most popular films; sends the client's region.
topRatedMovies(c as Client, page as int)MoviePageRead the best rated films.
upcomingMovies(c as Client, page as int)MoviePageRead the films about to be released; sends the client's region.
latestMovie(c as Client)MovieRead the film most recently added to TMDB.
directorOf(credits as Credits)stringThe first director's name out of a credits record.
directorsOf(credits as Credits)list of stringEvery director's name out of a credits record.
crewNamed(credits as Credits, job as string)list of stringEvery crew name credited with one job.
releaseTypeName(kind as int)stringThe lowercase name of a release type.
certificationOf(groups as list of ReleaseGroup, region as string)stringOne country's age rating, out of a release-dates result.
offersIn(offers as list of WatchOffers, region as string)WatchOffersOne country's offers, out of a watch-providers result.

Movie

A film's full record, as /movie/{id} answers it.

fieldmeaning
id as intthe movie id
title as stringthe title, in the client's language
originalTitle as stringthe title in its original language
tagline as stringthe marketing line, "" when there is none
overview as stringthe synopsis
releaseDate as stringthe primary release date, YYYY-MM-DD
runtime as intthe runtime in minutes, 0 when unknown
status as stringe.g. "Released", "Post Production", "Planned"
homepage as stringthe official site, "" when there is none
imdbId as stringe.g. "tt0076759", "" when not cross-referenced
posterPath as stringan image path for posterUrl
backdropPath as stringan image path for backdropUrl
genres as list of Genrethe genres, named
belongsToCollection as CollectionRefthe franchise, id 0 when none
budget as intthe budget in US dollars, 0 when not filed
revenue as intthe box office in US dollars, 0 when not filed
originalLanguage as stringan ISO 639-1 code
originCountry as list of stringthe producing countries
spokenLanguages as list of Languagethe languages spoken in it
productionCompanies as list of Companythe companies behind it
productionCountries as list of Countrywhere it was made
popularity as floatTMDB's popularity score
voteAverage as floatthe mean user rating, 0 to 10
voteCount as inthow many ratings that mean is over
adult as boolwhether the film is adult
video as boolTMDB's direct-to-video flag

ReleaseDate

One dated release of a film in one country.

fieldmeaning
date as stringan ISO 8601 timestamp
kind as inta RELEASE_* constant - see releaseTypeName
certification as stringthe age rating, "" when unrated
language as stringan ISO 639-1 code, "" when not language-specific
note as stringa free-text qualifier, e.g. "Director's cut"

ReleaseGroup

Every release of a film in one country.

fieldmeaning
region as stringthe two-letter country code
releases as list of ReleaseDatethe releases there, in TMDB's order

MovieBundle

A film and nine sub-resources, fetched in one request by movieBundle.

fieldmeaning
movie as Moviethe film itself
credits as Creditscast and crew
images as Imagesposters, backdrops and logos
videos as list of Videotrailers, teasers and clips
keywords as list of Keywordthe subject tags
externalIds as ExternalIdsthe film's ids elsewhere
recommendations as MoviePagewhat TMDB suggests next
similar as MoviePagefilms sharing genres and keywords
reviews as ReviewPagethe first page of user reviews
watchOffers as list of WatchOfferswhere to watch it, by country

Series, seasons and episodes

Guide: Series, seasons and episodes.

functionreturnswhat it does
show(c as Client, seriesId as int)ShowRead a series' record.
showBundle(c as Client, seriesId as int)ShowBundleRead a series and ten of its sub-resources in one request.
showCredits(c as Client, seriesId as int)CreditsRead a series' regular cast and crew.
showAggregateCredits(c as Client, seriesId as int)AggregateCreditsRead a series' credits rolled up over its whole run.
showImages(c as Client, seriesId as int)ImagesRead a series' artwork, in every language (no language is sent).
showVideos(c as Client, seriesId as int)list of VideoRead a series' trailers, teasers and clips.
showKeywords(c as Client, seriesId as int)list of KeywordRead a series' subject keywords.
showContentRatings(c as Client, seriesId as int)list of ContentRatingRead a series' age ratings, country by country.
showEpisodeGroups(c as Client, seriesId as int)list of EpisodeGroupRead the alternative episode orderings a series has.
showRecommendations(c as Client, seriesId as int, page as int)ShowPageRead what TMDB recommends after a series.
showSimilar(c as Client, seriesId as int, page as int)ShowPageRead series that share genres and keywords with a series.
showReviews(c as Client, seriesId as int, page as int)ReviewPageRead a series' user reviews.
showExternalIds(c as Client, seriesId as int)ExternalIdsRead a series' ids on other sites, TheTVDB's included.
showTranslations(c as Client, seriesId as int)list of TranslationRead a series' translated names and synopses.
showAlternativeTitles(c as Client, seriesId as int)list of AlternativeTitleRead the names a series is broadcast under elsewhere.
showWatchProviders(c as Client, seriesId as int)list of WatchOffersRead where a series can be watched, country by country.
season(c as Client, seriesId as int, seasonNumber as int)SeasonRead one season, episodes included.
seasonCredits(c as Client, seriesId as int, seasonNumber as int)CreditsRead a season's cast and crew.
seasonAggregateCredits(c as Client, seriesId as int, seasonNumber as int)AggregateCreditsRead a season's credits rolled up over its episodes.
seasonImages(c as Client, seriesId as int, seasonNumber as int)ImagesRead a season's posters, in every language (no language is sent).
seasonVideos(c as Client, seriesId as int, seasonNumber as int)list of VideoRead a season's videos.
seasonExternalIds(c as Client, seriesId as int, seasonNumber as int)ExternalIdsRead a season's ids on other sites.
episode(c as Client, seriesId as int, seasonNumber as int, episodeNumber as int)EpisodeRead one episode's record.
episodeCredits(c as Client, seriesId as int, seasonNumber as int, episodeNumber as int)CreditsRead an episode's cast, crew and guest stars.
episodeImages(c as Client, seriesId as int, seasonNumber as int, episodeNumber as int)ImagesRead an episode's stills, in every language (no language is sent).
episodeVideos(c as Client, seriesId as int, seasonNumber as int, episodeNumber as int)list of VideoRead an episode's videos.
episodeExternalIds(c as Client, seriesId as int, seasonNumber as int, episodeNumber as int)ExternalIdsRead an episode's ids on other sites.
airingToday(c as Client, page as int)ShowPageRead the series with an episode airing today, in TMDB's own time zone.
airingTodayIn(c as Client, timezone as string, page as int)ShowPageRead the series with an episode airing today, in one time zone.
onTheAir(c as Client, page as int)ShowPageRead the series with an episode airing in the next seven days.
popularShows(c as Client, page as int)ShowPageRead the most popular series.
topRatedShows(c as Client, page as int)ShowPageRead the best rated series.
latestShow(c as Client)ShowRead the series most recently added to TMDB.
contentRatingOf(ratings as list of ContentRating, region as string)stringOne country's rating, out of a content-ratings result.
seasonOf(s as Show, seasonNumber as int)SeasonSummaryA season out of a series' season list, by number rather than index.

Show

A series' full record, as /tv/{id} answers it.

fieldmeaning
id as intthe series id
name as stringthe name, in the client's language
originalName as stringthe name in its original language
tagline as stringthe marketing line, "" when there is none
overview as stringthe synopsis
firstAirDate as stringYYYY-MM-DD of the première
lastAirDate as stringYYYY-MM-DD of the most recent episode
status as stringe.g. "Returning Series", "Ended", "Canceled"
kind as stringTMDB's type: "Scripted", "Miniseries", "Reality", ...
homepage as stringthe official site, "" when there is none
posterPath as stringan image path for posterUrl
backdropPath as stringan image path for backdropUrl
genres as list of Genrethe genres, named
createdBy as list of Creatorthe credited creators
episodeRunTime as list of inttypical episode lengths in minutes
numberOfSeasons as inthow many seasons, specials excluded
numberOfEpisodes as inthow many episodes in total
seasons as list of SeasonSummarythe seasons, season 0 included
networks as list of Networkwho broadcasts or streams it
productionCompanies as list of Companythe companies behind it
productionCountries as list of Countrywhere it was made
spokenLanguages as list of Languagethe languages spoken in it
languages as list of stringISO 639-1 codes TMDB files it under
originCountry as list of stringthe producing countries
originalLanguage as stringan ISO 639-1 code
lastEpisodeToAir as Episodethe most recent episode, zeroed if none
nextEpisodeToAir as Episodethe next one, zeroed when nothing is scheduled
inProduction as boolwhether more is being made
popularity as floatTMDB's popularity score
voteAverage as floatthe mean user rating, 0 to 10
voteCount as inthow many ratings that mean is over
adult as boolwhether the series is adult

Creator

Someone credited with creating a series.

fieldmeaning
id as intthe person id
creditId as stringthe credit's own id, for credit
name as stringtheir name
gender as intsee genderName
profilePath as stringan image path for profileUrl

SeasonSummary

A season as it appears in a series record.

fieldmeaning
id as intthe season's own id
seasonNumber as intits number under the series, 0 for specials
name as stringe.g. "Season 3", "Specials"
overview as stringthe season synopsis, often ""
airDate as stringYYYY-MM-DD of the first episode
episodeCount as inthow many episodes it holds
posterPath as stringan image path for posterUrl
voteAverage as floatthe mean user rating of the season

Season

A season and its episodes.

fieldmeaning
id as intthe season's own id
seasonNumber as intits number under the series
name as stringe.g. "Season 3"
overview as stringthe season synopsis
airDate as stringYYYY-MM-DD of the first episode
posterPath as stringan image path for posterUrl
voteAverage as floatthe mean user rating of the season
episodes as list of Episodethe episodes, in broadcast order

Episode

One episode of a series.

fieldmeaning
id as intthe episode's own id
seasonNumber as intwhich season it belongs to
episodeNumber as intits number within that season
name as stringthe episode title
overview as stringthe synopsis
airDate as stringYYYY-MM-DD, "" when unscheduled
runtime as intthe runtime in minutes, 0 when unknown
kind as stringTMDB's episode_type: "standard", "finale", "mid_season"
productionCode as stringthe production code, often ""
showId as intthe series it belongs to
stillPath as stringan image path for stillUrl
voteAverage as floatthe mean user rating, 0 to 10
voteCount as inthow many ratings that mean is over

CreditRole

One role a performer played across a series.

fieldmeaning
creditId as stringthe credit's own id, for credit
character as stringwho they played
episodeCount as intin how many episodes

CreditJob

One job a crew member did across a series.

fieldmeaning
creditId as stringthe credit's own id, for credit
job as stringthe job title
episodeCount as intin how many episodes

AggregateCastMember

A performer's whole run on a series or season.

fieldmeaning
id as intthe person id
name as stringthe performer's name
originalName as stringthe name in its original script
roles as list of CreditRolethe parts they played
totalEpisodeCount as intepisodes across all their roles
order as intbilling order, 0 first
gender as intsee genderName
knownForDepartment as stringe.g. "Acting"
popularity as floatTMDB's popularity score
profilePath as stringan image path for profileUrl
adult as boolwhether the person is filed as adult

AggregateCrewMember

A crew member's whole run on a series or season.

fieldmeaning
id as intthe person id
name as stringtheir name
originalName as stringthe name in its original script
jobs as list of CreditJobthe jobs they did
department as stringthe department those jobs sit in
totalEpisodeCount as intepisodes across all their jobs
gender as intsee genderName
knownForDepartment as stringwhat they are usually credited for
popularity as floatTMDB's popularity score
profilePath as stringan image path for profileUrl
adult as boolwhether the person is filed as adult

AggregateCredits

Cast and crew rolled up over a whole series or season.

fieldmeaning
id as intthe series or season the credits belong to
cast as list of AggregateCastMemberperformers, in billing order
crew as list of AggregateCrewMembereveryone else

ContentRating

A series' age rating in one country.

fieldmeaning
region as stringthe two-letter country code
rating as stringthe rating in that country's system, e.g. "TV-MA"
descriptors as list of stringthe content warnings behind it

EpisodeGroup

An alternative ordering of a series' episodes (DVD, production, story arc).

fieldmeaning
id as stringthe group id
name as stringe.g. "Aired Order", "Story Arc"
description as stringwhat the ordering is, often ""
episodeCount as inthow many episodes it covers
groupCount as inthow many groups (seasons, arcs) it splits into
kind as intTMDB's type code for the ordering
network as Networkthe network it belongs to, zeroed when none

ShowBundle

A series and ten sub-resources, fetched in one request by showBundle.

fieldmeaning
show as Showthe series itself
credits as AggregateCreditscast and crew, rolled up over the run
images as Imagesposters, backdrops and logos
videos as list of Videotrailers, teasers and clips
keywords as list of Keywordthe subject tags
externalIds as ExternalIdsthe series' ids elsewhere
contentRatings as list of ContentRatingage ratings, by country
recommendations as ShowPagewhat TMDB suggests next
similar as ShowPageseries sharing genres and keywords
reviews as ReviewPagethe first page of user reviews
watchOffers as list of WatchOfferswhere to watch it, by country

People

Guide: People.

functionreturnswhat it does
person(c as Client, personId as int)PersonRead a person's record.
personBundle(c as Client, personId as int)PersonBundleRead a person and three of their sub-resources in one request.
personMovieCredits(c as Client, personId as int)PersonCreditsRead a person's film credits.
personShowCredits(c as Client, personId as int)PersonCreditsRead a person's series credits.
personCombinedCredits(c as Client, personId as int)PersonCreditsRead a person's whole filmography, films and series together.
personImages(c as Client, personId as int)ImagesRead a person's profile photographs.
personExternalIds(c as Client, personId as int)ExternalIdsRead a person's ids and social media handles elsewhere.
popularPeople(c as Client, page as int)PersonPageRead the most popular people.
latestPerson(c as Client)PersonRead the person most recently added to TMDB.
creditsInDepartment(credits as PersonCredits, department as string)list of PersonCreditThe crew credits a person has in one department.

Person

A person's full record, as /person/{id} answers it.

fieldmeaning
id as intthe person id
name as stringthe name TMDB files them under
alsoKnownAs as list of stringevery alias and transliteration
biography as stringthe biography, in the client's language
birthday as stringYYYY-MM-DD, "" when unknown
deathday as stringYYYY-MM-DD, "" when they are alive or unknown
placeOfBirth as stringfree text, "" when unknown
gender as intsee genderName
knownForDepartment as stringe.g. "Acting", "Directing"
homepage as stringthe official site, "" when there is none
imdbId as stringe.g. "nm0000158", "" when not cross-referenced
profilePath as stringan image path for profileUrl
popularity as floatTMDB's popularity score
adult as boolwhether the person is filed as adult

PersonCredit

One title on a person's filmography, with the person's role in it.

fieldmeaning
kind as MediaKindMovie or Show
id as intthe title's id, in the id space of kind
title as stringtitle for a film, name for a series
originalTitle as stringthe same, in the original language
character as stringwho they played, "" on a crew credit
job as stringthe job they did, "" on a cast credit
department as stringthe department that job sits in
creditId as stringthe credit's own id, for credit
order as intbilling order on a cast credit, 0 when not billed
episodeCount as intepisodes they appear in, series credits only
overview as stringthe title's synopsis
releaseDate as stringrelease_date or first_air_date
posterPath as stringan image path for posterUrl
backdropPath as stringan image path for backdropUrl
genreIds as list of intthe title's genre ids
originalLanguage as stringan ISO 639-1 code
popularity as floatTMDB's popularity score
voteAverage as floatthe mean user rating, 0 to 10
voteCount as inthow many ratings that mean is over
adult as boolwhether the title is adult

PersonCredits

A person's filmography, split into cast and crew credits.

fieldmeaning
id as intthe person the credits belong to
cast as list of PersonCredittitles they performed in
crew as list of PersonCredittitles they worked on

PersonBundle

A person and three sub-resources, fetched in one request by personBundle.

fieldmeaning
person as Personthe person themselves
credits as PersonCreditstheir whole filmography, films and series
images as Imagestheir profile photographs
externalIds as ExternalIdstheir ids and handles elsewhere

Collections, companies, networks and lookups

Guide: Collections, companies and lookups.

constantvaluemeaning
SOURCE_IMDB"imdb_id"find source: an IMDb id, tt0076759 for a title, nm0000158 for a person.
SOURCE_TVDB"tvdb_id"find source: a TheTVDB id.
SOURCE_WIKIDATA"wikidata_id"find source: a Wikidata entity id, e.g. Q17738.
SOURCE_FACEBOOK"facebook_id"find source: a Facebook page or username.
SOURCE_INSTAGRAM"instagram_id"find source: an Instagram handle, without the @.
SOURCE_TWITTER"twitter_id"find source: an X / Twitter handle, without the @.
SOURCE_TIKTOK"tiktok_id"find source: a TikTok handle.
SOURCE_YOUTUBE"youtube_id"find source: a YouTube channel id.
functionreturnswhat it does
collection(c as Client, collectionId as int)CollectionA collection and the films in it.
collectionImages(c as Client, collectionId as int)ImagesA collection's posters and backdrops, in every language.
collectionTranslations(c as Client, collectionId as int)list of TranslationEvery translation of a collection's name and overview.
company(c as Client, companyId as int)CompanyDetailsA production company's full record.
companyAlternativeNames(c as Client, companyId as int)list of stringThe other names a company trades under.
companyImages(c as Client, companyId as int)ImagesA company's logos.
network(c as Client, networkId as int)NetworkDetailsA television network's full record.
networkAlternativeNames(c as Client, networkId as int)list of stringThe other names a network broadcasts under.
networkImages(c as Client, networkId as int)ImagesA network's logos.
keyword(c as Client, keywordId as int)KeywordA keyword by id.
keywordMovies(c as Client, keywordId as int, page as int)MoviePageOne page of films tagged with a keyword.
review(c as Client, reviewId as string)ReviewOne review by id.
credit(c as Client, creditId as string)CreditDetailOne credit by id, from a cast or crew row's creditId.
find(c as Client, externalId as string, source as string)FindResultsLook up TMDB records by an id on another site (IMDb, TheTVDB, Wikidata ...).
findByImdb(c as Client, imdbId as string)FindResultsfind with SOURCE_IMDB.

CollectionSummary

A collection's row in a search result, without its films.

fieldmeaning
id as intthe collection id
name as stringthe collection name, e.g. "Star Wars Collection"
originalName as stringthe name in its original language
overview as stringa description, often ""
posterPath as stringan image path for posterUrl
backdropPath as stringan image path for backdropUrl
originalLanguage as stringan ISO 639-1 code
adult as boolwhether the collection is adult

Collection

A collection and the films in it.

fieldmeaning
id as intthe collection id
name as stringthe collection name
originalName as stringthe name in its original language
overview as stringa description, often ""
posterPath as stringan image path for posterUrl
backdropPath as stringan image path for backdropUrl
originalLanguage as stringan ISO 639-1 code
parts as list of MediaItemthe films, in release order

CollectionPage

One page of collections.

fieldmeaning
page as intwhich page this is, 1-based
totalPages as inthow many pages the query has
totalResults as inthow many collections the query has
results as list of CollectionSummarythis page's rows

CompanyPage

One page of companies.

fieldmeaning
page as intwhich page this is, 1-based
totalPages as inthow many pages the query has
totalResults as inthow many companies the query has
results as list of Companythis page's rows

KeywordPage

One page of keywords.

fieldmeaning
page as intwhich page this is, 1-based
totalPages as inthow many pages the query has
totalResults as inthow many keywords the query has
results as list of Keywordthis page's rows

CompanyDetails

A production company's full record, including its parent company.

fieldmeaning
id as intthe company id
name as stringthe company name
description as stringa description, usually ""
headquarters as stringthe head office, free text
homepage as stringthe official site, "" when there is none
logoPath as stringan image path for logoUrl
originCountry as stringa two-letter country code
parentCompanyId as intthe owning company, 0 when independent
parentCompanyName as stringthat company's name, "" when independent

NetworkDetails

A television network's full record.

fieldmeaning
id as intthe network id
name as stringthe network name
headquarters as stringthe head office, free text
homepage as stringthe official site, "" when there is none
logoPath as stringan image path for logoUrl
originCountry as stringa two-letter country code

CreditDetail

One credit by id: the person, the title and the role connecting them.

fieldmeaning
id as stringthe credit id
creditKind as string"cast" or "crew"
department as stringthe department, on a crew credit
job as stringthe job, on a crew credit
character as stringthe part, on a cast credit
media as MediaItemthe title the credit is on
person as PersonSummarythe person credited

FindResults

What an external id resolved to, one list per kind.

fieldmeaning
movies as list of MediaItemfilms that matched
shows as list of MediaItemseries that matched
people as list of MediaItempeople that matched
episodes as list of MediaItemepisodes that matched
seasons as list of MediaItemseasons that matched

Guide: Trending, vocabularies and changes.

constantvaluemeaning
TREND_DAY"day"Trending over the last 24 hours.
TREND_WEEK"week"Trending over the last 7 days.
functionreturnswhat it does
trendingAll(c as Client, window as string, page as int)MediaPageOne page of trending films, series and people in one ranked list.
trendingMovies(c as Client, window as string, page as int)MoviePageOne page of trending films.
trendingShows(c as Client, window as string, page as int)ShowPageOne page of trending series.
trendingPeople(c as Client, window as string, page as int)PersonPageOne page of trending people.
movieGenres(c as Client)list of GenreThe film genres, named in the client's language.
showGenres(c as Client)list of GenreThe series genres, named in the client's language.
movieCertifications(c as Client)list of CertificationGroupEvery country's film certification system.
showCertifications(c as Client)list of CertificationGroupEvery country's series certification system.
providerRegions(c as Client)list of CountryThe countries TMDB has watch-provider data for.
movieProviders(c as Client, watchRegion as string)list of WatchProviderThe streaming and rental services for films, in one country or all.
showProviders(c as Client, watchRegion as string)list of WatchProviderThe streaming and rental services for series, in one country or all.
changedMovies(c as Client, startDate as string, endDate as string, page as int)ChangePageOne page of film ids changed in a date range.
changedShows(c as Client, startDate as string, endDate as string, page as int)ChangePageOne page of series ids changed in a date range; see changedMovies.
changedPeople(c as Client, startDate as string, endDate as string, page as int)ChangePageOne page of person ids changed in a date range; see changedMovies.
certificationsIn(groups as list of CertificationGroup, region as string)list of CertificationOne country's ratings out of a certifications result; no request.

Certification

One rating in one country's certification system.

fieldmeaning
certification as stringthe rating, e.g. "PG-13"
meaning as stringTMDB's explanation of it
order as intstrictness rank, ascending; sort on this

CertificationGroup

One country's whole certification system.

fieldmeaning
region as stringthe two-letter country code
certifications as list of Certificationits ratings, in TMDB's order

ChangeEntry

One changed title or person: an id and the adult flag, nothing more.

fieldmeaning
id as intthe id of the changed title or person
adult as boolwhether it is adult, so a filtered mirror can skip it

ChangePage

One page of change entries.

fieldmeaning
page as intwhich page this is, 1-based
totalPages as inthow many pages the feed has
totalResults as inthow many entries the feed has
results as list of ChangeEntrythis page's entries

User authentication (v4)

Guide: Authenticating a user.

functionreturnswhat it does
requestToken(c as Client)RequestTokenStep 1: mint a request token for a person to approve.
requestTokenWithRedirect(c as Client, redirectTo as string)RequestTokenStep 1, with a URL TMDB redirects to after approval.
approvalUrl(token as string)stringStep 2: the TMDB URL where a person approves a request token.
accessToken(c as Client, approvedToken as string)AccessTokenStep 3: trade an approved request token for a user access token.
logout(c as Client, userToken as string)StatusResponseInvalidate a user access token at TMDB.

RequestToken

A request token waiting for a person to approve it.

fieldmeaning
requestToken as stringthe token to have approved
success as boolwhether TMDB issued it
statusCode as intTMDB's status code
statusMessage as stringTMDB's status text

AccessToken

A person's user access token and v4 account id.

fieldmeaning
accessToken as stringthe token to pass to withUserToken
accountId as stringthe v4 account object id the account verbs take, not the numeric v3 account id
success as boolwhether the trade succeeded
statusCode as intTMDB's status code
statusMessage as stringTMDB's status text

Account collections (v4)

Guide: Account collections.

constantvaluemeaning
ACCOUNT_SORT_ADDED_ASC"created_at.asc"Account sort: oldest addition first.
ACCOUNT_SORT_ADDED_DESC"created_at.desc"Account sort: most recent addition first.
ACCOUNT_SORT_RELEASE_ASC"release_date.asc"Account sort: oldest title first.
ACCOUNT_SORT_RELEASE_DESC"release_date.desc"Account sort: newest title first.
ACCOUNT_SORT_TITLE_ASC"title.asc"Account sort: alphabetical.
ACCOUNT_SORT_TITLE_DESC"title.desc"Account sort: reverse alphabetical.
ACCOUNT_SORT_RATING_ASC"vote_average.asc"Account sort: worst rated first.
ACCOUNT_SORT_RATING_DESC"vote_average.desc"Account sort: best rated first.
functionreturnswhat it does
accountLists(c as Client, accountId as string, page as int)ListPageOne page of the custom lists an account has created.
favoriteMovies(c as Client, accountId as string, page as int, sortBy as string)MoviePageOne page of an account's favourite films.
favoriteShows(c as Client, accountId as string, page as int, sortBy as string)ShowPageOne page of an account's favourite series.
ratedMovies(c as Client, accountId as string, page as int, sortBy as string)MoviePageOne page of the films an account has rated.
ratedShows(c as Client, accountId as string, page as int, sortBy as string)ShowPageOne page of the series an account has rated.
watchlistMovies(c as Client, accountId as string, page as int, sortBy as string)MoviePageOne page of an account's film watchlist.
watchlistShows(c as Client, accountId as string, page as int, sortBy as string)ShowPageOne page of an account's series watchlist.
recommendedMovies(c as Client, accountId as string, page as int)MoviePageOne page of films TMDB recommends to an account, from its activity.
recommendedShows(c as Client, accountId as string, page as int)ShowPageOne page of series TMDB recommends to an account, from its activity.

ListSummary

A custom list's row in an account's list index, without its items.

fieldmeaning
id as intthe list id the userlists verbs take
name as stringthe list's name
description as stringthe list's description, often ""
accountObjectId as stringthe owner's v4 account object id
public as boolwhether anyone can read it
adult as boolwhether it is flagged adult
featured as boolwhether TMDB features it
numberOfItems as inthow many titles are in it
averageRating as floatthe mean rating of its titles
revenue as intthe combined box office of its films
runtime as intthe combined runtime of its titles, in minutes
region as stringthe list's ISO 3166-1 country
language as stringthe list's ISO 639-1 language
sortBy as intTMDB's numeric code for the list's own ordering
createdAt as stringan ISO 8601 timestamp
updatedAt as stringan ISO 8601 timestamp

ListPage

One page of an account's custom lists.

fieldmeaning
page as intwhich page this is, 1-based
totalPages as inthow many pages of lists there are
totalResults as inthow many lists the account has
results as list of ListSummarythis page's lists

Custom lists (v4)

Guide: Custom lists.

constantvaluemeaning
LIST_SORT_ORIGINAL_ASC"original_order.asc"List sort: the order items were added, oldest first.
LIST_SORT_ORIGINAL_DESC"original_order.desc"List sort: the order items were added, newest first.
LIST_SORT_RATING_ASC"vote_average.asc"List sort: worst rated first.
LIST_SORT_RATING_DESC"vote_average.desc"List sort: best rated first.
LIST_SORT_RELEASE_ASC"primary_release_date.asc"List sort: oldest title first.
LIST_SORT_RELEASE_DESC"primary_release_date.desc"List sort: newest title first.
LIST_SORT_TITLE_ASC"title.asc"List sort: alphabetical.
LIST_SORT_TITLE_DESC"title.desc"List sort: reverse alphabetical.
functionreturnswhat it does
listItem(kind as MediaKind, id as int)ListItemBuild a ListItem, checking the kind and id.
createList(c as Client, name as string, description as string, isPublic as bool)StatusResponseCreate a custom list (writes).
createListIn(c as Client, name as string, description as string, isPublic as bool, language as string, region as string)StatusResponseCreate a custom list with its own language and country (writes).
listDetails(c as Client, listId as int, page as int)ListDetailsA list's metadata and one page of its items.
updateList(c as Client, listId as int, name as string, description as string, isPublic as bool, sortBy as string)StatusResponseReplace a list's name, description, visibility and sort order (writes).
deleteList(c as Client, listId as int)StatusResponseDelete a list (writes).
clearList(c as Client, listId as int)StatusResponseRemove every item from a list, keeping the list (writes).
addListItems(c as Client, listId as int, items as list of ListItem)ItemsResponseAdd titles to a list in one request (writes).
removeListItems(c as Client, listId as int, items as list of ListItem)ItemsResponseRemove titles from a list in one request (writes).
listItemStatus(c as Client, listId as int, kind as MediaKind, mediaId as int)ItemStatusWhether one title is in a list, without paging through it.
listItemsAll(c as Client, listId as int, maxPages as int)list of MediaItemEvery item in a list, fetched page by page up to a budget.

ListItem

A title to add to or remove from a list: a kind and an id.

fieldmeaning
kind as MediaKindMediaKind.Movie or MediaKind.Show
id as intthe title's id in that catalogue

ListDetails

A custom list's metadata and one page of its items.

fieldmeaning
id as intthe list id
name as stringthe list's name
description as stringthe list's description, often ""
public as boolwhether anyone can read it
sortBy as stringthe list's own ordering, a LIST_SORT_* value
region as stringthe list's ISO 3166-1 country
language as stringthe list's ISO 639-1 language
itemCount as inthow many titles the list holds in total
averageRating as floatthe mean rating of its titles
revenue as intthe combined box office of its films
runtime as intthe combined runtime of its titles, in minutes
posterPath as stringan image path for posterUrl, "" when unset
backdropPath as stringan image path for backdropUrl, "" when unset
createdByName as stringthe owner's display name
createdByUsername as stringthe owner's TMDB username
page as intwhich page of items this is
totalPages as inthow many pages of items there are
totalResults as inthow many items there are
results as list of MediaItemthis page's items

ItemOutcome

What happened to one item in a bulk add or remove.

fieldmeaning
kind as MediaKindthe item's kind
id as intthe item's id
success as boolwhether that item was added or removed

ItemsResponse

TMDB's answer to a bulk add or remove, with one outcome per item.

fieldmeaning
success as boolwhether the request as a whole succeeded
statusCode as intTMDB's status code
statusMessage as stringTMDB's status text
results as list of ItemOutcomewhat happened to each item

ItemStatus

Whether one title is in a list, from listItemStatus.

fieldmeaning
success as booltrue when the title is in the list
listId as intthe list that was checked
mediaId as intthe title that was checked
kind as MediaKindthat title's kind
statusCode as intTMDB's status code
statusMessage as stringTMDB's status text