Twitch
Query Twitch games, streamers, and streaming activity with your
GraphQL API token. Twitch gameId and channelId
values are strings. Use steamAppid when starting with a Steam game; not every
game has a Twitch mapping.
| Query | Purpose |
|---|---|
twitchGames | Search game names and resolve Twitch IDs, with Steam/IGDB mappings when available. |
twitchChannels | Search channel display-name prefixes, not channel logins. |
twitchGameStreamingStats | Get range summaries or daily, weekly, monthly, or yearly statistics. |
twitchGameTopStreamers | Rank channels for one game, using a preset window or explicit dates. |
twitchStreamersForGames | Find channels that played all or any of 1–25 games during a date range. |
twitchChannelStreamingGames | Rank games by their share of a channel's watched hours. |
twitchChannelStreamingActivity | Get daily channel activity, optionally restricted to one game. |
Find a game or channel
This query searches for Balatro and channels whose display names start with
"Cohh". Game search excludes non-game categories by default; set
includeCategories: true to include them. Use steamGame to get the mapped
Steam game's data and Trends.
query TwitchDiscovery {
twitchGames(query: "Balatro", limit: 5) {
hasMore
nextCursor
rows {
gameId
gameName
steamAppid
metadataResolved
steamGame { appid name trends(limit: 5) { data { trend { slug name } } } }
}
}
twitchChannels(query: "Cohh", limit: 5) {
rows { channelId channelName channelLogin followerCount }
}
}
For single-game queries, supply either gameId or steamAppid, never both.
For multi-game discovery, use either gameIds or steamAppids. Use a returned
channelId for channel queries, not a display name or URL.
Get a game's streaming history
This query requests daily statistics for a Steam game. Omit cursor on the
first request. Pass nextCursor back unchanged while hasMore is true.
query GameStreamingHistory($cursor: String) {
twitchGameStreamingStats(
steamAppid: 2379780
startDate: "2026-08-01"
endDate: "2026-08-31"
granularity: DAILY
limit: 50
cursor: $cursor
) {
gameId
startDate
endDate
hasMore
nextCursor
rows { period hoursWatched channelCount avgViewers peakViewers coverage }
}
}
granularity defaults to SUMMARY, which returns at most one aggregate row.
Use DAILY for arbitrary date ranges. WEEKLY requires complete Monday–Sunday
periods, MONTHLY complete calendar months, and YEARLY complete calendar years.
includeChannelCount (default true) and includeAllTimePeak (default false)
apply to summary results only.
Find streamers across games
This query finds channels that played both games in the requested period.
Use match: ANY to find channels that played either game. Filter by known
follower counts or hours watched to narrow the results.
query SharedStreamers {
twitchStreamersForGames(
steamAppids: [2379780, 646570]
match: ALL
startDate: "2026-08-01"
endDate: "2026-08-31"
minFollowers: 10000
maxFollowers: 100000
limit: 20
) {
hasMore
nextCursor
rows {
channelId
channelName
followerCount
hoursWatched
matchedGameCount
viewerMetricCoverage
viewerMetricsComplete
}
}
}
For one game, use twitchGameTopStreamers(steamAppid: 2379780, window: DAYS_30).
Its window options are DAYS_7, DAYS_30 (default), DAYS_365, and ALL_TIME.
Alternatively supply startDate/endDate, but not a window as well. Follower
and minHoursWatched filters on top streamers require explicit dates.
Explore a channel's games and activity
Set the channelId variable to an ID returned by channel search or streamer
discovery. This query compares the channel's top games over 90 days with its
daily activity during a specific week.
query ChannelResearch($channelId: String!) {
twitchChannelStreamingGames(channelId: $channelId, windowDays: 90, limit: 10) {
from
to
hasMore
nextCursor
rows { gameId gameName hoursWatched shareOfChannel steamGame { appid name } }
}
twitchChannelStreamingActivity(
channelId: $channelId
startDate: "2026-08-01"
endDate: "2026-08-07"
limit: 100
) {
hasMore
nextCursor
rows { day gameId hoursWatched streamHours avgViewers shareOfGame }
}
}
Channel-game rankings accept at most one range mode: allTime: true,
windowDays: 7/30/90/365, or an explicit date pair. Omitting all modes uses a
90-day window. Channel activity can omit both game identifiers to include all
games, or supply gameId or steamAppid to restrict it to one game.
Dates, pages, and coverage
- Explicit date pairs are inclusive UTC days in
YYYY-MM-DDform, at most 366 days. Statistics, multi-game streamer discovery, and channel activity require both dates. All-time presets mean all available history, not complete lifetime coverage. - Twitch pages use
limit,hasMore, and opaquecursor/nextCursor, not Relay edges or numeric offsets. Searches and streamer/channel-game rankings allow at most 50 rows; activity and statistics series allow at most 100. hoursWatchedmeasures viewer-hours;streamHoursmeasures broadcast hours.avgViewers/peakViewersare concurrent viewers, not unique people.- Viewer metrics can be null or partial even when hours watched is available.
Keep
coverage,observedDays, orviewerMetricCoveragealongside the metrics where returned. Do not replace missing data with zero. shareOfChannelandshareOfGameare fractions: 0.25 means 25%. They refer to shares of watched hours, not unique audience overlap.- An unmapped Steam ID produces an error on the selected Twitch analytics field;
unrelated game results can remain available. Search Twitch by name to check
for an unmapped category.
steamGameis null when no Steam record is available.
To get a Steam game's Trends, Twitch statistics, and streamers in one request, see Steam Trends.