The Movie Database Support

after search around the forum, I suppose the total results number is set to 20 per page, but in some queries, like discover/movie, it's not always the case, some times, the first page returns only 19 results, sometimes 9 results, but the second page returns always 20 results. I have to force query starting at page 2 to avoid this variation.

is this a bug ? or it's intentional ? can I force the page returns always 20 results ? (in case their are more than 1 page)

thanks a lot

4 replies (on page 1 of 1)

Jump to last post

A few things to mention so I can get a clearer picture here:

  1. Each page is cached and it's possible that new data has been updated since the time of the original cache leading to either wrong counts and/or additional pages
  2. In those cases when you're checking the second page, are there results? Technically you can request any page you want, but that doesn't necessarily mean there will be results

when i check the second page, there are always results, and the results length is 20. but the first page is not. for example:

returns only 19 results, but

returns 20 results

returns only 9 results, but

returns 20 results.

Ya, this is a combination of a few things that I'm aware. I've created a new ticket to look at this in the future.

Easy fix for you should be to trust the total_pages field, ignore the number of items being returned in results array.

thanks for your quick reply. much appreciate your help ^

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


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


Want to rate or add this item to a list?