The Movie Database Support

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

9 replies (on page 1 of 1)

Jump to last post

up :)

@Jaymart7 said:
Equivalent Discover
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

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

 "dates": {
    "maximum": "2020-08-24",
    "minimum": "2020-07-07"
  },
  "total_pages": 3

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

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=2020-08-24

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.

Hi, I have a question about your answer in Get upcoming request

"maximum": "2020-08-24",
"minimum": "2020-07-07"

why the minimum day is 7, not 24?

Thanks!

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.

@Jaymart7 said:
Hi, I have a question about your answer in Get upcoming request

"maximum": "2020-08-24",
"minimum": "2020-07-07"

why the minimum day is 7, not 24?
Thanks!

My response on the item was:

Get Upcoming = is similar to Get Now Playing

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

  ],
  "page": 1,
  "total_results": 858,
  "dates": {
    "maximum": "2020-09-03",
    "minimum": "2020-07-17"
  },
  "total_pages": 43
}

Get Upcoming

  ],
  "page": 1,
  "total_results": 204,
  "dates": {
    "maximum": "2020-09-21",
    "minimum": "2020-09-04"
  },
  "total_pages": 11
}

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.

Okay, thanks @ticao2 smile

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?

{
    "page": 1,
    "total_results": 199,
    "total_pages": 10,
    "results": [
        {
            "popularity": 37.912,
            "vote_count": 8277,
            "video": false,
            "poster_path": "/awUGN7ZCNq2EUTdpVaHDX23anOZ.jpg",
            "id": 85,
            "adult": false,
            "backdrop_path": "/kCiMExsYuNhYluHxPP2OTmWw7hp.jpg",
            "original_language": "en",
            "original_title": "Raiders of the Lost Ark",
            "genre_ids": [
                28,
                12
            ],
            "title": "Raiders of the Lost Ark",
            "vote_average": 7.9,
            "overview": "When Dr. Indiana Jones – the tweed-suited professor who just happens to be a celebrated archaeologist – is hired by the government to locate the legendary Ark of the Covenant, he finds himself up against the entire Nazi regime.",
            "release_date": "1981-06-12"
        },
        {
            "popularity": 36.388,
            "vote_count": 567,
            "video": false,
            "poster_path": "/qgrk7r1fV4IjuoeiGS5HOhXNdLJ.jpg",
            "id": 568160,
            "adult": false,
            "backdrop_path": "/ize3ZieqSy0TCWljmVoEiy8fSFS.jpg",
            "original_language": "ja",
            "original_title": "天気の子",
            "genre_ids": [
                12,
                16,
                18,
                14,
                10749
            ],

@Jaymart7 said:
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?

{
    "page": 1,
    "total_results": 199,
    "total_pages": 10,
    "results": [
        {
            "original_title": "Raiders of the Lost Ark",
            "release_date": "1981-06-12"
            ],

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:

FR France - 01/09/2020 - Digital - Netflix

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 &region=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 &region=en-US and see how it looks different.
I traded for: Try adding &region=US and see how it looks different.

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 ...

@ticao2 said:

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 region=en-US and see how it looks different.

region=en-US is not a valid query. You'd want to specify region=US. Region is a region parameter, and has nothing to do with language.

If you use region, you'll want to use release_date.gte/lte. primary_release_date.gte/lte is not compatible with region.

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