Soporte de 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 respuestas (en la página 1 de 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

¿No encuentras una película o serie? Inicia sesión para crearla:

Global

s centrar la barra de búsqueda
p abrir menú de perfil
esc cierra una ventana abierta
? abrir la ventana de atajos del teclado

En las páginas multimedia

b retrocede (o a padre cuando sea aplicable)
e ir a la página de edición

En las páginas de temporada de televisión

(flecha derecha) ir a la temporada siguiente
(flecha izquierda) ir a la temporada anterior

En las páginas de episodio de televisión

(flecha derecha) ir al episodio siguiente
(flecha izquierda) ir al episodio anterior

En todas las páginas de imágenes

a abrir la ventana de añadir imagen

En todas las páginas de edición

t abrir la sección de traducción
ctrl+ s enviar formulario

En las páginas de debate

n crear nuevo debate
w cambiar el estado de visualización
p cambiar público/privado
c cambiar cerrar/abrir
a abrir actividad
r responder al debate
l ir a la última respuesta
ctrl+ enter enviar tu mensaje
(flecha derecha) página siguiente
(flecha izquierda) página anterior

Configuraciones

¿Quieres puntuar o añadir este elemento a una lista?

Iniciar sesión