The Movie Database Support

Hi all, amazing API and works great! I'm hoping to make a web app (for learning) that pulls out all the rating number of a tv show. I do one API call for the search function to search for a show (call 1), this then gives me an ID for the show. Now I basically am looking at using that ID from search to get the TV Show details to find number of seasons (call 2), then I can use the number of seasons to then do multiple API calls for each season to get every single rating of an episode (call 3 to 10).

This is fine and all, but I'm super worried that to get one show displayed on the site I could be doing up to 10 API calls each time. Is there any good way i can drop the number of calls? I mean this works fine this way, but I don't want to go overboard on API calls if I can save server use.

Thanks everyone.

1 reply (on page 1 of 1)

Jump to last post

@WardenclyffeTower said:

After finding the number of seasons, you can use the append_to_response parameter to construct a third call with a response including all episodes. For example, Detectorists has an id of 61828 and 3 regular seasons and a special season. Use this to get all episode info:

https://api.themoviedb.org/3/tv/61828?api_key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&append_to_response=season/0,season/1,season/2,season/3

Oh great, thank you for this, will help a lot!

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