Twitch Video
twitch.video.get
One Twitch video by id or link: title, publish time, duration, view count, category, owner and thumbnails.
At a glance
- Endpoint ID
twitch.video.get- Price
- 1 credit per call; failed calls are free
- Runs for up to
- 30 seconds
Request
Send the endpoint ID as capability and its fields as input. Set UPSCRAPE_API_KEY to your key first.
curl --request POST \ --url https://data.upscrape.com/execute \ --header "Authorization: Bearer $UPSCRAPE_API_KEY" \ --header "Content-Type: application/json" \ --header "Prefer: wait=30" \ --data '{ "capability": "twitch.video.get", "input": { "video": "2939504732" }}'
import jsonimport osimport requestspayload = json.loads(r'''{ "capability": "twitch.video.get", "input": { "video": "2939504732" }}''')response = requests.post( "https://data.upscrape.com/execute", headers={ "Authorization": f"Bearer {os.environ['UPSCRAPE_API_KEY']}", "Content-Type": "application/json", "Prefer": "wait=30", }, json=payload,)response.raise_for_status()print(json.dumps(response.json(), indent=2))
const response = await fetch("https://data.upscrape.com/execute", { method: "POST", headers: { "Authorization": `Bearer ${process.env.UPSCRAPE_API_KEY}`, "Content-Type": "application/json", "Prefer": "wait=30", }, body: JSON.stringify({ "capability": "twitch.video.get", "input": { "video": "2939504732" }}),});if (!response.ok) { throw new Error(`Upscrape request failed: ${response.status}`);}console.log(JSON.stringify(await response.json(), null, 2));
Input
| Field | Type | Required | What it does | Example |
|---|---|---|---|---|
video |
string | yes | Numeric video id or twitch.tv/videos link. | 2939504732 |
Response
A finished call answers with HTTP 200; the data is in results[0].data, and billing.credits_charged is what it cost. A call still running after the wait answers 202: see jobs and results.
This is results[0].data from a real run:
{ "video": { "title": "KAI VS SPEED: FIRST TO MAKE A MILLION DOLLARS IN GTA 6", "view_count": 1491568, "published_at": "2026-11-24T17:36:25Z", "created_at": "2026-11-24T17:36:25Z", "duration_seconds": 17889, "id": "2939504732", "url": "https://www.twitch.tv/videos/2939504732", "game": { "name": "Just Chatting", "id": "509658", "slug": "just-chatting" }, "owner": { "display_name": "KaiCenat", "id": "641972806", "login": "kaicenat", "url": "https://www.twitch.tv/kaicenat" } }}
Fields
| Field | Type | Example |
|---|---|---|
video |
object | 9 fields |
video.created_at |
string | 2026-11-24T17:36:25Z |
video.duration_seconds |
integer | 17,889 |
video.game |
object | 3 fields |
video.game.id |
string | 509658 |
video.game.name |
string | Just Chatting |
video.game.slug |
string | just-chatting |
video.id |
string | 2939504732 |
video.owner |
object | 4 fields |
video.owner.display_name |
string | KaiCenat |
video.owner.id |
string | 641972806 |
video.owner.login |
string | kaicenat |
video.owner.url |
string | https://www.twitch.tv/kaicenat |
video.published_at |
string | 2026-11-24T17:36:25Z |
video.title |
string | KAI VS SPEED: FIRST TO MAKE A MILLION DOLLARS IN GTA 6 |
video.url |
string | https://www.twitch.tv/videos/2939504732 |
video.view_count |
integer | 1,491,568 |
If a call fails
A failed call costs nothing. The response carries an error.code you can branch on; Errors and retries lists every code and which ones to retry.
Other Twitch endpoints
Something missing or unclear? Ask the team that builds the Twitch endpoints.