# Twitch Top Streams & Games Scraper (`ninhothedev/twitch-streams-scraper`) Actor

$0.5/1K 🔥 Fast Twitch top streams scraper! Live streams & games by viewers — streamer, title, game & count. No key. JSON, CSV, Excel or API in seconds. Pull the directory for esports analytics & discovery ⚡

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

## Pricing

from $0.50 / 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.

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 Top Streams & Games Scraper

Scrape **Twitch's top live streams and top games** in seconds — no login, no API key, no Twitch developer app. Get live viewer counts, streamer names, stream titles, game/category, and start times, ready for esports analytics, streamer discovery, sponsorship research, and trend tracking.

Runs on **datacenter proxies** (or no proxy at all) and is priced to be cheap: roughly **$0.5 per 1,000 items**.

### What it does

This actor pulls structured data straight from Twitch's public web GraphQL endpoint — the same data twitch.tv shows on its Browse and Directory pages.

Two modes:

- **Top live streams** (`mode: streams`) — the biggest live streams right now, overall or filtered to specific games.
- **Top games** (`mode: games`) — the game categories ranked by current live viewers.

### Use cases

- **Esports analytics** — track which games and matches are pulling the most concurrent viewers in real time.
- **Streamer discovery** — surface the top broadcasters in any category to build talent shortlists.
- **Sponsorship & influencer research** — size a streamer's live audience and the game they play before you reach out.
- **Trend tracking** — monitor which games are rising or falling on Twitch day over day.

### Input

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `mode` | select | `streams` | `streams` = top live streams, `games` = top game categories by viewers. |
| `games` | array | `[]` | Only in `streams` mode. Exact Twitch game names (e.g. `Just Chatting`). Empty = top streams overall. |
| `limit` | integer | `30` | Items per query (1–100). |
| `maxItems` | integer | `100` | Total record cap (1–1000). |

#### Example — top live streams overall

```json
{ "mode": "streams", "limit": 30, "maxItems": 100 }
```

#### Example — top streams for specific games

```json
{ "mode": "streams", "games": ["Just Chatting", "League of Legends"], "limit": 20 }
```

#### Example — top games by viewers

```json
{ "mode": "games", "limit": 50 }
```

### Output

**Stream** record:

```json
{
  "type": "stream",
  "stream_id": "318541725271",
  "title": "DAY 2 — GTA V STORY MODE",
  "viewers": 62685,
  "streamer_login": "jynxzi",
  "streamer": "Jynxzi",
  "game": "Grand Theft Auto V",
  "started_at": "2026-07-20T14:55:35+00:00",
  "url": "https://twitch.tv/jynxzi",
  "source": "twitch",
  "scraped_at": "2026-07-20T20:00:00+00:00"
}
```

**Game** record:

```json
{
  "type": "game",
  "game_id": "509658",
  "name": "Just Chatting",
  "viewers": 451456,
  "url": "https://twitch.tv/directory/game/Just%20Chatting",
  "source": "twitch",
  "scraped_at": "2026-07-20T20:00:00+00:00"
}
```

Export to JSON, CSV, Excel, or hit the dataset API.

### Related actors

- [Twitch Channel Scraper](https://apify.com/ninhothedev/twitch-channel-scraper)
- [YouTube Search Scraper](https://apify.com/ninhothedev/youtube-search-scraper)
- [YouTube Channel Scraper](https://apify.com/ninhothedev/youtube-channel-scraper)
- [TikTok Scraper](https://apify.com/ninhothedev/tiktok-scraper)

### Notes

Only public data available on twitch.tv is collected. No credentials are used. Twitch is a trademark of its respective owner; this actor is not affiliated with or endorsed by Twitch.

**Keywords:** twitch scraper, twitch api, top live streams, twitch top games, twitch viewers, esports analytics, streamer discovery, twitch directory, live viewer count, twitch data export.

# Actor input Schema

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

What to scrape. 'streams' returns top live streams (overall, or per game if 'games' is set). 'games' returns the top game categories ranked by live viewers.

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

Only used in 'streams' mode. Provide exact Twitch game/category names (e.g. 'Just Chatting', 'League of Legends') to fetch top live streams for each. Leave empty to get top live streams overall.

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

How many items to request per query (top streams, top games, or per game). 1-100.

## `maxItems` (type: `integer`):

Hard cap on the total number of records pushed to the dataset. 1-1000.

## Actor input object example

```json
{
  "mode": "streams",
  "games": [
    "Just Chatting",
    "Grand Theft Auto V"
  ],
  "limit": 30,
  "maxItems": 100
}
```

# 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 = {
    "games": [
        "Just Chatting",
        "Grand Theft Auto V"
    ]
};

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

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

```

## MCP server setup

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

```

## OpenAPI specification

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