Skip to content
twitch.apiv2.0

Reference / API groups

twitch.analytics

Analytics: downloadable reports for your extensions and games.

Every method of twitch.analytics, with its parameters, what it returns and the token it needs.

twitch.analytics.extensions(params?, options?): Paginator<ExtensionAnalyticsReport>

Lists the reports available for the extensions of the user making the call. Each one is a link to a CSV file with one row per day of use.

Token: user, scope analytics:read:extensions.

NameTypeDescription
extension_idstringOnly this extension. Without it you get one report per extension the user owns.
type"overview_v2"Kind of report.
started_atstring | DateFirst day of the report, at midnight UTC. Goes with ended_at: set both or neither. Days before January 31, 2018 are not available.
ended_atstring | DateLast day of the report, at midnight UTC, included. Twitch pulls it back when it is too recent, since data takes up to two days to arrive.
firstnumberItems per page, 1 to 100. Twitch defaults to 20, and never sends more than 20 whatever you ask.
afterstringCursor of the next page. Ignored when extension_id is set.

options: Request options for this call: as, token, signal, timeout, retries.

Paginator<ExtensionAnalyticsReport>

Fields of ExtensionAnalyticsReport
NameTypeDescription
extension_idstringID of the extension the report is about.
URLstringURL of the CSV file. It stops working after 5 minutes.
type"overview_v2"Kind of report.
date_rangeAnalyticsDateRangeThe days the report covers.
const reports = await twitch.analytics.extensions().all();
for (const report of reports) console.log(report.extension_id, report.URL);

Twitch reference

twitch.analytics.games(params?, options?): Paginator<GameAnalyticsReport>

Lists the reports available for the games of the user making the call. Each one is a link to a CSV file with one row per day. A game needs at least 5 hours of broadcast over the period to get a report.

Token: user, scope analytics:read:games.

NameTypeDescription
game_idstringOnly this game. Without it you get one report per game the user owns.
type"overview_v2"Kind of report.
started_atstring | DateFirst day of the report, at midnight UTC. Goes with ended_at: set both or neither. Days older than one year are not available.
ended_atstring | DateLast day of the report, at midnight UTC, included. Twitch pulls it back when it is too recent, since data takes up to two days to arrive.
firstnumberItems per page, 1 to 100. Twitch defaults to 20, and never sends more than 20 whatever you ask.
afterstringCursor of the next page. Ignored when game_id is set.

options: Request options for this call: as, token, signal, timeout, retries.

Paginator<GameAnalyticsReport>

Fields of GameAnalyticsReport
NameTypeDescription
game_idstringID of the game the report is about.
URLstringURL of the CSV file. It stops working after 5 minutes.
type"overview_v2"Kind of report.
date_rangeAnalyticsDateRangeThe days the report covers.
const [report] = (await twitch.analytics.games({ game_id: "493057" })).data;

Twitch reference