# Twitch Scraper (`automation-lab/twitch-scraper`) Actor

Scrape Twitch channels, live streams, top games, clips, and VODs. Extract follower counts, viewer stats, stream titles, and clip data. Pure API scraper — fast, reliable, no browser needed. Export to JSON, CSV, or Excel.

- **URL**: https://apify.com/automation-lab/twitch-scraper.md
- **Developed by:** [Stas Persiianenko](https://apify.com/automation-lab) (community)
- **Categories:** Social media, Videos, MCP servers
- **Stats:** 162 total users, 55 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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/platform/actors/running/actors-in-store#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 Scraper: channels, streams, clips, games, and VODs

**Twitch Scraper** extracts data from [Twitch](https://www.twitch.tv) channels, live streams, top games, clips, and videos using Twitch's public API. No API key, no login, no browser needed.

Get **channel profiles** with follower counts, partner status, recent VODs, and top clips. Browse **top live streams** ranked by viewers. Discover **trending games** with viewer and broadcaster counts. Extract **clips** with view counts, durations, and curator info.

The easiest way to try it: [open Twitch Scraper](https://apify.com/automation-lab/twitch-scraper) on Apify, keep the default input, and click **Start**.

Built on Twitch's public GraphQL API — pure HTTP, no Playwright, no proxies, no anti-bot issues. Runs in **under 5 seconds** on 256 MB memory.

### Who is it for?

**Influencer marketing teams**

- Find streamers by game category, follower count, and partner status
- Track which channels are live and what games they play
- Build outreach lists with profile data and social metrics

**Esports and gaming analysts**

- Monitor live viewership across games and categories
- Track trending games by viewer and broadcaster count
- Analyze clip performance and viral content

**Content creators and streamers**

- Research competitors in your game category
- Track top clips from channels you follow
- Monitor viewership trends for scheduling decisions

**Data journalists and researchers**

- Study Twitch viewership patterns over time
- Analyze the gaming industry landscape
- Track streamer growth and engagement metrics

### Why use Twitch Scraper?

- **No API key or login required** — uses Twitch's public endpoint
- **Pure HTTP, no browser** — runs on 256 MB memory, finishes in seconds
- **6 scraping modes** — channels, search, top streams, game streams, top games, clips
- **Rich channel data** — followers, partner status, last broadcast, live status, VODs, clips
- **40% cheaper** than competing Twitch scrapers on the Store
- **Export anywhere** — JSON, CSV, Excel, or push to Google Sheets, Slack, and 5,000+ apps via Zapier/Make
- **Schedule and automate** — run on a schedule via Apify's built-in scheduler
- **Full API access** — call from Node.js, Python, cURL, or any HTTP client

### What data can you extract?

#### Channel Profiles (up to 1,000 channels per run)

| Field | Description |
|-------|-------------|
| `login` | Channel username |
| `displayName` | Display name |
| `description` | Channel bio |
| `profileImageUrl` | Avatar image URL |
| `bannerImageUrl` | Banner image URL |
| `url` | Channel page URL |
| `followersCount` | Total follower count |
| `isPartner` | Twitch Partner status |
| `isAffiliate` | Twitch Affiliate status |
| `isLive` | Currently streaming |
| `currentViewers` | Live viewer count |
| `streamTitle` | Current stream title |
| `currentGame` | Game being played |
| `lastBroadcastTitle` | Most recent broadcast title |
| `lastBroadcastGame` | Most recent broadcast game |
| `lastBroadcastDate` | When last broadcast started |
| `createdAt` | Account creation date |
| `recentVideos` | Last 5 VODs with titles, view counts, durations |
| `topClips` | Top 5 clips with view counts, URLs, curators |

#### Live Streams, Game Streams, Search Results

| Field | Description |
|-------|-------------|
| `broadcasterLogin` | Channel username |
| `broadcasterDisplayName` | Display name |
| `broadcasterFollowers` | Follower count |
| `title` | Stream title |
| `viewersCount` | Current viewer count |
| `game` | Game/category name |
| `startedAt` | Stream start time |
| `url` | Channel URL |

#### Top Games/Categories

| Field | Description |
|-------|-------------|
| `name` | Game/category name |
| `viewersCount` | Total viewers across all streams |
| `broadcastersCount` | Number of live channels |
| `boxArtUrl` | Game cover image |

#### Clips

| Field | Description |
|-------|-------------|
| `title` | Clip title |
| `url` | Clip URL |
| `viewCount` | View count |
| `durationSeconds` | Clip length |
| `game` | Game name |
| `channelLogin` | Source channel |
| `curatorLogin` | Who created the clip |
| `thumbnailUrl` | Clip thumbnail |

### How much does it cost to scrape Twitch?

This Actor uses **pay-per-event** pricing — you pay only for what you scrape.
No monthly subscription. All platform costs are **included**.

| | Free | Starter ($29/mo) | Scale ($199/mo) | Business ($999/mo) |
|---|---|---|---|---|
| **Per channel** | $0.00345 | $0.003 | $0.00234 | $0.0018 |
| **Per stream/game/clip** | $0.0023 | $0.002 | $0.00156 | $0.0012 |
| **1,000 channels** | $3.45 | $3.00 | $2.34 | $1.80 |

Higher-tier plans get additional volume discounts.

**Real-world cost examples:**

| Mode | Results | Duration | Cost (Free tier) |
|---|---|---|---|
| 2 channel profiles | 2 | ~3s | ~$0.01 |
| 30 top live streams | 30 | ~4s | ~$0.07 |
| 30 top games | 30 | ~4s | ~$0.07 |
| 30 clips from 2 channels | 30 | ~4s | ~$0.07 |

On Apify's **free plan ($5 credits)**, you can scrape approximately **1,400 channels** or **2,100 streams**.

### How to scrape Twitch data

1. Go to [Twitch Scraper](https://apify.com/automation-lab/twitch-scraper) on Apify Store
2. Select a **Scraping Mode** (Channel Profiles, Top Streams, etc.)
3. Enter the required input:
   - **Channel Profiles / Clips**: enter Twitch usernames
   - **Search Channels**: enter a search query
   - **Streams by Game**: enter the game name
   - **Top Streams / Top Games**: no input needed
4. Click **Start** and wait a few seconds
5. Download results as JSON, CSV, or Excel

**Example: Scrape 3 channel profiles**

```json
{
    "mode": "channels",
    "channelUsernames": ["shroud", "pokimane", "xqc"],
    "includeVideos": true,
    "includeClips": true
}
```

**Example: Get top 30 live streams**

```json
{
    "mode": "topStreams",
    "maxResults": 30
}
```

**Example: Get clips from a channel**

```json
{
    "mode": "clips",
    "channelUsernames": ["shroud"],
    "maxResults": 30,
    "clipPeriod": "LAST_MONTH"
}
```

### Input parameters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `mode` | string | `channels` | Scraping mode: `channels`, `searchChannels`, `topStreams`, `gameStreams`, `topGames`, `clips` |
| `channelUsernames` | array | `[]` | List of Twitch usernames. Used in `channels` and `clips` modes |
| `searchQuery` | string | — | Search query for `searchChannels` mode |
| `gameName` | string | — | Game name for `gameStreams` mode (e.g., "League of Legends") |
| `maxResults` | integer | `30` | Maximum results. Channel Profiles: unlimited. Other modes: up to 30 |
| `clipPeriod` | string | `LAST_WEEK` | Time range for clips: `LAST_DAY`, `LAST_WEEK`, `LAST_MONTH`, `ALL_TIME` |
| `includeVideos` | boolean | `true` | Include recent VODs (Channel Profiles mode) |
| `includeClips` | boolean | `false` | Include top clips (Channel Profiles mode) |

### Output example

**Channel profile:**

```json
{
    "id": "37402112",
    "login": "shroud",
    "displayName": "shroud",
    "description": "I'm back baby",
    "profileImageUrl": "https://static-cdn.jtvnw.net/jtv_user_pictures/...",
    "url": "https://www.twitch.tv/shroud",
    "followersCount": 11313275,
    "isPartner": true,
    "isAffiliate": false,
    "isLive": false,
    "currentViewers": null,
    "lastBroadcastTitle": "Ready or Not with friends",
    "lastBroadcastGame": "Ready or Not",
    "createdAt": "2012-11-03T15:50:32Z",
    "recentVideos": [
        {
            "id": "2724725765",
            "title": "Marathon stream",
            "viewCount": 260226,
            "durationSeconds": 27466,
            "game": "Marathon"
        }
    ]
}
```

### Tips for best results

- **Start small** — try 2-3 channels first, then scale up
- **Channel Profiles mode has no limit** — you can scrape hundreds of channels in a single run
- **Browse modes return up to 30 results** — Twitch limits browsing queries to 30 per request
- **Use exact game names** — for `gameStreams` mode, use the exact game name as shown on Twitch (e.g., "League of Legends", not "LoL")
- **Schedule regular runs** — track viewership trends by running the scraper on a schedule
- **Combine modes** — run multiple times with different modes to build comprehensive datasets
- **VODs and clips are optional** — disable them in Channel Profiles mode if you only need basic stats

### Integrations

- **Twitch Scraper -> Google Sheets** — export live stream rankings to a spreadsheet, updated hourly
- **Twitch Scraper -> Slack/Discord** — get alerts when specific streamers go live or hit viewer milestones
- **Twitch Scraper -> Make/Zapier** — trigger workflows when new top clips appear for tracked channels
- **Scheduled runs** — monitor game category trends daily and build historical viewership data
- **Webhooks** — process scraped channel data in real-time for influencer databases

### API usage

#### Node.js

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

const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });
const run = await client.actor('automation-lab/twitch-scraper').call({
    mode: 'channels',
    channelUsernames: ['shroud', 'pokimane'],
    includeVideos: true,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient('YOUR_API_TOKEN')
run = client.actor('automation-lab/twitch-scraper').call(run_input={
    'mode': 'channels',
    'channelUsernames': ['shroud', 'pokimane'],
    'includeVideos': True,
})
items = client.dataset(run['defaultDatasetId']).list_items().items
print(items)
```

#### cURL

```bash
curl "https://api.apify.com/v2/acts/automation-lab~twitch-scraper/run-sync-get-dataset-items" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "mode": "topStreams",
    "maxResults": 30
  }'
```

### 🤖 Agent and LLM workflow (Apify API / MCP-ready)

Use this actor as an agent-ready source for gaming, esports, influencer, and live-stream intelligence. It does **not** expose a native Twitch MCP endpoint; AI assistants can run it through Apify's API, Apify Integrations, or the Apify MCP server and then analyze the dataset results.

**Example agent task:** "Get the top 30 Twitch streams right now, group them by game, and identify five high-viewer channels that could fit an influencer campaign."

#### Call from an agent via API

```bash
curl "https://api.apify.com/v2/acts/automation-lab~twitch-scraper/runs?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"mode":"topStreams","maxResults":30}'

## After the run finishes, let the agent fetch and summarize the dataset
curl "https://api.apify.com/v2/datasets/DATASET_ID/items?format=json" \
  -H "Authorization: Bearer YOUR_APIFY_TOKEN"
```

#### Use through Apify MCP server

If your AI client supports MCP, connect the Apify MCP server and allow only this actor:

```bash
claude mcp add --transport http apify "https://mcp.apify.com?tools=automation-lab/twitch-scraper"
```

Then ask your assistant to run `automation-lab/twitch-scraper` with channel, stream, game, or clip inputs, wait for the Apify run to finish, and work with fields such as viewer counts, games, stream titles, followers, VODs, and clip metrics.

Learn more in the [Apify MCP documentation](https://docs.apify.com/platform/integrations/mcp).

### Legality and responsible use

Twitch Scraper accesses only **publicly available data** through Twitch's public API endpoints — the same data any visitor sees on twitch.tv. The scraper does not bypass any authentication, does not access private data, and does not violate CAPTCHA protections.

Web scraping of publicly available data is generally legal in the US and EU. However, you should always:

- Comply with applicable data protection laws (GDPR, CCPA)
- Use scraped data responsibly and ethically
- Avoid collecting personal data without a legitimate purpose
- Review Twitch's Terms of Service for your specific use case

### FAQ

**How fast is Twitch Scraper?**

Very fast. Channel profiles complete in under 1 second each. Browse modes (top streams, games, clips) return results in 3-5 seconds total. A run with 30 results typically costs under $0.08.

**How much does it cost to scrape 1,000 Twitch channels?**

On the Free tier: approximately $3.45 (start fee + $0.00345 per channel). On the Scale plan ($199/mo): approximately $2.34.

**Why does the scraper return a maximum of 30 results for stream/game/clip modes?**

Twitch's API enforces a per-request limit of 30 items for browsing queries. Channel Profiles mode is unaffected — you can scrape unlimited channels since each is a separate query. For browse modes, you get the top 30 results sorted by relevance/popularity.

**What if a channel username is wrong or doesn't exist?**

The scraper handles this gracefully — it logs a warning and continues with the remaining usernames. No crash, no failed run.

**Can I get historical data or past streams?**

The scraper returns the channel's 5 most recent VODs (when `includeVideos` is enabled) and clips within a selected time range. For historical viewership data, schedule regular runs and aggregate the data over time.

### Related actors

- [YouTube Scraper](https://apify.com/automation-lab/youtube-scraper) — extract videos, channels, playlists, and comments
- [YouTube Transcript Scraper](https://apify.com/automation-lab/youtube-transcript) — download video transcripts and captions
- [TikTok Scraper](https://apify.com/automation-lab/tiktok-scraper) — scrape TikTok profiles, videos, and hashtags
- [Twitter/X Scraper](https://apify.com/automation-lab/twitter-scraper) — extract tweets, profiles, and followers
- [Instagram Scraper](https://apify.com/automation-lab/instagram-scraper) — scrape posts, reels, stories, and profiles
- [Reddit Scraper](https://apify.com/automation-lab/reddit-scraper) — extract posts and comments from subreddits
- [LinkedIn Jobs Scraper](https://apify.com/automation-lab/linkedin-jobs-scraper) — scrape job listings by keyword and location

# Actor input Schema

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

Choose what to scrape from Twitch.

## `channelUsernames` (type: `array`):

Enter Twitch usernames (e.g., "shroud", "pokimane"). Used in Channel Profiles and Channel Clips modes.

## `searchQuery` (type: `string`):

Search term for finding channels. Used only in Search Channels mode.

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

Exact game/category name (e.g., "League of Legends" or "Just Chatting"). Used only in Streams by Game mode.

## `maxResults` (type: `integer`):

Maximum number of items to scrape. Channel Profiles mode processes the usernames you provide; other modes return up to 30 results per query.

## `clipPeriod` (type: `string`):

Time range for clips. Used in "Channel Clips" mode.

## `includeVideos` (type: `boolean`):

Fetch recent VODs for each channel (Channel Profiles mode). Adds ~5 videos per channel.

## `includeClips` (type: `boolean`):

Fetch top clips for each channel (Channel Profiles mode). Adds ~5 clips per channel.

## Actor input object example

```json
{
  "mode": "channels",
  "channelUsernames": [
    "shroud",
    "pokimane"
  ],
  "searchQuery": "gaming",
  "gameName": "Just Chatting",
  "maxResults": 10,
  "clipPeriod": "LAST_WEEK",
  "includeVideos": true,
  "includeClips": false
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

# 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",
    "channelUsernames": [
        "shroud",
        "pokimane"
    ],
    "searchQuery": "gaming",
    "gameName": "Just Chatting",
    "maxResults": 10,
    "clipPeriod": "LAST_WEEK",
    "includeVideos": true,
    "includeClips": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation-lab/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 = {
    "mode": "channels",
    "channelUsernames": [
        "shroud",
        "pokimane",
    ],
    "searchQuery": "gaming",
    "gameName": "Just Chatting",
    "maxResults": 10,
    "clipPeriod": "LAST_WEEK",
    "includeVideos": True,
    "includeClips": False,
}

# Run the Actor and wait for it to finish
run = client.actor("automation-lab/twitch-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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",
  "channelUsernames": [
    "shroud",
    "pokimane"
  ],
  "searchQuery": "gaming",
  "gameName": "Just Chatting",
  "maxResults": 10,
  "clipPeriod": "LAST_WEEK",
  "includeVideos": true,
  "includeClips": false
}' |
apify call automation-lab/twitch-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=automation-lab/twitch-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/fYNkekVm5JhPoRyce/builds/piZI5GzBMlYhpvWci/openapi.json
