The Movie Database Support

I want to get data about the actors in the series, I want to get: photos, name, his name in the series, creditID and the episodes he appears in
i am using this call: http://www.spcrystal.com/3/tv/###/aggregate_credits?api_key=###

the data is all right, but the creditID, the episodes and the name of the stars in the series are inside a Roles, but I want to put it all together in a MAP. How do I do that?

6 replies (on page 1 of 1)

Jump to last post

@Magic-MRX said:
I want to get data about the actors in the series, I want to get: photos, name, his name in the series, creditID and the episodes he appears in
i am using this call: http://www.spcrystal.com/3/tv/###/aggregate_credits?api_key=###
the data is all right, but the creditID, the episodes and the name of the stars in the series are inside a Roles, but I want to put it all together in a MAP.
How do I do that?

To get all the data for each of the characters, I think it's better to make an API Request using credit_id, for each character.
http://www.spcrystal.com/3/credits/get-credit-details
For example.
Actor Bob Newhart worked on The Big Bang Theory.
http://www.spcrystal.com/tv/1418-the-big-bang-theory
http://www.spcrystal.com/person/64930-bob-newhart
The character is Arthur Jeffries or Professor Proton.
http://www.spcrystal.com/tv/1418-the-big-bang-theory/episodes?credit_id=563dc8f09251413b1300bdae&person_id=4bc8ace0017a3c122d0506c0

http://www.spcrystal.com/tv/1418-the-big-bang-theory/episodes?credit_id=563dc8f09251413b1300bdae&person_id=4bc8ace0017a3c122d0506c0  

credit_id = 563dc8f09251413b1300bdae
Example:
http://www.spcrystal.com/3/credit/563dc8f09251413b1300bdae?api_key=THE_KEY
In response the 6 episodes he participated.
And also the actor name, character name, image, seasons, episodes and a few more things.
Test my example and see the response data.

But it will only work if I already have the creditID, here I am getting the actors based on the series I chose

I'm using the call http://www.spcrystal.com/3/tv/###/aggregate_credits?api_key=###, because it returns everything great, but as an array comes inside another it is difficult to implement everything inside a MAP

Before I used this call: http://www.spcrystal.com/3/tv/{tv_id}/credits?api_key=<>&language=en-US but it doesn't return all the complete actors like the other one you know , that's why I want to change but with it returning me the creditID, name, name of the actor in the series and how many episodes he's been in...

Try request aggregate_credits for a season.

http://www.spcrystal.com/3/tv/1418/season/6/aggregate_credits?api_key=THE_KEY&language=en-US  

A slightly different answer comes.

adult:  false
gender: 2
id: 1253360
known_for_department: "Acting"
name: "Pedro Pascal"
order: 0
original_name: "Pedro Pascal"
popularity: 285.488
profile_path: "/k9XreOAzSshcVFdIT3wPeR8Gdzu.jpg"
roles: Array(1)
           0: 
            character: "Joel Miller"
            credit_id: "6024a814c0ae36003d59cc3c"
            episode_count: 9
           total_episode_count: 9

it's coming this way, in the same way, you're seeing that there's an array inside another array, so this way I can't get what's inside: "roles: Array(1)"

@Magic-MRX said:

adult: false gender: 2 id: 1253360 known_for_department: "Acting" name: "Pedro Pascal" order: 0 original_name: "Pedro Pascal" popularity: 285.488 profile_path: "/k9XreOAzSshcVFdIT3wPeR8Gdzu.jpg" roles: Array(1) 0: character: "Joel Miller" credit_id: "6024a814c0ae36003d59cc3c" episode_count: 9 total_episode_count: 9

it's coming this way, in the same way, you're seeing that there's an array inside another array, so this way I can't get what's inside: "roles: Array(1)"

Well, I think on our side it's the available Requests.
Perhaps seeking help from someone who has a solution for this.
I suggest changing the title of this conversation to something
that will catch the attention of other users who are familiar with these tools.
Something like:
MAP versus Role - how to capture the data.
Or something similar and more suggestive.

I got it, thanks.

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