# Twitch Live Streams (`apt_marble/twitch-live-streams`) Actor

Collect the top live streams for any Twitch category: stream titles, viewer counts, channel names, follower counts and tags in one snapshot.

- **URL**: https://apify.com/apt_marble/twitch-live-streams.md
- **Developed by:** [Hamza](https://apify.com/apt_marble) (community)
- **Features:** Limited permissions
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 streams

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

## Twitch Live Streams

Pick one or more Twitch categories and get back a snapshot of the top live streams in each: stream titles, viewer counts, channel names, follower counts and tags. Built for anyone who tracks what is live right now: sponsorship teams finding active creators, game publishers watching their category, agencies scouting talent, and analysts measuring attention stream by stream.

### What you can do with it

- **Snapshot a category** — enter `Just Chatting` or `VALORANT` and get the top live streams by viewers back as clean rows.
- **Find active creators to sponsor** — every row carries the channel, its followers, partner status and what it is streaming now.
- **Track a launch or event** — re-run the same categories on a schedule and watch viewer counts and rankings move run by run.
- **Compare categories** — run several category names in one run and compare who is pulling viewers in each.
- **Filter by language** — narrow a category to one broadcast language for a reproducible, like-for-like list.

### What you get

One row per live stream, sorted by viewers within each category. Abridged sample of a single record:

```json
{
  "streamId": "54820391381",
  "title": "Ranked grind !drops",
  "categoryName": "VALORANT",
  "viewersCount": 6931,
  "startedAt": "2026-07-27T02:00:00Z",
  "streamType": "live",
  "channelName": "bigstreamer",
  "channelDisplayName": "BigStreamer",
  "channelId": "12345678",
  "channelFollowers": 800000,
  "isPartner": true,
  "isAffiliate": false,
  "thumbnailUrl": "https://static-cdn.jtvnw.net/previews-ttv/live_user_bigstreamer-440x248.jpg",
  "tags": ["English", "DropsEnabled"],
  "channelUrl": "https://www.twitch.tv/bigstreamer",
  "requestedCategory": "VALORANT"
}
```

### Input reference

| Setting | Type | Default | What it does |
| --- | --- | --- | --- |
| Category names | list of text | — | Twitch category names with exact spelling, e.g. `Just Chatting` or `VALORANT`. One snapshot of top streams is collected per category. **Required.** |
| Streams per category | whole number | `50` | How many of the top live streams to collect per category, sorted by viewers. Maximum 100. |
| Broadcast language | text | empty | Optional two-letter language filter, e.g. `EN`. Leave empty for the unfiltered directory mix. |
| Max items | whole number | `500` | Maximum stream rows across all categories. The actor works through your categories until this number is reached or the categories run out. Maximum 2,000. |

### Output fields

| Field | Type | Description |
| --- | --- | --- |
| `streamId` | text | Stable ID of the live stream. |
| `title` | text | Stream title as shown in the directory. |
| `categoryName` | text | Category the stream is listed under. |
| `viewersCount` | number | Live viewers at collection time. |
| `startedAt` | text | When the stream started (ISO date). |
| `streamType` | text | Stream kind, e.g. `live`. |
| `channelName` | text | Streaming channel's handle. |
| `channelDisplayName` | text | Display name with original casing. |
| `channelId` | text | Stable numeric Twitch ID for the channel. |
| `channelFollowers` | number | Channel followers at collection time. |
| `isPartner` | true/false | Whether the channel is a Twitch Partner. |
| `isAffiliate` | true/false | Whether the channel is a Twitch Affiliate. |
| `thumbnailUrl` | text | Live preview image. |
| `tags` | list of text | Stream tags such as language or DropsEnabled. |
| `channelUrl` | text | Clean link to the channel page. |
| `categoryId` | text | Stable ID of the queried category. |
| `categoryDisplayName` | text | Category display name. |
| `categoryViewers` | number | Total live viewers in the category. |
| `categoryFollowers` | number | Total followers of the category. |
| `requestedCategory` | text | The category name you entered for this row. |

### Pricing

You pay per stream row, with no monthly minimum.

### Limits & what this actor cannot do

- Each category returns a single snapshot of its top streams (up to 100) — deeper pages of the directory are not collected.
- Rows are a snapshot at the moment of collection; viewers, titles and rankings keep changing afterwards.
- Directory mixes vary by region and language; use the language filter for like-for-like runs.
- Unknown or misspelled category names are skipped, not charged — use the exact spelling shown in the Twitch directory.
- Fields a stream does not show come back empty rather than guessed.
- Speed depends on the size of the job and on Twitch's own response times; no fixed throughput is promised.
- Twitch's terms govern automated access. You are responsible for using the data lawfully and in line with the source site's terms, and for handling any personal data in line with applicable privacy law.

### FAQ

**Do I need a Twitch account?**
No. The actor reads only what Twitch shows in its directory — enter category names and press start.

**What counts as a category name?**
The exact game or category name as shown on Twitch, such as `Just Chatting`, `VALORANT` or `EA Sports FC 26`.

**How many streams can I collect per run?**
Up to 100 per category and 2,000 rows per run.

**Can I schedule it?**
Yes. Schedule it hourly, daily or weekly from the Apify console, and each run writes a fresh dataset you can compare against the last.

**Is the data complete?**
It covers the top of each requested category at collection time. Smaller streams below the snapshot cut-off are not included.

# Actor input Schema

## `categoryNames` (type: `array`):

Twitch category (game) names, e.g. "Just Chatting" or "VALORANT". Use the exact spelling shown in the Twitch directory. One snapshot of top streams is collected per category.

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

How many of the top live streams to collect per category, sorted by viewers. Maximum 100 — each category returns a single snapshot of its top streams.

## `language` (type: `string`):

Optional two-letter broadcast language filter, e.g. "EN". Leave empty for the unfiltered directory mix.

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

Maximum stream rows to collect across all categories. The actor works through your categories until this number is reached or the categories run out.

## Actor input object example

```json
{
  "categoryNames": [
    "Just Chatting"
  ],
  "maxStreamsPerCategory": 50,
  "language": "",
  "maxItems": 500
}
```

# Actor output Schema

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

Every row this run produced.

## `runSummary` (type: `string`):

What this run collected, and anything it could not read.

# 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 = {
    "categoryNames": [
        "Just Chatting"
    ],
    "maxStreamsPerCategory": 50,
    "language": "",
    "maxItems": 500
};

// Run the Actor and wait for it to finish
const run = await client.actor("apt_marble/twitch-live-streams").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 = {
    "categoryNames": ["Just Chatting"],
    "maxStreamsPerCategory": 50,
    "language": "",
    "maxItems": 500,
}

# Run the Actor and wait for it to finish
run = client.actor("apt_marble/twitch-live-streams").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 '{
  "categoryNames": [
    "Just Chatting"
  ],
  "maxStreamsPerCategory": 50,
  "language": "",
  "maxItems": 500
}' |
apify call apt_marble/twitch-live-streams --silent --output-dataset

```

## MCP server setup

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

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/nNUnGbTJhktqeAFoU/builds/6TDYWhVE7SRd4UjWM/openapi.json
