Sometimes it’s useful to search for movies and TV shows based on filters or definable values like ratings, certifications, or release dates. TMDB’s discover method makes this easy. It has two versions, one for movies and the other for TV shows. This lesson will focus on how TMDB’s discover method works for the movies.

Discover movies

We can discover movies with respect to different types of data like genres, ratings, number of votes, and certificationsCertifications decide whether a movie can be publicly presented or not. If not, then make some deletions and modifications to allow it for public viewing. For example, a “Rated G: General audiences” certification represents a movie for all ages.. TMDB also has a method to get a valid list of certifications.

The discover method also supports the sorting of results. For example, we can get our results in ascending or descending order using the asc keyword or desc keyword. Moreover, we can also use gte for greater than or equal to and lte for less than or equal to. We’ll discuss a few in detail below.

Note: A number of filters we use with discover endpoint support being comma (,) or pipe (|) separated. The commas are treated as an AND query, while pipes are considered as an OR.

Get hands-on with 1200+ tech skills courses.