# Twitch Scraper — Streams, Channels & Directory (`sian.agency/twitch-scraper`) Actor

Scrape Twitch (twitch.tv) live streams, channels & directories into clean structured data — viewers, followers, categories, clips, archive videos. Browse a category, search channels, or pull full channel profiles. JSON/CSV, no login or API key.

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

## Pricing

from $0.98 / 1,000 overview record extracteds

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 a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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 — Live Streams, Channels & Directory Data 🟣

[![SIÁN Agency Store](https://img.shields.io/badge/Store-SI%C3%81N%20Agency-1AE392)](https://apify.com/sian.agency?fpr=sian) [![Bilibili Scraper](https://img.shields.io/badge/Store-Bilibili%20Scraper-00A1D6)](https://apify.com/sian.agency/bilibili-video-scraper?fpr=sian) [![Douyin Scraper](https://img.shields.io/badge/Store-Douyin%20Scraper-161823)](https://apify.com/sian.agency/douyin-scraper?fpr=sian) [![Instagram Transcript](https://img.shields.io/badge/Store-Instagram%20Transcript-E4405F)](https://apify.com/sian.agency/instagram-ai-transcript-extractor?fpr=sian)

#### 🎉 Pull thousands of live streams, channels and clips into clean JSON — no login, no API key
##### Built for esports analysts, streamer-discovery teams, sponsorship researchers and growth marketers

---

### 📋 Overview

**Need structured Twitch data without wrangling an OAuth app or a browser farm?** This scraper turns Twitch's public catalog into clean datasets — live streams by category, channel profiles, keyword search results, clips and archive videos — one operation per run, one tidy dataset out.

**Why teams choose this scraper:**
- ✅ **Three data sources in one tool**: browse a category directory, search channels by keyword, or pull full channel profiles
- ⚡ **Fast and direct**: high-volume live-stream rows in seconds — no account, no captcha, no API key
- 🎯 **Rich records**: viewers, followers, partner/affiliate status, account age, current stream, last broadcast, tags, clips and archive videos
- 💰 **Pay-per-result**: only pay for records you actually receive — generous FREE tier to test first
- 💎 **Clean, typed output**: every field documented, ready for JSON/CSV/Excel export
- ✨ **NEW**: optional archive-video pulls and a per-row coverage score so you can gauge data quality at a glance

---

### ✨ Features

- 📺 **Category Directory**: pull every live stream for a game/category (e.g. `VALORANT`, `Just Chatting`), sorted by viewers
- 🔎 **Channel Search**: find channels by keyword with follower counts and live status
- 👤 **Full Channel Profiles**: follower count, account creation date, partner/affiliate flags, bio, avatar and banner
- 🔴 **Live Stream Data**: current viewers, stream title, category, tags and preview thumbnail
- 🎞️ **Recent Clips**: top clips per channel with view counts, duration and game
- 🎬 **Archive Videos**: optional past-broadcast pulls with view counts and length
- 🌐 **Language Filters**: restrict directory streams to specific broadcast languages
- 📊 **Coverage Score**: a 0–1 quality gauge on every row
- 📄 **Run Report**: an HTML summary of every run, saved to your key-value store

---

### 🎬 Quick Start

Pick a mode, give it a category, keyword or channel, and run. Results stream into your dataset and export to JSON, CSV or Excel. No setup, no credentials.

```bash
curl -X POST https://api.apify.com/v2/acts/sian.agency~twitch-scraper/runs?token=YOUR_TOKEN \
-H 'Content-Type: application/json' \
-d '{"scrapeMode": "overview", "sourceType": "directory", "game": "VALORANT"}'
````

***

### 🚀 Getting Started (3 Simple Steps)

#### Step 1: Choose a mode

**Overview** for many rows (category directory or channel search), or **Detail** for full profiles of specific channels.

#### Step 2: Provide your target

A category name, a search keyword, or one or more channel logins / URLs.

#### Step 3: Run and export

Start the actor and download your dataset as JSON, CSV or Excel.

**That's it! In under a minute, you'll have:**

- A clean dataset of streams or channels
- Engagement metrics (viewers, followers) ready to analyze
- An HTML run report with success/error counts

***

### 📥 Input Configuration

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| scrapeMode | string | No | `overview` (many rows) or `detail` (full profiles) |
| sourceType | string | No | Overview source: `directory` or `search` |
| game / games | string / array | No | Category/game for directory overview (single or bulk) |
| directoryUrl | string | No | Paste a Twitch directory URL instead of a category |
| searchTerm / searchTerms | string / array | No | Keyword(s) for channel search overview |
| searchUrl | string | No | Paste a Twitch search URL instead of a term |
| channel / channels | string / array | No | Channel login(s) or URL(s) for detail mode |
| includeVideos | boolean | No | Also pull archive videos in detail mode |
| sort | string | No | Directory sort: viewers high→low, low→high, or recent |
| languages | array | No | Restrict directory streams to broadcast languages |
| maxResults | integer | No | Cap records per run (FREE capped at 25) |
| maxPages | integer | No | Directory pages to fetch per category |

**Example — directory:**

```json
{
  "scrapeMode": "overview",
  "sourceType": "directory",
  "game": "Just Chatting",
  "sort": "VIEWER_COUNT",
  "maxResults": 100
}
```

**Example — channel search:**

```json
{
  "scrapeMode": "overview",
  "sourceType": "search",
  "searchTerm": "speedrun"
}
```

**Example — full channel detail:**

```json
{
  "scrapeMode": "detail",
  "channels": ["xqc", "https://www.twitch.tv/pokimane"],
  "includeVideos": true
}
```

***

### 📤 Output

Results are saved to the Apify dataset with **35+ fields** including:

| Field | Type | Description |
|-------|------|-------------|
| login | string | Channel login handle |
| display\_name | string | Channel display name |
| url | string | Public channel URL |
| is\_live | boolean | Whether currently broadcasting |
| viewers | number | Current concurrent viewers |
| game | string | Current category / game |
| stream\_title | string | Current live stream title |
| followers | number | Total follower count |
| is\_partner | boolean | Twitch Partner status |
| created\_at | string | Account creation date |
| tags | array | Stream freeform tags |
| clips | array | Recent clips (detail mode) |
| videos | array | Archive videos (detail mode, optional) |
| preview\_image\_url | string | Live stream thumbnail |
| coverage | number | Per-row data-quality score (0–1) |

**Example:**

```json
{
  "id": "71092938",
  "url": "https://www.twitch.tv/xqc",
  "source": "detail",
  "login": "xqc",
  "display_name": "xQc",
  "followers": 12502569,
  "is_partner": true,
  "is_live": false,
  "last_broadcast_game": "Just Chatting",
  "clip_count": 20,
  "coverage": 1,
  "status": "success"
}
```

***

### 💼 Use Cases & Examples

#### 1. Esports & Tournament Analytics

**Analysts tracking which streams and players draw the biggest audiences during an event.**

**Input:** A game category (e.g. `VALORANT`) in directory mode
**Output:** Live streams sorted by viewers, with titles, tags and categories
**Use:** Rank concurrent viewership across competing broadcasts in real time.

#### 2. Streamer & Influencer Discovery

**Talent and sponsorship teams building shortlists of channels in a niche.**

**Input:** A keyword in search mode, or a list of candidate logins in detail mode
**Output:** Follower counts, partner status, live status and recent clips
**Use:** Find and qualify creators by audience size and engagement.

#### 3. Sponsorship & Brand-Fit Research

**Marketers vetting channels before a partnership.**

**Input:** Channel logins in detail mode with `includeVideos`
**Output:** Account age, follower count, recent broadcast history and archive videos
**Use:** Assess consistency, reach and content fit before reaching out.

#### 4. Category & Trend Monitoring

**Researchers tracking which games and categories are surging.**

**Input:** Multiple categories in bulk directory mode
**Output:** Per-category live-stream counts and viewer totals
**Use:** Spot rising titles and shifting audience attention over time.

#### 5. Audience & Language Analysis

**Growth teams segmenting streams by broadcast language.**

**Input:** A category with `languages` filters
**Output:** Streams restricted to your target languages, with tags
**Use:** Size and compare regional audiences for a game.

#### 6. Content & Clip Curation

**Editors and social teams sourcing the best recent clips.**

**Input:** Channel logins in detail mode
**Output:** Top recent clips with view counts and durations
**Use:** Build highlight reels and social posts from proven clips.

***

### 🔗 Integration Examples

#### JavaScript/Node.js

```javascript
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_TOKEN' });

const run = await client.actor('sian.agency/twitch-scraper').call({
  scrapeMode: 'overview',
  sourceType: 'directory',
  game: 'VALORANT',
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items[0]);
```

#### Python

```python
from apify_client import ApifyClient
client = ApifyClient('YOUR_TOKEN')

run = client.actor('sian.agency/twitch-scraper').call(
    run_input={'scrapeMode': 'detail', 'channels': ['xqc', 'pokimane']}
)

for item in client.dataset(run['defaultDatasetId']).iterate_items():
    print(item)
```

#### cURL

```bash
curl -X POST 'https://api.apify.com/v2/acts/sian.agency~twitch-scraper/runs?token=YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"scrapeMode": "overview", "sourceType": "search", "searchTerm": "chess"}'
```

#### Automation Workflows (N8N / Zapier / Make)

1. **Trigger**: Schedule or webhook
2. **HTTP Request**: Call the actor API
3. **Process**: Handle JSON results
4. **Action**: Save, notify, or transform

***

### 📊 Performance & Pricing

#### FREE Tier (Try It Now)

- **25 records** per run — full feature access, same quality
- No credit card required
- Perfect for testing and small projects

#### PAID Tier (Production Ready)

- **Unlimited** records per run
- Faster processing, no delays
- Pay-per-result: only charged for successful records

💰 **Transparent pay-per-result pricing** — you're never charged for invalid input or failed fetches.

🔗 [View current pricing](https://apify.com/sian.agency/twitch-scraper?fpr=sian)

***

### ❓ Frequently Asked Questions

**Q: How many records can I extract?**
A: FREE tier: 25 per run. PAID tier: unlimited.

**Q: Do I need a Twitch account or developer key?**
A: No — the scraper reads only publicly available data. No login, no API key.

**Q: What output formats are available?**
A: JSON, CSV and Excel — export directly from the Apify dataset.

**Q: Can I scrape a specific channel's full profile?**
A: Yes — use Detail mode with one or more channel logins or URLs.

**Q: Can I get archive videos and clips?**
A: Clips come with every Detail run; enable **Also Pull Archive Videos** for past broadcasts.

**Q: Is this legal?**
A: Yes — we only extract publicly available data. See the legal section below.

**Q: How fresh is the data?**
A: Every run fetches live data at request time — viewers and live status are current.

***

### 🐛 Troubleshooting

**No results in directory mode**

- Use the exact category name as shown on Twitch (e.g. `Just Chatting`, not `just chatting room`)
- Try the directory URL field instead of a bare category name

**A channel returns "not found" in detail mode**

- Use the channel login (the name in `twitch.tv/<login>`), not the display name
- Remove a leading `@` — both `xqc` and `@xqc` work, but check the spelling

**Fewer rows than expected**

- FREE runs are capped at 25 records — upgrade for unlimited
- Deep directory pagination may be limited by Twitch; the run stops cleanly when reached

***

### ⚖️ Is it legal to scrape data?

Our actors are ethical and do not extract any private user data, such as email addresses, gender, or location. They only extract what the user has chosen to share publicly. We therefore believe that our actors, when used for ethical purposes by Apify users, are safe.

However, you should be aware that your results could contain personal data. Personal data is protected by the **GDPR** in the European Union and by other regulations around the world. You should not scrape personal data unless you have a legitimate reason to do so. If you're unsure whether your reason is legitimate, consult your lawyers.

You can also read Apify's blog post on the [legality of web scraping](https://blog.apify.com/is-web-scraping-legal/).

> **Disclaimer:** This is an independent tool and is not affiliated with, endorsed by, or sponsored by Twitch Interactive, Inc. "Twitch" is a trademark of its respective owner. This actor accesses only publicly available information.

***

### 🤝 Support

[![Telegram Support](https://img.shields.io/badge/Telegram-Support%20Group-0088cc?logo=telegram)](https://t.me/+vyh1sRE08sAxMGRi)

**Join our active support community**

- For issues or questions, open an issue in the actor's repository
- Check the [SIÁN Agency Store](https://apify.com/sian.agency?fpr=sian) for more automation tools
- 📧 <apify@sian-agency.online>

***

**Built by [SIÁN Agency](https://www.sian-agency.online)** | **[More Tools](https://apify.com/sian.agency?fpr=sian)**

# Actor input Schema

## `scrapeMode` (type: `string`):

**OVERVIEW** = cheap list mode. Get many live streams for a category, or search channels by keyword — fast, high-volume rows.

**DETAIL** = full mode. Give specific channels (logins / channel URLs) and get the complete record — follower count, account age, partner/affiliate status, current live stream, last broadcast, recent clips, and optionally archive videos.

## `sourceType` (type: `string`):

In **Overview** mode, choose the list source:

- **Directory** — live streams for a game/category (e.g. `VALORANT`, `Just Chatting`), sorted by viewers
- **Search** — channels matching a text keyword

Ignored in Detail mode.

## `game` (type: `string`):

**DIRECTORY OVERVIEW:** A Twitch category or game name to pull live streams for. Sorted by viewers.

**Examples:** `VALORANT`, `Just Chatting`, `League of Legends`, `Grand Theft Auto V`

💡 **TIP:** Use the exact category name as shown on Twitch — the directory resolves the canonical name automatically.

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

**BULK DIRECTORY:** Pull live streams for several categories in one go — each is fetched separately and all results land in the same dataset.

**TIER-BASED LIMITS:**

- **FREE users:** results capped per run
- **PAID users:** unlimited

💡 Click **Bulk edit** to paste one category per line.

## `directoryUrl` (type: `string`):

Paste a Twitch directory URL instead of a category name — the sort filter in the query string is preserved.

**Example:** `https://www.twitch.tv/directory/category/valorant`

When provided, this overrides the Category fields.

## `searchTerm` (type: `string`):

**SEARCH OVERVIEW:** A keyword to search Twitch channels for. Returns matching channels with follower counts and live-stream status.

**Examples:** `valorant`, `chess`, `speedrun`, `music`

## `searchTerms` (type: `array`):

**BULK SEARCH:** Run several channel searches in one go — each term is searched separately and all results land in the same dataset.

**TIER-BASED LIMITS:**

- **FREE users:** results capped per run
- **PAID users:** unlimited

💡 Click **Bulk edit** to paste one term per line.

## `searchUrl` (type: `string`):

Paste a Twitch search URL instead of a term.

**Example:** `https://www.twitch.tv/search?term=valorant`

When provided, this overrides the Search Term fields.

## `channel` (type: `string`):

**DETAIL MODE:** A Twitch channel to fetch in full. Accepts a login or a channel URL.

**Examples:**

- `xqc`
- `@xqc`
- `https://www.twitch.tv/xqc`

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

**BULK DETAIL:** A list of channels (logins / channel URLs) to fetch in full.

**TIER-BASED LIMITS:**

- **FREE users:** results capped per run
- **PAID users:** unlimited

💡 Click **Bulk edit** to paste one channel per line.

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

In **Detail** mode, also fetch each channel's recent archive videos (past broadcasts) with view counts, duration and game. Adds the videos to each channel record.

## `clipsFirst` (type: `integer`):

How many recent clips to fetch per channel in Detail mode.

## `videosFirst` (type: `integer`):

How many archive videos to fetch per channel when **Also Pull Archive Videos** is on.

## `sort` (type: `string`):

Order for **directory** streams: by viewer count (high→low), viewer count ascending (low→high), or most recent.

## `languages` (type: `array`):

Restrict directory streams to one or more broadcast language codes, e.g. `en`, `es`, `fr`, `de`, `pt`. Leave empty for all languages.

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

Hard cap on the total records saved this run. **FREE** runs are capped at 25 regardless of this value; **PAID** runs are unlimited.

## `maxPages` (type: `integer`):

How many directory pages to fetch per category (up to ~30 streams each). Page 1 is always available; deeper pagination may be gated by Twitch and stops cleanly.

## Actor input object example

```json
{
  "scrapeMode": "overview",
  "sourceType": "directory",
  "game": "VALORANT",
  "directoryUrl": "https://www.twitch.tv/directory/category/valorant",
  "searchTerm": "valorant",
  "searchUrl": "https://www.twitch.tv/search?term=valorant",
  "channel": "xqc",
  "includeVideos": false,
  "clipsFirst": 20,
  "videosFirst": 20,
  "sort": "VIEWER_COUNT",
  "maxResults": 100,
  "maxPages": 1
}
```

# Actor output Schema

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

The full dataset of scraped Twitch channels and live streams.

## `scrapingSummary` (type: `string`):

HTML summary showing successful and failed results with key metrics.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("sian.agency/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 = {}

# Run the Actor and wait for it to finish
run = client.actor("sian.agency/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 '{}' |
apify call sian.agency/twitch-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Twitch Scraper — Streams, Channels & Directory",
        "description": "Scrape Twitch (twitch.tv) live streams, channels & directories into clean structured data — viewers, followers, categories, clips, archive videos. Browse a category, search channels, or pull full channel profiles. JSON/CSV, no login or API key.",
        "version": "1.0",
        "x-build-id": "EKdrF1eZQeM8WK50p"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/sian.agency~twitch-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-sian.agency-twitch-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/sian.agency~twitch-scraper/runs": {
            "post": {
                "operationId": "runs-sync-sian.agency-twitch-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/sian.agency~twitch-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-sian.agency-twitch-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "scrapeMode": {
                        "title": "🧭 Scrape Mode",
                        "enum": [
                            "overview",
                            "detail"
                        ],
                        "type": "string",
                        "description": "**OVERVIEW** = cheap list mode. Get many live streams for a category, or search channels by keyword — fast, high-volume rows.\n\n**DETAIL** = full mode. Give specific channels (logins / channel URLs) and get the complete record — follower count, account age, partner/affiliate status, current live stream, last broadcast, recent clips, and optionally archive videos.",
                        "default": "overview"
                    },
                    "sourceType": {
                        "title": "📁 Overview Source (Overview mode)",
                        "enum": [
                            "directory",
                            "search"
                        ],
                        "type": "string",
                        "description": "In **Overview** mode, choose the list source:\n- **Directory** — live streams for a game/category (e.g. `VALORANT`, `Just Chatting`), sorted by viewers\n- **Search** — channels matching a text keyword\n\nIgnored in Detail mode.",
                        "default": "directory"
                    },
                    "game": {
                        "title": "🎮 Single Category / Game (Directory overview)",
                        "type": "string",
                        "description": "**DIRECTORY OVERVIEW:** A Twitch category or game name to pull live streams for. Sorted by viewers.\n\n**Examples:** `VALORANT`, `Just Chatting`, `League of Legends`, `Grand Theft Auto V`\n\n💡 **TIP:** Use the exact category name as shown on Twitch — the directory resolves the canonical name automatically.",
                        "default": "VALORANT"
                    },
                    "games": {
                        "title": "🚀 Bulk Categories / Games (Directory overview)",
                        "uniqueItems": true,
                        "type": "array",
                        "description": "**BULK DIRECTORY:** Pull live streams for several categories in one go — each is fetched separately and all results land in the same dataset.\n\n**TIER-BASED LIMITS:**\n- **FREE users:** results capped per run\n- **PAID users:** unlimited\n\n💡 Click **Bulk edit** to paste one category per line.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "directoryUrl": {
                        "title": "🔗 Directory URL (Directory overview, optional)",
                        "type": "string",
                        "description": "Paste a Twitch directory URL instead of a category name — the sort filter in the query string is preserved.\n\n**Example:** `https://www.twitch.tv/directory/category/valorant`\n\nWhen provided, this overrides the Category fields."
                    },
                    "searchTerm": {
                        "title": "🔎 Search Term (Search overview)",
                        "type": "string",
                        "description": "**SEARCH OVERVIEW:** A keyword to search Twitch channels for. Returns matching channels with follower counts and live-stream status.\n\n**Examples:** `valorant`, `chess`, `speedrun`, `music`"
                    },
                    "searchTerms": {
                        "title": "🚀 Bulk Search Terms (Search overview)",
                        "uniqueItems": true,
                        "type": "array",
                        "description": "**BULK SEARCH:** Run several channel searches in one go — each term is searched separately and all results land in the same dataset.\n\n**TIER-BASED LIMITS:**\n- **FREE users:** results capped per run\n- **PAID users:** unlimited\n\n💡 Click **Bulk edit** to paste one term per line.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "searchUrl": {
                        "title": "🔗 Search URL (Search overview, optional)",
                        "type": "string",
                        "description": "Paste a Twitch search URL instead of a term.\n\n**Example:** `https://www.twitch.tv/search?term=valorant`\n\nWhen provided, this overrides the Search Term fields."
                    },
                    "channel": {
                        "title": "👤 Single Channel (Detail mode)",
                        "type": "string",
                        "description": "**DETAIL MODE:** A Twitch channel to fetch in full. Accepts a login or a channel URL.\n\n**Examples:**\n- `xqc`\n- `@xqc`\n- `https://www.twitch.tv/xqc`"
                    },
                    "channels": {
                        "title": "🚀 Bulk Channels (Detail mode)",
                        "uniqueItems": true,
                        "type": "array",
                        "description": "**BULK DETAIL:** A list of channels (logins / channel URLs) to fetch in full.\n\n**TIER-BASED LIMITS:**\n- **FREE users:** results capped per run\n- **PAID users:** unlimited\n\n💡 Click **Bulk edit** to paste one channel per line.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "includeVideos": {
                        "title": "🎬 Also Pull Archive Videos (Detail mode)",
                        "type": "boolean",
                        "description": "In **Detail** mode, also fetch each channel's recent archive videos (past broadcasts) with view counts, duration and game. Adds the videos to each channel record.",
                        "default": false
                    },
                    "clipsFirst": {
                        "title": "🔢 Clips Per Channel (Detail mode)",
                        "minimum": 0,
                        "maximum": 100,
                        "type": "integer",
                        "description": "How many recent clips to fetch per channel in Detail mode.",
                        "default": 20
                    },
                    "videosFirst": {
                        "title": "🔢 Videos Per Channel (Detail mode)",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "How many archive videos to fetch per channel when **Also Pull Archive Videos** is on.",
                        "default": 20
                    },
                    "sort": {
                        "title": "↕️ Stream Sort (Directory overview)",
                        "enum": [
                            "VIEWER_COUNT",
                            "VIEWER_COUNT_ASC",
                            "RECENT"
                        ],
                        "type": "string",
                        "description": "Order for **directory** streams: by viewer count (high→low), viewer count ascending (low→high), or most recent.",
                        "default": "VIEWER_COUNT"
                    },
                    "languages": {
                        "title": "🌐 Stream Languages (Directory overview)",
                        "uniqueItems": true,
                        "type": "array",
                        "description": "Restrict directory streams to one or more broadcast language codes, e.g. `en`, `es`, `fr`, `de`, `pt`. Leave empty for all languages.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxResults": {
                        "title": "🔢 Max Records Per Run",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Hard cap on the total records saved this run. **FREE** runs are capped at 25 regardless of this value; **PAID** runs are unlimited.",
                        "default": 100
                    },
                    "maxPages": {
                        "title": "📄 Max Directory Pages",
                        "minimum": 1,
                        "maximum": 10,
                        "type": "integer",
                        "description": "How many directory pages to fetch per category (up to ~30 streams each). Page 1 is always available; deeper pagination may be gated by Twitch and stops cleanly.",
                        "default": 1
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
