Wsparcie The Movie Database

I'm fetching the latest popular movies using the https://api.themoviedb.org/3/movie/popular?language=en-US&page=1 API endpoint.
However, the results object in the response doesn't include the IMDB ID.
I understand that I can retrieve the imdb id by making the call to the /find endpoint,
but in my use case it would be an overhead to make an additional call.
Is there any way to efficiently get the IMDB ID for each movie in the results object? TIA.

cc @TravisBell

3 odpowiedzi (strona 1 z 1)

Jump to last post

@tim_cook said:
How to get IMDB ID when querying the /popular endpoint?
I'm fetching the latest popular movies using the https://api.themoviedb.org/3/movie/popular?language=en-US&page=1 API endpoint.
However, the results object in the response doesn't include the IMDB ID.

Correct. The answer does not provide an External ID, the IMDB ID.

I understand that I can retrieve the imdb id by making the call to the /find endpoint,

No. It's exactly the opposite.
Use Find with an External ID to find a movie, series, etc... here on TMDb.
For example, with IMDB ID tt0054331

https://api.themoviedb.org/3/find/tt0054331?external_source=imdb_id&language=pt-BR    
or
https://api.themoviedb.org/3/find/tt0054331?api_key=THE_KEY&external_source=imdb_id&language=pt-BR    

but in my use case it would be an overhead to make an additional call.

To obtain the IMDB ID of an item, simply make an API Request for the item's details.
For example the movie Spartacus, TMDb ID 967

https://api.themoviedb.org/3/movie/967?language=pt-BR
or
https://api.themoviedb.org/3/movie/967?api_key=THE_KEY&language=pt-BR

The response will contain the following data: imdb_id "tt0054331"

Is there any way to efficiently get the IMDB ID for each movie in the results object? TIA.

The only way I know is the one I provided above.
There is no way to get all IMDB IDs from a Popular API Request.

Ok, got it. Thanks for the clarification.

I'm facing issues when hitting the find endpoint. I'm getting:

{
  "success": false,
  "status_code": 34,
  "status_message": "The resource you requested could not be found."
}

I tried using different IDs but still got the same response. ENDPOINT: https://api.themoviedb.org/3/find/<IMDB_ID>?api_key=API_KEY&append_to=externals_ids

I'm curious if the append_to query param is now replaced with external_source?

@tim_cook said:
I tried using different IDs but still got the same response.
ENDPOINT: https://api.themoviedb.org/3/find/<IMDB_ID>?api_key=API_KEY&append_to=externals_ids

Find does not accept Append To Response.
But you need to inform which system the ID is from using &external_source=imdb
Compare your Request with my example:

https://api.themoviedb.org/3/find/<IMDB_ID>?api_key=API_KEY&append_to=externals_ids  
https://api.themoviedb.org/3/find/<IMDB_ID>?api_key=API_KEY&external_source=imdb_id  

I suggest you read the documentation carefully.
https://developer.themoviedb.org/reference/find-by-id

I'm curious if the append_to query param is now replaced with external_source?

It was not replaced.
Using Find you need &external_source= informing which system the ID is from. In this case imdb.
Only using Detail (Movie, TV or Person) you can use &append_to_response=
See here https://developer.themoviedb.org/docs/append-to-response

Nie mo偶esz znale藕膰 filmu lub serialu? Zaloguj si臋, aby go utworzy膰.

Globalny

s zaznacz pasek wyszukiwania
p otw贸rz menu profilu
esc Zamknij otwarte okno
? otw贸rz okno skr贸t贸w klawiszowych

On media pages

b go back (or to parent when applicable)
e przejd藕 do strony edycji

On TV season pages

(prawa strza艂ka) przejd藕 do nast臋pnego sezonu
(lewa strza艂ka) przejd藕 do poprzedniego sezonu

On TV episode pages

(prawa strza艂ka) przejd藕 do nast臋pnego odcinka
(lewa strza艂ka) przejd藕 do poprzedniego odcinka

On all image pages

a otw贸rz okno dodawania obrazu

On all edit pages

t open translation selector
ctrl+ s prze艣lij formularz

On discussion pages

n otw贸rz now膮 dyskusj臋
w toggle watching status
p toggle public/private
c toggle close/open
a open activity
r odpowiedz na dyskusj臋
l przejd藕 do ostatniej odpowiedzi
ctrl+ enter wy艣lij swoj膮 wiadomo艣膰
(prawa strza艂ka) nast臋pna strona
(lewa strza艂ka) poprzednia strona

Ustawienia

Want to rate or add this item to a list?

Zaloguj