# Clips API does not expose video URL

**URL:** <https://staging-discuss.dev.twitch.com/t/clips-api-does-not-expose-video-url/15763>\
**Category:** API\
**Created:** [May 13, 2018, 7:36am UTC](https://staging-discuss.dev.twitch.com/t/clips-api-does-not-expose-video-url/15763 "2018-05-13T07:36:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![thefiz](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/thefiz/32/4549_2.png) [@thefiz](https://staging-discuss.dev.twitch.com/u/thefiz)\
**Post date:** [May 13, 2018, 7:36am UTC](https://staging-discuss.dev.twitch.com/t/clips-api-does-not-expose-video-url/15763/1 "2018-05-13T07:36:17Z")

</div>

I wrote a simple little Node.js downloader for people to put clip URLs in, and get the related clip video MP4 files out. 90% of the time, I can call the API, get the tracking\_id and download using [clips-media-assets.twitch.tv/[tracking-id].mp4](http://clips-media-assets.twitch.tv/%5Btracking-id%5D.mp4)

Occasionally, a clip is not at that address, but instead at [broadcast-id]-offset-######.mp4

There is no indication that a clip is at the alternate style URL, nor is the offset # exposed via the API in any way (occasionally the offset is also visible in the thumbnail URL, but not always).

If the Clip video file URL could be added to the API that would be ideal. Barring that, the fact that it’s using the broadcast\_id with the offset would also work.

---

<div class="post-metadata">

**Author:** ![CommanderRoot](https://avatars.discourse-cdn.com/v4/letter/c/839c29/32.png) [@CommanderRoot](https://staging-discuss.dev.twitch.com/u/CommanderRoot)\
**Post date:** [May 13, 2018, 11:31am UTC](https://staging-discuss.dev.twitch.com/t/clips-api-does-not-expose-video-url/15763/2 "2018-05-13T11:31:58Z")

</div>

You can use a thumbnail image url to “generate” the video url.

For example:

> “thumbnails”: {  
> “medium”: “[https://clips-media-assets.twitch.tv/vod-107049351-offset-26-preview-480x272.jpg](https://clips-media-assets.twitch.tv/vod-107049351-offset-26-preview-480x272.jpg)”,  
> “small”: “[https://clips-media-assets.twitch.tv/vod-107049351-offset-26-preview-260x147.jpg](https://clips-media-assets.twitch.tv/vod-107049351-offset-26-preview-260x147.jpg)”,  
> “tiny”: “[https://clips-media-assets.twitch.tv/vod-107049351-offset-26-preview-86x45.jpg](https://clips-media-assets.twitch.tv/vod-107049351-offset-26-preview-86x45.jpg)”  
> }

Just replace the “-preview-480x272.jpg” with “.mp4” and you got the video url.

---

<div class="post-metadata">

**Author:** ![thefiz](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/thefiz/32/4549_2.png) [@thefiz](https://staging-discuss.dev.twitch.com/u/thefiz)\
**Post date:** [May 13, 2018, 7:31pm UTC](https://staging-discuss.dev.twitch.com/t/clips-api-does-not-expose-video-url/15763/3 "2018-05-13T19:31:47Z")

</div>

I apologize, I meant to put the following in my initial report. I was able to solve a majority by looking for the offset in the Thumbnail. However, some clips do not expose the offset in the thumbnail URL. I didn’t know this was an issue until I got a bug report from a user with this [Example Clip](https://clips.twitch.tv/RudeBraveStaplePartyTime)

---

<div class="post-metadata">

**Author:** ![CommanderRoot](https://avatars.discourse-cdn.com/v4/letter/c/839c29/32.png) [@CommanderRoot](https://staging-discuss.dev.twitch.com/u/CommanderRoot)\
**Post date:** [May 14, 2018, 3:59pm UTC](https://staging-discuss.dev.twitch.com/t/clips-api-does-not-expose-video-url/15763/4 "2018-05-14T15:59:29Z")

</div>

Seems like Twitch just recently changed the format of the Clip video url again.

Looking at this API:

```auto
https://clips.twitch.tv/api/v2/clips/LazySuaveParrotBatChest/status

```

It now seems to be

```auto
https://clips-media-assets2.twitch.tv/AT-cm%7C{clip ID}.mp4

```

`%7C` is an url encoded “\_”, not sure why they did it this way but that’s how it currently is.

Because Twitch now uses multiple ways for their video URLs it’s probably best to use the above mentioned API to get the right one for the Clip you want to download.

---

<div class="post-metadata">

**Author:** ![thefiz](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/thefiz/32/4549_2.png) [@thefiz](https://staging-discuss.dev.twitch.com/u/thefiz)\
**Post date:** [May 14, 2018, 7:13pm UTC](https://staging-discuss.dev.twitch.com/t/clips-api-does-not-expose-video-url/15763/5 "2018-05-14T19:13:55Z")

</div>

Thanks, that’ll work. While not ideal, as that API is deprecated and will be removed in December. But it’ll work in the meantime

---

<div class="post-metadata">

**Author:** ![system](https://d2spem0quai2ol.cloudfront.net/original/2X/0/05909729875cce3b53e59d5561c4d23bb14948fc.png) [@system](https://staging-discuss.dev.twitch.com/u/system)\
**Post date:** [June 13, 2018, 7:13pm UTC](https://staging-discuss.dev.twitch.com/t/clips-api-does-not-expose-video-url/15763/6 "2018-06-13T19:13:56Z")

</div>

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