TV Show Suggestions

Learn and practice how to get recommended and similar TV shows along with reviews using TMDB API.

In this lesson, we’ll discover three endpoints—TV show reviews, recommendations, and similar TV shows.

TV show reviews

Reviews help users to decide whether they want to watch a particular TV show or not. TMDB’s TV show reviews endpoint allows us to fetch all the reviews of the specified TV show. The endpoint takes in an integer path parameter, tv_id, and returns a single JSON response that has all the reviews.

The base URL in focus is as follows:

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

The input parameters required by our query string 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.

page

integer

optional

This is used to specify which page to query. Its value can be in the range of 1–1000 inclusive. The default value is 1.

The objects in the resulting JSON response are as follows:

Object

Type

Category

Description

id

integer

optional

This is the ID of the TV show for which we request the reviews.

page

integer

optional

This is the page being queried.

results

array[object]

optional

This returns all the reviews of the requested TV show on the specified page, such as 21 shows on page 1, then 20 shows on page 2, and so on.

total_pages

integer

optional

This is the total number of pages having reviews for the TV show we requested.

total_results

integer

optional

This is the total number of reviews for the TV show we requested.

Let’s run an example of TV show reviews endpoint. The widget below has a code to retrieve all the reviews for a TV show ...