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
Can't find a movie or TV show? Login to create it.
Want to rate or add this item to a list?
Not a member?
Reply by CubWolf
on November 18, 2021 at 3:54 PM
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 ^
Reply by ticao2 đŸ‡§đŸ‡· pt-BR
on November 18, 2021 at 4:39 PM
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
Yes, it is the right tool.
This is not true. Everyone is informed.
The answer limit is:
Maximum 20 items per page.
Maximum 500 pages
Maximum 10,000 items.
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=
This method you used is valid for a period longer than 1 year, or if it goes from one year to another year.
Wrong. Date filter names are different.
first_air_date_year, first_air_date.lte, first_air_date.gte
Reply by macarrĂ£o
on November 19, 2021 at 7:50 AM
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.