The Movie Database 지원

Hi,

I noticed an issue with the Multi search endpoint: https://api.themoviedb.org/3/search/multi

It has a poster_path in the response object, but it's always null. When checking the Person search, the image can be found under profile_path instead of poster_path.

I was wondering if the backend can fix that by redirecting the Person profile_path as a poster_path in the Multi endpoint.

Thank you.

4 댓글 (1 / 1)

Jump to last post

Hi @gustavopeq, no, we cannot make a change like this.

Every media object returned across all of the many different endpoints are the same. Whether it's search, lists, popular, or trending, everything is consistent per media type.

You'll have to check which media type it is you're dealing with and template out accordingly. Note the media_type field that is returned so you can make that decision.

Cheers.

Understood... So when using this Multi endpoint, if I need to display the Person's profile picture, it's expected that I do an extra API call by the Person ID, to be able to get the profile_path right? Thanks @travisbell

@gustavopeq said:

...it's expected that I do an extra API call by the Person ID, to be able to get the profile_path right?

No. The profile_path field is returned as part of the object. Here's the response for a search of "Brad Pitt", notice the first response has a profile_path field

Request

curl -v "http://api.themoviedb.org/3/search/multi?api_key=###&query=brad+pitt"

*   Trying [2600:9000:201e:2800:c:174a:c400:93a1]:80...
* Connected to api.themoviedb.org (2600:9000:201e:2800:c:174a:c400:93a1) port 80
> GET /3/search/multi?api_key=###&query=brad+pitt HTTP/1.1
> Host: api.themoviedb.org
> User-Agent: curl/8.4.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Type: application/json;charset=utf-8
< Content-Length: 4176
< Connection: keep-alive
< Date: Fri, 26 Jan 2024 23:03:22 GMT
< Server: openresty
< Cache-Control: public, max-age=12698
< x-memc: HIT
< x-memc-key: ed0cade417eee6ebbd8a04b6e5505653
< x-memc-age: 12612
< x-memc-expires: 12698
< ETag: W/"b14717f2ce17309a1a72b5526a9fbf3c"
< Vary: Accept-Encoding
< X-Cache: Miss from cloudfront
< Via: 1.1 de2ed3c94563fee614f35f9bc3f52d1c.cloudfront.net (CloudFront)
< X-Amz-Cf-Pop: IAD89-C3
< Alt-Svc: h3=":443"; ma=86400
< X-Amz-Cf-Id: KNctMrkrIMapvE0OtNp_M1YSWWEuP5e5vosws98YZvFFs5ITg8OqDQ==
< Vary: Origin
<
* Connection #0 to host api.themoviedb.org left intact

Response

{
    "page": 1,
    "results": [
        {
            "adult": false,
            "id": 287,
            "name": "Brad Pitt",
            "original_name": "Brad Pitt",
            "media_type": "person",
            "popularity": 42.404,
            "gender": 2,
            "known_for_department": "Acting",
            "profile_path": "/cckcYc2v0yh1tc9QjRelptcOBko.jpg",
            "known_for": [
                ...
            ]
        },
        {
            "adult": false,
            "backdrop_path": "/gt07Tw1IMbHbYpkJTCtqCEj0J8W.jpg",
            "id": 1033548,
            "title": "Brad Pitt: More Than a Pretty Face",
            "original_language": "fr",
            "original_title": "Brad Pitt, la revanche d'un blond",
            "overview": "Brad Pitt is a singular actor in Hollywood's glamorous world, breaking through his \"playboy image\" and embodying American cinema's renewal. At the beginning there was a humble Midwestern aware of being a smokescreen for the illusions of his time, who has managed to keep control of his image to better serve the most talented directors of our time. To name but a few: David Fincher, Quentin Tarantino, the Coen brothers, Terrence Malick, James Gray and soon Damien Chazelle. This documentary dives into the brain of a complex, brilliant and endearing personality, far from the cliché of a world-famous movie icon to discover the hidden side of the most handsome man in the world.",
            "poster_path": "/lVpi5vYqpEcHn74YqWQhihKz0yk.jpg",
            "media_type": "movie",
            "genre_ids": [
                99,
                10770
            ],
            "popularity": 4.496,
            "release_date": "2022-10-09",
            "video": false,
            "vote_average": 7.2,
            "vote_count": 10
        },
        {
            "adult": false,
            "backdrop_path": null,
            "id": 923893,
            "title": "Brad Pitt & Jennifer Aniston: Hollywood's Couple of the Year",
            "original_language": "en",
            "original_title": "Brad Pitt & Jennifer Aniston: Hollywood's Couple of the Year",
            "overview": "This documentary explores the sequence of events that led A-listers Brad Pitt and Jennifer Aniston to one another, and recounts their relationship in the international spotlight.",
            "poster_path": null,
            "media_type": "movie",
            "genre_ids": [],
            "popularity": 0.621,
            "release_date": "2000-01-01",
            "video": false,
            "vote_average": 6,
            "vote_count": 1
        }
    ],
    "total_pages": 1,
    "total_results": 3
}

Ohhh, so it does comes with the profile_path when the media_type is "person" I was using "Response 200 body" in https://developer.themoviedb.org/reference/search-multi , and it doesn't list the profile_path there, so I thought it didn't exist at all. That makes more sense... Thanks a lot @travisbell

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

전체

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

미디어 페이지

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

TV 시즌 페이지

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

TV 에피소드 페이지

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

모든 이미지 페이지

a 이미지 추가 창 열기

모든 편집 페이지

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

토론 페이지

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

설정

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

로그인