Lots of null vod in Clips API

This makes my third “vod” issue in the clips api I’ve reported - a hat trick for me!

I just ran some queries and got a new result - null in the “vod” part of the clip JSON. This hasn’t happened before - at least in the last couple of months. I know, because it broke my code!

It’s happening very often - one of my queries asks for the top 100 Minecraft clips in the last 24 hours. 17 of them returned had null for the vod. It was working just 12 hours ago!

For example:

    {
        "id": "ToughAffluentSandpiperFreakinStinkin",
        "tracking_id": "62660458",
        "url": "https://clips.twitch.tv/ToughAffluentSandpiperFreakinStinkin?tt_medium=clips_api&tt_content=url",
        "embed_url": "https://clips.twitch.tv/embed?clip=ToughAffluentSandpiperFreakinStinkin&tt_medium=clips_api&tt_content=embed",
        "embed_html": "<iframe src='https://clips.twitch.tv/embed?clip=ToughAffluentSandpiperFreakinStinkin&tt_medium=clips_api&tt_content=embed' width='640' height='360' frameborder='0' scrolling='no' allowfullscreen='true'></iframe>",
        "broadcaster": {
            "id": "76516878",
            "name": "mcinvi1337",
            "display_name": "mcinvi1337",
            "channel_url": "https://www.twitch.tv/mcinvi1337",
            "logo": "https://static-cdn.jtvnw.net/jtv_user_pictures/mcinvi1337-profile_image-3d385e2c7692b2d2-300x300.jpeg"
        },
        "curator": {
            "id": "63690258",
            "name": "anakin151",
            "display_name": "anakin151",
            "channel_url": "https://www.twitch.tv/anakin151",
            "logo": null
        },
        "vod": null,
        "game": "Minecraft",
        "language": "pl",
        "title": "CHALLANGE : NIE WYJEB SIE ANI RAZU XDDDDDDDDDDDDDDDDD",
        "views": 82,
        "duration": 29.999333,
        "created_at": "2017-03-29T18:55:36Z",
        "thumbnails": {
            "medium": "https://clips-media-assets.twitch.tv/-853284304-offset-3188-preview-480x272.jpg",
            "small": "https://clips-media-assets.twitch.tv/-853284304-offset-3188-preview-260x147.jpg",
            "tiny": "https://clips-media-assets.twitch.tv/-853284304-offset-3188-preview-86x45.jpg"
        }
    }

Not all channels automatically archive their broadcasts, mcinvi1337 from your example being one such channel. There is no VOD for the clip.

Well, so I guess I’m complaining that the return format changed. Here’s one clip from this morning compared to the same one this evening. Notice that “vod” is null now, whereas before it was a JSON object. It was nice to at least see the timestamp, though your explanation may apply to both cases. However I’ve also had results like the first example in this post in which the streamer probably was archiving streams, because other clips from the same streamer had a vod id and vod url.

    {
        "id": "RockyCautiousReubenRedCoat",
        "tracking_id": "62597802",
        "url": "https://clips.twitch.tv/RockyCautiousReubenRedCoat?tt_medium=clips_api&tt_content=url",
        "embed_url": "https://clips.twitch.tv/embed?clip=RockyCautiousReubenRedCoat&tt_medium=clips_api&tt_content=embed",
        "embed_html": "<iframe src='https://clips.twitch.tv/embed?clip=RockyCautiousReubenRedCoat&tt_medium=clips_api&tt_content=embed' width='640' height='360' frameborder='0' scrolling='no' allowfullscreen='true'></iframe>",
        "broadcaster": {
            "id": "146635835",
            "name": "easyy_ja",
            "display_name": "easYY_ja",
            "channel_url": "https://www.twitch.tv/easyy_ja",
            "logo": "https://static-cdn.jtvnw.net/jtv_user_pictures/easyy_ja-profile_image-b487eb251349f11e-300x300.jpeg"
        },
        "curator": {
            "id": "139329246",
            "name": "997_policja",
            "display_name": "997_policja",
            "channel_url": "https://www.twitch.tv/997_policja",
            "logo": null
        },
        "vod": {
            "id": "",
            "url": "https://www.twitch.tv/videos/?t=3h21m29s"
        },
        "game": "Minecraft",
        "language": "pl",
        "title": "eee",
        "views": 15,
        "duration": 31.999667,
        "created_at": "2017-03-29T14:36:09Z",
        "thumbnails": {
            "medium": "https://clips-media-assets.twitch.tv/24914308000-offset-12088-preview-480x272.jpg",
            "small": "https://clips-media-assets.twitch.tv/24914308000-offset-12088-preview-260x147.jpg",
            "tiny": "https://clips-media-assets.twitch.tv/24914308000-offset-12088-preview-86x45.jpg"
        }
    }

and the same this evening:

    {
        "id": "RockyCautiousReubenRedCoat",
        "tracking_id": "62597802",
        "url": "https://clips.twitch.tv/RockyCautiousReubenRedCoat?tt_medium=clips_api&tt_content=url",
        "embed_url": "https://clips.twitch.tv/embed?clip=RockyCautiousReubenRedCoat&tt_medium=clips_api&tt_content=embed",
        "embed_html": "<iframe src='https://clips.twitch.tv/embed?clip=RockyCautiousReubenRedCoat&tt_medium=clips_api&tt_content=embed' width='640' height='360' frameborder='0' scrolling='no' allowfullscreen='true'></iframe>",
        "broadcaster": {
            "id": "146635835",
            "name": "easyy_ja",
            "display_name": "easYY_ja",
            "channel_url": "https://www.twitch.tv/easyy_ja",
            "logo": "https://static-cdn.jtvnw.net/jtv_user_pictures/easyy_ja-profile_image-b487eb251349f11e-300x300.jpeg"
        },
        "curator": {
            "id": "139329246",
            "name": "997_policja",
            "display_name": "997_policja",
            "channel_url": "https://www.twitch.tv/997_policja",
            "logo": null
        },
        "vod": null,
        "game": "Minecraft",
        "language": "pl",
        "title": "eee",
        "views": 36,
        "duration": 31.999667,
        "created_at": "2017-03-29T14:36:09Z",
        "thumbnails": {
            "medium": "https://clips-media-assets.twitch.tv/24914308000-offset-12088-preview-480x272.jpg",
            "small": "https://clips-media-assets.twitch.tv/24914308000-offset-12088-preview-260x147.jpg",
            "tiny": "https://clips-media-assets.twitch.tv/24914308000-offset-12088-preview-86x45.jpg"
        }
    }

The clips team shipped a fix for the erroneous URLs, which means returning null instead of an object when the VOD info isn’t available. I’ll check to confirm!

Checking if the VOD is null makes more sense than checking for an empty ID, FWIW.

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