This endpoint checks if the Twitch channel is currently live. If online, it returns the live stream data from Twitch. If offline, it returns the most recent VOD from the database.
Endpoint
The Twitch user ID to check stream status for
GET /api/twitch/stream/[id]
Response
The response varies depending on whether the stream is live or offline.
Live stream response
Twitch username (lowercase)
ID of the game being played
Name of the game being played
Stream type, always “live” when online
Current number of viewers
ISO 8601 timestamp of when the stream started
Template URL for stream thumbnail
Array of tag IDs applied to the stream
Array of tag names applied to the stream
Whether the stream is marked as mature content
Offline stream response
Always “offline” when the stream is not live
The most recent VOD from the databaseDate when the VOD was created
Number of views on the VOD
Predicted date for next stream
Examples
Request
curl https://kommtkevinonline.de/api/twitch/stream/123456789
Response (live)
{
"id": "41234567890",
"user_id": "123456789",
"user_login": "kommtkev1n",
"user_name": "KommtKev1n",
"game_id": "509658",
"game_name": "Just Chatting",
"type": "live",
"title": "Streaming now!",
"viewer_count": 1337,
"started_at": "2026-03-03T14:30:00Z",
"language": "de",
"thumbnail_url": "https://static-cdn.jtvnw.net/previews-ttv/live_user_kommtkev1n-{width}x{height}.jpg",
"tag_ids": [],
"tags": ["German", "English"],
"is_mature": false
}
Response (offline)
{
"type": "offline",
"lastVod": {
"vodid": "2345678901",
"title": "Previous stream VOD",
"date": "2026-03-01T18:00:00.000Z",
"url": "https://www.twitch.tv/videos/2345678901",
"thumbnail": "https://static-cdn.jtvnw.net/cf_vods/d2nvs31859zcd8/thumbnail.jpg",
"viewCount": 500,
"onlineIntendDate": "2026-03-05",
"duration": 7200,
"transcript": {}
}
}