# Helix API / Get Videos returns 404 if 1 id doesn't exist

**URL:** <https://discuss.dev.twitch.com/t/helix-api-get-videos-returns-404-if-1-id-doesnt-exist/21646>\
**Category:** API\
**Created:** [June 27, 2019, 5:58pm UTC](https://discuss.dev.twitch.com/t/helix-api-get-videos-returns-404-if-1-id-doesnt-exist/21646 "2019-06-27T17:58:35Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Proddy3](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/proddy3/32/982_2.png) [@Proddy3](https://discuss.dev.twitch.com/u/Proddy3)\
**Post date:** [June 27, 2019, 5:58pm UTC](https://discuss.dev.twitch.com/t/helix-api-get-videos-returns-404-if-1-id-doesnt-exist/21646/1 "2019-06-27T17:58:35Z")

</div>

The New Twitch API has a “Get Videos” endpoint ([https://dev.twitch.tv/docs/api/reference/#get-videos](https://dev.twitch.tv/docs/api/reference/#get-videos)) that you can specify up to 100 ids for to return information on those videos. However, if even 1 of those ids no longer exists, or isn’t a valid vod, the entire response is:  
{“error”:“Not Found”,“status”:404,“message”:“vods not found”}

A better output would be to return just the valid videos, like the Get Users endpoint does.

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [June 27, 2019, 6:08pm UTC](https://discuss.dev.twitch.com/t/helix-api-get-videos-returns-404-if-1-id-doesnt-exist/21646/2 "2019-06-27T18:08:50Z")

</div>

Flagging to Twitch

---

<div class="post-metadata">

**Author:** ![Proddy3](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/proddy3/32/982_2.png) [@Proddy3](https://discuss.dev.twitch.com/u/Proddy3)\
**Post date:** [June 27, 2019, 6:12pm UTC](https://discuss.dev.twitch.com/t/helix-api-get-videos-returns-404-if-1-id-doesnt-exist/21646/3 "2019-06-27T18:12:38Z")

</div>

Cheers, is this not the intended output?

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [June 27, 2019, 6:15pm UTC](https://discuss.dev.twitch.com/t/helix-api-get-videos-returns-404-if-1-id-doesnt-exist/21646/4 "2019-06-27T18:15:20Z")

</div>

You are right in that it should behave like Get Users does

---

<div class="post-metadata">

**Author:** ![Six](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/six/32/2334_2.png) [@Six](https://discuss.dev.twitch.com/u/Six)\
**Post date:** [June 27, 2019, 6:21pm UTC](https://discuss.dev.twitch.com/t/helix-api-get-videos-returns-404-if-1-id-doesnt-exist/21646/5 "2019-06-27T18:21:33Z")

</div>

If that’s not the intended behavior then boy do I have a nice bug dump for you lol.

But in reality, it’s enough of a split that from a user’s perspective either way could be viewed as “correct”. I can gather all the endpoint behavior data I’ve collected when I get home and post them if everything _should_ act like the `/users` endpoint.

---

<div class="post-metadata">

**Author:** ![Proddy3](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/proddy3/32/982_2.png) [@Proddy3](https://discuss.dev.twitch.com/u/Proddy3)\
**Post date:** [June 27, 2019, 7:11pm UTC](https://discuss.dev.twitch.com/t/helix-api-get-videos-returns-404-if-1-id-doesnt-exist/21646/6 "2019-06-27T19:11:59Z")

</div>

It’s the logical response when specifying multiple IDs, because the alternative is to call the API 100 times which they’re trying to avoid as far as I can tell.

---

<div class="post-metadata">

**Author:** ![Six](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/six/32/2334_2.png) [@Six](https://discuss.dev.twitch.com/u/Six)\
**Post date:** [June 27, 2019, 7:32pm UTC](https://discuss.dev.twitch.com/t/helix-api-get-videos-returns-404-if-1-id-doesnt-exist/21646/7 "2019-06-27T19:32:53Z")

</div>

I see valuable things from both perspectives. From Twitch’s point of view, anything to help prevent people from hitting the API hard is a win for them. On the other hand, returning `200 - OK` when there still could have been an error somewhere in the mix is a bit counter-intuitive, and an annoyance to the developer. A compromise that I could see would be to return an `4XX` error, and then in the content put all of the malformed/erroneous data you provided. That way you can just filter out everything that was wrong, update your caches, you only need to make one more request as opposed to individual requests, _and_ you were directly notified that there was in fact an error.

But in the end, it’s up to Twitch to decide what they want. I’d just like some form of uniformity across the API, which there is surprisingly little of.

---

<div class="post-metadata">

**Author:** ![Proddy3](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/proddy3/32/982_2.png) [@Proddy3](https://discuss.dev.twitch.com/u/Proddy3)\
**Post date:** [July 3, 2019, 5:00pm UTC](https://discuss.dev.twitch.com/t/helix-api-get-videos-returns-404-if-1-id-doesnt-exist/21646/8 "2019-07-03T17:00:17Z")

</div>

Is there any ETA on when the response will be “fixed”/changed?

---

<div class="post-metadata">

**Author:** ![system](https://d2opxh93rbxzdn.cloudfront.net/original/2X/0/05909729875cce3b53e59d5561c4d23bb14948fc.png) [@system](https://discuss.dev.twitch.com/u/system)\
**Post date:** [August 2, 2019, 5:00pm UTC](https://discuss.dev.twitch.com/t/helix-api-get-videos-returns-404-if-1-id-doesnt-exist/21646/9 "2019-08-02T17:00:20Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
