# Twitch Scraper — Streams, Games, Channels & Clips API (`logiover/twitch-scraper`) Actor

Unofficial Twitch data API via Twitch's own GraphQL — no key, no login, no browser. Scrape top games, live streams, streamer/channel info, past videos (VODs) and top clips, plus channel & game search. Export Twitch datasets to JSON, CSV or Excel for creator discovery, gaming analytics & lead-gen.

- **URL**: https://apify.com/logiover/twitch-scraper.md
- **Developed by:** [Logiover](https://apify.com/logiover) (community)
- **Categories:** Games, Videos, Social media
- **Features:** Limited permissions
- **Stats:** 14 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.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.
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 Scraper — Live Streams, Top Games, Channels, Videos & Clips Data API (No Key)

![Twitch Scraper — Streams, Games, Channels & Clips API](https://img.shields.io/badge/Apify-Actor-00A67E?logo=apify\&logoColor=white) ![No API key](https://img.shields.io/badge/No%20API%20key-required-2ea44f) ![Pay per result](https://img.shields.io/badge/Pricing-Pay%20per%20result-1C7ED6) ![Social Media](https://img.shields.io/badge/Category-Social%20Media-8B5CF6) ![Export](https://img.shields.io/badge/Export-JSON%20%7C%20CSV%20%7C%20Excel-F59E0B)

An **unofficial Twitch scraper** and structured **Twitch data API** in a single Apify Actor. Pull the **top games, live streams, streamer & channel profiles, past broadcasts (VODs) and top clips**, plus channel & game **search** — powered directly by **Twitch's own public GraphQL** endpoint. No API key, no OAuth login, no registered developer app, no headless browser — just fast HTTP and clean, flat JSON you can export to CSV, Excel or JSON. **Seven modes share one input form**, and every result is tagged with `_mode` so you can mix modes in a single dataset and filter later.

> ### 🏆 Why this Twitch scraper?
>
> **7 modes in one Actor** · **thousands of live streams per run** · direct Twitch GraphQL (no browser) · no key, no OAuth, no dev app · 6 pre-built dataset views · export to JSON / CSV / Excel. The unofficial **Twitch API alternative** for creator discovery, gaming & esports analytics and streamer lead generation.

***

### ✨ What this Actor does / Key features

- 📡 **Top live streams** — sweep the whole live directory: the top games and up to 100 live streams each, aggregated into one high-volume dataset (thousands of streams per run).
- 🎮 **Top games / categories** — the games directory ranked by current viewers, with `viewersCount`, box art and a directory URL.
- 🕹️ **Live streams by game** — every visible live stream for a category with `title`, `viewersCount`, start time, freeform tags, game and full broadcaster details.
- 👤 **Channel / streamer profiles** — `login`, `displayName`, `description`, `followers`, partner/affiliate flags, account age, live status, current game and avatar/banner.
- 📼 **Videos (VODs)** — a channel's past broadcasts with `title`, `viewCount`, duration, publish date and game.
- ✂️ **Clips** — a channel's top clips with `title`, `viewCount`, duration, curator and game, filterable by time window.
- 🔎 **Search** — free-text search across channels (streamers) or games (categories).
- 🏷️ **Universal fields** — clean `twitchUrl`, plus `_mode` and `scrapedAt` (ISO 8601) on every item, and **6 pre-built views** (Overview, Streams, Games, Channels, Videos, Clips).
- ⚡ **No key, no browser** — reads Twitch's public GraphQL with the same anonymous web Client-ID your browser uses; fast, cheap HTTP.

### 🚀 Quick start (3 steps)

1. **Configure** — pick a **Mode** and fill the fields it needs (the input form shows which apply).
2. **Run** — click **Start**. The Actor calls Twitch's GraphQL and streams results into your dataset, each tagged with `_mode`.
3. **Get your data** — open the **Output / Dataset** tab, switch between the six views and export to **JSON, CSV, Excel, HTML, RSS or JSON Lines**, or pull it via the Apify API.

#### The 7 modes

| Mode | What it returns |
|---|---|
| `topStreams` | Sweep the top games and pull their live streams — the whole live directory (highest volume) |
| `topGames` | Top games / categories ranked by current viewers |
| `streamsByGame` | Live streams for one or more specific games |
| `user` | Channel / streamer profile for one or many logins (batch) |
| `videos` | A channel's past broadcasts / VODs |
| `clips` | A channel's top clips |
| `search` | Free-text search across channels or games |

### 📥 Input

Pick a `mode`, then fill only the fields that mode needs. Everything else is optional.

#### Example — sweep the top games for live streams (high-volume default)

```json
{
  "mode": "topStreams",
  "gameFanout": 30,
  "gameSort": "VIEWER_COUNT",
  "maxResults": 500
}
```

#### Example — batch channel/streamer profiles (lead-gen)

```json
{
  "mode": "user",
  "logins": ["shroud", "pokimane", "xqc", "ninja"]
}
```

#### Example — live streams for one game + top clips

```json
{
  "mode": "streamsByGame",
  "game": "VALORANT",
  "maxResults": 200
}
```

| Field | Type | Description |
|-------|------|-------------|
| `mode` | string | One of `topStreams`, `topGames`, `streamsByGame`, `user`, `videos`, `clips`, `search`. **Required.** |
| `gameSort` | string | Games-directory ordering (`topStreams`/`topGames`): `VIEWER_COUNT`, `RELEVANCE` or `NUM_FOLLOWERS`. |
| `gameFanout` | integer | How many top games `topStreams` sweeps for live streams (1–100). Default `30`. |
| `game` | string | Category name for `streamsByGame`, e.g. `Just Chatting`, `VALORANT`. |
| `games` | array | Batch of category names for `streamsByGame`. |
| `login` | string | Channel login for `user`/`videos`/`clips`, e.g. `shroud`. A full URL or `@handle` also works. |
| `logins` | array | Batch of channel logins for `user`, e.g. `["shroud","pokimane","xqc"]`. |
| `videoSort` | string | Video ordering (`videos`): `TIME` (newest) or `VIEWS`. |
| `clipPeriod` | string | Clip window (`clips`): `LAST_DAY`, `LAST_WEEK`, `LAST_MONTH` or `ALL_TIME`. |
| `clipSort` | string | Clip ordering (`clips`): `VIEWS_DESC`, `VIEWS_ASC`, `CREATED_AT_DESC` or `CREATED_AT_ASC`. |
| `query` | string | Free-text term for `search` mode. |
| `searchIndex` | string | Search target for `search`: `CHANNEL` (streamers) or `GAME` (categories). |
| `maxResults` | integer | Upper bound on rows returned. Drives the multi-game sweep for `topStreams`/`streamsByGame`. Default `300`. |

> **Note:** Twitch caps each request at 100 items and gates deep cursor pagination for guests, so this Actor maximises volume by fanning out across games and channels rather than paging one endless list.

### 📤 Output

Results stream to the default dataset; every item carries a `_mode` field so you can filter or pivot. Six pre-built views (Overview, Streams, Games, Channels, Videos, Clips) slice the data with zero post-processing. Trimmed sample rows:

```json
{
  "_mode": "topStreams",
  "login": "shroud",
  "displayName": "shroud",
  "title": "ranked grind",
  "gameName": "VALORANT",
  "viewersCount": 28450,
  "startedAt": "2026-07-06T09:12:00Z",
  "tags": ["English", "FPS"],
  "isPartner": true,
  "thumbnailUrl": "https://static-cdn.jtvnw.net/previews-ttv/...",
  "twitchUrl": "https://www.twitch.tv/shroud",
  "scrapedAt": "2026-07-06T12:00:00Z"
}
```

```json
{
  "_mode": "user",
  "login": "pokimane",
  "displayName": "pokimane",
  "followers": 9420000,
  "isPartner": true,
  "isAffiliate": false,
  "isLive": false,
  "liveGame": null,
  "description": "hi i'm poki",
  "profileImageUrl": "https://static-cdn.jtvnw.net/jtv_user_pictures/...",
  "twitchUrl": "https://www.twitch.tv/pokimane",
  "scrapedAt": "2026-07-06T12:00:00Z"
}
```

<details>
<summary><b>📋 Full field reference (click to expand)</b></summary>

| Field | Modes | Description |
|-------|-------|-------------|
| `_mode` | all | Which endpoint produced the row |
| `twitchUrl` | all | Canonical Twitch URL for the stream / channel / game / clip |
| `scrapedAt` | all | Scrape timestamp (ISO 8601) |
| `login` / `displayName` | streams, user, search | Channel login and display name |
| `title` | streams, videos, clips | Stream / video / clip title |
| `gameName` | streams, videos, clips | Game being played |
| `viewersCount` | streams, games | Current live viewers |
| `startedAt` | streams | When the stream went live |
| `tags` | streams | Freeform stream tags |
| `isPartner` / `isAffiliate` | streams, channels | Partner / affiliate flags |
| `thumbnailUrl` | streams, videos | Preview image |
| `rank` / `name` / `gameId` / `boxArtUrl` | games | Directory rank, game name, ID, box art |
| `followers` | channels | Channel follower count |
| `isLive` / `liveGame` / `liveViewers` | channels | Live status and current game/viewers |
| `description` / `profileImageUrl` | channels | Bio and avatar |
| `channelName` | videos, clips | Owning channel |
| `viewCount` | videos, clips | View count |
| `durationMinutes` / `publishedAt` | videos | VOD length and publish date |
| `durationSeconds` / `createdAt` / `curatorName` | clips | Clip length, created date and who clipped it |

</details>

#### Additional output fields

These fields are also present in the dataset:

| Field | Type | Description |
|---|---|---|
| `bannerImageUrl` | string | Banner image url |
| `broadcasterId` | string | Broadcaster id |
| `currentGame` | string | Current game |
| `directoryGame` | string | Directory game |
| `isStaff` | string | Is staff |
| `lastBroadcastAt` | string | Last broadcast at |
| `lastBroadcastTitle` | string | Last broadcast title |
| `liveStartedAt` | string | Live started at |
| `liveTitle` | string | Live title |
| `primaryColorHex` | string | Primary color hex |
| `streamId` | string | Stream id |
| `userId` | string | User id |

### 💡 Use cases

- **Creator & influencer discovery** — find streamers by game or keyword, rank channels by followers and live viewers, and build outreach lists for sponsorships and brand deals.
- **Gaming & esports analytics** — track which games top the directory over time, measure category viewership, and benchmark titles by concurrent viewers.
- **Live stream monitoring** — snapshot who is live in a category right now, with viewer counts, titles and tags, on a schedule.
- **Lead-gen for streamers** — export channel profiles (followers, partner status, current game, bio) as a clean CSV for sales and talent scouting.
- **Recommendation engines & ML** — bulk-ingest streams, games, clips and channels to train content or collaborative recommenders.
- **AI agents & RAG** — wrap the Actor as a tool so an LLM can answer "who are the top VALORANT streamers live now?" or embed clip and VOD metadata.

### 👥 Who uses it

Influencer-marketing & talent agencies · gaming and esports analysts · brand & sponsorship teams · recommendation-engine and ML developers · data scientists and AI-agent builders · streamers and community managers tracking the directory.

### 💰 Pricing

This Actor runs on a simple **pay-per-result** model — you pay for the rows you extract, with no separate Apify platform fees to calculate. Try it on the **free tier** first, then scale up. See the **Pricing** tab on this page for the current rate.

### ❓ Frequently Asked Questions

**Is it legal to scrape Twitch?**
The Actor collects only publicly available directory and profile data through Twitch's own public GraphQL. You are responsible for using the data in compliance with Twitch's Terms and applicable laws.

**Does Twitch have a public API, and is this a Twitch API alternative?**
Twitch's official Helix API requires a registered developer app and OAuth tokens. This Actor works as an unofficial Twitch API and a practical **Twitch API alternative**: you send structured input and get structured JSON back, without registering a Helix app, managing OAuth, or hitting official rate limits.

**Can I scrape Twitch without login or an API key?**
Yes. This unofficial Twitch scraper reads publicly available data through Twitch's own public GraphQL endpoint, using the same anonymous web Client-ID your browser uses. You only need an Apify account — no Twitch API key, no OAuth, no registered developer app, no login.

**How do I get Twitch top games / directory data?**
Use `topGames` for the categories ranked by current viewers, or `topStreams` to also pull the live streams inside each of those games. Both return `viewersCount` so you can chart directory trends over time.

**How do I find streamers by game?**
Use `streamsByGame` with the category name (e.g. `VALORANT`) to list everyone live in that game right now, with viewer counts and full broadcaster details. For keyword or name lookups, use `search` with `searchIndex: "CHANNEL"`.

**Can I scrape Twitch clips and VODs?**
Yes. `clips` returns a channel's top clips (filter by last day/week/month/all time and sort by views or date), and `videos` returns past broadcasts / VODs with view counts, duration and game.

**How much data can one run return?**
The `topStreams` mode sweeps many games and pulls up to 100 live streams per game, so a single run easily yields thousands of live-stream rows. Twitch caps each request at 100 items and gates deep cursor pagination for guests, so the Actor maximises volume by fanning out across games and channels.

**How do I export Twitch data to CSV, JSON or Excel?**
Run any mode and download the dataset as CSV, JSON, Excel (XLSX), HTML, RSS or JSON Lines from the run page, or pull it via the Apify API — a simple Twitch data export and streaming dataset tool.

**Does it work for esports / brand-safety monitoring?**
Yes. Snapshot live streams in a category on a schedule to monitor who is broadcasting, their titles, tags and viewer counts — useful for esports tracking, sponsorship measurement and brand-safety review.

### 🔗 More social & media scrapers by logiover

Building a cross-platform creator or media dataset? Pair Twitch with the rest of the logiover social-media suite:

| Platform | Actor |
|---|---|
| ▶️ YouTube | [YouTube Channel Scraper](https://apify.com/logiover/youtube-channel-scraper) · [YouTube Search Scraper](https://apify.com/logiover/youtube-search-scraper) |
| 🎵 TikTok | [TikTok Hashtag Video Scraper](https://apify.com/logiover/tiktok-hashtag-video-scraper) |
| 🧵 Threads | [Threads Scraper](https://apify.com/logiover/threads-scraper) |
| 👽 Reddit | [Reddit Subreddit Scraper](https://apify.com/logiover/reddit-search-scraper) |
| 🎮 Steam | [Steam Game Reviews Scraper](https://apify.com/logiover/steam-game-reviews-scraper) |
| 🎬 IMDb | [IMDb Scraper](https://apify.com/logiover/imdb-scraper) |
| 📺 TVmaze | [TVmaze Scraper](https://apify.com/logiover/tvmaze-scraper) |
| 🎧 Podcasts | [Apple Podcasts Episode Scraper](https://apify.com/logiover/apple-podcasts-episode-scraper) |

👉 Browse all **[logiover scrapers on Apify Store](https://apify.com/logiover)** — 180+ actors across real estate, jobs, crypto, social media & B2B data.

### ⏰ Scheduling & integration

Schedule this Actor on Apify to snapshot the Twitch directory or specific channels daily or weekly. Export results to JSON, CSV or Excel, sync to Google Sheets, or push to your database, BI tools and webhooks through the Apify API. Call it from your stack via `run-sync-get-dataset-items`, the JavaScript/Python clients, or no-code tools like **Make, n8n and Zapier**.

### 🤖 AI Agents, MCP & RAG Integration

**Twitch Scraper** works natively as an on-demand data tool for AI assistants and autonomous workflows.

Connect this Actor directly to **Apify AI**, **Claude Desktop**, **Cursor**, **VS Code**, **Windsurf**, **LangChain**, or **LlamaIndex** via the official **Apify MCP Server** — no custom wrapper code needed:

```json
{
  "mcpServers": {
    "apify": {
      "type": "http",
      "url": "https://mcp.apify.com?tools=logiover/twitch-scraper"
    }
  }
}
```

- **Schema-typed inputs & outputs:** Clean JSON records with explicit `.actor/input_schema.json` and `.actor/output_schema.json` definitions so LLM agents infer parameters and parse fields accurately without HTML noise.
- **Bounded & predictable runs:** Built-in volume caps and pay-per-result budget guards prevent runaway agent tool loops.
- **RAG & automation ready:** Stream run datasets straight into vector stores, n8n, Make, Zapier, or webhook pipelines.

### 💬 Support, Issues & Reviews

- **Bug reports & target-site changes:** Hit an unexpected empty result or selector change? [Open a ticket in the Issues tab](https://apify.com/logiover/twitch-scraper/issues) with your **Run ID** or sample input — we actively monitor issues and ship fixes fast.
- **Feature & field requests:** Need an additional data attribute or filter? [Request it in the Issues tab](https://apify.com/logiover/twitch-scraper/issues).
- **Enjoying this Actor?** If it saved you engineering time, please consider leaving an honest [review on Apify Store](https://apify.com/logiover/twitch-scraper/reviews) or bookmarking [logiover/twitch-scraper](https://apify.com/logiover/twitch-scraper) — organic developer feedback helps others discover reliable tools and keeps maintenance prioritized.

### ⚖️ Legal

This Actor extracts only publicly available data and is intended for legitimate research, analytics and lead-generation use. You are responsible for complying with Twitch's Terms of Service and any applicable local laws.

***

This Actor is an independent tool. It is not affiliated with, endorsed by, or sponsored by Twitch; Twitch and all other trademarks mentioned here are the property of their respective owners.

### Twitch scraping — frequently asked questions

#### Do I need a Twitch API key, account or login?

No. This Actor reads publicly available pages and feeds, so there is nothing to register for and no credentials to manage.

#### How do I export Twitch data to CSV, Excel, JSON or Google Sheets?

Open the **Storage** tab after a run and pick the format you want — CSV, Excel, JSON, XML or an HTML table. For Google Sheets, Airtable or a database, use the dataset URL or the Apify API so the sheet refreshes itself on every run.

#### Can I schedule this Twitch scraper to run daily or hourly?

Yes. Use the **Schedules** tab and pick a cadence. Daily is enough for most tracking work; pick hourly only if the rows you care about really do change that fast.

#### How many rows can I get, and what does it cost?

See the volume section above for a measured figure. Billing is per result, so you pay for the rows you actually receive and a run that finds nothing costs nothing.

#### Is scraping Twitch legal?

This Actor collects only information that Twitch publishes publicly. It does not log in, does not defeat access controls and does not touch private data. You remain responsible for how you use the output, including under GDPR and similar rules where personal data is involved.

#### What happens if Twitch blocks the run or changes its layout?

A refused exit IP is swapped for a fresh one within a quarter of a second and retried, and rate limiting is waited out rather than fought. If nothing gets through, the run **fails with the reason** instead of reporting success with zero rows — so an empty result always means "no matches", never "the source would not answer".

#### Can I use this with an AI agent, LangChain or an MCP client?

Yes. The Actor is callable over the Apify API and through Apify's MCP server, so an agent can run it and read the dataset back as a tool call.

### 📝 Changelog

#### 2026-11-14

- Verified live high-volume benchmark (2026-11-14): extracted **650** structured records in **5.0s** on the production build.
- Hardened internal proxy stall fallback and pay-per-event dataset instance budget protection.

#### 2026-11-11

- Added reliable terminal run status telemetry and structured Apify AI / MCP Server (`mcp.apify.com`) tool configuration.
- Added direct Issues & Reviews support links and refreshed live maintenance verification.

#### 2026-11-01

- Monthly health check (2026-11-01): a live run on the current build completed successfully and returned data. Input options, output fields and pricing are unchanged.
- README refreshed: 1 link to renamed Actors updated, 3 links to retired Actors removed; independence disclaimer added; documented 12 additional output fields.

#### 2026-10-15

- A run that reaches its maximum cost per run now stops cleanly with its results saved and a status message, instead of ending as aborted.
- A proxy group your account cannot use no longer stops the run at start-up; it falls back to the default Apify Proxy.
- Runs with a short timeout (API and AI-agent calls) now finish inside it with what they collected, instead of being cut off.
- Memory is managed within the run's own limit, which removes a rare out-of-memory crash on large pages.
- The prefilled example for `maxResults` is now 200 (was 300).
- The default used when the field is left out for `maxResults` is now 4,000 (was 300).

#### 2026-09-23

- Fleet-wide quality audit. Verified end to end against live data and re-checked the input schema, the output columns and the run configuration.
- Run reliability reviewed: 100.0% of public runs succeeded in the last 30 days.
- Input schema, output schema and pricing configuration reviewed.

#### 2026-09-01

- Fleet-wide health check. Verified against this Actor's real run history: 30-day success rate, output row counts, per-field fill rates, and peak memory against the configured memory limit.
- Reviewed for the failure patterns that have cost this fleet runs — unguarded proxy setup, retry loops that can outlast the run's own time budget, and full-page HTML parsing that can exhaust a small container.
- No change to input, output fields or scraping logic.

#### 2026-08-11

- Maintenance release: refreshed the build and dependencies.
- Re-verified live execution, non-empty structured output and dataset field/type integrity.
- Reviewed reliability (retries, pagination) and output quality as part of a full-fleet QA pass.

#### 2026-08-01

- Completed the August 2026 full health check: verified empty/programmatic default, Console UI default, and two source-informed alternative inputs on Apify.
- Confirmed successful live execution, non-empty structured output, dataset-field/type integrity, and logical sample quality within the 5-minute quality window.
- Declared 20 dataset fields from typed live cloud samples so the output contract is no longer an empty placeholder.
- Declared 34 nullable dataset fields from typed live cloud samples so the output contract is no longer an empty placeholder or brittle to sparse modes.
- Added source-emitted channelName and integer viewCount fields for videos/clips to the top-level dataset contract.

#### 2026-07-06

- ✨ README overhaul: shields.io badges, richer multi-mode output samples with full field reference, ready-to-run example scenarios, social-media suite cross-links, expanded keyword-gap FAQ and clearer quick-start.

#### 2026-07-01

- Initial release: seven Twitch modes (top streams, top games, streams by game, channel profiles, videos, clips, search) over Twitch's public GraphQL — no key, no login, no browser.

***

\*Maintained: last verified 2026-11-14 — checked end-to-end against live run history (reliability, output fields and types, and time/memory budgets).

# Changelog

This Actor's version history is a separate document: https://apify.com/logiover/twitch-scraper/changelog.md

# Actor input Schema

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

Which Twitch endpoint to run.

• **topStreams** — sweep the top games and pull live streams for each; aggregates the whole live directory (highest volume)
• **topGames** — top games / categories ranked by current viewers
• **streamsByGame** — live streams for one or more specific games
• **user** — channel / streamer profile for one or more logins (batch)
• **videos** — a channel's past broadcasts / VODs
• **clips** — a channel's top clips
• **search** — free-text search across channels or games

## `gameSort` (type: `string`):

Ordering for the games directory.

## `gameFanout` (type: `integer`):

How many top games **topStreams** should sweep for live streams. More games = more streams. 1-100.

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

Category name for **streamsByGame**, e.g. `Just Chatting`, `Minecraft`, `League of Legends`, `VALORANT`. Use the exact Twitch category name.

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

Array of category names for batch **streamsByGame**.

## `login` (type: `string`):

Twitch channel login / username for **user**, **videos**, **clips**, e.g. `shroud`. A full URL like `https://twitch.tv/shroud` or an `@handle` also works.

## `logins` (type: `array`):

Array of Twitch channel logins for batch **user** lookups, e.g. `["shroud", "pokimane", "xqc"]`.

## `videoSort` (type: `string`):

Ordering for a channel's videos.

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

Time window for a channel's clips.

## `clipSort` (type: `string`):

Ordering for a channel's clips.

## `query` (type: `string`):

Free-text term for **search** mode (a streamer name, keyword or game title).

## `searchIndex` (type: `string`):

Search **channels** (streamers) or **games** (categories).

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

Upper bound on rows returned. For topStreams/streamsByGame this drives the multi-game sweep; for topGames/videos/clips a single page caps at 100 (Twitch's per-request limit).

## Actor input object example

```json
{
  "mode": "topStreams",
  "gameSort": "VIEWER_COUNT",
  "gameFanout": 30,
  "game": "Just Chatting",
  "games": [],
  "login": "shroud",
  "logins": [
    "shroud",
    "pokimane",
    "xqc"
  ],
  "videoSort": "TIME",
  "clipPeriod": "ALL_TIME",
  "clipSort": "VIEWS_DESC",
  "query": "valorant",
  "searchIndex": "CHANNEL",
  "maxResults": 200
}
```

# Actor output Schema

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

Full results dataset. Use the Streams view for stream modes, Games for top games, Channels for user/search, Videos for VOD lists and Clips for clip lists.

# 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": "topStreams",
    "gameSort": "VIEWER_COUNT",
    "gameFanout": 30,
    "game": "Just Chatting",
    "login": "shroud",
    "logins": [
        "shroud",
        "pokimane",
        "xqc"
    ],
    "maxResults": 200
};

// Run the Actor and wait for it to finish
const run = await client.actor("logiover/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": "topStreams",
    "gameSort": "VIEWER_COUNT",
    "gameFanout": 30,
    "game": "Just Chatting",
    "login": "shroud",
    "logins": [
        "shroud",
        "pokimane",
        "xqc",
    ],
    "maxResults": 200,
}

# Run the Actor and wait for it to finish
run = client.actor("logiover/twitch-scraper").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 '{
  "mode": "topStreams",
  "gameSort": "VIEWER_COUNT",
  "gameFanout": 30,
  "game": "Just Chatting",
  "login": "shroud",
  "logins": [
    "shroud",
    "pokimane",
    "xqc"
  ],
  "maxResults": 200
}' |
apify call logiover/twitch-scraper --silent --output-dataset

```

## MCP server setup

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

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/ePKHsENEilS9yqeiG/builds/v7EnMXglszhCafFGG/openapi.json
