The Movie Database Support

Good afternoon gentlemen,

I want to get all the movies or series that were launched in X year, with X genre. Currently, i'm using this request:

https://api.themoviedb.org/3/discover/movie?api_key=myapikey&original_language="en"&primary_release_date.gte=1929-01-01&primary_release_date.lte=1929-12-31&with_genres=878

But I have a few questions about it.

1- Using the /discover/ is correct? For me, it seens that using discover, not all the movies are shown, only the famous ones. What could I use to show ALL the movies without anykind of pre filter?

2- The filter by year is correct? In the example, i'm trying to search for movies from 1929, but i'm not really sure if that works.

3- To search for tv series instead of movies, I just need to change the movie? to ** tv?** right?

If there is a simpler request, please let me know.

Thanks for the help, Matheus

3 replies (on page 1 of 1)

Jump to last post

you can us a sort_by filter to sort your items by popularity for example. desc or asc. I use the same method to list movies by years, and yes you just had to switch movie and TV. I hope this will help. Maybe someone could tell more. But for now you have one answer ^

@macarrĂ£o said:
Search movies/series by year and genre
Good afternoon gentlemen,
I want to get all the movies or series that were launched in X year, with X genre. Currently, i'm using this request:

https://api.themoviedb.org/3/discover/movie?api_key=myapikey&original_language="en"&primary_release_date.gte=1929-01-01&primary_release_date.lte=1929-12-31&with_genres=878

There is a small error in your Request.
The original language parameter must be
&with_original_language=
And not just
&original_language=
And I see you are specifying language with the quotes. "en"
It is not necessary. The 2-letter ISO language code is enough. en

But I have a few questions about it.
1- Using the /discover/ is correct?

Yes, it is the right tool.

For me, it seens that using discover, not all the movies are shown, only the famous ones.
What could I use to show ALL the movies without anykind of pre filter?

This is not true. Everyone is informed.
The answer limit is:
Maximum 20 items per page.
Maximum 500 pages
Maximum 10,000 items.

2- The filter by year is correct? In the example, i'm trying to search for movies from 1929, but i'm not really sure if that works.

Yes, the filter for the period is correct.
However, as you want each year separate then you can use the filter for year.
&primary_release_year=

https://api.themoviedb.org/3/discover/movie?api_key=THE_KEY&language=en-US&sort_by=primary_release_date.asc&with_original_language=en&primary_release_year=1929 

This method you used is valid for a period longer than 1 year, or if it goes from one year to another year.

3- To search for tv series instead of movies, I just need to change the movie? to ** tv?** right?

Wrong. Date filter names are different.
first_air_date_year, first_air_date.lte, first_air_date.gte

Good morning,

Everything worked! Now I have a perfect request for my movies and series.

Thank you very much CubWolf, and ticao2, I really appreciate it.

Have a nice week.

Can't find a movie or TV show? Login to create it.

Global

s focus the search bar
p open profile menu
esc close an open window
? open keyboard shortcut window

On media pages

b go back (or to parent when applicable)
e go to edit page

On TV season pages

(right arrow) go to next season
(left arrow) go to previous season

On TV episode pages

(right arrow) go to next episode
(left arrow) go to previous episode

On all image pages

a open add image window

On all edit pages

t open translation selector
ctrl+ s submit form

On discussion pages

n create new discussion
w toggle watching status
p toggle public/private
c toggle close/open
a open activity
r reply to discussion
l go to last reply
ctrl+ enter submit your message
(right arrow) next page
(left arrow) previous page

Settings

Want to rate or add this item to a list?

Login