When you make an API Request requesting Videos (plural),
in the response you will receive something like this:
videos
results
0
iso_639_1 "en"
iso_3166_1 "US"
name "Fight Club - Theatrical Trailer Remastered in HD"
key "6JnN1DmbqoU"
site "YouTube"
size 1080
type "Trailer"
official false
published_at "2015-02-26T03:19:25.000Z"
id "5e382d1b4ca676001453826d"
This is it https://api.themoviedb.org/3/movie/61222/videos?api_key=${API_KEY} the ID "61222" is from the API, and it belongs to a movie known as "Bojack Horseman" but when I fetch the API above it returns a video trailer name known as "Home Trailer"
@Corizon said:
This is it https://api.themoviedb.org/3/movie/61222/videos?api_key=${API_KEY}
the ID "61222" is from the API, and it belongs to a movie known as "Bojack Horseman"
but when I fetch the API above it returns a video trailer name known as "Home Trailer"
This is the response in JSON >>>
0:
id: "533ec6b7c3a36854480063c0"
iso_639_1: "en"
iso_3166_1: "US"
key: "dRYzINrg6B4"
name: "Home Trailer"
official: false
published_at: "2009-07-22T15:06:36.000Z"
site: "YouTube"
size: 360
type: "Trailer"
Oh okay, I see. Now I have to find a way to differentiate the series from the movies. Maybe, I can use some help to know if there's a way to filter the full movies from the series
One way would be to query the movie and tv details pages to see if the id exists and see which one the title matches if they both exist.
Another possibility would be to download the daily file exports to get the list of ids for all titles.
I guess I am wondering where you are getting the id numbers you want to use and why isn't there something from the source of the ids that tells what it is?
Atbilde no superboy97
on jūlijs 23, 2022 at 1:51 AM
"video:false" or "video:true" have nothing to do with the videos attached to the movie.
To get the videos, you should use the Get Videos method of the API.
Atbilde no ticao2 🇧🇷 pt-BR
on jūlijs 23, 2022 at 1:55 AM
The meaning of the Video attribute, in the singular, can be seen here:
https://www.themoviedb.org/bible/movie#59f73b759251416e71000005
Roughly identifies what is not Movie.
The Videos parameter, in the plural, refers to trailers and other videos of the same type.
See here: https://www.themoviedb.org/bible/movie/59f3b16d9251414f2000000a
To get the Videos of a Movie, See here:
https://developers.themoviedb.org/3/movies/get-movie-videos
Example:
Atbilde no ticao2 🇧🇷 pt-BR
on jūlijs 23, 2022 at 1:57 AM
Trailer URL
When you make an API Request requesting Videos (plural), in the response you will receive something like this:
Just add the Key in the respective URL:
For example:
Youtube: https://www.youtube.com/watch?v=6JnN1DmbqoU
Youtube: https://www.youtube.com/watch?v=hzfvYSIIgyc
Vimeo: https://vimeo.com/282875052
Travis Bell said on 2020-09-19
Atbilde no simonferndriger
on jūlijs 24, 2022 at 2:39 AM
Thanks, that helped!
Atbilde no Corizon
on jūlijs 22, 2023 at 3:21 AM
Please, the videos are not corresponding to the movie ID's
Atbilde no superboy97
on jūlijs 22, 2023 at 4:00 AM
Without the exact query (just remove your API key) you have sent and the answer you have got, we can't help you.
Atbilde no Corizon
on jūlijs 22, 2023 at 6:44 AM
This is it
https://api.themoviedb.org/3/movie/61222/videos?api_key=${API_KEY}
the ID "61222" is from the API, and it belongs to a movie known as "Bojack Horseman" but when I fetch the API above it returns a video trailer name known as "Home Trailer"This is the response in JSON:
Atbilde no ticao2 🇧🇷 pt-BR
on jūlijs 22, 2023 at 7:42 AM
Bojack Horseman is not a movie. It's a TV Series.
BoJack Horseman (2014)
https://www.themoviedb.org/tv/61222-bojack-horseman
Home (2008)
https://www.themoviedb.org/movie/61222-home
Atbilde no Corizon
on jūlijs 22, 2023 at 3:18 PM
Oh okay, I see. Now I have to find a way to differentiate the series from the movies. Maybe, I can use some help to know if there's a way to filter the full movies from the series
Atbilde no robbie3999
on jūlijs 22, 2023 at 8:24 PM
One way would be to query the movie and tv details pages to see if the id exists and see which one the title matches if they both exist.
Another possibility would be to download the daily file exports to get the list of ids for all titles.
I guess I am wondering where you are getting the id numbers you want to use and why isn't there something from the source of the ids that tells what it is?
Atbilde no Corizon
on jūlijs 24, 2023 at 7:53 AM
Thanks a lot @robbie3999 I finally figured it out