Query parameters
| Field | Type | Description |
|---|---|---|
| handle | string | Required Twitch login, 1–25 letters, digits or underscores. Normalized to lowercase. |
Live streaming API
Retrieve Twitch profiles, video pages, weekly schedules and complete public clips.
Four authenticated endpoints with full source records and bounded retrieval. Videos, schedules and clips passed live acceptance on the deployment host. Profile retrieval is currently challenged by Twitch on this host and returns an explicit failure.
http://localhost:3012Local development example. Replace with your service origin.
/v1/twitch/profileRetrieve profile identity, biography, social links, followers, partner status, current stream, videos, home-page video shelves and similar streamers. Social names become lowercase top-level keys. Deployment-host acceptance is currently blocked by an integrity challenge on social links. The worker returns HTTP 502 / upstream_challenged without a reduced profile.
| Field | Type | Description |
|---|---|---|
| handle | string | Required Twitch login, 1–25 letters, digits or underscores. Normalized to lowercase. |
| Field | Type | Description |
|---|---|---|
| id | string | Always included. |
| isLive | boolean | Always included. |
| currentViewersCount | integer | null | Current stream viewers; null when offline. |
| stream | object | Current live stream object, or {} when offline. |
| handle | string | Required Twitch login, 1–25 letters, digits or underscores. Normalized to lowercase. |
| displayName | string | Always included. |
| profileImageURL | string | null | Profile image at the reference size of 150 pixels. |
| bannerImageURL | string | null | Source banner URL, or null. |
| description | string | null | Always included. |
| followers | integer | Current follower count; it can change between requests. |
| isPartner | boolean | Published Twitch partner flag. |
| allVideos | array | Up to 12 latest videos, with full owner/game, restrictions, tags and logged-out self metadata. |
| recentBroadcasts | array | Present when Twitch supplies a nonempty latest-broadcasts shelf. Preserves its source records; this field can be absent from the reference service even when Twitch supplies it. |
| featuredClips | array | Public top-clips shelf, including isFeatured on each item, creator, broadcaster, game and guest participants. Omitted when no populated shelf is supplied. |
| similarStreamers | array | Up to 15 public recommendations; an empty source shelf yields an empty array. |
| requestId | string | Operation identifier for correlation. |
| accounting | object | Upstream HTTP attempts, total decoded bytes, and elapsed milliseconds. |
| success | boolean | True when the primary requested data is usable. |
| status | string | success, partial, failed or challenged. Inspect coverage on HTTP 200. |
| sourceUrl | string | Canonical public Twitch page URL. |
| fetchedAt | string | UTC retrieval timestamp. |
| coverage | object | Public GraphQL coverage. Clip auxiliary query errors produce partial with auxiliary_graphql_error; missing required primary fields fail. |
Nested fields and every response variant are in the OpenAPI specification.
/v1/twitch/user/videosRetrieve the first page of up to 100 videos, with optional type and sort filters. Source hasNextPage and cursor metadata are returned for compatibility; continuation requests are not supported because the logged-out source rejects them with an integrity challenge.
| Field | Type | Description |
|---|---|---|
| handle | string | Required Twitch login, 1–25 letters, digits or underscores. Normalized to lowercase. |
| filter_by | string | Optional HIGHLIGHT, ARCHIVE or UPLOAD. Omit to include all source video types. |
| sort_by | string | TIME (default) or VIEWS. |
| Field | Type | Description |
|---|---|---|
| videos | array | Complete video records with game, owner, broadcast identifier, media previews, tags, timestamps, duration and views. Empty when there are no results. |
| hasNextPage | boolean | Whether Twitch indicates more records exist. The current worker retrieves only the first page. |
| cursor | string | null | Last source edge cursor, or null. Returned as metadata only; this endpoint does not accept a continuation cursor. |
| requestId | string | Operation identifier for correlation. |
| accounting | object | Upstream HTTP attempts, total decoded bytes, and elapsed milliseconds. |
| success | boolean | True when the primary requested data is usable. |
| status | string | success, partial, failed or challenged. Inspect coverage on HTTP 200. |
| sourceUrl | string | Canonical public Twitch page URL. |
| fetchedAt | string | UTC retrieval timestamp. |
| coverage | object | Public GraphQL coverage. Clip auxiliary query errors produce partial with auxiliary_graphql_error; missing required primary fields fail. |
Nested fields and every response variant are in the OpenAPI specification.
/v1/twitch/user/scheduleRetrieve the current calendar week, Monday 00:00 UTC through the next Monday. Includes schedule segments, cancellation metadata, interruption, next segment, current stream and this week’s recent broadcasts.
| Field | Type | Description |
|---|---|---|
| handle | string | Required Twitch login, 1–25 letters, digits or underscores. Normalized to lowercase. |
| Field | Type | Description |
|---|---|---|
| id | string | Always included. |
| primaryColorHex | string | null | Always included. |
| lastBroadcast | object | null | Source last-broadcast metadata or null. |
| broadcastSettings | object | Published channel broadcast title and ID. |
| stream | JSON | Live metadata including both preview orientations, dimensions and game, or null. |
| videos | object | Up to 30 archive videos within the current UTC week, preserving edges and source type names. |
| channel | object | Source channel ID and schedule, including segments, nextSegment and interruption. Schedule can be null. |
| __typename | string | Always included. |
| requestId | string | Operation identifier for correlation. |
| accounting | object | Upstream HTTP attempts, total decoded bytes, and elapsed milliseconds. |
| success | boolean | True when the primary requested data is usable. |
| status | string | success, partial, failed or challenged. Inspect coverage on HTTP 200. |
| sourceUrl | string | Canonical public Twitch page URL. |
| fetchedAt | string | UTC retrieval timestamp. |
| coverage | object | Public GraphQL coverage. Clip auxiliary query errors produce partial with auxiliary_graphql_error; missing required primary fields fail. |
Nested fields and every response variant are in the OpenAPI specification.
/v1/twitch/clipRetrieve the complete public clip and playback metadata. Numeric keys preserve the reference API’s GraphQL batch response: 0 is the clip, 1 related clips, and 2 logged-out viewer data.
| Field | Type | Description |
|---|---|---|
| url | string | Required HTTPS clips.twitch.tv/<slug> or twitch.tv/<channel>/clip/<slug>. Tracking queries/fragments are removed; credentials, ports and embedded URLs are rejected. |
| Field | Type | Description |
|---|---|---|
| 0 | object | Primary GraphQL response at 0.data.clip, including extensions and videoURL. |
| 1 | object | Related-clips GraphQL response. Source errors are retained and produce partial coverage. A working source query returns data even if the reference service has a stale-query error. |
| 2 | object | Logged-out viewer response; data.user is null. No Twitch account session is used. |
| requestId | string | Operation identifier for correlation. |
| accounting | object | Upstream HTTP attempts, total decoded bytes, and elapsed milliseconds. |
| success | boolean | True when the primary requested data is usable. |
| status | string | success, partial, failed or challenged. Inspect coverage on HTTP 200. |
| sourceUrl | string | Canonical public Twitch page URL. |
| fetchedAt | string | UTC retrieval timestamp. |
| coverage | object | Public GraphQL coverage. Clip auxiliary query errors produce partial with auxiliary_graphql_error; missing required primary fields fail. |
| Field | Type | Description |
|---|---|---|
| id | string | Public clip ID. |
| slug | string | Clip slug verified against the requested URL. |
| url | string | Always included. |
| embedURL | string | Always included. |
| title | string | Always included. |
| viewCount | integer | Current source views, compared strictly during acceptance. |
| language | string | Always included. |
| isFeatured | boolean | Always included. |
| assets | array | All selected source assets, render states, thumbnail URLs, quality variants and portrait metadata. |
| curator | object | null | Public clip creator, or null. |
| game | object | null | Public game metadata, or null. |
| broadcast | object | null | Associated broadcast ID and title, or null. |
| broadcaster | object | Owner profile, partner flag, follower total, stream, last broadcast and logged-out self metadata. |
| thumbnailURL | string | Always included. |
| createdAt | string | Always included. |
| isPublished | boolean | Must be true for successful retrieval. |
| durationSeconds | number | Clip duration in seconds. |
| champBadge | JSON | Source badge metadata or null. |
| playbackAccessToken | object | Expiring public playback signature and JSON value returned by Twitch. They vary by request and are not logged or cached. |
| video | JSON | Associated video ID/type/title, or null. |
| videoOffsetSeconds | number | null | Source video offset or null. |
| videoQualities | array | Published source media URLs; never downloaded by this worker. |
| isViewerEditRestricted | boolean | Logged-out edit restriction flag. It does not imply that public viewing is restricted. |
| suggestedCropping | JSON | Source crop metadata or null. |
| __typename | string | Original GraphQL source type. |
| videoURL | string | First video-quality source URL signed with the current public playback signature/token. Expires with that token; request a fresh clip response when needed. |
Nested fields and every response variant are in the OpenAPI specification.
| HTTP | Code / status | Meaning |
|---|---|---|
| 200 | partial | Primary clip data is usable but a related-clips or viewer GraphQL query returned source errors. |
| 400 | invalid_request | Missing or unsafe input, unknown parameters, invalid filter/sort, or duplicate parameters. |
| 401 | unauthorized | Missing or invalid dedicated worker API key. |
| 403 | restricted_page | Unpublished clip, denied or expired playback token, or unexpected authenticated viewer. |
| 404 | not_found | The requested user/clip is missing or the route is unknown. |
| 429 | upstream_rate_limited | Twitch rate limited retrieval. |
| 502 | upstream_challenged / public_client_unavailable | Twitch challenged the request or its public client identifier could not be determined. |
| 502 | upstream_graphql_error / unsupported_page | Primary query failure or incomplete, unexpected or mismatched data. |
| 502 | response_too_large / payload_too_complex | Byte, depth or JSON node limit exceeded. |
| 502 | unsafe_redirect / request_limit / upstream_error | Bounded transport could not complete. |
| 503 | busy | All worker admission slots are occupied. |
| 504 | timeout | The total request deadline expired. |