Actions92
- Channel Actions
- Channel > Config Actions
- Event Actions
- Integrations Actions
- Live Actions
- Misc > Countries Actions
- Misc > Stream Actions
- Option Actions
- Option > Record Actions
- Option > Record > Instant Actions
- Option > Record > Storage Actions
- Option > Timeshift Actions
- Option > Watermarking Actions
- Option > Simulcast Actions
- Players Actions
- Players > Ads Actions
- Players > Embeds Actions
- Players > Pictures Actions
- Prices Actions
- Restrictions Actions
- Stats > Channel > Connection History Actions
- Stats > Channel > Consumption Actions
- Stats > Channel > Export Stats Actions
- Stats > Channel > Geolocation Actions
- Stats > Channel > Technologies Actions
- Stats > Channel > Viewers Actions
- Stats > Channel > Viewing Actions
- Stats > Globals > Consumption Actions
- Stats > Globals > Geolocation Actions
- Stats > Globals > Viewers Actions
- Stats > Globals > Viewing Actions
- Thumbnail Actions
- Order Actions
Stats > Globals > Viewers → Viewers Per Channel Histogram
AI-generatedSummary
Fetch viewer statistics for a given time range and aggregate counts per channel according to a selected granularity.
Inputs
- authentication (required) — Authentication method to use (OAuth2 or API Key).
- query_from (required) — Starting date for the consumption data.
- query_to (required) — Ending date for the consumption data.
- query_per (required) — Granularity for aggregation (day, hour, minute, month, quarter, week, year).
- query_account_id (required) — Account identifier.
- returnFullResponse — If true, returns the full API response; otherwise returns a simplified histogram.
Output shape
An object with a data array where each element represents a channel's viewer count in a bin defined by query_per.
The response includes channel identifiers and aggregated viewer numbers; pagination may be present; errors follow n8n's standard error format.
Examples
Example 1: Get hourly viewer histogram for a specific account between two dates using OAuth2.
authentication: oauth2, query_from: 2024-01-01T00:00:00Z, query_to: 2024-01-07T23:59:59Z, query_per: hour, query_account_id: 12345, returnFullResponse: false
Example 2: Retrieve daily aggregated viewers for a channel over a month.
authentication: apiKey, query_from: 2024-02-01, query_to: 2024-02-28, query_per: day, query_account_id: 67890, returnFullResponse: true
Example 3: Fetch yearly viewer histogram for a quarter using API Key authentication.
authentication: apiKey, query_from: 2023-01-01, query_to: 2023-12-31, query_per: year, query_account_id: 54321, returnFullResponse: false