Taageerada Xoggunka Filimka

How to get top 10 popular movies along with the trailer information in one query using tmdb api

2 replies (on page 1 of 1)

Jump to last post

I am currently using http://api.themoviedb.org/3/movie/popular?api_key=### but its returning more pages

Hi jasonbourne1224,

You can't in 1 query, you would have to do it in 11 (popular call + the first 10 ids). Once you have the /movie/popular results, you can iterate over the first 10 items in the results array and call the /movie/{id} method. You can use append_to_response to call the videos method at the same time like so:

http://api.themoviedb.org/3/movie/550?api_key=###&append_to_response=videos

The ID in this case as an example is 550.

Hope that helps.

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

Ma doonaysaa inaad qiimayso ama ku darto shaygan liiska?

Galid