Hi, I am using the Find By ID (https://developer.themoviedb.org/reference/find-by-id) method to get some details about movies or TV shows but it keeps returning empty results. Here is an example JavaScript call, written inside of the playground component of the documentation page. The movie is 'Elemental':
const options = {
method: 'GET',
headers: {
accept: 'application/json',
Authorization: <my auth key>
}
};
fetch('https://api.themoviedb.org/3/find/976573?external_source=imdb_id', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
The result I am getting:
{
"movie_results": [],
"person_results": [],
"tv_results": [],
"tv_episode_results": [],
"tv_season_results": []
}
Bir filmi veya diziyi bulamıyor musun? Eklemek için oturum aç.
Bu öğeyi derecelendirmek veya bir listeye eklemek ister misiniz?
Üye değil misin?
Travis Bell adlı kullanıcıyı yanıtla
3 O 2023 tarihinde saat 4:21 ÖS'da
For IMDb ID searches, you need to prefix them with tt.
Also, is it the latest Pixar movie Elemental you're talking about? If so, the IMDB ID is
15789038
, not976573
.andreproco adlı kullanıcıyı yanıtla
3 O 2023 tarihinde saat 5:49 ÖS'da
Okay with your url I managed to retrieve Elemental data. But I am confused now by the id. I am getting this object back:
As you can see, the id property holds a different value form the one in your URL.
Travis Bell adlı kullanıcıyı yanıtla
3 O 2023 tarihinde saat 7:13 ÖS'da
That’s the TMDB ID, which is completely separate from IMDB.
If you already have the TMDB ID, make a call directly to the asset:
javpot adlı kullanıcıyı yanıtla
24 O 2023 tarihinde saat 4:43 ÖS'da
what if I want don't want a movie specifically ? I want to return either a movie or a tv show? does it still work with the prefix /movie/ before the url?
robbie3999 adlı kullanıcıyı yanıtla
24 O 2023 tarihinde saat 5:53 ÖS'da
Hi @javpot, here is the API reference. As you can see on the left, there are separate calls for movie and tv. So a request for a tv series would be:
TMDB id numbers are not unique between movies and tv, the same number can be used for a movie and a tv series.
javpot adlı kullanıcıyı yanıtla
27 O 2023 tarihinde saat 2:41 ÖS'da
thanks for your answer is there a way to have access to the trailer of the movie or tv show? I don't see the url of the trailer inside the json
robbie3999 adlı kullanıcıyı yanıtla
27 O 2023 tarihinde saat 4:58 ÖS'da
Trailers for movies and tv can be accessed using the "videos" endpoint.
https://developer.themoviedb.org/reference/movie-videos
https://developer.themoviedb.org/reference/tv-series-videos
The youtube key returned can be accessed as https://www.youtube.com/watch?v={key}
javpot adlı kullanıcıyı yanıtla
29 O 2023 tarihinde saat 9:01 ÖÖ'da
alright thank you