# Stream Stats API (compatible with Twitch & Kick) (`rivetfinch/stream-stats`) Actor

Channel info and live status for thousands of channels, top clips by views with VOD links, VODs and top games, read through the official Twitch API and Kick API on your own free app keys. Compatible with Twitch and Kick. No scraping, no proxies, no emails.

- **URL**: https://apify.com/rivetfinch/stream-stats.md
- **Developed by:** [Rivetfinch](https://apify.com/rivetfinch) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.50 / 1,000 api request made on your keys

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Stream Stats API (compatible with Twitch & Kick)

Live status and channel info for thousands of Twitch channels, the most viewed clips of any channel or game with a link to the exact moment in the VOD, recent VODs, and the top games with their top streams. Kick channels' live status and viewers come in the same schema. Everything is read through the **official Twitch Helix API and Kick's official public API, on your own free app keys**: no scraping, no proxies, no browser.

### Before you start: your own Twitch app (2 minutes, free)

This Actor runs on **your** Twitch app keys, so the data comes to you under your own developer agreement with Twitch.

1. Sign in at [dev.twitch.tv/console/apps](https://dev.twitch.tv/console/apps) (Twitch asks for two-factor authentication on developer accounts) and click **Register Your Application**. Any name; OAuth Redirect URL `http://localhost`; any category; Client Type **Confidential**.
2. Open the app, copy the **Client ID**, click **New Secret** and copy the **Client Secret**.
3. Paste both into this Actor's input. They are stored encrypted by Apify, never logged and never written to the output.

For Kick channels, also create a Kick app in your Kick account under **Settings > Developer** ([docs.kick.com](https://docs.kick.com)) and paste its Client ID and Client Secret. A run without keys still succeeds, with one free `problem` row that repeats these steps.

Each run gets one app token with your keys and **revokes it at the end of the run**.

### What a row looks like

A clip row looks like this:

```json
{
  "type": "clip",
  "platform": "twitch",
  "rank": 1,
  "channelLogin": "examplechannel",
  "channelName": "ExampleChannel",
  "channelId": "141981764",
  "channelUrl": "https://www.twitch.tv/examplechannel",
  "title": "the chair broke",
  "category": "Just Chatting",
  "categoryId": "509658",
  "language": "en",
  "id": "AwkwardHelplessSalamanderSwiftRage",
  "url": "https://clips.twitch.tv/AwkwardHelplessSalamanderSwiftRage",
  "viewCount": 48211,
  "createdAt": "2026-11-20T21:14:03Z",
  "durationSeconds": 29.9,
  "vodId": "2290001111",
  "vodOffsetSeconds": 5130,
  "vodUrl": "https://www.twitch.tv/videos/2290001111?t=1h25m30s",
  "isFeatured": true,
  "embedUrl": "https://clips.twitch.tv/embed?clip=AwkwardHelplessSalamanderSwiftRage",
  "thumbnailUrl": "https://static-cdn.jtvnw.net/example-preview.jpg",
  "source": "channel:examplechannel",
  "fetchedAt": "2026-11-23T15:00:00Z"
}
```

(Values are illustrative; fields that don't apply to a row type are `null` and left out here.)

### What you get

- **Channels mode: info and live status.** Title, category, language, tags, partner or affiliate, account age, and whether the channel is live right now with viewers and start time. Twitch answers 100 channels per call, so **1,000 channels take about 30 requests**. Kick channels (`kick.com/name` or `kick:name`) come in the same rows, with Kick's subscriber count.
- **Clips mode: the most viewed clips of a channel or a game**, in any time window, with `vodUrl` pointing at the clip's moment in the VOD. Twitch stops at about 1,000 clips per query; this Actor slices the window automatically to get **every clip** past that cap.
- **Videos mode: VODs, highlights and uploads** per channel or game, sorted by newest, trending or views, filtered by date.
- **topGames mode: the most watched categories** right now and the top live streams in each, or the top streams for the games you name.
- **"Only new clips" monitor** for scheduled runs: each run returns only clips it has not returned before.
- **One schema for Twitch and Kick**, with a link back to twitch.tv or kick.com on every row.
- **A run that doesn't die on one bad channel.** A misspelled, renamed or banned channel gives a free `problem` row and the run carries on.
- **No personal data.** Emails and phone numbers are removed from bios and titles; clip creators, follower lists and other viewer data are never output.

### Input

| Field | What it does |
|---|---|
| What to get (`mode`) | `channels`, `clips`, `videos` or `topGames`. |
| Twitch Client ID / Client Secret | Your Twitch app's keys (secret fields). |
| Kick Client ID / Client Secret | Optional, only for Kick channels. |
| Channels (`channels`) | Twitch logins, twitch.tv links, kick.com links or `kick:name`. Up to 10,000 per run. |
| Games or categories (`games`) | Twitch category names spelled as on Twitch (`Just Chatting`) or numeric ids. Used by clips, videos and topGames modes. |
| From / To (`startDate`, `endDate`) | `2026-11-01`, `2026-11-01T18:00:00Z` or relative (`7 days`, `24 hours`). Clips default to the last 7 days; for videos it filters on the creation date. |
| Max clips per channel or game (`maxClipsPerSource`) | Up to 1,000: one query, most viewed first. Above 1,000, or `0` for all: automatic window slicing. Default 100, or all with the monitor on. |
| Featured clips only | Only clips the channel marked as featured. |
| Only new clips since the last run (`monitor`) | For schedules; see [Monitor](#monitor-only-new-clips). |
| Monitor name (`monitorStateName`) | Optional; runs with the same name share one memory. Defaults to one per saved task. |
| Max videos, video type, sort, period | Videos mode. Twitch returns at most 500 videos for one game. |
| Top games (`maxGames`), top streams per game (`streamsPerGame`) | topGames mode. `streamsPerGame: 0` lists the games only. |
| Try follower totals (`includeFollowerTotals`) | See [Limits](#limits). |
| Max rows (`maxRows`) | Stop after this many channel, stream, clip and video rows. `0` = no limit besides your maximum charge. |

Example inputs:

```json
{ "mode": "channels", "channels": ["examplechannel", "https://www.twitch.tv/another_one", "kick.com/somekicker"] }
```

```json
{ "mode": "clips", "games": ["Just Chatting"], "startDate": "2026-11-01", "endDate": "2026-11-08", "maxClipsPerSource": 0 }
```

```json
{ "mode": "topGames", "maxGames": 20, "streamsPerGame": 10 }
```

### Output

One dataset, one row per item, with a `type`:

| `type` | When |
|---|---|
| `channel` | channels mode, one per channel (Twitch or Kick) |
| `stream` | topGames mode, one per live stream |
| `clip` | clips mode |
| `video` | videos mode |
| `game` | topGames mode, one per category |
| `problem` | a channel or game that could not be read, with `problem` and `message` |

Every row is free: you pay per API request (see [Pricing](#pricing)).

The dataset has ready-made views: Overview, Channels, Clips, Videos, and Top games and streams. Export to JSON, CSV or Excel, or read it through the Apify API.

The run's `SUMMARY` record (key-value store) holds rows per type and per channel or game, API requests charged, all API requests and rate-limit waits, clip-slicing counts, notes, and whether the app tokens were revoked.

### Pricing

**You pay for the software's work: the API requests it makes on your own key.** Every row is free. The data comes to you straight from the Twitch API and the Kick API under your own Twitch and Kick developer agreements; this Actor does not sell it.

- **$0.0025 per API request** (event `api-request`, shown as $2.50 per 1,000 requests): one per Twitch or Kick data request made with your keys, plus Apify's start fee of $0.00005 per run.
- **Free:** getting and revoking the run's app token, retries after a rate limit or a network error, and every row (`channel`, `stream`, `clip`, `video`, `game` and `problem`).
- **Follower totals cost one request per channel**, because Twitch answers them one channel at a time.

Requests per 1,000 rows (measured on the test server, see `COSTS.md` in the source):

| Mode | API requests per 1,000 rows |
|---|---|
| Twitch channels: info and live status (100 channels per request, 3 endpoints) | 30 |
| Twitch channels with follower totals | 1,030 |
| Clips: top 1,000 of a game, or every clip with window slicing | 14–17 |
| Videos, top streams | about 10 |
| Kick channels (50 per request) | 20 |
| Top games (game rows only) | 1 per 100 games |

A single-channel lookup is 1 to 3 requests: a Kick channel 1, a channel's videos 2, a Twitch channel's info and live status 3, plus 1 for its follower total.

What that costs:

- One Twitch channel's info and live status: about $0.0075.
- 1,000 Twitch channels: about $0.08.
- 1,000 clips: about $0.04.
- 1,000 channels with follower totals: about $2.58.

The Twitch and Kick APIs themselves cost nothing. Set a maximum charge per run in the run options to cap spending: the run stops cleanly before any request that would go over it, never starts a batch of channels it can't finish, keeps every row already read, and lists in `SUMMARY` what was not reached.

### Clips past the 1,000 cap

Twitch's Get Clips returns the most viewed clips of a window, but stops at about 1,000 per query. With `maxClipsPerSource` above 1,000 or `0`, a window that hits the cap is cut into four slices, and each slice again until every slice is under the cap (down to 15-minute slices). Every clip comes once. Rows then come slice by slice, newest slice first, with `rank` empty: sort the dataset by `viewCount` for one ranked list. A 15-minute slice that still holds more than ~1,000 clips is noted in `SUMMARY`; only its most viewed clips are returned.

### Monitor: only new clips

Turn on **Only new clips since the last run** and schedule the Actor or a saved task. The first run returns the clips of your window; every later run looks back from the previous run (with 6 hours of overlap for late clips) and returns only clips not returned before.

- **The memory keeps to Twitch's 24-hour storage limit.** It lives in a key-value store this Actor creates, named `stream-stats-state`, and holds only one-way hashes of clip ids, each with the time it was stored, plus the time of the last run. No titles, counts or other data. Every run forgets ids stored more than 23 hours ago, whether or not the channel or game was read to the end.
- **Schedule runs less than about 23 hours apart** (every hour, every 6 hours, twice a day) and you never see a clip twice. **Runs more than about 23 hours apart may repeat a few late clips:** the memory has expired by then, so the next run starts an hour before the previous run and returns again the clips made in that hour.
- **Every new clip, by default.** With the monitor on, `maxClipsPerSource` defaults to all. If you set a cap, a channel or game with more new clips than the cap comes in parts over several runs, and the run says so in its log and `SUMMARY`.
- Each saved task has its own memory, and runs started without a task get one memory per list of channels and games, unless you give a monitor name.
- If you stop the schedule, the last record stays in the store (hashes and times only) until you delete the store `stream-stats-state` in Console > Storage.

### Speed and rate limits

- Twitch gives each app about 800 requests a minute. The Actor reads the `Ratelimit-Remaining` and `Ratelimit-Reset` headers and pauses before the bucket runs dry, so it rarely sees a 429; when it does, it waits until the reset time and retries.
- If Twitch asks for a pause longer than 90 seconds, the run stops with a clear partial status: rows so far are kept, the rest are listed in `SUMMARY`.
- Kick publishes no rate limit, so Kick calls go one per second, 50 channels per call.
- Up to 4 channels or games are worked on at once. Requests needed: about 31 per 1,000 channels in channels mode, about 17 per 1,000 clips (window slicing included), 1 per 100 videos or streams, and 1 per 50 Kick channels. So a 2,000-channel live check uses well under a tenth of one minute's Twitch allowance.

### Your data, your keys, your terms

- **You run this tool on your own Twitch (and Kick) app.** You are the developer under the [Twitch Developer Services Agreement](https://legal.twitch.com/legal/developer-agreement/) and Kick's developer terms, and you must follow them. In particular:
  - **Twitch and Kick allow keeping API data for at most 24 hours.** Apify keeps run datasets for your plan's retention period (7 days or more), so delete each run's dataset (and its key-value store, which holds `SUMMARY`) within 24 hours: by hand in Console, with the API (`DELETE /v2/datasets/{id}`, `DELETE /v2/key-value-stores/{id}`) or with a follow-up step in your pipeline. Copies you make elsewhere fall under the same limit.
  - The data may not be sold, re-distributed or re-syndicated, and marketing or research uses (such as campaign analysis or targeting users) need a separate agreement with Twitch.
  - Keep your keys secret; never share or sell them.
- **This Actor stores nothing beyond the run's own storage.** No shared cache, no database. The only thing kept between runs is the monitor memory, in your own account: hashed clip ids that expire after 23 hours, and the time of the last run (see [Monitor](#monitor-only-new-clips)).
- Every row links back to twitch.tv or kick.com. Show Twitch video only through Twitch's own player (`embedUrl`).
- Only documented endpoints are called: no twitch.tv pages, no private GraphQL, no undocumented kick.com API.

### Errors, and what to do

- **"Twitch did not accept the Client ID and Client Secret"**: the run fails at once and nothing is charged. Check that both come from the same app and that the secret was not reset since. The message explains how to create an app at dev.twitch.tv.
- **No keys at all**: the run succeeds with one free `problem` row whose message is the 3-step set-up above.
- **`notFound`**: the login is misspelled or renamed, or the account is suspended or banned. Twitch's and Kick's APIs return nothing for all of these, so they can't be told apart.
- **`rateLimited`**: see [Speed and rate limits](#speed-and-rate-limits); run again later for the rest.
- **`notSupported`**: Kick channels in clips or videos mode. Kick's official API has no clips or VODs.
- **`blocked`**: the API answered with a bot check; it is never worked around, and the run stops reading that API.

### Limits

- **Follower totals.** Twitch documents a user token for its follower endpoint. With **Try follower totals** on, the Actor asks once per channel with your app token; if Twitch refuses, `followerCount` stays empty and `SUMMARY` says so. Kick's API has no follower counts.
- **Kick:** channel info, live status, viewers, category and subscriber count only. No clips, VODs or followers: Kick's official API doesn't have them, and its terms bar other ways.
- **Viewer-level data is never output**: no clip creators, followers or chatters.
- Get Clips needs a channel or a game: there is no "all of Twitch" clip list.
- Twitch's `vod_offset` can lag a few minutes behind new clips, and is empty when the VOD was deleted.

This Actor is not affiliated with, endorsed by or sponsored by Twitch or Kick. Twitch and Kick are trademarks of their owners.

This Actor's code was written with the help of AI.

# Actor input Schema

## `mode` (type: `string`):

channels: channel info and live status (Twitch and Kick). clips: top clips per channel or game, sorted by views. videos: recent VODs, highlights and uploads. topGames: the most watched categories and their top live streams.

## `twitchClientId` (type: `string`):

From your own app at dev.twitch.tv/console/apps (free; any OAuth Redirect URL such as http://localhost works). Stored encrypted; never logged or saved in the output.

## `twitchClientSecret` (type: `string`):

The Client Secret of the same Twitch app (Client Type: Confidential). Used only to get an app token, which the Actor revokes at the end of the run.

## `kickClientId` (type: `string`):

Only for Kick channels: the Client ID of your Kick app (Kick account > Settings > Developer).

## `kickClientSecret` (type: `string`):

The Client Secret of the same Kick app.

## `channels` (type: `array`):

Twitch logins (shroud), twitch.tv links, kick.com links or kick:name. Up to 10,000 per run. Kick channels work in channels mode only (Kick's official API has no clips or VODs).

## `games` (type: `array`):

Twitch category names exactly as Twitch spells them (Just Chatting, Fortnite) or numeric category ids. Used by clips, videos and topGames modes. Leave empty in topGames mode for the current top list.

## `startDate` (type: `string`):

Start of the time window: a date (2026-11-01), a date-time (2026-11-01T18:00:00Z) or a relative time (7 days, 24 hours). Clips: defaults to 7 days ago. Videos: optional filter on the creation date.

## `endDate` (type: `string`):

End of the time window, in the same formats. Defaults to now.

## `maxClipsPerSource` (type: `integer`):

Empty = 100, or all with the monitor on. Up to 1,000: one query, the most viewed clips of the window in Twitch's order. Above 1,000, or 0 for all: the window is sliced automatically to get past Twitch's ~1,000-per-query cap. With the monitor, a cap makes busy channels or games come in parts over several runs.

## `featuredClipsOnly` (type: `boolean`):

Only clips the channel has marked as featured.

## `monitor` (type: `boolean`):

For scheduled runs: each channel or game returns only clips this monitor has not returned before. To keep to Twitch's 24-hour storage limit, the memory (hashed clip ids, in the Actor's own store) forgets ids after 23 hours, so runs more than about 23 hours apart may repeat a few clips from just before the previous run.

## `monitorStateName` (type: `string`):

Optional. Runs with the same name share one memory. Defaults to one memory per saved task, or, for runs started without a task, one per list of channels and games.

## `maxVideosPerSource` (type: `integer`):

Videos per channel or game. Twitch returns at most 500 videos for one game.

## `videoType` (type: `string`):

archive = past broadcasts (VODs), highlight, upload, or all.

## `videoSort` (type: `string`):

time = newest first, trending, or views.

## `videoPeriod` (type: `string`):

Twitch's own period filter for videos: all, day, week or month.

## `maxGames` (type: `integer`):

topGames mode: how many of the most watched categories to list (up to 100).

## `streamsPerGame` (type: `integer`):

topGames mode: live streams per category, most viewers first. 0 lists the games only.

## `includeFollowerTotals` (type: `boolean`):

Channels mode: one extra API request per channel (each charged as one request). Twitch documents a user token for follower totals; if your app token is refused, followerCount stays empty and SUMMARY says so.

## `maxRows` (type: `integer`):

Stop after this many channel, stream, clip and video rows (0 = no limit besides your maximum charge). Game and problem rows are not counted. Every row is free; you pay per API request.

## Actor input object example

```json
{
  "mode": "channels",
  "channels": [
    "twitch",
    "twitchgaming"
  ],
  "featuredClipsOnly": false,
  "monitor": false,
  "maxVideosPerSource": 50,
  "videoType": "all",
  "videoSort": "time",
  "videoPeriod": "all",
  "maxGames": 20,
  "streamsPerGame": 10,
  "includeFollowerTotals": false,
  "maxRows": 0
}
```

# Actor output Schema

## `rows` (type: `string`):

One row per channel, stream, clip, video, game or problem, in one schema for Twitch and Kick.

## `summary` (type: `string`):

JSON record: rows per type, API requests charged, per-channel or per-game results, API requests and rate-limit waits, notes and whether the app tokens were revoked.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "mode": "channels",
    "channels": [
        "twitch",
        "twitchgaming"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("rivetfinch/stream-stats").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "mode": "channels",
    "channels": [
        "twitch",
        "twitchgaming",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("rivetfinch/stream-stats").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "mode": "channels",
  "channels": [
    "twitch",
    "twitchgaming"
  ]
}' |
apify call rivetfinch/stream-stats --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rivetfinch/stream-stats"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/wr1gAEJuZtPmqg4yh/builds/886pUA6HNTagpKzrL/openapi.json
