The Movie Database 지원

Sorry first time using API to fetch data, I want to get actor or actress image using there name is it possible to do so? if Yes, what would be the link or how the call should be made?

7 댓글 (1 / 1)

Jump to last post

Ok as I looked further I found this https://developers.themoviedb.org/3/people/get-person-images there is a way to get an image but it asks for "person_id" where will I find person id?

Hi @RichaGupta,

When you say you want to get the images of a person do you mean their profile images or rather, the backdrops and posters that they appear in?

Hi Travis,

I am trying to get their profile pic, I am able to get to it somehow now but I am confused why there are multiple pics return and which one should be considered? like if I try to find Chris Brown pics there are 5 different images I am getting how would I know which one to pick programmatically?

I first try to get to that person details like this

https://api.themoviedb.org/3/search/person?api_key=XXXXXXXXXXX&language=en-US&query=Chris%20Brown&page=1&include_adult=false

there you can see "profile_path" out of all 39 total results, it has 5 images which one to consider in that case?

https://image.tmdb.org/t/p/w500/mPQkVbV1SBo0d7lE2BlEivCOrs2.jpg https://image.tmdb.org/t/p/w500/4k8sacCMG9jI2jo7x5XVSzq2Mnt.jpg https://image.tmdb.org/t/p/w500/vL805BcPV6xbu2HUZig8ZEvnjJL.jpg https://image.tmdb.org/t/p/w500/7IwyeH44l7MaJ9Fo48CVxj7nyQT.jpg https://image.tmdb.org/t/p/w500/coja80Y3B1XJeCJpW6l1ReCH7Zh.jpg

Thanks Richa

Hi Richa,

Each item in the results array is an object representative of a single person. There is only 1 image per object. I've truncated the results here:

{
  "page": 1,
  "total_results": 39,
  "total_pages": 2,
  "results": [
    {
      "popularity": 1.4,
      "id": 1939990,
      "profile_path": null,
      "name": "Chris Brown",
      "known_for": [ ... ],
      "adult": false
    },
    {
      "popularity": 1.336,
      "id": 1395790,
      "profile_path": null,
      "name": "Chris Brown",
      "known_for": [ ... ],
      "adult": false
    },
    {
      "popularity": 1.12,
      "id": 1414991,
      "profile_path": "/mPQkVbV1SBo0d7lE2BlEivCOrs2.jpg",
      "name": "Chris Brown",
      "known_for": [ ... ],
      "adult": false
    },
    ...
  ]
}

So the 3rd item in the array has a profile image of "/mPQkVbV1SBo0d7lE2BlEivCOrs2.jpg".

ok thanks, I think I am able to figure it out there are some glitches but its working for now :)

@RichaGupta said:

Hi Travis,

I am trying to get their profile pic, I am able to get to it somehow now but I am confused why there are multiple pics return and which one should be considered? like if I try to find Chris Brown pics there are 5 different images I am getting how would I know which one to pick programmatically?

I first try to get to that person details like this

https://api.themoviedb.org/3/search/person?api_key=XXXXXXXXXXX&language=en-US&query=Chris%20Brown&page=1&include_adult=false

there you can see "profile_path" out of all 39 total results, it has 5 images which one to consider in that case?

https://image.tmdb.org/t/p/w500/mPQkVbV1SBo0d7lE2BlEivCOrs2.jpg https://image.tmdb.org/t/p/w500/4k8sacCMG9jI2jo7x5XVSzq2Mnt.jpg https://image.tmdb.org/t/p/w500/vL805BcPV6xbu2HUZig8ZEvnjJL.jpg https://image.tmdb.org/t/p/w500/7IwyeH44l7MaJ9Fo48CVxj7nyQT.jpg https://image.tmdb.org/t/p/w500/coja80Y3B1XJeCJpW6l1ReCH7Zh.jpg

Thanks Richa

how can we get actors images for each movie

@TohidGazi said:
how can we get actors images for each movie

When you make a Movie Details API Request,
https://developer.themoviedb.org/reference/movie-details
and use the "&append_to_response=" resource with "credits",
https://developer.themoviedb.org/docs/append-to-response
it may solve your problem.
For example:

https://api.themoviedb.org/3/movie/550?api_key=THE_KEY&language=pt-BR&append_to_response=credits  

In the response you will receive the cast list.
And in each person in the cast you will find the "profile_path" of the person's default image.
That is, the image presented on the person's home page here on TMDb.

credits 
cast    
0   
adult   false
gender  2
id  819
known_for_department    "Acting"
name    "Edward Norton"
original_name   "Edward Norton"
popularity  34.043
profile_path    "/5XBzD5WuTyVQZeS4VI25z2moMeY.jpg"
cast_id 4
character   "The Narrator"
credit_id   "52fe4250c3a36847f80149f3"
order   0
1   
adult   false
gender  2
id  287
known_for_department    "Acting"
name    "Brad Pitt"

찾으시는 영화나 TV 프로그램이 없나요? 로그인 하셔서 직접 만들어주세요.

전체

s 검색 바 띄우기
p 프로필 메뉴 열기
esc 열린 창 닫기
? 키보드 단축키 창 열기

미디어 페이지

b 돌아가기
e 편집 페이지로 이동

TV 시즌 페이지

(우 화살표) 다음 시즌으로 가기
(좌 화살표) 이전 시즌으로 가기

TV 에피소드 페이지

(우 화살표) 다음 에피소드로 가기
(좌 화살표) 이전 에피소드로 가기

모든 이미지 페이지

a 이미지 추가 창 열기

모든 편집 페이지

t 번역 선택 열기
ctrl+ s 항목 저장

토론 페이지

n 새 토론 만들기
w 보기 상태
p 공개/비공개 전환
c 열기/닫기 전환
a 활동 열기
r 댓글에 글쓰기
l 마지막 댓글로 가기
ctrl+ enter 회원님의 메세지 제출
(우 화살표) 다음 페이지
(좌 화살표) 이전 페이지

설정

이 항목을 평가하거나 목록에 추가할까요?

로그인