# Twitch Streamer & Channel Analytics (`zucchini_gopher_m2v/twitch-analytics-scraper`) Actor

Trending games/categories, global top live streams, top channels within a category, and per-channel trending-rank lookup -- no account or API key needed.

- **URL**: https://apify.com/zucchini\_gopher\_m2v/twitch-analytics-scraper.md
- **Developed by:** [Faisal Ahdan naufal](https://apify.com/zucchini_gopher_m2v) (community)
- **Categories:** Videos, Social media
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $7.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Twitch Streamer & Channel Analytics

Trending games/categories, platform-wide top live streams, top channels within a category, and per-channel trending-rank lookup — no account or API key needed.

### Why use this actor

- Market-level Twitch intelligence: what's trending right now, who's dominating a category, and where a specific streamer ranks
- Complements a single-channel profile lookup with genuinely different, cross-channel data
- No account, login, or API key required
- Automatic retries on temporary network hiccups
- Transparent about ranking accuracy — every ranked field is clearly labeled "approximate" because Twitch's own sort isn't perfectly ordered (see Known limits) — nothing is dressed up as more precise than it is

### How it works

Pick a `mode`:

1. **`top-games`** — trending games/categories by current viewer count, with how many channels are streaming each.
2. **`top-streams`** — the platform-wide top live streams right now.
3. **`game-streams`** — the top live channels within one specific game/category.
4. **`channel-rank`** — checks whether specific channel(s) are currently live and trending, reporting their approximate position in the platform-wide top 30 and in their category's top 30.

### Input

**Top games:**

```json
{ "mode": "top-games", "limit": 20 }
```

**Top live streams:**

```json
{ "mode": "top-streams", "limit": 30 }
```

**Top streams in a game:**

```json
{ "mode": "game-streams", "gameName": "Just Chatting", "limit": 30 }
```

**Channel trending rank:**

```json
{ "mode": "channel-rank", "logins": ["xqc", "shroud"] }
```

| Field | Type | Description |
|---|---|---|
| `mode` | string | `"top-games"` (default), `"top-streams"`, `"game-streams"`, or `"channel-rank"`. |
| `limit` | integer | Max results for `top-games`/`top-streams`/`game-streams`. Twitch caps this at 30 for streams, 100 for games (see Known limits). |
| `gameName` / `gameNames` | string / array | `game-streams` mode — exact game/category name(s) as shown on Twitch. |
| `login` / `logins` | string / array | `channel-rank` mode — channel login(s) to check. |
| `maxConcurrency` | integer | `game-streams`/`channel-rank` mode — how many items to process in parallel. Default 4. |
| `proxyConfiguration` | object | Apify Proxy settings. Residential is on by default. |

### Output

**Top games mode** — one record per game:

```json
{
  "_input": "top-games",
  "_source": "S1-gql",
  "_scrapedAt": "2026-08-25T20:07:18Z",
  "rankApprox": 4,
  "_approxSort": true,
  "gameId": "30921",
  "name": "Rocket League",
  "viewersCount": 126135,
  "broadcastersCount": 1174,
  "boxArtURL": "https://static-cdn.jtvnw.net/ttv-boxart/30921-{width}x{height}.jpg"
}
```

**Top streams / game streams mode** — one record per live stream:

```json
{
  "_input": "Just Chatting",
  "_source": "S1-gql",
  "_scrapedAt": "2026-08-25T20:07:39Z",
  "rankApprox": 5,
  "_approxSort": true,
  "streamId": "317579103844",
  "title": "EN MODE MARDI PRIME",
  "viewersCount": 18547,
  "createdAt": "2026-08-25T19:43:29Z",
  "broadcasterLogin": "anyme023",
  "broadcasterDisplayName": "Anyme023",
  "gameName": "Just Chatting"
}
```

**Channel rank mode:**

```json
{
  "_input": "xqc",
  "_source": "S1-gql",
  "_scrapedAt": "2026-08-25T20:07:44Z",
  "login": "xqc",
  "displayName": "xQc",
  "isLive": true,
  "viewersCount": 30580,
  "gameName": "Special Events",
  "globalRankApprox": 7,
  "globalRankNote": "position 7 within the platform-wide top 30 live streams",
  "categoryRankApprox": 3,
  "categoryRankNote": "position 3 within the top 30 live streams in 'Special Events'"
}
```

An offline channel returns `isLive: false` with a `note` explaining that ranking only applies while live. A record with `_error` instead means that item couldn't be processed (`"_error": "channel_not_found"` or `"_error": "game_not_found"`).

### Known limits

- **Ranks are approximate, not guaranteed-exact.** Twitch's own `VIEWER_COUNT` sort was confirmed live to NOT be strictly monotonic — a fetched "sorted" page can have a low-viewer stream sandwiched between two much higher ones. Every ranked field is prefixed `*Approx` and stamped with `_approxSort: true` for exactly this reason. Treat rank as "roughly where this sits," not a precise leaderboard position.
- **Only the top 30 (streams) or top 100 (games) are visible at all.** Twitch blocks deeper pagination for HTTP-only clients (a device-integrity check that can't be satisfied without a real browser). A channel outside the top 30 in both its category and platform-wide returns `null` for both rank fields — that doesn't mean they have zero viewers, just that they're outside the visible window.
- **No chat activity, follower-history/growth trends, or revenue estimates.** These aren't available from any public, unauthenticated Twitch endpoint (the old anonymous chatters endpoint is confirmed dead) — this actor won't fabricate numbers third-party sites compute from their own private historical archives.

# Actor input Schema

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

"top-games" lists trending games/categories by viewer count. "top-streams" lists the platform-wide top live streams. "game-streams" lists the top live channels within a specific game/category. "channel-rank" checks whether specific channel(s) are currently trending, with their approximate rank platform-wide and within their category.

## `limit` (type: `integer`):

"top-games"/"top-streams"/"game-streams" mode -- how many results to return. Twitch enforces a hard per-page ceiling for HTTP-only clients (30 for streams, 100 for games) -- see README for why deeper pagination isn't available.

## `gameName` (type: `string`):

"game-streams" mode -- the exact game/category name as it appears on Twitch (e.g. "Just Chatting", "League of Legends").

## `gameNames` (type: `array`):

"game-streams" mode only -- multiple game/category names to fetch in one run.

## `login` (type: `string`):

"channel-rank" mode -- a single Twitch channel login to check.

## `logins` (type: `array`):

"channel-rank" mode only -- multiple channel logins to check in one run.

## `maxConcurrency` (type: `integer`):

"game-streams"/"channel-rank" mode -- how many games/channels to process in parallel.

## `proxyConfiguration` (type: `object`):

Apify Proxy configuration. Residential is on by default.

## Actor input object example

```json
{
  "mode": "top-games",
  "limit": 30,
  "gameName": "Just Chatting",
  "login": "shroud",
  "maxConcurrency": 4,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `results` (type: `string`):

All scraped top-games / top-streams / game-streams / channel-rank records produced by this run.

# 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": "top-games",
    "limit": 30,
    "gameName": "Just Chatting",
    "login": "shroud",
    "maxConcurrency": 4,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("zucchini_gopher_m2v/twitch-analytics-scraper").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": "top-games",
    "limit": 30,
    "gameName": "Just Chatting",
    "login": "shroud",
    "maxConcurrency": 4,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("zucchini_gopher_m2v/twitch-analytics-scraper").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": "top-games",
  "limit": 30,
  "gameName": "Just Chatting",
  "login": "shroud",
  "maxConcurrency": 4,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call zucchini_gopher_m2v/twitch-analytics-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,zucchini_gopher_m2v/twitch-analytics-scraper"
        }
    }
}

```

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/IQzaJ7ISBaEvv2VxY/builds/ngcvGMT87v9tbVNkn/openapi.json
