The Movie Database Support

on discover API , https://www.themoviedb.org/documentation/api/discover

there are some examples on how to 'sort' movies. I m looking a query to sort the movies by 'genre' . does anyone know how we can do that ?

3 replies (on page 1 of 1)

Jump to last post

Hi @tornado1979,

There is no way to sort by genre, no. I'm not clear on how you'd expect the results to be returned in that case, can you give me some background info on what you're looking for?

Hi Travis, thanks for your interest.

i would expect the final outcome to be like below, movies in a list based on their category (action,animation etc), but as i see the structure of the json data and genres are on a separate json, it seems not possible.

..... and so on

{ movie:1 category: Action, title: title1}, { movie:2 category: Action, title: title2}, { movie:3 category: Animation, title: title3}, { movie:4 category: Animation, title: title4}, { movie:5 category: Animation, title: title5}, { movie:6 category: Comedy, title: title6}, { movie:7 category: Comedy, title: title7},

Understood.

Correct, since we return multiple genre objects this wouldn't really be possible.

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