...

/

Primary TV Show Details

Primary TV Show Details

Learn and practice how to get primary TV shows details using TMDB API.

This lesson focuses on TMDB’s endpoint to retrieve the key details of the TV show, season, and episode by their ID.

TV show details

The primary TV show details help an individual to choose whether to watch a TV show or not. TMDB allows us to fetch all the primary details of a TV show by its TMDB’s ID. The method takes in tv_id for a show and returns all of its main details in a single JSON response. This feature is very helpful for the developers as it’s the basic functionality of any media application.

We can get the key information about a TV show by using TMDB’s TV show details endpoint with an integer path parameter tv_id.

Here is the base URL in focus:

https://api.themoviedb.org/3/tv/{tv_id}?api_key={yourTMDBapikey}

The input parameters required by our query string for this endpoint are as follows:

Name

Type

Category

Description

language

string

optional

This is an ISO_3166_1 code used to get the translated data as per the specified language. This is applicable to only the fields that support it. The default value is en-US.

append_to_response

string

optional

This is used to append requests within the same namespace to the response. It follows the pattern ([\w]+).


The objects in the output JSON response are as follows:

Object

Type

Category

Description

episode_run_time

array[integer]

optional

This is the general duration of one episode.

first_air_date

string

optional

This is the date when the requested TV show was first released officially.

genres

array[object]

optional

This returns all the thematic categories, like action, drama, and so on, for the requested TV show.

id

integer

optional

This is the TV show ID, the one we provide in our GET request URL.

networks

array[object]

optional

This returns all the networks (with their details) that are airing the requested TV show.

number_of_episodes

integer

optional

This is the total number of episodes of our requested TV show.

number_of_seasons

integer

optional

This is the total number of seasons for our requested TV show.

original_language

string

optional

This is the language in which the requested TV show was originally created.

original_name

string

optional

This is the original name of the requested TV show in the original language. For example, a show that aired originally in Japan will have the original name in Japanese.

overview

string

optional

This is to the point, spoiler free and brief summary or plot of the requested TV show.

popularity

number

optional

This is a number calculated based on various factors, like the number of user votes or the number of visits to the TV show’s page. This tells us how popular the requested TV show is.

tagline

string or null

optional

This is a short but really catchy promotional text used on the TV show poster that makes the user watch it.

type

string

optional

This is the type of requested TV show. The valid values are documentary, news, miniseries, reality, scripted, talk show, and video.

vote_count

integer

optional

This is the total number of votes for the requested TV show.

Let’s try to run an ...