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
Resolved Tickets
Non podes atopar unha película ou serie? Inicia sesión para creala.
Queres valorar ou engadir o elemento a unha listaxe?
Non es membro?
Resposta de jigas
no 22 de decembro do 2013 ás 10:21AM
: (
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
Resposta de Travis Bell
no 22 de decembro do 2013 ás 10:36AM
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.
Resposta de RoliSoft
no 26 de decembro do 2013 ás 9:31AM
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]
Resposta de Travis Bell
no 26 de decembro do 2013 ás 12:48PM
HA! Truthfully, I didn't even know that would work, but very cool to know that it does.
Resposta de Zippie
no 27 de decembro do 2013 ás 5:30AM
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
Resposta de Travis Bell
no 27 de decembro do 2013 ás 11:20AM
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.
Resposta de samingle
no 19 de xaneiro do 2014 ás 5:14PM
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:
It works exactly as expected over CURL etc., returning the tv credits of the 5 actors listed, but over AJAX the request gets denied.
Resposta de Travis Bell
no 20 de xaneiro do 2014 ás 12:49PM
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.Resposta de samingle
no 20 de xaneiro do 2014 ás 3:06PM
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).
Resposta de Travis Bell
no 20 de xaneiro do 2014 ás 3:30PM
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
.Resposta de samingle
no 20 de xaneiro do 2014 ás 3:32PM
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?
Resposta de Travis Bell
no 20 de xaneiro do 2014 ás 3:38PM
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.Resposta de rcoenen
no 22 de xaneiro do 2014 ás 1:29PM
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?
Resposta de Travis Bell
no 22 de xaneiro do 2014 ás 1:45PM
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.
Resposta de Travis Bell
no 3 de febreiro do 2014 ás 1:10PM
FYI, the
/tv/on_the_air
method is live.I also pushed a fix for the Freebase lookups:
And also, there's now a
/person/:id/external_ids
method.Cheers.