The Movie Database Support

Hi,

I would like to store the credits for each episode but want to do this as efficiently as possible and not be burdensome to the API servers. Is it correct that to get the credits for an episode, you need to call the TV Episode end point (/3/tv/{series_id}/season/{season_number}/episode/{episode_number}/credits) ? Is there an alternative to retrieve this information or a way to retrieve the credits for multiple episodes in one call? I am hoping that there is another option that would help to avoid the individual episode credit calls to cut down on the traffic and server side resources.

Thanks in advance,

zbd

2 replies (on page 1 of 1)

Jump to last post

You have to iterate through all the episodes. If you want to add the regular season cast to these episodes, you must also iterate through all seasons and manually merge the regular cast (season level) and guest stars (episode level) for each episode.

The TMDB API allows 50 queries per second, so you can write your code multithreaded to speed things up. Just use some sort of request rate limiter and handle HTTP Error 429 (Too many requests).

Also be aware that the TMDB API Terms of Use only allow you to cache TMDB data locally for a maximum of 6 months.

I am doing pretty much what you describe, so I will continue on with that approach. I have the API rate limiting set at 39 calls per second (rolling window) to make sure I stay under 40 per second. I thought the limit was 40 but if I can set it to 50 that will help cut the time a bit.

With respect to caching, I think I should be okay. I am running processes to check the recent changes api and when found, I refresh the data if it is still available and purge if not. I am also running a periodic pull of the id files and doing a full refresh overwriting old data. This process will purge any data that is local but not in the id files so that I don't hold stale data.

If this doesn't stay within the bounds of the terms of use, please let me know. Any suggestions on how to correct would be greatly appreciated, too.

Thank you for the assistance, zbd

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?

Đăng nhập