The Movie Database Support

Hey guys,

I know a lot of you have been waiting for this so here it is, the TV API.

We currently have 17 methods available:

GET '/3/tv/:id'
GET '/3/tv/:id/credits'
GET '/3/tv/:id/external_ids'
GET '/3/tv/:id/images'
GET '/3/tv/:id/translations'
GET '/3/tv/:id/season/:season_number'
GET '/3/tv/:id/season/:season_number/credits'
GET '/3/tv/:id/season/:season_number/external_ids'
GET '/3/tv/:id/season/:season_number/images'
GET '/3/tv/:id/season/:season_number/episode/:episode_number'
GET '/3/tv/:id/season/:season_number/episode/:episode_number/credits'
GET '/3/tv/:id/season/:season_number/episode/:episode_number/external_ids'
GET '/3/tv/:id/season/:season_number/episode/:episode_number/images'
GET '/3/tv/on_the_air'
GET '/3/tv/top_rated'
GET '/3/tv/popular'
GET '/3/search/tv'
GET '/3/discover/tv'

And 3 new person credit methods to support TV and external IDs:

GET '/3/person/:id/movie_credits'
GET '/3/person/:id/tv_credits'
GET '/3/person/:id/combined_credits'
GET '/3/person/:id/external_ids'

And also new credit, find and network namespace:

GET '/3/credit/:id'
GET '/3/find/:id'
GET '/3/network/:id'

Functionality wise, they work almost identical to movies or the way you expect things to work on v3. The most notable thing missing right now is getting to the TV credits from the person side of things. I'll be working on that this week.

Understandably, this is a preview release and should be considered a risk. Some data could change depending on the feedback I get and if you roll this out publicly you are assuming that risk. I don't expect it to be like this for long, maybe a few weeks. I'll let everyone know when the design is final.

Now go ahead everyone, test!

Open Tickets

  • LH-298 - Create the method to list TV genres

Resolved Tickets

  • LH-296 - Link up TV credits on people
  • LH-292 - Create a tv season credits method
  • LH-300 - Ensure 404 items get a proper not found response
  • LH-302 - Rename sort_order to order to match the movie credit order field
  • LH-304 - Rename the TV character_name field to character to keep it consistent with movies
  • LH-309 - Create the /tv/popular method
  • LH-310 - Create the /tv/top-rated method
  • LH-294 - Create the /discover/tv method
  • LH-295 - Create the /network/:id method
  • LH-311 - Create a /tv/:id/translations method
  • LH-301 - Search for TvSeries by an external id
  • LH-312 - Create the /tv/on_the_air method
  • LH-313 - Create the /tv/today method
  • LH-297 - Hook up the change methods to TV

86 replies (on page 4 of 6)

Jump to last post

Previous pageNext pageLast page

: (

Well , that forces me to make 2 requests to the server. In my database i have the :imdbid that i need to convert to id

so , i will request /find/{imdbid} --> return {id}

a new call : /3/tv/ {id} /images

how can we merge that to one call ? regards

You will have to make two calls. It's how the API is designed.

If I was you, I would run through all of your IMDB IDs and get the TMDb ID and save it in your DB. You would only have to do this once per ID and then never worry about it again.

Hello,

Is it possible to fetch all episodes with a single query?

If I understand correctly, currently /3/tv/:id returns only the available season numbers, and I'd have to send a request for each season to /3/tv/:id/season/:num in order to fetch all episodes. This would be undesirable in some cases, where there are just way too many seasons.

Thank you for your response in advance.

EDIT: Nevermind, I've figured it out. Solution in case anyone else is bothered by this: /3/tv/:id?api_key=:key&append_to_response=season/1,season/2[,etc]

EDIT: Nevermind, I've figured it out. Solution in case anyone else is bothered by this: /3/tv/:id?api_key=:key&append_to_response=season/1,season/2[,etc]

HA! Truthfully, I didn't even know that would work, but very cool to know that it does.

Hey Travis,

Noticed that the freebase Id's don't seem to be working when searching for tv series. I suspect this is because they include '/' ex: '/en/breaking_bad' or '/m/03d34x8' respectively the freebase id and freebase mid for breaking bad.

I've tried url encoding them but then I just don't get any hits

Hey Zippie,

Good catch, interesting. I'm sure you're right, it's tripping on the slashes and treating them as URL paths instead of discrete values. I've created a new ticket for this here.

I'm attempting to get a list of credits for several actors with one request, and running into a bit of a wall. The request works fine in every context except AJAX, where it hits a cross-site scripting error (the rest of the requests I'm doing work fine over AJAX, so I'm assuming this is a configuration issue of some sort).

Here's the request I'm sending:

https://api.themoviedb.org/3/person?api_key=###&append_to_response=1224596/tv_credits,1224618/tv_credits,17287/tv_credits,129101/tv_credits,1215702/tv_credits

It works exactly as expected over CURL etc., returning the tv credits of the 5 actors listed, but over AJAX the request gets denied.

Actually, I think what is happening is that you're not specifying a person ID so the API is returning a 404 not found, even though it's finding some results via the append to response.

Basically, the API is not designed to be used like this. The /person/:id method enforces the lookup of an ID and there is no way around this right now. There is no /person method.

Wouldn't it also receive a 404 on other access methods if that were the case? It returns exactly as expected if I query it from PHP, etc., just not AJAX (and it sort of has to happen over AJAX due to the rate limiting).

The issue being that I'm betting PHP isn't caring about the response headers and only the response body, so it's working. Your browser (or specifically whatever library you're using jQuery, Ext, etc…) does care about the response headers and since it's not getting a 200 status back it's failing, regardless of any response body being returned.

At this time, there is no /person method, only /person/:id.

Makes sense. Any future plans to add a method of fetching this sort of data, or should I just separate it into a bunch of individual requests?

There is no plans at this time, you should make separate requests.

There are lots of neat ways you can use ?append_to_response to blend requests into a single HTTP call similar to this but this specific example isn't officially supported.

I'll probably push a fix to simply ignore the append_to_response param on 404 responses so at least then it wouldn't be a little confusing like it is here.

Why is the duration of episodes listed as property of the TV series instead of a length/duration property for each single episode? Currently it is impossible to track any series that have episodes that have a variable length. Basically, the current approach works for ie Game of Thrones where every episode is indeed exactly 60 minutes, but what if a special episode (christmas edition, etc.) would be say, 90 minutes?

We don't track per episode runtimes. We can think about adding that later but I'm betting most of the time these values wouldn't be filled in. In any case, I've created a new ticket for this and will consider it in the future.

FYI, the /tv/on_the_air method is live.

I also pushed a fix for the Freebase lookups:

http://api.themoviedb.org/3/find/en/the_big_bang_theory?api_key=###&external_source=freebase_id

And also, there's now a /person/:id/external_ids method.

http://api.themoviedb.org/3/person/287/external_ids?api_key=###

Cheers.

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