Hi,
What is the equivalent Discover
query for the following:
Get Latest
Get Now Playing =?
Get Popular ==== sort_by=popularity.desc
Get Upcoming = ?
Get Trending =?
as well as the tvs.
Thanks
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 Jaymart
on August 26, 2020 at 9:55 AM
up :)
Reply by ticao2 š§š· pt-BR
on August 26, 2020 at 12:05 PM
Your question is short but broad and generic.
The complete answer would be immense and tiring.
So let's use one of them as an example.
In a Get Now Playing API Request you will receive the minimum and maximum date parameters in the response.
For example:
https://api.themoviedb.org/3/movie/now_playing?api_key=THE_KEY&language=en-US&page=1
These parameters can be seen at the bottom of the answer page.
So, if you want to make a Discover API request to receive approximately the same result, you must use these date parameters.
For example:
https://api.themoviedb.org/3/discover/movie?api_key=THE_KEY&language=en-US&sort_by=release_date.asc&page=1&release_date.gte=2020-07-07&release_date.lte=20-08
Get Upcoming = is similar to Get Now Playing
Get Popular = Just don't use any other parameters. Just sort by popularity.
= Example https://api.themoviedb.org/3/discover/movie?api_key=THE_KEY&language=en-US&sort_by=popularity.desc&page=1
Get Latest = I believe that there is no equivalent in Discover.
Get Trending = I believe that there is no equivalent in Discover.
EDIT
The example was incorrect at the end date. I added the correct one in text mode.
Reply by Jaymart
on August 29, 2020 at 5:52 AM
Hi, I have a question about your answer in
Get upcoming
requestwhy the minimum day is 7, not 24?
Thanks!
Reply by ticao2 š§š· pt-BR
on August 29, 2020 at 10:24 AM
First of all, I made a correction to the link I posted on the Discover example.
The link was in error at the end date.
My response on the item was:
Similar, but not Identical.
The example of dates is not from the Get Upcoming but from Get Now Playing.
Get Now Playing considers a Premiere date period of approximately 7 weeks Prior to the day you make the API Request.
Get Upcoming considers a Premiere date period of approximately 3 weeks After the day you make the API Request.
I believe that you personally have not done any testing with these API Requests.
So I will put both here to facilitate your test.
https://api.themoviedb.org/3/movie/now_playing?api_key=THE_KEY&language=en-US&page=1
https://api.themoviedb.org/3/movie/upcoming?api_key=THE_KEY&language=en-US&page=1
When making these API requests today (2020-08-29 11:19 local date and time), the date parameters are as follows:
Get Now Playing
Get Upcoming
So we can say that:
Get Now Playing considers the Past. Those who already have Premiere.
Get Upcoming considers the Future. The ones that will have Premiere.
Reply by Jaymart
on August 29, 2020 at 7:49 PM
Okay, thanks @ticao2
Reply by Jaymart
on August 30, 2020 at 7:04 AM
Hi @ticao2 , when I filter like this
https://api.themoviedb.org/3/discover/movie?release_date.gte=2020-09-01&release_date.lte=2020-09-31&sort_by=revenue.desc&page=1&vote_count.gte=1 [sept 1 2020 - sept 31 2020]
It show something like this, the date is very late?
Reply by ticao2 š§š· pt-BR
on August 30, 2020 at 9:17 AM
You want to know why a film that was known to have its premiere in 1981 is appearing in the answer.
It turns out that this film also has the following release date:
look here: https://www.themoviedb.org/movie/85-raiders-of-the-lost-ark/edit?active_nav_item=release_information
How to resolve this issue?
First: If you do not specify any Region in the API Request, then any launch or relaunch date in any country in the world will be considered valid.
Try adding ®ion=US and see how it looks different.
or
Second: You can change the release_date parameters for the primary_release_date parameters.
So only the primary date, the one whose year appears in parentheses next to the title, will be considered as possible.
EDIT
I made a correction (Thanks Travis).
Where it was: Try adding ®ion=en-US and see how it looks different.
I traded for: Try adding ®ion=US and see how it looks different.
Reply by ticao2 š§š· pt-BR
on August 30, 2020 at 11:57 AM
Try switching to primary_release_date.gte
primary_release_date = is the date chosen by the TMDb system to be the official release date for a Movie. World Premiere.
This date determines the year that appears in parentheses next to the film's title on the film's page.
release_date = are all the release dates of a Movie in each and every country in the world, over time,
including premieres, festival, on television, in Bluray or DVD, digital media, etc ...
A movie can only have one primary_release_date
But it can have several and countless release_date
A different opening date for each country, for each media,
for open television, for cable TV, re-releases, 50th anniversary celebration, etc ... etc ... etc ...
Reply by Travis Bell
on August 30, 2020 at 1:07 PM
region=en-US
is not a valid query. You'd want to specifyregion=US
. Region is a region parameter, and has nothing to do with language.If you use
region
, you'll want to userelease_date.gte/lte
.primary_release_date.gte/lte
is not compatible with region.