The Movie Database Support

I tried to make the following request

https://api.themoviedb.org/3/discover/movie?api_key=myapikey&with_runtime.lte=10

Which should give me movies that are no longer than 10 minutes. The request however does include movies that are longer than that.

For example the first movie in the results is:

{
  "popularity": 197.528,
  "vote_count": 178,
  "video": false,
  "poster_path": "/fapXd3v9qTcNBTm39ZC4KUVQDNf.jpg",
  "id": 423204,
  "adult": false,
  "backdrop_path": "/k2WyDw2NTUIWnuEs5gT7wgrCQg6.jpg",
  "original_language": "en",
  "original_title": "Angel Has Fallen",
  "genre_ids": [
    28
  ],
  "title": "Angel Has Fallen",
  "vote_average": 5.9,
  "overview": "Secret Service Agent Mike Banning is framed for the attempted assassination of the President and must evade his own agency and the FBI as he tries to uncover the real threat.",
  "release_date": "2019-08-23"
}

Which is 2h 1m.

Please correct me if I'm not using the with_runtime parameter properly.

10 replies (on page 1 of 1)

Jump to last post

Hi @guy6767,

You can see here, that someone added a runtime of 2. That would be why it's being returned.

I've updated the value, is it still being returned?

It's not being returned anymore.

However this also happens to about 90% of the movies that are being returned. The thing is, when I'm using the /movie/{movie_id} request, the runtime is correct.

For example, the first result for discover/movie?api_key=myapikey&with_runtime.lte=45 is:

{
"popularity": 36.064,
"vote_count": 422,
"video": false,
"poster_path": "/wwnkDdJo87p7RVBPH18DmsWTUxE.jpg",
"id": 502416,
"adult": false,
"backdrop_path": "/mBOv5YrX5QGr5CusK0PKSHuxOt9.jpg",
"original_language": "en",
"original_title": "Ma",
...
}

So for the runtime I request https://api.themoviedb.org/3/movie/502416?api_key=myapikey, and I'm getting:

{
....
"original_language": "en",
"original_title": "Ma",
...
"id": 3172,
...
"runtime": 99,
...
}

Is there anyway to ensure that the "with_runtime.lte" parameter uses the same runtime I'm getting from /movie/{movie_id}?

Is there anyway to ensure that the "with_runtime.lte" parameter uses the same runtime I'm getting from /movie/{movie_id}?

Not currently, no. Runtimes can be added to each translation, and all of these values get queried when you run a discover request with with_runtime.lte.

You can see Ma, has the same issue as Angel Has Fallen: https://www.themoviedb.org/movie/502416-ma/changes?filter_key=key&filter=runtime

I see, thanks for the detailed reply.

No worries. I've gone ahead and corrected the pt-BR translation for Ma, which should remove it. If you come across more, you can make these edits yourself, or use the "Report" button on each movie and submit a report to have a moderator look at them. This helps everybody out. wink

Hi Travis,

We encountered the same problem... We implemented filters for the discover list in our app and had to realize the way the with_runtime.lte/gte parameters work, isn't a really reliable way to get movies within a specific runtime range. About 7 of 10 movies on page 1 of our discover response had actually another runtime that the one we specified with the with_runtime.lte/gte parameters. This may be owed to incorrect data provided by some contributors, but I don't think we have the capacities to fix this problem by finding and editing every incorrect runtime data existing in the database.

Could you please consider adding a parameter like local_runtime.lte/gte which only uses the local runtimes (and maybe as a fallback the original runtimes)?

If that's not possible: Do you know another method how we can filter out the "incorrect" movies afterwards? The request won't respond the movie runtime for the requested region, which could help us reach that target.

Best greetings and thanks in advance, Lukas

Adding a param like local_runtime.lte/gte is not something I have plans for right now. But there is something I can add when users add vastly different runtimes compared to what else has been entered, in hopes to catch the error when it's added.

In order to fix the bad entries right now, we'll just have to find them and get them fixed. I'm currently rebuilding TMDb's discover experience so it's something that I will probably be looking at in order to get it launched.

Here's the relevant ticket to improve the editing workflow. When I get to this ticket, I can probably also remove the seemingly erroneous values.

Thank you for the quick response! I'm glad that you're up to the problem. Nevertheless, I would like to share a few more thoughts with you (hoping not to annoy you):

Preventing incorrect information from being created would definitely be an effective step. But this handling could collide with "legit" differing runtimes (e.g. "The Shining" with an US Cut of 143 minutes and Kubrick cutting the movie to 119 minutes for several european countries... both cinema releases). Some "legit" differing runtimes could also be deleted by mistake if try to clean those incorrect runtimes in the database.

Let's image every runtime in the database is cleaned up and 100% correct: Why would a user (for example from Sweden) want to get suggested "The Shining" after filtering the discover function ( region=SE, language=sv-SE, with_runtime.gte=140 ) for runtimes longer than 140 minutes?

What's the usecase for this kind of with_runtime.lte/gte behavior considering every kind of runtime?

It's July 2022 and it still hasn't been addressed.

@chylinski said:
It's July 2022 and it still hasn't been addressed.

If you're referring to the feature that admin Travis Bell reported in 2019 that he intended to implement,
I believe the feature has been implemented.
Look here
https://trello.com/c/EffmZsoj/180-throw-a-warning-when-the-entered-runtime-is-vastly-different-than-the-average

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