I'm looking at this collection using the API, by calling this endpoint:
https://api.themoviedb.org/3/collection/14890
and the results I'm getting don't match what I see on the website. What's on the website is correct:
However, what I see from the API is not the same; here's a subset of the result:
[
{
"title": "Bad Boys for Life",
"id": 38700
},
{
"title": "Bad Boys",
"id": 9737
},
{
"title": "Bad Boys II",
"id": 8961
},
{
"title": "Bad Boys: Ride or Die",
"id": 573435
}
]
This is placing the third film — Bad Boys for Life
as the first.
Since the website is correct, I guess this is just an API issue?
Thanks,
Clue Liss
Un film, une émission télévisée ou un artiste est introuvable ? Connectez-vous afin de créer une nouvelle fiche.
Vous souhaitez évaluer ou ajouter cet élément à une liste ?
Pas encore membre ?
Réponse de Travis Bell
le 4 juin 2025 à 11h01
Hey Casey,
I don't believe the results in the collection end point are explicitly ordered. My suggestion would be to sort by the
release_date
field locally, on your client.TMDB does not store any order information about collection parts at this time (I have an open ticket for that), and we just sort by the release date as well.
Réponse de caseyliss
le 4 juin 2025 à 12h32
😳 🤦🏻♂️
Whoopsie doopsie! That's my bad then; thanks for clarifying!
For what it's worth, may be worth adding a small clause to the API endpoint to make this explicit?
Thanks again, [No Longer] Clue Liss