Skip to main content

Twitch

Base URL: https://drain.lat/api/v1/twitch
Fetch a Twitch channel profile including live status.
GET /api/v1/twitch/profile/:username
username
string
required
The Twitch channel username.
curl "https://drain.lat/api/v1/twitch/profile/twitch" \
  -H "x-api-key: YOUR_API_KEY"
id
string
Twitch user ID.
username
string
Twitch username.
displayName
string
Display name.
description
string
Channel description.
avatarUrl
string
Avatar image URL.
offlineBannerUrl
string
Offline banner image URL.
broadcasterType
string
Account type: partner, affiliate, or empty string.
viewCount
number
Total all-time view count.
created
string
Account creation date (ISO 8601).
isLive
boolean
Whether the channel is currently live.
streamTitle
string
Current stream title. Empty string when offline.
category
string
Game or category being streamed. Empty string when offline.
viewerCount
number
Current viewer count. null when offline.
language
string
Stream language code.
tags
string[]
Stream tags.
profileUrl
string
Link to the Twitch channel.
Response
{
  "id": "12345678",
  "username": "twitch",
  "displayName": "Twitch",
  "description": "Twitch is where thousands of communities come together.",
  "avatarUrl": "https://...",
  "offlineBannerUrl": "https://...",
  "broadcasterType": "partner",
  "viewCount": 420000000,
  "created": "2011-06-22T00:00:00Z",
  "isLive": false,
  "streamTitle": "",
  "category": "",
  "viewerCount": null,
  "language": "en",
  "tags": ["English"],
  "profileUrl": "https://www.twitch.tv/twitch",
  "scrapedAt": "2026-05-08T10:00:00.000Z"
}
Get top clips for a Twitch channel.
GET /api/v1/twitch/profile/:username/clips
username
string
required
The Twitch channel username.
limit
number
Number of clips to return. Max 20. Default 10.
curl "https://drain.lat/api/v1/twitch/profile/xqc/clips?limit=10" \
  -H "x-api-key: YOUR_API_KEY"
username
string
Twitch username.
clips
array
total
number
Number of clips returned.
Response
{
  "username": "xqc",
  "clips": [
    {
      "id": "AbcDef123",
      "title": "insane play",
      "url": "https://clips.twitch.tv/AbcDef123",
      "embedUrl": "https://clips.twitch.tv/embed?clip=AbcDef123",
      "thumbnailUrl": "https://...",
      "viewCount": 420000,
      "duration": 30.0,
      "createdAt": "2026-04-01T12:00:00Z",
      "creatorName": "xqc",
      "gameName": "Just Chatting"
    }
  ],
  "total": 10,
  "scrapedAt": "2026-05-08T10:00:00.000Z"
}
Get past broadcasts and VODs for a Twitch channel.
GET /api/v1/twitch/profile/:username/videos
username
string
required
The Twitch channel username.
limit
number
Number of videos to return. Max 20. Default 10.
curl "https://drain.lat/api/v1/twitch/profile/xqc/videos?limit=10" \
  -H "x-api-key: YOUR_API_KEY"
username
string
Twitch username.
videos
array
total
number
Number of videos returned.
Response
{
  "username": "xqc",
  "videos": [
    {
      "id": "1234567890",
      "title": "!prime | xQcOW",
      "description": "",
      "url": "https://www.twitch.tv/videos/1234567890",
      "thumbnailUrl": "https://...",
      "viewCount": 85000,
      "duration": "8h30m0s",
      "publishedAt": "2026-05-07T18:00:00Z",
      "type": "archive"
    }
  ],
  "total": 10,
  "scrapedAt": "2026-05-08T10:00:00.000Z"
}