The Movie Database Support

Hi! I am working with /person/popular and looking for a way to get that response sorted by most popular, descending/ascending? I don't see any sort query params in the docs. I can get pages, but page items are not sorted by popularity.

https://api.themoviedb.org/3/person/popular?api_key=<>&language=en-US&page=1

Thanks!

4 replies (on page 1 of 1)

Jump to last post

Hi @Torbjor,

The /*/popular methods are indeed sorted by popularity, can you show me what you're seeing when they're not?

2.1.5 :001 > require 'rest_client'
2.1.5 :002 > api_key = "XXX"
2.1.5 :003 > request = RestClient.get 'http://api.themoviedb.org/3/person/popular', { :accept => 'application/json', :params => { :api_key => api_key } }
2.1.5 :004 > parsed_request = JSON.parse(request)
2.1.5 :005 > parsed_request['results'].map { |result| result['popularity'] }
 => [55.193624, 36.873281, 36.340025, 36.016189, 30.976805, 29.763182, 26.366653, 25.500246, 25.305701, 25.089034, 22.588007, 22.029472, 21.889838, 21.838433, 21.055364, 20.255858, 19.558332, 19.48768, 19.225475, 19.2007]

Thanks for the reply! Soon after I sent this I realized I wasn't asking the right question. You are right. What I'd like to ask is, how do you measure popularity? For example, 'Wonder Woman' is in first place today with a popularity score of 106 but 'Beauty and the Beast' is in second place with 65.

Popularity is calculated by a variety of things like page views, the number of ratings and favourites/watchlist additions per day and then release date.

Thanks!

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