I am currently calling the genre endpoint to get a list of movies within a specific genre. In each movie object is an ID number e.g. https://gyazo.com/4619e36eeba29cfa7f1ea85d8d6b3671. I then want to pass this ID to another API that uses the movie database, to check if said movie is on streaming services. However, the other API is asking for the tmdb_id e.g. https://gyazo.com/ecc12d65c6ffa4e6e4ac69d7b696d81e and when I pass the ID I get in the movie object from the genre endpoint, I get a completely different movie, leading me to believe maybe the ID I am getting is related to the genre end point and not the actual movie ID.
Hope this makes sense, can anyone help me understand how I get the movies actual tmdb_id when getting it via the genre end point?
Can't find a movie or TV show? Login to create it.
გსურთ შეაფასოთ ან დაამატოთ ეს ელემენტი სიაში?
არა წევრი?
Reply by ticao2 🇧🇷 pt-BR
on დეკემბერი 1, 2021 at 1:16 PM
It seems to me that you are mixing Movies with TV Show and also mixing Movie genres with TV Show genres.
You didn't post the API Requests you made here.
So I can only guess what happened.
In the first image you posted, the data is from a TV Show.
https://www.themoviedb.org/tv/114695-marvel-studios-legends
Therefore you must make your second API Request for a TV Show.
https://api.themoviedb.org/3/tv/114695?api_key=THE_KEY&language=en-US
If you use the same ID making a movie request you will get the wrong data from a movie that has the same ID.
https://api.themoviedb.org/3/movie/114695?api_key=THE_KEY&language=en-US
https://www.themoviedb.org/movie/114695-mystery-woman-snapshot
The list of IDs are separate, different.
For example, ID 500:
https://www.themoviedb.org/movie/500-reservoir-dogs
https://www.themoviedb.org/tv/500-mad-about-you
https://www.themoviedb.org/person/500-tom-cruise
https://www.themoviedb.org/network/500
https://www.themoviedb.org/company/500
You can discern the difference between each media type
by looking at the
media_type
field returned with each object.Reply by mattglwilliams
on დეკემბერი 1, 2021 at 1:30 PM
How stupid of me, you're right, I was passing a TV ID and searching for a movie.
Thanks for your help!