# Twitch Scraper (Live Streams, Viewers, Followers) (`webdatatools/twitch-scraper`) Actor

Scrape Twitch channel profiles with follower counts and live status, live streams by category with viewer counts and titles, and the top categories directory.

- **URL**: https://apify.com/webdatatools/twitch-scraper.md
- **Developed by:** [Murat Uzun](https://apify.com/webdatatools) (community)
- **Categories:** Social media, Videos, Marketing
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.20 / 1,000 rows

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?

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

### What is Twitch Scraper?

Twitch Scraper collects public Twitch data: channel profiles with follower counts and live status, the live streams in a category with viewer counts and titles, and the top categories directory. It uses Twitch's public web data, so no Twitch login or API key is needed.

### Why use Twitch Scraper?

- Live viewer counts and stream titles for any category, most viewed first.
- Follower counts and live status for any channel list.
- The top categories directory, with category IDs and box art, for trend and niche research.
- Pay only for rows saved.

### How to use Twitch Scraper

1. Enter channel names (`riotgames` or a Twitch channel URL) and/or exact category names (`Just Chatting`, `Minecraft`).
2. Set how many live streams to collect per category.
3. Optionally list the top categories (set the count, or 0 to skip).
4. Run it and download the dataset as JSON, CSV, Excel or HTML, or read it through the API.

### Example input

```json
{
    "channels": ["riotgames", "shroud"],
    "games": ["Just Chatting"],
    "maxStreamsPerCategory": 30,
    "topCategories": 10
}
```

### Example output

Real rows from a run on 2026-10-23.

Live stream in a category:

```json
{
    "kind": "stream",
    "source": "game",
    "query": "Just Chatting",
    "channelLogin": "kaicenat",
    "channelName": "KaiCenat",
    "streamId": "319664982487",
    "title": "UNBOXING IPHONE DUO + EXPLORING KYOTO JAPAN",
    "viewers": 34394,
    "gameName": "Just Chatting",
    "gameId": "509658",
    "language": "EN",
    "streamType": "live",
    "startedAt": "2026-10-23T01:09:40Z",
    "url": "https://www.twitch.tv/kaicenat",
    "categoryName": "Just Chatting",
    "position": 4
}
```

Channel profile (offline channel):

```json
{
    "kind": "channel",
    "source": "channel",
    "query": "riotgames",
    "channelLogin": "riotgames",
    "channelName": "Riot Games",
    "followers": 7362144,
    "createdAt": "2012-09-08T06:53:10.58539Z",
    "isLive": false,
    "url": "https://www.twitch.tv/riotgames"
}
```

### Data table

| `kind` | One row per | Main fields |
|---|---|---|
| `stream` | live stream in a category | channel, title, viewers, category, language, start time |
| `channel` | channel profile | followers, description, created date, live status and, when live, the current stream |
| `category` | category in the top directory | category ID, name, box art |

### Input parameters

- **Channels**: channel names or Twitch channel URLs.
- **Categories (games)**: exact Twitch category names. The Actor returns live streams, most viewed first.
- **Max live streams per category**: 1 to 1000. Twitch returns up to 100 per page.
- **Top categories (directory)**: how many top categories to list. 0 turns it off.

### Pricing

Pay per row saved (see the Actor page for the current price). The run stops before it would exceed your max total charge.

### Twitch Scraper vs. the Twitch API

The Twitch Helix API needs a registered application and tokens. This Actor uses the public web data that twitch.tv itself shows, so you can start with no account. It does not return VODs, clips, chat, or private or subscriber-only data.

### Using Twitch Scraper with AI agents and MCP

Use it from the Apify MCP server or the API with channel names or category names. Pay-per-event pricing is charged per row, so an agent that sets a `maxTotalChargeUsd` never goes over that budget.

### FAQ

**Why is a category empty?**
The category name must match Twitch's category name exactly (for example `Just Chatting`). A category with no live streams returns no stream rows.

**Why is `viewers` empty for a channel row?**
The channel is offline. Its profile is still returned, with `isLive` set to false.

**Are follower counts exact?**
They are the follower totals Twitch returns for the channel at the time of the run.

### Support and feedback

If you find a problem, open an issue in the Actor's Issues tab. A review helps other users find it.

# Actor input Schema

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

Twitch channel names, e.g. `riotgames`, `@riotgames` or `https://www.twitch.tv/riotgames`. Returns the profile, followers and live status.

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

Exact Twitch category names, e.g. `Just Chatting`, `Minecraft`. Returns the live streams in each category with viewers and titles.

## `maxStreamsPerCategory` (type: `integer`):

Live streams to collect for each category, most viewed first (Twitch order).

## `topCategories` (type: `integer`):

How many of the top Twitch categories to list (0 = none).

## Actor input object example

```json
{
  "channels": [
    "riotgames"
  ],
  "games": [
    "Just Chatting"
  ],
  "maxStreamsPerCategory": 30,
  "topCategories": 0
}
```

# Actor output Schema

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

All streams from 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 = {
    "channels": [
        "riotgames"
    ],
    "games": [
        "Just Chatting"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("webdatatools/twitch-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 = {
    "channels": ["riotgames"],
    "games": ["Just Chatting"],
}

# Run the Actor and wait for it to finish
run = client.actor("webdatatools/twitch-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 '{
  "channels": [
    "riotgames"
  ],
  "games": [
    "Just Chatting"
  ]
}' |
apify call webdatatools/twitch-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,webdatatools/twitch-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/guRHXh1ygEZaUitEf/builds/yDRcolKzg9j7CpTVH/openapi.json
