Twitch Game Streams
twitch.game.streams
Live Twitch streams in a game or category with viewer counts, start time, language, preview image and broadcaster.
At a glance
- Endpoint ID
twitch.game.streams- 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.game.streams", "input": { "game": "Fortnite", "limit": 20 }}'
import jsonimport osimport requestspayload = json.loads(r'''{ "capability": "twitch.game.streams", "input": { "game": "Fortnite", "limit": 20 }}''')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.game.streams", "input": { "game": "Fortnite", "limit": 20 }}),});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 |
|---|---|---|---|---|
game |
string | yes | Category name or twitch.tv/directory/category link. | Fortnite |
limit |
integer | no | Maximum number of results to return. From 1 to 100. | 20 |
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:
{ "has_more": true, "items": [ { "id": "322492867673", "language": "EN", "preview_image_url": "https://static-cdn.jtvnw.net/previews-ttv/live_user_royals-1280x720.jpg", "started_at": "2026-11-30T04:24:46Z", "viewers": 2653, "broadcaster": { "display_name": "royals", "id": "546716440", "login": "royals", "url": "https://www.twitch.tv/royals" }, "game": { "name": "Fortnite", "id": "33214" } }, { "id": "318463735010", "language": "ES", "preview_image_url": "https://static-cdn.jtvnw.net/previews-ttv/live_user_recuerd0p-1280x720.jpg", "started_at": "2026-11-30T09:36:40Z", "viewers": 675, "broadcaster": { "display_name": "Recuerd0p", "id": "185913819", "login": "recuerd0p", "url": "https://www.twitch.tv/recuerd0p" }, "game": { "name": "Fortnite", "id": "33214" } } ]}
Fields
| Field | Type | Example |
|---|---|---|
items[].game.name |
string | Fortnite |
items[].broadcaster.display_name |
string | royals |
items[].broadcaster |
object | 4 fields |
items[].broadcaster.id |
string | 546716440 |
items[].broadcaster.login |
string | royals |
items[].broadcaster.url |
string | https://www.twitch.tv/royals |
items[].game |
object | 2 fields |
items[].game.id |
string | 33214 |
items[].id |
string | 322492867673 |
items[].language |
string | EN |
items[].preview_image_url |
string | https://static-cdn.jtvnw.net/previews-ttv/live_user_royals-1280… |
items[].started_at |
string | 2026-11-30T04:24:46Z |
items[].viewers |
integer | 2653 |
has_more |
boolean | true |
items |
array | 3 records |
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.