# Twitch Live Channel Scraper - Viewers, Game & Stream Start Time (`capy8ara/twitch-channel-intel`) Actor

Scrape live Twitch channels for viewer counts, game, stream title and stream start time, up to 100 channels per run. Every row carries point-in-time timestamps and a content hash, so snapshots can be deduplicated. Official Helix API, no proxies.

- **URL**: https://apify.com/capy8ara/twitch-channel-intel.md
- **Developed by:** [Punit Kaushik](https://apify.com/capy8ara) (community)
- **Categories:** Social media, Videos, Developer tools
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.90 / 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?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Twitch Live Channel Scraper - Streams, Clips, VODs & Schedules

Scrape Twitch channels in one run: who is live right now and with how many viewers, plus their
recent clips, recent VODs, published schedule and a channel search. Up to 100 channels per run,
straight from Twitch's official Helix API.

Every row carries the same provenance fields whatever its type - **when the event happened**,
**when we observed it**, a stable entity key and a content hash - so mixed output can still be
joined, deduplicated and reasoned about later.

### Record types

One run can return several types at once; the `record_type` field tells them apart.

| `record_type` | one row per | `event_time` is |
|---|---|---|
| `stream` | channel that is live right now | when the stream started |
| `clip` | clip created in the lookback window | when the clip was created |
| `video` | VOD or highlight | when the video was created |
| `schedule` | scheduled segment | segment start time |
| `channel` | channel search result | when it went live, empty if offline |

### Fields on every row

| field | meaning |
|---|---|
| `record_type` | `stream`, `clip`, `video`, `schedule` or `channel` |
| `event_time` | when this happened in the world (UTC ISO-8601), null when not applicable |
| `ingest_time` | when this run observed it (UTC ISO-8601) |
| `entity_key` | `twitch:channel:<id>`, `twitch:clip:<id>`, `twitch:video:<id>`, `twitch:schedule:<channel>:<segment>` |
| `source_url` | the page this record describes |
| `source_id` | the object's id at the source |
| `content_hash` | sha256 of the payload, so identical observations dedupe |
| `http_status` | status returned by the API for this record |

Type-specific fields follow: `viewer_count`, `game_name`, `title`, `language`, `view_count`,
`duration_seconds`, `end_time`, `is_recurring` and so on.

### Input

```json
{
  "channels": ["lofigirl", "gaules", "riotgames"],
  "includeStreams": true,
  "includeClips": true,
  "clipDays": 30,
  "maxClipsPerChannel": 20,
  "includeVideos": false,
  "includeSchedule": true,
  "searchQuery": "",
  "maxSearchResults": 20
}
```

Only the modes you enable cost anything. **Channels that are offline produce no `stream` row** - a
run with zero rows is a valid answer, not a failure. Absence means "not live at `ingest_time`",
which is information.

`searchQuery` works without any logins, for example `"minecraft"`.

### Output

```json
{
  "record_type": "clip",
  "event_time": "2026-09-25T08:22:04Z",
  "ingest_time": "2026-10-23T13:40:11.902Z",
  "entity_key": "twitch:clip:InexpensiveVastPuppyBCouch-AaKwizGbhAYj_M6L",
  "source_id": "InexpensiveVastPuppyBCouch-AaKwizGbhAYj_M6L",
  "source_url": "https://clips.twitch.tv/InexpensiveVastPuppyBCouch-AaKwizGbhAYj_M6L",
  "content_hash": "51943e2b41cf...",
  "http_status": 200,
  "broadcaster_login": "gaules",
  "creator_name": "somebody",
  "title": "...",
  "view_count": 1204,
  "duration_seconds": 28.4,
  "language": "pt"
}
```

### What this Actor cannot return

These need authorisation that belongs to the broadcaster, not to the Actor, so they are out of
scope rather than missing:

| data | why not |
|---|---|
| follower counts | `moderator:read:followers` on that channel, granted per broadcaster |
| subscriber counts | `channel:read:subscriptions` on that channel |
| chat messages | not in Helix at all; needs a persistent IRC connection |

Anything claiming follower or subscriber history for arbitrary channels is either using a
different, less reliable route or is out of date.

### Pricing

Pay per result: **$1.90 per 1,000 rows**, plus a small per-run start fee. A row is a row whatever
its type, so enabling clips and schedules costs more only because it returns more rows. Offline
channels and empty modes cost nothing.

### Notes

- Official Helix API. No website scraping, no proxies, no captchas, no bans.
- Requests stay well below Twitch's published rate limit (roughly 660/min against a budget of 800).
- VODs expire on Twitch after about 14 to 60 days, so `video` rows are recent by nature. Clips
  persist, which is what makes `clip` rows usable as history.

# Actor input Schema

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

Twitch logins, up to 100 per run. Offline channels return no stream row - a run with zero results is a valid answer, not a failure.

## `includeStreams` (type: `boolean`):

One row per channel that is live right now: viewers, game, title, language.

## `includeClips` (type: `boolean`):

Recent clips per channel, with their own created_at and view_count. This is real history, not a snapshot.

## `clipDays` (type: `integer`):

How far back to look for clips, 1 to 90 days.

## `maxClipsPerChannel` (type: `integer`):

Twitch returns the newest clips first.

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

Recent videos per channel. Twitch deletes VODs after roughly 14 to 60 days, so this is not an archive.

## `maxVideosPerChannel` (type: `integer`):

Twitch returns the newest videos first.

## `includeSchedule` (type: `boolean`):

Scheduled stream segments, when the broadcaster publishes a schedule.

## `searchQuery` (type: `string`):

Optional free-text channel search, for example 'minecraft'. Returns channel rows, live or not. Can be used without any logins.

## `maxSearchResults` (type: `integer`):

Number of channel rows returned by the search.

## Actor input object example

```json
{
  "channels": [
    "lofigirl",
    "gaules",
    "jynxzi"
  ],
  "includeStreams": true,
  "includeClips": false,
  "clipDays": 30,
  "maxClipsPerChannel": 20,
  "includeVideos": false,
  "maxVideosPerChannel": 10,
  "includeSchedule": false,
  "maxSearchResults": 20
}
```

# Actor output Schema

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

One record per channel observed live during the run, with event_time, ingest_time, entity_key and content_hash on every row.

## `summary` (type: `string`):

Counts for the run: channels requested, channels live, and the ingest timestamp.

# 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": [
        "lofigirl",
        "gaules",
        "jynxzi"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("capy8ara/twitch-channel-intel").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": [
        "lofigirl",
        "gaules",
        "jynxzi",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("capy8ara/twitch-channel-intel").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": [
    "lofigirl",
    "gaules",
    "jynxzi"
  ]
}' |
apify call capy8ara/twitch-channel-intel --silent --output-dataset

```

## MCP server setup

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

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/O0KmLfD8Ng4OxGgIq/builds/OdnArkTarVivjd9E6/openapi.json
