Twitch Videos API. Past broadcasts, highlights and uploads, page by page.
Past broadcasts, highlights and uploads of a channel. We handle the proxies, blocks and platform changes.
Twitch Videos API at a glance
Returns a public Twitch channel's past broadcasts, highlights and uploads, newest or most viewed first, from its login, link or numeric ID. Each video has its link, signed playlist, title, description, publish time, length, exact views, language, thumbnail and storyboard, its category, whether it is still recording or kept from logged-out viewers, Twitch's content labels, and the channel that made it.
GET /v1/twitch/videos
- 1 credit per page, $0.75–$1.97 per 1,000 pages
- 22 typed fields null when unknown
- 100 past broadcasts, highlights and uploads per page, newest first
handleis all it needs, e.g.ninja
Send one request. Get up to 100 past broadcasts, highlights and uploads back.
Copy the request in your language, or hand it to your agent. Sign up for an API key and your first 100 credits are free.
$ npm install socialtaphandle = ninjaconst params = new URLSearchParams({
handle: "ninja",
});
const res = await fetch(`https://socialtap.dev/v1/twitch/videos?${params}`, {
headers: { "x-api-key": process.env.SOCIALTAP_API_KEY ?? "" },
});
const body = await res.json();
if (!res.ok) throw new Error(`${body.error.code}: ${body.error.message}`);
const { data, page, meta } = body;
console.log(data, meta.credits_charged);import os
import requests
res = requests.get(
"https://socialtap.dev/v1/twitch/videos",
params={"handle": "ninja"},
headers={"x-api-key": os.environ["SOCIALTAP_API_KEY"]},
)
body = res.json()
if not res.ok:
raise RuntimeError(f"{body['error']['code']}: {body['error']['message']}")
data, page, meta = body["data"], body["page"], body["meta"]
print(data, meta["credits_charged"])require "json"
require "net/http"
uri = URI("https://socialtap.dev/v1/twitch/videos")
uri.query = URI.encode_www_form('handle' => 'ninja')
req = Net::HTTP::Get.new(uri)
req["x-api-key"] = ENV.fetch("SOCIALTAP_API_KEY")
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
body = JSON.parse(res.body)
raise "#{body["error"]["code"]}: #{body["error"]["message"]}" unless res.is_a?(Net::HTTPSuccess)
pp body["data"]
puts body["meta"]["credits_charged"]<?php
$query = http_build_query([
'handle' => 'ninja',
]);
$ch = curl_init('https://socialtap.dev/v1/twitch/videos?' . $query);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['x-api-key: ' . getenv('SOCIALTAP_API_KEY')],
]);
$body = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) {
throw new RuntimeException($body['error']['code'] . ': ' . $body['error']['message']);
}
print_r($body['data']);
echo $body['meta']['credits_charged'], PHP_EOL;package main
import (
"encoding/json"
"fmt"
"log"
"net/http"
"net/url"
"os"
)
func main() {
q := url.Values{}
q.Set("handle", "ninja")
req, err := http.NewRequest("GET", "https://socialtap.dev/v1/twitch/videos?"+q.Encode(), nil)
if err != nil {
log.Fatal(err)
}
req.Header.Set("x-api-key", os.Getenv("SOCIALTAP_API_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
log.Fatal(err)
}
defer res.Body.Close()
var body struct {
Data json.RawMessage `json:"data"`
Page json.RawMessage `json:"page"`
Meta map[string]any `json:"meta"`
Error *struct {
Code string `json:"code"`
Message string `json:"message"`
} `json:"error"`
}
if err := json.NewDecoder(res.Body).Decode(&body); err != nil {
log.Fatal(err)
}
if body.Error != nil {
log.Fatalf("%s: %s", body.Error.Code, body.Error.Message)
}
fmt.Println(string(body.Data), body.Meta["credits_charged"])
}curl 'https://socialtap.dev/v1/twitch/videos?handle=ninja' \
-H "x-api-key: $SOCIALTAP_API_KEY"{
"data": [
{
"approximate_fields": [],
"author": {
"avatar_url": "https://static-cdn.jtvnw.net/jtv_user_pictures/90d40495-f467-4911-9035-72d8d10a49c5-profile_image-300x300.png",
"display_name": "Ninja",
"id": "19571641",
"is_verified": true,
"url": "https://www.twitch.tv/ninja",
"username": "ninja"
},
"coauthors": [],
"duration_ms": 7726000,
"hashtags": [],
"id": "2918964242",
"is_nsfw": false,
"is_pinned": null,
"is_sponsored": null,
"language": "en",
"media": [
{
"alt_text": null,
"duration_ms": 7726000,
"expires_at": "2026-11-06T01:53:41Z",
"height": null,
"thumbnail_url": "https://static-cdn.jtvnw.net/cf_vods/d1m7jfoe9zdc1j/3a618d76bb26843ecc3f_ninja_322129789658_1793756098//thumb/thumb0-1280x720.jpg",
"type": "video",
"url": "https://usher.ttvnw.net/vod/2918964242.m3u8?allow_audio_only=true&allow_source=true&player=twitchweb&playlist_include_framerate=true&sig=SCRUBBED&token=%7B%22authorization%22%3A%7B%22forbidden%22%3Afalse%2C%22reason%22%3A%22%22%7D%2C%22chansub%22%3A%7B%22restricted_bitrates%22%3A…",
"width": null
}
],
"mentions": [],
"metrics": {
"comment_count": null,
"like_count": null,
"quote_count": null,
"repost_count": null,
"save_count": null,
"share_count": null,
"view_count": 34782
},
"platform": "twitch",
"platform_specific": {
"twitch": {
"animated_preview_url": "https://d1m7jfoe9zdc1j.cloudfront.net/3a618d76bb26843ecc3f_ninja_322129789658_1793756098/storyboards/2918964242-strip-0.jpg",
"author_follower_count": null,
"broadcast_id": null,
"broadcast_type": "archive",
"category": {
"box_art_url": "https://static-cdn.jtvnw.net/ttv-boxart/509658-285x380.jpg",
"id": "509658",
"name": "Just Chatting",
"slug": "just-chatting"
},
"chapters": [],
"clip_id": null,
"clipped_by": null,
"content_labels": [],
"deletes_at": null,
"embed_url": null,
"is_featured": null,
"is_recording": false,
"is_restricted": false,
"renditions": [],
"source_video": null,
"vertical_renditions": []
}
},
"platform_type": "live",
"published_at": "2026-11-04T01:35:03Z",
"text": null,
"thumbnail_url": "https://static-cdn.jtvnw.net/cf_vods/d1m7jfoe9zdc1j/3a618d76bb26843ecc3f_ninja_322129789658_1793756098//thumb/thumb0-1280x720.jpg",
"title": "BLEV BROS SPORTS SHOW WEEK 8 RECAP | GO LIONS | PRAYERS FOR JACK CAMPBELL",
"type": "video",
"unknown_fields": [
"platform_specific.twitch.chapters"
],
"url": "https://www.twitch.tv/videos/2918964242"
},
{
"approximate_fields": [],
"author": {
"avatar_url": "https://static-cdn.jtvnw.net/jtv_user_pictures/90d40495-f467-4911-9035-72d8d10a49c5-profile_image-300x300.png",
"display_name": "Ninja",
"id": "19571641",
"is_verified": true,
"url": "https://www.twitch.tv/ninja",
"username": "ninja"
},
"coauthors": [],
"duration_ms": 7641000,
"hashtags": [],
"id": "2912661812",
"is_nsfw": false,
"is_pinned": null,
"is_sponsored": null,
"language": "en",
"media": [
{
"alt_text": null,
"duration_ms": 7641000,
"expires_at": "2026-11-06T01:53:41Z",
"height": null,
"thumbnail_url": "https://static-cdn.jtvnw.net/cf_vods/d1m7jfoe9zdc1j/a4420620c79ca00ab677_ninja_321991442137_1793147635//thumb/thumb0-1280x720.jpg",
"type": "video",
"url": "https://usher.ttvnw.net/vod/2912661812.m3u8?allow_audio_only=true&allow_source=true&player=twitchweb&playlist_include_framerate=true&sig=SCRUBBED&token=%7B%22authorization%22%3A%7B%22forbidden%22%3Afalse%2C%22reason%22%3A%22%22%7D%2C%22chansub%22%3A%7B%22restricted_bitrates%22%3A…",
"width": null
}
],
"mentions": [],
"metrics": {
"comment_count": null,
"like_count": null,
"quote_count": null,
"repost_count": null,
"save_count": null,
"share_count": null,
"view_count": 53518
},
"platform": "twitch",
"platform_specific": {
"twitch": {
"animated_preview_url": "https://d1m7jfoe9zdc1j.cloudfront.net/a4420620c79ca00ab677_ninja_321991442137_1793147635/storyboards/2912661812-strip-0.jpg",
"author_follower_count": null,
"broadcast_id": null,
"broadcast_type": "archive",
"category": {
"box_art_url": "https://static-cdn.jtvnw.net/ttv-boxart/509658-285x380.jpg",
"id": "509658",
"name": "Just Chatting",
"slug": "just-chatting"
},
"chapters": [],
"clip_id": null,
"clipped_by": null,
"content_labels": [],
"deletes_at": null,
"embed_url": null,
"is_featured": null,
"is_recording": false,
"is_restricted": false,
"renditions": [],
"source_video": null,
"vertical_renditions": []
}
},
"platform_type": "live",
"published_at": "2026-10-28T00:34:00Z",
"text": null,
"thumbnail_url": "https://static-cdn.jtvnw.net/cf_vods/d1m7jfoe9zdc1j/a4420620c79ca00ab677_ninja_321991442137_1793147635//thumb/thumb0-1280x720.jpg",
"title": "BLEV BROS SPORTS SHOW WEEK 7 RECAP",
"type": "video",
"unknown_fields": [
"platform_specific.twitch.chapters"
],
"url": "https://www.twitch.tv/videos/2912661812"
},
{
"approximate_fields": [],
"author": {
"avatar_url": "https://static-cdn.jtvnw.net/jtv_user_pictures/90d40495-f467-4911-9035-72d8d10a49c5-profile_image-300x300.png",
"display_name": "Ninja",
"id": "19571641",
"is_verified": true,
"url": "https://www.twitch.tv/ninja",
"username": "ninja"
},
"coauthors": [],
"duration_ms": 998000,
"hashtags": [],
"id": "2909042011",
"is_nsfw": false,
"is_pinned": null,
"is_sponsored": null,
"language": "en",
"media": [
{
"alt_text": null,
"duration_ms": 998000,
"expires_at": "2026-11-06T01:53:41Z",
"height": null,
"thumbnail_url": "https://static-cdn.jtvnw.net/cf_vods/d1m7jfoe9zdc1j/65503c51b8da69e7b122_ninja_321934738265_1792803422//thumb/thumb0-1280x720.jpg",
"type": "video",
"url": "https://usher.ttvnw.net/vod/2909042011.m3u8?allow_audio_only=true&allow_source=true&player=twitchweb&playlist_include_framerate=true&sig=SCRUBBED&token=%7B%22authorization%22%3A%7B%22forbidden%22%3Afalse%2C%22reason%22%3A%22%22%7D%2C%22chansub%22%3A%7B%22restricted_bitrates%22%3A…",
"width": null
}
],
"mentions": [],
"metrics": {
"comment_count": null,
"like_count": null,
"quote_count": null,
"repost_count": null,
"save_count": null,
"share_count": null,
"view_count": 14940
},
"platform": "twitch",
"platform_specific": {
"twitch": {
"animated_preview_url": "https://d1m7jfoe9zdc1j.cloudfront.net/65503c51b8da69e7b122_ninja_321934738265_1792803422/storyboards/2909042011-strip-0.jpg",
"author_follower_count": null,
"broadcast_id": null,
"broadcast_type": "archive",
"category": {
"box_art_url": "https://static-cdn.jtvnw.net/ttv-boxart/1264310518_IGDB-285x380.jpg",
"id": "1264310518",
"name": "Marvel Rivals",
"slug": "marvel-rivals"
},
"chapters": [],
"clip_id": null,
"clipped_by": null,
"content_labels": [],
"deletes_at": null,
"embed_url": null,
"is_featured": null,
"is_recording": false,
"is_restricted": false,
"renditions": [],
"source_video": null,
"vertical_renditions": []
}
},
"platform_type": "live",
"published_at": "2026-10-24T00:57:07Z",
"text": null,
"thumbnail_url": "https://static-cdn.jtvnw.net/cf_vods/d1m7jfoe9zdc1j/65503c51b8da69e7b122_ninja_321934738265_1792803422//thumb/thumb0-1280x720.jpg",
"title": "CHECKING OUT THE BRAND NEW MARVEL RIVALS UPDATE WITH TIMMY TONKA TENDERS",
"type": "video",
"unknown_fields": [
"platform_specific.twitch.chapters"
],
"url": "https://www.twitch.tv/videos/2909042011"
}
],
"page": {
"has_more": false,
"next_cursor": null,
"next_cursor_expires_at": null,
"end_reason": "platform_limit"
},
"meta": {
"request_id": "req_3f9c2a7d1e8b4c6a9f0e2d4b6a8c0e1f",
"platform": "twitch",
"source": "api",
"is_cached": false,
"credits_charged": 1,
"latency_ms": 407,
"fetched_at": "2026-10-25T12:00:00Z",
"input": {
"kind": "profile",
"id": "19571641",
"url": "https://www.twitch.tv/ninja"
},
"credits_remaining": 9999,
"client_request_id": null,
"warnings": []
}
}import { SocialTap } from "socialtap";
const client = new SocialTap(); // apiKey defaults to process.env.SOCIALTAP_API_KEY
const res = await client.twitch.videos.list({ handle: "ninja" });
console.log(res.data);
console.log(res.credits.charged, res.meta.request_id);import java.net.URI;
import java.net.URLEncoder;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.charset.StandardCharsets;
public class Main {
public static void main(String[] args) throws Exception {
String query = "handle=" + encode("ninja");
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://socialtap.dev/v1/twitch/videos?" + query))
.header("x-api-key", System.getenv("SOCIALTAP_API_KEY"))
.GET()
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
// An error is {"error": {"code", "message", ...}}; success is {data, meta}, meta.credits_charged its price.
if (response.statusCode() >= 400) throw new RuntimeException(response.body());
System.out.println(response.body());
}
static String encode(String value) {
return URLEncoder.encode(value, StandardCharsets.UTF_8);
}
}using System.Text.Json;
using var http = new HttpClient();
http.DefaultRequestHeaders.Add("x-api-key", Environment.GetEnvironmentVariable("SOCIALTAP_API_KEY"));
var query = string.Join("&",
"handle=" + Uri.EscapeDataString("ninja"));
var res = await http.GetAsync("https://socialtap.dev/v1/twitch/videos?" + query);
using var body = JsonDocument.Parse(await res.Content.ReadAsStringAsync());
if (!res.IsSuccessStatusCode)
{
var error = body.RootElement.GetProperty("error");
throw new Exception($"{error.GetProperty("code")}: {error.GetProperty("message")}");
}
Console.WriteLine(body.RootElement.GetProperty("data"));
Console.WriteLine(body.RootElement.GetProperty("meta").GetProperty("credits_charged"));// Cargo.toml: reqwest = { version = "0.12", features = ["blocking", "json"] }, serde_json = "1"
use std::env;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let res = reqwest::blocking::Client::new()
.get("https://socialtap.dev/v1/twitch/videos")
.query(&[("handle", "ninja")])
.header("x-api-key", env::var("SOCIALTAP_API_KEY")?)
.send()?;
let ok = res.status().is_success();
let body: serde_json::Value = res.json()?;
if !ok {
return Err(format!("{}: {}", body["error"]["code"], body["error"]["message"]).into());
}
println!("{} {}", body["data"], body["meta"]["credits_charged"]);
Ok(())
}200 OK · GET https://socialtap.dev/v1/twitch/videosLong arrays and strings are shortened here. Real responses are complete.Docs One schema on 21 platforms.
The response reference lists every field, its type and when it is null. See the full schema.
Null means unknown
A field Twitch doesn't show is null, never zero or an empty string, so a real zero always means zero.
What it accepts
The Twitch channel: its login with or without the @ (ninja), a channel link with any tab after it (twitch.tv/ninja/videos), or its numeric ID (19571641).
Write one parser
Twitch, TikTok, Instagram and 18 more platforms answer in these fields, so the code that reads one reads them all.
platformstring- Platform ID (tiktok, youtube, …).
idstring- Platform-native post ID (string; Instagram shortcode, Reddit with its t3_ prefix).
urlstring- Canonical post URL.
typestring- Normalized content shape. New values may be added; treat unknown values as other.
platform_typestring- The platform's own product label, lowercase (reel, short, story, live, tweet, …).
titlestring- Headline (YouTube title, Reddit title); null on caption-only platforms.
textstring- Caption, description or body as plain text.
languagestring- BCP-47 language of text, when the platform states it.
Live data from 33 platforms.
What teams build with the Twitch Videos API.
Monitor a channel for new broadcasts and highlights
Find a streamer's most viewed videos
Benchmark views across a channel's broadcasts
Collect a channel's videos to transcribe or clip
Good to know before you build.
- Each list stops at its first 100 videos (all or one type, newest or most viewed), because Twitch refuses anonymous requests past them with an integrity check. A list that goes on ends there with page.end_reason platform_limit. To read more of a channel, ask for each type and both sorts.
- Newest orders by when Twitch made each video, and published_at can be later on a highlight or an upload, so only type=archive is strictly by published_at. There, since ends the walk. On the other types, since and until filter the page.
- text is the video's description, which most past broadcasts don't have, and is null then.
- is_nsfw is true when Twitch marks the video with any content classification label but politics and sensitive social issues, such as a mature-rated game, gambling, drugs, violence or sexual themes. platform_specific.twitch.content_labels lists them all in Twitch's own words.
- media[0].url is the video's playlist (HLS, every quality Twitch gives a logged-out viewer and audio only), signed, and works from any network until expires_at, which is less than a day away, so fetch a fresh one rather than store it. A cached answer keeps the links it was fetched with, so a max_age longer than that can return expired links.
- A video Twitch keeps from logged-out viewers, usually for the channel's subscribers, returns every other field, with platform_specific.twitch.is_restricted true and media[0].url null.
- A channel with no videos returns an empty page, one Twitch has taken down returns private_or_unavailable, and a name nobody holds, or a channel its owner closed, returns not_found.
- If Twitch's API is down, the channel's Videos page can answer type=all, newest, by login: its latest few videos, with no type, category, labels, playlist or is_restricted, and views as of when Twitch last drew the page (metrics.view_count in approximate_fields).
1 credit per page. Failed requests are free.
Buy credits once and spend them on any endpoint, on any platform.
| Source | Price per successful page | Per 1,000 pages |
|---|---|---|
| Any source | 1 credit | $0.75–$1.97 |
- Cache hits are free.
- Credits from packs and top-ups never expire.
- A monthly plan's credits are spent first, and what is left of them ends at each renewal.
- Prices exclude tax: sales tax is added at checkout where it applies.
- Outside the US, plans and packs are sold to businesses: checkout asks for your VAT, GST or other business tax ID.
Questions about the Twitch Videos API.
More in the API reference.
How much does the Twitch Videos API cost?
How do I get the next page?
Try it on an account you know.
Paste its handle or link in the playground, or copy the request into your code.
- No credit card
- Failed requests are free
- Works on all 218 endpoints