# Twitch Scraper (`studious_mortise/twitch-scraper`) Actor

Pay per result Twitch scraper with no login. Get channel profiles, live streams by game or language, top games, clips and VODs. Export to JSON, CSV or Excel.

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

## Pricing

$1.50 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#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

### What does Twitch Scraper do?

Twitch Scraper is an unofficial Twitch API that gets public data from Twitch with no login, no API key and no browser. It reads the same public endpoint the Twitch website uses, so it runs on 256 MB of memory and finishes in seconds.

Twitch Scraper allows you to:

- scrape channel profiles with follower count, partner and affiliate status, social links, next scheduled stream, recent videos and top clips.
- search channels by keyword and get thousands of profiles for one query.
- scrape live streams sorted by viewers, filtered by game, language or stream tag.
- get the top 100 games and categories with viewers, live channels and followers.
- scrape clips of a channel or a game for the last day, week, month or all time.
- scrape videos, past broadcasts (VODs), highlights and uploads of a channel.
- export everything to JSON, CSV, Excel or XML, or read it through the API.

### What data can I extract from Twitch?

👤 Channel ID, login, display name and channel URL
📝 Channel description, language and creation date
🖼️ Profile image, banner image, offline image and brand color
👥 Follower count
⭐ Partner and affiliate status
🔴 Live status, current viewers, current game and stream title
🔗 Social links (Twitter/X, YouTube, Discord, Instagram and more)
📅 Next scheduled stream and last broadcast
🎮 Live streams with viewers, game, language, tags, start time, uptime and preview image
🏆 Top games with viewers, live channels, followers and box art
🎬 Clips with views, duration, curator, game and thumbnail
📼 Videos and VODs with views, length, type, game and thumbnail

### How much will it cost to scrape Twitch?

Twitch Scraper costs $1.50 per 1,000 results. Every record in the dataset (a channel, a stream, a game, a clip or a video) counts as one result. Platform usage is included in this price and there is no start fee.

The free Apify plan gives you $5 in monthly credits, which is enough for about 3,300 results per month. If you scrape Twitch regularly, an Apify subscription gives you more credits and longer data retention.

Some examples:

- 100 channel profiles, each with 10 recent videos and 10 top clips inside: $0.15
- 2,000 channels found by keyword search: $3.00
- Top 500 Thai live streams, once every hour for a day: $18.00
- Top 100 games, once a day for a month: $4.50

Videos and clips embedded inside a channel profile are free. Only the profile itself is counted.

### How to scrape Twitch?

Twitch Scraper does not require any coding skills.

1. Choose what to scrape: channel profiles, channel search, live streams, top games, clips or videos.
2. Fill in the usernames, search keywords or game names for that mode.
3. Set Maximum results to control how much you spend.
4. Click "Start" and wait for the scraper to finish. Most runs take a few seconds.
5. Download your data in JSON, CSV, Excel or XML format.

#### How to use scraped Twitch data

- Build lists of streamers for sponsorships and influencer marketing, filtered by game, language and follower count.
- Track live viewership of games and categories over time by running the scraper on a schedule.
- Monitor competing channels: when they go live, what they play and how many viewers they get.
- Find the best clips of a channel or a game for content curation.
- Archive the video catalog of a channel.
- Research the Twitch market in one language, for example all Thai or Japanese streams.

### Input parameters

Select the mode first. Only the fields for that mode are used, the rest are ignored.

- Mode or `mode`: what to scrape. One of `channels`, `searchChannels`, `liveStreams`, `topGames`, `clips`, `videos`. Default `channels`.
- Channels or `channels`: Twitch usernames or channel URLs, for example `shroud`, `@pokimane` or `https://www.twitch.tv/xqc`. Used by `channels`, `clips` and `videos`.
- Search queries or `searchQueries`: keywords to search channels for, for example `valorant` or `vtuber`. Used by `searchChannels`.
- Games or `gameNames`: category names as shown on Twitch, for example `Just Chatting` or `VALORANT`. Used by `liveStreams`, `clips` and `topGames`. Leave empty to get the global top.
- Languages or `languages`: two letter language codes such as `en`, `th`, `ja`, `ko`, `de`, `es`, `pt`. Filters live streams and game clips.
- Stream tags or `tags`: freeform tags such as `Vtuber` or `Speedrun`. Used by `liveStreams`.
- Maximum results or `maxItems`: stop after this many records in total, across all channels, queries or games in the run. Default 100.
- Minimum viewers or `minViewers`: skip live streams with fewer viewers. Used by `liveStreams`.
- Clip period or `clipPeriod`: `LAST_DAY`, `LAST_WEEK`, `LAST_MONTH` or `ALL_TIME`. Default `LAST_WEEK`.
- Clip sort or `clipSort`: `VIEWS_DESC`, `VIEWS_ASC`, `CREATED_AT_DESC`, `CREATED_AT_ASC` or `TRENDING`. Default `VIEWS_DESC`.
- Video type or `videoType`: `ALL`, `ARCHIVE` (past broadcasts), `HIGHLIGHT` or `UPLOAD`. Default `ALL`.
- Video sort or `videoSort`: `TIME` (newest first) or `VIEWS`. Default `TIME`.
- Recent videos per channel or `channelVideos`: how many recent videos to include inside each channel profile, 0 to 100. Default 5.
- Top clips per channel or `channelClips`: how many top clips to include inside each channel profile, 0 to 100. Default 5.
- Proxy or `proxyConfiguration`: optional. Twitch normally works without a proxy.

To see the full list of parameters and their default values, head over to the Input tab.

#### Input examples

Scrape three channel profiles with 10 recent videos and 10 top clips of the month:

```json
{
    "mode": "channels",
    "channels": ["shroud", "pokimane", "https://www.twitch.tv/xqc"],
    "channelVideos": 10,
    "channelClips": 10,
    "clipPeriod": "LAST_MONTH"
}
```

Find up to 2,000 channels related to VALORANT:

```json
{
    "mode": "searchChannels",
    "searchQueries": ["valorant"],
    "maxItems": 2000,
    "channelVideos": 0,
    "channelClips": 0
}
```

Get the top Thai live streams with at least 20 viewers:

```json
{
    "mode": "liveStreams",
    "languages": ["th"],
    "minViewers": 20,
    "maxItems": 500
}
```

Get live streams in two games:

```json
{
    "mode": "liveStreams",
    "gameNames": ["VALORANT", "Just Chatting"],
    "maxItems": 200
}
```

Get the top 100 games by viewers:

```json
{
    "mode": "topGames",
    "maxItems": 100
}
```

Get the most viewed clips of the week for a channel and a category:

```json
{
    "mode": "clips",
    "channels": ["xqc"],
    "gameNames": ["Just Chatting"],
    "clipPeriod": "LAST_WEEK",
    "maxItems": 200
}
```

Get all past broadcasts of a channel, newest first:

```json
{
    "mode": "videos",
    "channels": ["shroud"],
    "videoType": "ARCHIVE",
    "videoSort": "TIME",
    "maxItems": 100
}
```

### Results

Each channel, stream, game, clip or video is stored as one item in the dataset. Every item has a `type` field and a fixed set of fields. Missing values are `null`, they are never left out, so CSV and Excel exports always have the same columns. The Output tab has a separate table view for each type.

#### 👤 Example channel

```json
{
    "type": "channel",
    "id": "37402112",
    "login": "shroud",
    "displayName": "shroud",
    "url": "https://www.twitch.tv/shroud",
    "description": "I'm back baby",
    "profileImageUrl": "https://static-cdn.jtvnw.net/jtv_user_pictures/...-profile_image-300x300.png",
    "bannerImageUrl": "https://static-cdn.jtvnw.net/jtv_user_pictures/...-profile_banner-480.jpeg",
    "offlineImageUrl": "https://static-cdn.jtvnw.net/jtv_user_pictures/...-channel_offline_image-1920x1080.jpeg",
    "primaryColorHex": "00ADFF",
    "language": "EN",
    "followersCount": 11290608,
    "isPartner": true,
    "isAffiliate": false,
    "isLive": false,
    "currentViewers": null,
    "currentGame": null,
    "streamTitle": null,
    "stream": null,
    "lastBroadcastId": "320267692764",
    "lastBroadcastTitle": "the dog is back to save us all",
    "lastBroadcastStartedAt": "2026-09-11T07:24:38.78317Z",
    "lastBroadcastGame": "Battlefield 6",
    "nextScheduledStream": {
        "title": "",
        "startAt": "2026-09-11T18:00:00Z",
        "categories": []
    },
    "socialLinks": [
        { "name": "discord", "title": "Discord", "url": "https://discord.gg/shroud" },
        { "name": "twitter", "title": "Twitter", "url": "https://twitter.com/shroud" },
        { "name": "youtube", "title": "YouTube", "url": "https://youtube.com/shroud" }
    ],
    "videoCount": 1571,
    "recentVideos": [ { "type": "video", "id": "2870437527", "title": "...", "viewCount": 136309, "lengthSeconds": 21231 } ],
    "topClips": [ { "type": "clip", "id": "...", "title": "...", "viewCount": 52000 } ],
    "createdAt": "2012-11-03T15:50:32.87847Z",
    "updatedAt": "2026-09-10T15:33:30.150644Z",
    "searchQuery": null,
    "scrapedAt": "2026-09-11T14:02:11Z"
}
```

When the channel is live, `stream` contains the stream id, title, viewers, start time, language, type, mature flag, game, tags and preview image.

#### 🔴 Example live stream

```json
{
    "type": "stream",
    "id": "316014893160",
    "title": "[Live] Wardogs is open now",
    "url": "https://www.twitch.tv/nutsurusama",
    "viewersCount": 198,
    "startedAt": "2026-09-11T10:56:28Z",
    "uptimeMinutes": 185,
    "language": "EN",
    "broadcasterLanguage": "TH",
    "streamType": "live",
    "isMature": false,
    "gameId": "743893402",
    "gameName": "WARDOGS",
    "tags": ["Thai", "DropsEnabled"],
    "previewImageUrl": "https://static-cdn.jtvnw.net/previews-ttv/live_user_nutsurusama-640x360.jpg",
    "broadcasterId": "153258411",
    "broadcasterLogin": "nutsurusama",
    "broadcasterDisplayName": "NutsuruSama",
    "broadcasterProfileImageUrl": "https://static-cdn.jtvnw.net/jtv_user_pictures/...-profile_image-150x150.png",
    "broadcasterFollowers": 58066,
    "broadcasterIsPartner": true,
    "broadcasterIsAffiliate": false,
    "scrapedAt": "2026-09-11T14:02:11Z"
}
```

#### 🏆 Example game

```json
{
    "type": "game",
    "id": "509658",
    "name": "Just Chatting",
    "displayName": "Just Chatting",
    "url": "https://www.twitch.tv/directory/category/just-chatting",
    "rank": 1,
    "viewersCount": 220203,
    "broadcastersCount": 3672,
    "followersCount": 53190362,
    "boxArtUrl": "https://static-cdn.jtvnw.net/ttv-boxart/509658-285x380.jpg",
    "tags": ["IRL"],
    "scrapedAt": "2026-09-11T13:01:56Z"
}
```

#### 🎬 Example clip

```json
{
    "type": "clip",
    "id": "3006751830",
    "slug": "ZanyAssiduousMinkHumbleLife-EcYOnfK_-LHOOCYE",
    "title": "Clutch round",
    "url": "https://www.twitch.tv/kmomo_0512/clip/ZanyAssiduousMinkHumbleLife-EcYOnfK_-LHOOCYE",
    "viewCount": 10500,
    "durationSeconds": 58,
    "createdAt": "2026-09-06T18:28:16Z",
    "language": "zh",
    "gameId": "516575",
    "gameName": "VALORANT",
    "broadcasterId": "12345",
    "broadcasterLogin": "kmomo_0512",
    "broadcasterDisplayName": "kmomo",
    "broadcasterUrl": "https://www.twitch.tv/kmomo_0512",
    "curatorId": "67890",
    "curatorLogin": "9peach_1111",
    "curatorDisplayName": "9peach",
    "thumbnailUrl": "https://static-cdn.jtvnw.net/twitch-video-assets/.../thumb-1920x1080.jpg",
    "videoId": "2860000000",
    "videoOffsetSeconds": 5321,
    "scrapedAt": "2026-09-11T14:02:11Z"
}
```

#### 📼 Example video

```json
{
    "type": "video",
    "id": "2870437527",
    "title": "the dog is back to save us all",
    "url": "https://www.twitch.tv/videos/2870437527",
    "viewCount": 136309,
    "lengthSeconds": 21231,
    "publishedAt": "2026-09-10T18:05:11Z",
    "createdAt": "2026-09-10T18:05:11Z",
    "broadcastType": "ARCHIVE",
    "language": "en",
    "description": "",
    "gameId": "2027006220",
    "gameName": "Battlefield 6",
    "channelId": "37402112",
    "channelLogin": "shroud",
    "channelDisplayName": "shroud",
    "channelUrl": "https://www.twitch.tv/shroud",
    "thumbnailUrl": "https://static-cdn.jtvnw.net/cf_vods/.../thumb-640x360.jpg",
    "scrapedAt": "2026-09-11T14:02:11Z"
}
```

### Notes for developers

#### Twitch page limits

Twitch does not let anonymous clients page through directory listings. In one request the scraper gets the top 30 global live streams (per language and tag combination), up to 100 streams per game, 100 top games, 100 clips per channel or game for one period and sort, and 100 videos per channel for one type and sort. To go deeper, the `liveStreams` mode without game names walks the top 100 games automatically, which gives up to about 10,000 live streams. Channel search is paginated and can return thousands of channels.

#### Limiting results with maxItems

`maxItems` is the main cost control. The scraper stops as soon as it has stored that many records. You can also set a maximum total charge on the run; the scraper stops cleanly when it is reached and says so in the status message.

#### Free preview

When a run is not billed per result, for example when you run the code locally with `apify run`, output is limited to 50 records. This is by design, not an error.

#### Not available

Follower lists, chat messages and viewer identities are not available to anonymous clients and are not part of this scraper.

### FAQ

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

No. The scraper reads the same public data that Twitch shows to logged out visitors.

#### Do you need proxies for scraping Twitch?

No. Twitch's public endpoint works without a proxy and the scraper runs without one by default. If you ever see request failures, you can turn on Apify Proxy in the input.

#### How do I get only streams in my language?

Use the `languages` field, for example `["th"]` for Thai or `["ja", "ko"]` for Japanese and Korean. Twitch matches streams by their language tag, which you can see in the `tags` field (for example `ภาษาไทย` for Thai). The `language` and `broadcasterLanguage` fields show the language the streamer set in their own settings, so they can say `EN` for a stream that is clearly in Thai.

#### Why did I get fewer results than maxItems?

Either Twitch had fewer matches (a small game, or a channel with few clips), a filter such as `minViewers` removed some, or the page limits above apply. The final status message of the run explains what happened.

#### Can I use Twitch Scraper with the Apify API?

Yes. The Apify API gives you programmatic access to run the scraper, get its results and manage schedules. See the API tab for ready to use code in Node.js, Python and cURL.

#### Can I use Twitch Scraper through an MCP server?

Yes. You can call this scraper from AI agents and tools such as Claude, Cursor or VS Code through the Apify MCP server. Pass the same input JSON shown above.

#### Can I integrate Twitch Scraper with other apps?

Yes. Twitch Scraper can be connected with Google Sheets, Slack, Make, Zapier, webhooks and other Apify integrations, so results are delivered where you need them.

#### Is it legal to scrape Twitch?

The scraper only collects data that Twitch shows publicly: channel profiles, stream metadata, clip and video metadata. It does not collect private data, chat messages or viewer identities. You are responsible for using the data in line with Twitch's terms and the laws that apply to you. Personal data is protected by the GDPR in the European Union and by other regulations around the world, so do not scrape personal data unless you have a legitimate reason to do so.

### Twitch Scraper ภาษาไทย

Twitch Scraper ดึงข้อมูลสาธารณะจาก Twitch โดยไม่ต้องล็อกอิน ไม่ต้องใช้ API key และไม่ต้องใช้เบราว์เซอร์ รองรับ 6 โหมด:

- `channels`: ข้อมูลโปรไฟล์ช่อง (ผู้ติดตาม, สถานะ Partner/Affiliate, ลิงก์โซเชียล, ตารางสตรีมถัดไป, วิดีโอล่าสุด, คลิปยอดนิยม)
- `searchChannels`: ค้นหาช่องด้วยคีย์เวิร์ด เช่น `valorant` หรือ `vtuber`
- `liveStreams`: สตรีมที่กำลังไลฟ์ เรียงตามผู้ชม กรองตามเกม ภาษา (ใส่ `th` เพื่อดูสตรีมเมอร์ไทย) และแท็ก
- `topGames`: 100 เกมและหมวดหมู่ยอดนิยม พร้อมจำนวนผู้ชมและช่องที่ไลฟ์อยู่
- `clips`: คลิปยอดนิยมของช่องหรือของเกม เลือกช่วงเวลาและการเรียงได้
- `videos`: VOD ไฮไลต์ และวิดีโออัปโหลดของช่อง

ราคา 1.5 ดอลลาร์ต่อ 1,000 รายการ เท่ากันทุกแพลน ไม่มีค่าเริ่มรัน บัญชี Apify ฟรีมีเครดิต 5 ดอลลาร์ต่อเดือน ใช้ได้ประมาณ 3,300 รายการ

วิธีใช้: เลือกโหมด, กรอกชื่อช่องหรือคีย์เวิร์ดหรือชื่อเกม, ตั้งค่า `maxItems` เพื่อจำกัดค่าใช้จ่าย, กด Start แล้วดาวน์โหลดผลลัพธ์เป็น JSON, CSV หรือ Excel (ไฟล์ CSV เปิดใน Excel ได้ ภาษาไทยไม่เพี้ยน)

ตัวอย่างอินพุตสำหรับสตรีมภาษาไทยที่มีผู้ชมอย่างน้อย 20 คน:

```json
{ "mode": "liveStreams", "languages": ["th"], "minViewers": 20, "maxItems": 300 }
```

ข้อจำกัด: ต่อหนึ่งคำขอจะได้สตรีมทั่วโลกสูงสุด 30 รายการ (ต่อภาษาหรือแท็ก), สตรีมต่อเกมสูงสุด 100 รายการ, คลิปหรือวิดีโอต่อช่องสูงสุด 100 รายการ โหมด `liveStreams` ที่ไม่ระบุเกมจะไล่ดึงจาก 100 เกมยอดนิยมให้อัตโนมัติ ส่วนการค้นหาช่องดึงได้หลายพันรายการ

### Your feedback

We are always working on improving this scraper. If you find a bug, a missing field or have a feature request, please create an issue on the Issues tab of this Actor. Feedback in English or Thai is welcome.

# Actor input Schema

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

channels = profiles for the usernames in "channels". searchChannels = channel profiles matching "searchQueries". liveStreams = live streams sorted by viewers (optionally by game, language, tag). topGames = categories ranked by viewers. clips = top clips of channels and/or games. videos = VODs, highlights and uploads of channels.

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

Twitch usernames or channel URLs, e.g. shroud, @pokimane, https://www.twitch.tv/xqc. Used by modes: channels, clips, videos. Up to 100 channels are fetched per request.

## `searchQueries` (type: `array`):

Keywords to search channels for, e.g. valorant, thai, speedrun. One query can return thousands of channels; use maxItems to cap. Mode: searchChannels.

## `gameNames` (type: `array`):

Category names as shown on Twitch, e.g. Just Chatting, VALORANT, League of Legends (case-insensitive). Modes: liveStreams (streams in these games), clips (top clips in these games), topGames (stats for just these games). Leave empty for the global top.

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

Two-letter Twitch language codes, e.g. en, th, ja, ko, de, pt, es. Filters live streams (by broadcaster language) and game clips. Leave empty for all languages.

## `tags` (type: `array`):

Freeform stream tags to filter live streams by, e.g. Thai, Vtuber, Speedrun. Mode: liveStreams.

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

Stop after this many records. Each record is one charged result.

## `minViewers` (type: `integer`):

Skip live streams with fewer current viewers than this. Mode: liveStreams.

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

Time window for clips (mode clips, and the topClips embedded in channel profiles).

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

Order of clips in mode clips.

## `videoType` (type: `string`):

Which videos to list in mode videos.

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

Order of videos in mode videos.

## `channelVideos` (type: `integer`):

How many recent videos to embed in each channel record (modes channels and searchChannels). 0 disables. Embedded videos are not charged separately.

## `channelClips` (type: `integer`):

How many top clips (within clipPeriod) to embed in each channel record (modes channels and searchChannels). 0 disables. Embedded clips are not charged separately.

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

Optional. Twitch's public API normally works without a proxy; enable Apify Proxy only if you see request failures. Proxy traffic is billed by Apify at platform rates.

## Actor input object example

```json
{
  "mode": "channels",
  "channels": [
    "shroud",
    "pokimane",
    "https://www.twitch.tv/xqc"
  ],
  "searchQueries": [
    "valorant"
  ],
  "maxItems": 100,
  "minViewers": 0,
  "clipPeriod": "LAST_WEEK",
  "clipSort": "VIEWS_DESC",
  "videoType": "ALL",
  "videoSort": "TIME",
  "channelVideos": 5,
  "channelClips": 5
}
```

# Actor output Schema

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

No description

# 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"
    ],
    "searchQueries": [
        "valorant"
    ]
};

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

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,studious_mortise/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/OI7qq8pOzKrg70vHs/builds/YBES8L5evPKbgNhOI/openapi.json
