Primary TV Show Details
Learn and practice how to get primary TV shows details using TMDB API.
We'll cover the following...
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 |
| string | optional | This is an |
| 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 |
| array[integer] | optional | This is the general duration of one episode. |
| string | optional | This is the date when the requested TV show was first released officially. |
| array[object] | optional | This returns all the thematic categories, like action, drama, and so on, for the requested TV show. |
| integer | optional | This is the TV show ID, the one we provide in our GET request URL. |
| array[object] | optional | This returns all the networks (with their details) that are airing the requested TV show. |
| integer | optional | This is the total number of episodes of our requested TV show. |
| integer | optional | This is the total number of seasons for our requested TV show. |
| string | optional | This is the language in which the requested TV show was originally created. |
| 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. |
| string | optional | This is to the point, spoiler free and brief summary or plot of the requested TV show. |
| 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. |
| 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. |
| string | optional | This is the type of requested TV show. The valid values are documentary, news, miniseries, reality, scripted, talk show, and video. |
| integer | optional | This is the total number of votes for the requested TV show. |
Let’s try to run an ...