# Twitch Channel Scraper (`khadinakbar/twitch-channel-scraper`) Actor

Scrape public Twitch channels by username or URL — profile, live status, follower count, partner/affiliate type, recent videos (VODs), and top clips. HTTP-only via the Twitch GraphQL API, no login. MCP-ready.

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

## Pricing

from $4.00 / 1,000 channel scrapeds

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 Channel Scraper

Scrape public **Twitch channels** by username or URL and get a clean, structured record for each one — profile details, **live status**, follower count, partner/affiliate type, recent videos (VODs), and top clips. HTTP-only via the Twitch GraphQL API, **no login required**, and **MCP-ready** for AI agents.

### What it does

Give it a list of Twitch channels (usernames like `shroud`, or full URLs like `https://www.twitch.tv/pokimane`). For each channel it returns one record containing:

- **Identity** — login, display name, channel ID, bio, account creation date, account age.
- **Status** — partner / affiliate flags, broadcaster type.
- **Audience** — total follower count.
- **Live state** — whether the channel is live right now, plus live title, game/category, current viewer count, and stream start time. When offline, it returns the last-set title and category instead.
- **Most recent broadcast** — title and start time.
- **Recent videos (VODs)** — newest first, with view counts, duration, publish date, and game.
- **Top clips** — ranked by views within your chosen time window.
- **Branding** — profile avatar, banner, offline image, and channel color.

### When to use it

- **Influencer / sponsorship scouting** — size up a creator's audience and current activity before reaching out.
- **Streamer analytics & dashboards** — track follower counts and live status across many channels.
- **Esports & gaming research** — pull rosters of channels and what they're streaming.
- **AI agents** — a clean tool call: channel in, structured JSON out.

**Not** for scraping Twitch search results, categories/games, chat messages, or VOD transcripts — those are separate jobs.

### Output

One record per channel. Example (`detailed` format, trimmed):

```json
{
  "channelUrl": "https://www.twitch.tv/shroud",
  "login": "shroud",
  "channelId": "37402112",
  "displayName": "shroud",
  "description": "I'm back baby",
  "createdAt": "2012-11-03T15:50:32.878Z",
  "accountAgeYears": 13.6,
  "isPartner": true,
  "isAffiliate": false,
  "broadcasterType": "partner",
  "followerCount": 11300996,
  "isLive": true,
  "streamTitle": "GETTING MY DRIVERS LICENSE",
  "streamGame": "Forza Horizon 6",
  "streamViewers": 2629,
  "streamStartedAt": "2026-06-20T17:10:04Z",
  "streamType": "live",
  "lastBroadcastTitle": "GETTING MY DRIVERS LICENSE",
  "lastBroadcastStartedAt": "2026-06-20T17:10:04Z",
  "primaryColorHex": "#0000FF",
  "profileImageUrl": "https://static-cdn.jtvnw.net/jtv_user_pictures/...-300x300.png",
  "bannerImageUrl": "https://static-cdn.jtvnw.net/...",
  "recentVideos": [
    { "id": "2801374356", "title": "...", "viewCount": 246565, "durationSeconds": 10812, "publishedAt": "2026-06-17T17:05:31Z", "game": "Just Chatting", "url": "https://www.twitch.tv/videos/2801374356" }
  ],
  "topClips": [
    { "slug": "...", "title": "...", "viewCount": 91234, "durationSeconds": 30, "createdAt": "2026-06-12T...", "url": "https://clips.twitch.tv/..." }
  ],
  "found": true,
  "scrapedAt": "2026-06-20T19:00:00Z"
}
```

| Field | Type | Description |
|---|---|---|
| `login` | string | Lowercase Twitch username |
| `displayName` | string | Channel display name |
| `followerCount` | integer | Total followers |
| `broadcasterType` | string | `partner`, `affiliate`, or `""` |
| `isLive` | boolean | Currently streaming? |
| `streamTitle` / `streamGame` | string | Live (or last-set) title and category |
| `streamViewers` | integer | Current live viewers (null offline) |
| `recentVideos` | array | Recent VODs (newest first) |
| `topClips` | array | Top clips by views in the chosen window |
| `found` | boolean | `false` when a channel doesn't exist or fails |

Choose `responseFormat: "concise"` to drop images, videos, and clips for a smaller payload (handy for AI agents).

### Pricing

Pay-per-event:

- **Actor start** — $0.00005 per run.
- **Channel scraped** — **$0.004 per existing channel** returned. Channels that don't exist or fail are **not** charged.

A 100-channel run costs about **$0.40**. Pay-per-usage (compute + proxy) is also available — pick whichever billing fits at run time.

### Input

| Field | Required | Default | Description |
|---|---|---|---|
| `channels` | yes | — | Usernames or channel URLs |
| `maxVideos` | no | 10 | Recent videos per channel (0–100, 0 to skip) |
| `maxClips` | no | 10 | Top clips per channel (0–100, 0 to skip) |
| `clipsPeriod` | no | `LAST_MONTH` | `LAST_DAY` / `LAST_WEEK` / `LAST_MONTH` / `ALL_TIME` |
| `responseFormat` | no | `detailed` | `detailed` or `concise` |

#### Example input

```json
{
  "channels": ["shroud", "pokimane", "https://www.twitch.tv/xqc"],
  "maxVideos": 5,
  "maxClips": 5,
  "clipsPeriod": "LAST_WEEK"
}
```

### Run it

#### API (JavaScript)

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

const client = new ApifyClient({ token: 'YOUR_TOKEN' });
const run = await client.actor('khadinakbar/twitch-channel-scraper').call({
    channels: ['shroud', 'pokimane'],
    maxVideos: 5,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### API (Python)

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_TOKEN")
run = client.actor("khadinakbar/twitch-channel-scraper").call(
    run_input={"channels": ["shroud", "pokimane"], "maxVideos": 5}
)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["displayName"], item["followerCount"], item["isLive"])
```

#### MCP (AI agents)

Exposed as `khadinakbar/twitch-channel-scraper` through the [Apify MCP server](https://mcp.apify.com). An agent passes a channel list and gets structured JSON back — ideal for "how big is this streamer and are they live?" questions.

### FAQ

**Do I need a Twitch account or API key?** No. It uses Twitch's public, anonymous web GraphQL endpoint.

**Can it scrape private or subscriber-only data?** No. Public channel data only.

**Does it return live viewer counts?** Yes, when the channel is live (`streamViewers`). Counts are a snapshot at scrape time.

**What happens for a channel that doesn't exist?** You get a record with `found: false` and an `error` note, and you are not charged for it.

**How many channels per run?** No hard limit — pass as many as you like; cost scales linearly at $0.004 per existing channel.

### Legal

This actor collects only publicly available data from Twitch and does not bypass authentication or access private information. You are responsible for using the data in compliance with Twitch's Terms of Service, applicable laws (including data-protection laws such as GDPR/CCPA), and any third-party rights. This tool is intended for lawful purposes such as research, analytics, and business intelligence. It is not affiliated with or endorsed by Twitch Interactive, Inc.

# Actor input Schema

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

List of Twitch channels to scrape, as usernames or full channel URLs (e.g. "shroud" or "https://www.twitch.tv/pokimane"). @handles and URLs with extra path/query are accepted and normalized to the login. Each unique channel returns one dataset record. This is NOT a search query and NOT a category/game name — provide exact channel identities.

## `maxVideos` (type: `integer`):

How many recent videos (past broadcasts / VODs) to include per channel, newest first. Range 0–100; defaults to 10. Set 0 to skip videos entirely and reduce output size. Each video item carries id, title, viewCount, durationSeconds, publishedAt, game, and url.

## `maxClips` (type: `integer`):

How many top clips to include per channel, sorted by views within the selected period. Range 0–100; defaults to 10. Set 0 to skip clips. Each clip item carries slug, title, viewCount, durationSeconds, createdAt, and url.

## `clipsPeriod` (type: `string`):

Time window used to rank the top clips returned. One of LAST\_DAY, LAST\_WEEK, LAST\_MONTH, or ALL\_TIME; defaults to LAST\_MONTH. Only affects clips, not videos. Ignored when maxClips is 0.

## `responseFormat` (type: `string`):

Controls record richness. 'detailed' (default) returns all fields including images, recent videos, and top clips. 'concise' returns only core channel + live-status fields for a smaller, cheaper-to-read payload (useful for AI agents). Does NOT change pricing.

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

Proxy settings for outbound requests. Defaults to Apify datacenter proxy, which is sufficient for the Twitch GraphQL API. You normally do not need to change this.

## Actor input object example

```json
{
  "channels": [
    "shroud",
    "ninja"
  ],
  "maxVideos": 10,
  "maxClips": 10,
  "clipsPeriod": "LAST_MONTH",
  "responseFormat": "detailed",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

One record per Twitch channel with profile, live status, followers, videos, and clips. Download as JSON, CSV, Excel, HTML, or RSS.

# 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": [
        "shroud",
        "pokimane",
        "https://www.twitch.tv/xqc"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("khadinakbar/twitch-channel-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": [
        "shroud",
        "pokimane",
        "https://www.twitch.tv/xqc",
    ],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("khadinakbar/twitch-channel-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 '{
  "channels": [
    "shroud",
    "pokimane",
    "https://www.twitch.tv/xqc"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call khadinakbar/twitch-channel-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

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