Helix API changes from Kraken - data missing

Hey everyone,

Discovering the new Helix API at the moment, and I couldn’t help but notice some nasty changes from the Kraken API.

PS: the following examples are taken on the channel lirik.

Channels


/kraken/channels/lirik

{
    "mature": false,
    "status": "Next Stream: Wednesday @ NOON EST / 5pm GMT ",
    "broadcaster_language": "en",
    "display_name": "LIRIK",
    "game": "Star Wars Battlefront II",
    "language": "en",
    "_id": 23161357,
    "name": "lirik",
    "created_at": "2011-06-27T18:34:45Z",
    "updated_at": "2017-11-14T23:06:03Z",
    "partner": true,
    "logo",
    "video_banner",
    "profile_banner",
    "profile_banner_background_color",
    "url": "https://www.twitch.tv/lirik",
    "views": 209278320,
    "followers": 1858542,
    "_links": {},
    "delay": null,
    "banner": null,
    "background": null
}

/helix/users?login=lirik

{
    "data": [
        {
            "id": "23161357",
            "login": "lirik",
            "display_name": "LIRIK",
            "type": "",
            "broadcaster_type": "partner",
            "description": "Your source for a good time, hilarity, and gaming!",
            "profile_image_url": "https://static-cdn.jtvnw.net/jtv_user_pictures/lirik-profile_image-476e7a592cdfed74-300x300.png",
            "offline_image_url": "https://static-cdn.jtvnw.net/jtv_user_pictures/lirik-channel_offline_image-af3bc6ef396c76ae-1920x1080.png",
            "view_count": 209278320
        }
    ]
}

/helix/users/follows?to_id=23161357

{
    "data": [
        {
            "from_id": "162731046",
            "to_id": "23161357",
            "followed_at": "2017-11-14T23:11:38Z"
        }
    ],
    "pagination": {}
}

Videos


/kraken/videos/201221306

{
    "title": "May The Micro transactions Be With You",
    "description",
    "description_html",
    "broadcast_id",
    "broadcast_type": "archive",
    "status": "recorded",
    "language": "en",
    "tag_list": "",
    "views": 1110,
    "created_at": "2017-11-14T17:05:23Z",
    "published_at": "2017-11-14T17:05:23Z",
    "url": "https://www.twitch.tv/videos/201221306",
    "_id": "v201221306",
    "recorded_at": "2017-11-14T17:05:23Z",
    "game": "Star Wars Battlefront II",
    "length": 21846,
    "preview",
    "animated_preview_url",
    "thumbnails": [{}],
    "fps": {},
    "resolutions": {},
    "channel": {
        "name": "lirik",
        "display_name": "LIRIK"
    },
    "_links": {}
}

/helix/videos?id=201221306

{
    "data": [
        {
            "id": "201221306",
            "user_id": "23161357",
            "title": "May The Micro transactions Be With You",
            "description": "",
            "created_at": "2017-11-14T17:05:23Z",
            "published_at": "2017-11-14T17:05:23Z",
            "url": "https://www.twitch.tv/videos/201221306",
            "thumbnail_url": "https://static-cdn.jtvnw.net/s3_vods/7714e9285d897ffd7322_lirik_26730077552_739300026/thumb/thumb0-%{width}x%{height}.jpg",
            "viewable": "public",
            "view_count": 1110,
            "language": "en"
        }
    ],
    "pagination": {}
}

Conclusion/Thoughts


Based on the examples outputs below, we can see that the following data are changed:

  • Many channel information disappeared: mature, language, broadcaster_language, created_at, updated_at, and most importantly, followers.
  • The followers count indeed vanished, and we now have a /follows endpoint that requires us to do painful loops over results when dealing with highly followed users.
  • Many important video information disappeared too: game, length, recorded_at, broadcast_type, resolutions, fps, etc.

To conclude, with the new Helix APi, we at the moment got:

  • A more difficult way to get a user’s followers
  • No way to tell which game he played during a stream session / video
  • No way at all to know how long the video was, length disappearing.

I coudldn’t find any information concerning future implementations of these data on the roadmap.
What do you think ?
Is there a way to get those missing data ?
Will it be implemented in the endpoints below in the future ?

Thanks for reading this whole block, difficult to digest; sorry mates !
Have a good day.

2 Likes

And this related thread: Few Questions on new API

I just hit the same roadblock after discovering the new API.
Before I only had to 1 request with kraken/streams, but now I have to 2 more request on top of that, just for 2 lines of data;

  • helix/streams (for initial request)
  • helix/games (to decode the game id)
  • helix/users (to get profile image)

This really puts a pressure on the request limit.

At least Kraken is online for another year…

Some more direct communication on the flow here would be awesome. I noticed yesterday that the documentation on the channels endpoint is missing now, so I hope that means there are changes coming.

Any update from some Twitch devs or other users who might have found out something interesting ?

The problem is, that Helix isn’t usable for a wide range of use cases due to a lot of missing properties in the users endpoint (if this is the replacement for the channels endpoint).

Btw… Why do most endpoints have a property named user_id and user_login but the users endpoint uses id and login? That’s confusing.

@geardrops Are there any plans to bring back all the missing properties?

in API design thats a toss up.

Since you are talking to the users endpoint why duplicate the word “user” across the response since it’s obvious that the ID and Login returned by the users endpoint(s) are for a user.

Other none user end points, explicitly state it’s a user_id as otherwise id would be the stream id (for example in the case of a stream end point)

Ditto for database design, if it’s the users table, why call the column user_id when id fits perfectly. Other tables that reference the users id from the users table would say user_id

1 Like

Makes perfect sense. I just noticed that it’s different. Ty for the roadmap link, i guess i missed that.

I might be blind, but the cards for videos, users, streams and follows are in Live, not In Progress.
It means these endpoints are finished I reckon, right ?

Um, well they exist.

And we fed back in this post (and others) that “hey some useful stuff is missing”

And from what I understand, the developers are not the ones running trello (we all remember the stream up/down webhook card archiving debacle). So what we think a column means doesn’t match what the trello board says I would venture…

1 Like

Makes sense;
I wonder if an answer/update/whatever will be given before the complete deprecation of the V3/V5 API though.

As of right now, I’m not really comfortable with requesting both Kraken and Helix in my applications; that’s a bit clunky but hey, I’ll go with it for now !

The info for games likely won’t change drastically day to day, so why not cache it in a database and refresh your cache every 24 hours? New games get added often, but I can’t foresee breaking changes happening that aren’t announced over official channels.

As for user data, yes, it’s a pain to make a second API call to grab that data, but again, looking at the data, outside of view count, that info likely won’t be changed all too often for most streamers, so again, why not cache it and refresh your cache every 8-12 hours? The last time I ran a test of my live data, it took around 1-2 minutes to check 35,000+ users using Client Id and Oauth in a background process and didn’t hit rate limit once.

I can’t speak to the videos or follows endpoints as my current project doesn’t use them (yet).

Just food for thought… Hope it helps

(Edit:. I also agree that currently Helix feels broken because of missing data that were all used to getting, but we just have to be patient and hope that all the missing data gets added around the API on one endpoint or another)

1 Like

I already do store API JSON responses to compute data on my server, not relying on Twitch API.
But the real issue is with the absence of length for videos, making it impossible to compute data as easy as airtime.

Add to this the amount of requests needed to get what we could get in fewer requests in Kraken, it gives a feeling of unfinished business, yeah.

Hey everyone! Thanks @BarryCarlyon for that great response above.

I can tell you all that we are going to be adding user follows count. Oh, and also Video duration. Coming Soon™️ :slight_smile:

5 Likes

Thanks, great news !
Can’t wait to try that out :slightly_smiling_face:

What about getting game and user information when fetching streams?

+1 for this. I can’t think of a lot of scenarios where I’d want stream data but not the user names of the streams (you’d need them to create a nice link to the stream for example). Having that info (i.e. user name, at minimum) available in /streams is super useful and it feels like a regression that Helix doesn’t provide it.

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