The Movie Database 支持

Hello, I'm trying to write a query that will return the entire cast from a TV Show but I have no idea how append another query to the one I already have : http://api.themoviedb.org/3/tv/1399/credits?api_key=************. I am totally aware that this query returns the cast team from the latest season of the show but how to make it return them all? Thank you

8 回复(第 1 页,共 1 页)

Jump to last post

Hi mp_blind,

There is no query to get all of the cast from every season. You would have to iterate though every season and call each credits method.

You can make one query for the TV show details and credits by using the ?append_to_response param. That request would look like so:

https://api.themoviedb.org/3/tv/1399?api_key=###&append_to_response=credits

Or a season's like so:

https://api.themoviedb.org/3/tv/1399/season/1?api_key=###&append_to_response=credits

Cheers.

Thank you

Hello,

I am trying to get credits from a tv show by my app displaying the name of the tv show (for example Always Sunny In Philadelphia) getting the credit ID and the tv show ID then using http://api.themoviedb.org/3/tv/{id}/credits?api_key=XXXXXXXXXXXXX. My question is which ID do I use just ID (which gave me null) or credit ID(which gave me the credits for that 70's show)?

My logging info: FOR TV SHOW CREDIT ID::: 52fdff9cc3a3684e451f3423 --> when I selected Always Sunny in Pili

tvID::: 296161328

Thank you in advance!

Hi jrichardson,

The id for "It's Always Sunny in Philadelphia" is 2710. So with that id, you can call the TV show credits:

http://api.themoviedb.org/3/tv/2710/credits?api_key=###

If you would like to get a specific credit's info, then you can use one of the ids returned in the credits array. Here's Glenn Howerton's credit as an example:

http://api.themoviedb.org/3/credit/525741f1760ee36aaa0b8b81?api_key=###

Cheers.

I am getting the wrong id then? What I do is choose an actor get the list of movies and tv shows they have been in. Then I select one and pull the credit id and id from the selected object. That is where I got that is from so why I are they different? Thank you for the info.

Hi jrichardson,

Well, I'm not sure where you got that id from… we don't have any TV ids as high as the number you referenced above.

Search for Glenn Howerton:

https://api.themoviedb.org/3/search/person?api_key=###&query=glenn+howerton

Returns id a person with the id of 77870, head off and request the combined_credits for 77870:

https://api.themoviedb.org/3/person/77870/combined_credits?api_key=###

Look at his "It's Always Sunny in Philadelphia" credit, which has the show id 2710 and credit id of 525741f1760ee36aaa0b8b81.

How would I get the credits of always sunny in phili then? Do I have to iterate through each season and get credits back from them? When I selected always sunny in phili from list this is the data that displays:

SELECTED DATA ::::: { character = Sal; "credit_id" = 52fdff9cc3a3684e451f3423; "episode_count" = 2; "first_air_date" = "2005-08-04"; id = 2710; "media_type" = tv; name = "It's Always Sunny in Philadelphia"; "original_name" = "It's Always Sunny in Philadelphia"; "poster_path" = "/jQ0U5LjdFStCeZdOJca9Zs90yAa.jpg"; }

How do I get the credits of always sunny in phili from this data?

After a little searching: "http://themoviedb.apiary-mock.com/3/search/tv" but the documentation does specify the rest which is very inconvenient. I am assuming to be the same as for a person would be "http://themoviedb.apiary-mock.com/3/search/tv/It's+Always+Sunny+in+Philadelphia&api_key=XXXXXXXXXXXXX"?

There’s two types of credits that are added to TV. There’s season level credits (the season regulars) which can be returned by accessing any season/{season_number}/credits call and episode level which are the guest stars and episode level crew (writers, director). Some examples:

http://api.themoviedb.org/3/tv/2710/season/9/credits?api_key=###

The show level credits returns the “last season” credits:

http://api.themoviedb.org/3/tv/2710/credits?api_key=###

Episode level credits (which contain the guest stars and episode level crew) can be called via any episode number:

http://api.themoviedb.org/3/tv/2710/season/9/episode/10/credits?api_key=###

Cheers.

找不到电影或节目?登录并创建它吧。

全站通用

s 聚焦到搜索栏
p 打开个人资料菜单
esc 关闭打开的窗口
? 打开键盘快捷键窗口

在媒体页面

b 返回(或返回上级)
e 进入编辑页面

在电视季页面

(右箭头)下一季
(左箭头)前一季

在电视集页面

(右箭头)下一集
(左箭头)上一集

在所有图像页面

a 打开添加图片窗口

在所有编辑页面

t 打开翻译选择器
ctrl+ s 提交

在讨论页面

n 创建新讨论
w 切换关注状态
p 设为公开 / 私密讨论
c 关闭 / 开放讨论
a 打开活动页
r 回复讨论
l 跳转至最新回复
ctrl+ enter 发送信息
(右箭头)下一页
(左箭头)前一页

设置

想给这个条目评分或将其添加到片单中?

登录

还不是会员?

注册加入社区