Social Dash Scraper
Documentation v0.1OpenAPI

Live streaming API

Twitch

Private · profile challenged

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.

Base URLhttp://localhost:3012

Local development example. Replace with your service origin.

Get a Twitch profile

GET/v1/twitch/profile

Retrieve 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.

Query parameters

FieldTypeDescription
handlestringRequired Twitch login, 1–25 letters, digits or underscores. Normalized to lowercase.

Response fields

FieldTypeDescription
idstringAlways included.
isLivebooleanAlways included.
currentViewersCountinteger | nullCurrent stream viewers; null when offline.
streamobjectCurrent live stream object, or {} when offline.
handlestringRequired Twitch login, 1–25 letters, digits or underscores. Normalized to lowercase.
displayNamestringAlways included.
profileImageURLstring | nullProfile image at the reference size of 150 pixels.
bannerImageURLstring | nullSource banner URL, or null.
descriptionstring | nullAlways included.
followersintegerCurrent follower count; it can change between requests.
isPartnerbooleanPublished Twitch partner flag.
allVideosarrayUp to 12 latest videos, with full owner/game, restrictions, tags and logged-out self metadata.
recentBroadcastsarrayPresent 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.
featuredClipsarrayPublic top-clips shelf, including isFeatured on each item, creator, broadcaster, game and guest participants. Omitted when no populated shelf is supplied.
similarStreamersarrayUp to 15 public recommendations; an empty source shelf yields an empty array.
requestIdstringOperation identifier for correlation.
accountingobjectUpstream HTTP attempts, total decoded bytes, and elapsed milliseconds.
successbooleanTrue when the primary requested data is usable.
statusstringsuccess, partial, failed or challenged. Inspect coverage on HTTP 200.
sourceUrlstringCanonical public Twitch page URL.
fetchedAtstringUTC retrieval timestamp.
coverageobjectPublic 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.

Get user videos

GET/v1/twitch/user/videos

Retrieve 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.

Query parameters

FieldTypeDescription
handlestringRequired Twitch login, 1–25 letters, digits or underscores. Normalized to lowercase.
filter_bystringOptional HIGHLIGHT, ARCHIVE or UPLOAD. Omit to include all source video types.
sort_bystringTIME (default) or VIEWS.

Response fields

FieldTypeDescription
videosarrayComplete video records with game, owner, broadcast identifier, media previews, tags, timestamps, duration and views. Empty when there are no results.
hasNextPagebooleanWhether Twitch indicates more records exist. The current worker retrieves only the first page.
cursorstring | nullLast source edge cursor, or null. Returned as metadata only; this endpoint does not accept a continuation cursor.
requestIdstringOperation identifier for correlation.
accountingobjectUpstream HTTP attempts, total decoded bytes, and elapsed milliseconds.
successbooleanTrue when the primary requested data is usable.
statusstringsuccess, partial, failed or challenged. Inspect coverage on HTTP 200.
sourceUrlstringCanonical public Twitch page URL.
fetchedAtstringUTC retrieval timestamp.
coverageobjectPublic 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.

Get user schedule

GET/v1/twitch/user/schedule

Retrieve 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.

Query parameters

FieldTypeDescription
handlestringRequired Twitch login, 1–25 letters, digits or underscores. Normalized to lowercase.

Response fields

FieldTypeDescription
idstringAlways included.
primaryColorHexstring | nullAlways included.
lastBroadcastobject | nullSource last-broadcast metadata or null.
broadcastSettingsobjectPublished channel broadcast title and ID.
streamJSONLive metadata including both preview orientations, dimensions and game, or null.
videosobjectUp to 30 archive videos within the current UTC week, preserving edges and source type names.
channelobjectSource channel ID and schedule, including segments, nextSegment and interruption. Schedule can be null.
__typenamestringAlways included.
requestIdstringOperation identifier for correlation.
accountingobjectUpstream HTTP attempts, total decoded bytes, and elapsed milliseconds.
successbooleanTrue when the primary requested data is usable.
statusstringsuccess, partial, failed or challenged. Inspect coverage on HTTP 200.
sourceUrlstringCanonical public Twitch page URL.
fetchedAtstringUTC retrieval timestamp.
coverageobjectPublic 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.

Get a Twitch clip

GET/v1/twitch/clip

Retrieve 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.

Query parameters

FieldTypeDescription
urlstringRequired HTTPS clips.twitch.tv/<slug> or twitch.tv/<channel>/clip/<slug>. Tracking queries/fragments are removed; credentials, ports and embedded URLs are rejected.

Response fields

FieldTypeDescription
0objectPrimary GraphQL response at 0.data.clip, including extensions and videoURL.
1objectRelated-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.
2objectLogged-out viewer response; data.user is null. No Twitch account session is used.
requestIdstringOperation identifier for correlation.
accountingobjectUpstream HTTP attempts, total decoded bytes, and elapsed milliseconds.
successbooleanTrue when the primary requested data is usable.
statusstringsuccess, partial, failed or challenged. Inspect coverage on HTTP 200.
sourceUrlstringCanonical public Twitch page URL.
fetchedAtstringUTC retrieval timestamp.
coverageobjectPublic GraphQL coverage. Clip auxiliary query errors produce partial with auxiliary_graphql_error; missing required primary fields fail.

Clip fields · 0.data.clip

FieldTypeDescription
idstringPublic clip ID.
slugstringClip slug verified against the requested URL.
urlstringAlways included.
embedURLstringAlways included.
titlestringAlways included.
viewCountintegerCurrent source views, compared strictly during acceptance.
languagestringAlways included.
isFeaturedbooleanAlways included.
assetsarrayAll selected source assets, render states, thumbnail URLs, quality variants and portrait metadata.
curatorobject | nullPublic clip creator, or null.
gameobject | nullPublic game metadata, or null.
broadcastobject | nullAssociated broadcast ID and title, or null.
broadcasterobjectOwner profile, partner flag, follower total, stream, last broadcast and logged-out self metadata.
thumbnailURLstringAlways included.
createdAtstringAlways included.
isPublishedbooleanMust be true for successful retrieval.
durationSecondsnumberClip duration in seconds.
champBadgeJSONSource badge metadata or null.
playbackAccessTokenobjectExpiring public playback signature and JSON value returned by Twitch. They vary by request and are not logged or cached.
videoJSONAssociated video ID/type/title, or null.
videoOffsetSecondsnumber | nullSource video offset or null.
videoQualitiesarrayPublished source media URLs; never downloaded by this worker.
isViewerEditRestrictedbooleanLogged-out edit restriction flag. It does not imply that public viewing is restricted.
suggestedCroppingJSONSource crop metadata or null.
__typenamestringOriginal GraphQL source type.
videoURLstringFirst 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.

Coverage & limits

  • One handle or clip per request; four concurrent operations per worker. No automatic pagination, media download or outbound-link crawling.
  • 20-second total deadline, four upstream HTTP attempts maximum, with one shared transient network/5xx retry. Challenges, redirects, rate limits and GraphQL errors are not retried.
  • 4 MiB combined decoded bytes, depth 24 and 30,000 examined JSON nodes. Incomplete required primary fields, mismatched identities and exceeded bounds fail explicitly.
  • Profile: 12 latest videos, up to 10 source shelves with 100 items each, and 15 similar streamers. Videos: 100 items per page. Schedule: current UTC week, up to 100 segments and 30 archives. Clip: up to 20 related clips.
  • Uses Twitch’s public website client identifier and logged-out GraphQL queries. No account credentials, Authorization headers, cookies, private sessions or login flows. Denied/unpublished clips and expired playback tokens fail explicitly.
  • The public client identifier is discovered from Twitch’s homepage and cached in memory for 15 minutes. No profile, video, schedule or clip response cache; cache_max_age is unsupported.
  • Nested source fields, nulls, array order and GraphQL type names are preserved. Clip batch extensions retain operational telemetry; only durationMilliseconds and requestID are excluded from parity comparison.
  • Live counters, playback signatures and playback expiry timestamps can differ between simultaneous requests. They remain in the strict comparison; a difference never counts as exact parity.
  • Live comparisons: two video pages and two schedules matched exactly. Both profiles contained every matching reference field plus a recent-broadcasts shelf. Both clips contained every primary reference field; only per-request playback values and the reference’s failed related query differed. Strict full-response parity remains false for profiles and clips.
  • Video history is limited to the first page. A bounded native cursor-continuation read returned failed integrity check. No integrity token, login, or bypass was attempted; cursor input is rejected rather than advertised as working.
  • Deployed privately in Coolify. Server acceptance passed videos, schedules and primary clip fields; profile socialMedias returned IntegrityCheckFailed. Public About-page HTML contains no replacement social data. All primary fields remain required; profile availability on this host is not accepted.

Errors & partial results

HTTPCode / statusMeaning
200partialPrimary clip data is usable but a related-clips or viewer GraphQL query returned source errors.
400invalid_requestMissing or unsafe input, unknown parameters, invalid filter/sort, or duplicate parameters.
401unauthorizedMissing or invalid dedicated worker API key.
403restricted_pageUnpublished clip, denied or expired playback token, or unexpected authenticated viewer.
404not_foundThe requested user/clip is missing or the route is unknown.
429upstream_rate_limitedTwitch rate limited retrieval.
502upstream_challenged / public_client_unavailableTwitch challenged the request or its public client identifier could not be determined.
502upstream_graphql_error / unsupported_pagePrimary query failure or incomplete, unexpected or mismatched data.
502response_too_large / payload_too_complexByte, depth or JSON node limit exceeded.
502unsafe_redirect / request_limit / upstream_errorBounded transport could not complete.
503busyAll worker admission slots are occupied.
504timeoutThe total request deadline expired.