# Twitch Clips Scraper (`xtracto/twitch-clips`) Actor

Scrape top or recent clips from any Twitch channel with view count, duration, thumbnail, and game metadata.

- **URL**: https://apify.com/xtracto/twitch-clips.md
- **Developed by:** [Farhan Febrian Nauval](https://apify.com/xtracto) (community)
- **Categories:** Social media, Videos
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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 Clips Scraper

Extract the top clips from any Twitch channel in bulk — clip title, view count, duration, game, creator handle, and full-resolution thumbnail — in a clean structured JSON output.

### Why use this actor

- **No account / no login required** — just give it a Twitch channel login (or full channel URL).
- **No API key needed** — this actor returns the same clip data the Twitch web app shows on the Clips tab.
- **Rich detail** — clip title, view count, duration in seconds, the game played at the time, the broadcaster handle, and a high-resolution thumbnail URL ready to embed.
- **Top-clips ranking** — clips come back in descending view-count order so the most viral moments are always first.
- **Bulk input** — pass a list of channels in one run; one dataset row per clip.
- **Stable JSON output** suitable for pipelines, spreadsheets, and databases — every row carries `_input`, `_source`, `_scrapedAt` envelope fields so you can join results back to your input list.

### How it works

1. You provide a list of Twitch channel logins (e.g. `xqc`) or full channel URLs.
2. The actor fetches each channel's clips list, paginating until it has up to `maxResults` clips per channel.
3. Each clip is flattened into a structured JSON record — title, view count, duration, game, creator, thumbnail.
4. Results stream into your dataset, ready to download as JSON, CSV, or Excel.

You do not need to manage scrapers, browsers, or rotating IPs — all handled internally.

### Input

```json
{
  "channels": [
    "xqc",
    "shroud"
  ],
  "period": "LAST_WEEK",
  "maxResults": 20,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["DATACENTER"]
  }
}
```

| Field | Type | Description |
|---|---|---|
| `channels` | array | List of Twitch channel logins or channel URLs. Both `xqc` and `https://www.twitch.tv/xqc` are accepted. |
| `period` | string | Time window for the top-clips ranking: `LAST_DAY`, `LAST_WEEK`, `LAST_MONTH`, or `ALL_TIME`. Defaults to `LAST_WEEK`. |
| `maxResults` | integer | Maximum number of clips returned per channel. Default: 20. Max: 200. |
| `proxyConfiguration` | object | Apify Proxy settings. Datacenter proxy works for most channels. |

### Output

Input: `xqc`, `maxResults: 3`

```json
{
  "_input": "xqc",
  "_source": "S1-primary",
  "_scrapedAt": "2026-05-18T11:23:35.624365+00:00",
  "id": "3942697259",
  "slug": "DeliciousDelightfulPicklesWOOP",
  "url": "https://www.twitch.tv/xqc/clip/DeliciousDelightfulPicklesWOOP",
  "title": "xqc makes the wrong choice",
  "viewCount": 943767,
  "durationSeconds": 44,
  "createdAt": "2020-12-09T19:18:10Z",
  "thumbnailURL": "https://static-cdn.jtvnw.net/twitch-video-assets/twitch-vap-video-assets-prod-us-west-2/ce4b4ef1-4e8d-4391-bff6-2bc4c5506a4d/landscape/thumb/thumb-0000000000-1920x1080.jpg",
  "broadcaster": {
    "id": "71092938",
    "login": "xqc",
    "displayName": "xQc"
  },
  "game": {
    "id": "65876",
    "name": "Cyberpunk 2077"
  },
  "language": "EN",
  "isFeatured": false
}
```

| Field | Type | Description |
|---|---|---|
| `_input` | string | The channel login or URL exactly as you supplied it. Use this to join results back to your input list. |
| `_source` | string | Internal tag for the path used to fetch the record. `S1-primary` means the fastest, richest path; values starting with `S2-fallback` indicate a fallback was used. |
| `_scrapedAt` | string | ISO-8601 UTC timestamp when the record was scraped. |
| `id` | string | Twitch's numeric clip ID. Stable across renames. |
| `slug` | string | Human-readable clip slug used in the public URL (e.g. `DeliciousDelightfulPicklesWOOP`). |
| `url` | string | Canonical public clip URL — opens the clip in the Twitch web player. |
| `title` | string | Clip title set by the clipper. |
| `viewCount` | integer | Total views on the clip at scrape time. |
| `durationSeconds` | integer | Clip length in seconds (typically 5–60). |
| `createdAt` | string | ISO-8601 UTC timestamp when the clip was first cut. |
| `thumbnailURL` | string | Full-resolution preview image URL (1920x1080 landscape). Safe to embed in dashboards. |
| `broadcaster.id` | string | Numeric Twitch user ID of the streamer the clip belongs to. |
| `broadcaster.login` | string | Streamer login (URL handle). |
| `broadcaster.displayName` | string | Streamer display name with original casing. |
| `game.id` | string | Twitch's internal game/category ID. |
| `game.name` | string | Game or category name shown at the moment the clip was cut (e.g. `Cyberpunk 2077`). |
| `language` | string | Stream language at the time of the clip (e.g. `EN`). |
| `isFeatured` | boolean | `true` if Twitch has flagged this clip as featured on the channel. |

#### Error envelope

Channels that don't exist or fail to fetch return a structured error instead of crashing the run:

```json
{
  "_input": "this-channel-does-not-exist-xyz",
  "_error": "fetch_failed",
  "_errorDetail": "channel not found",
  "_scrapedAt": "2026-05-18T11:23:40.012345+00:00"
}
```

Filter on `_error` to triage failed rows.

### Pricing

This actor is billed per result: **$3.50 per 1,000 clips** (Tier 3). Each clip returned = 1 result. Errors (channel not found, fetch failures) are not billed.

### Other Sosmed Actors

| Platform | Actor | Best for |
|---|---|---|
| Twitch | [Twitch Channel Scraper](https://apify.com/xtracto/twitch-channel) | Channel profile, followers, live status |
| Twitch | [Twitch Video Detail Scraper](https://apify.com/xtracto/twitch-video-detail) | Full VOD detail — title, duration, view count |
| YouTube | [YouTube Shorts Scraper](https://apify.com/xtracto/youtube-shorts-scraper) | Short-form vertical clips from any channel |
| Instagram | [Instagram Account Reels Scraper](https://apify.com/xtracto/instagram-account-reels-scraper) | Reels feed for any Instagram handle |
| Threads | [Threads Account Threads Scraper](https://apify.com/xtracto/threads-account-threads-scraper) | All threads posted by a Threads account |
| Bluesky | [Bluesky Account Posts Scraper](https://apify.com/xtracto/bluesky-account-posts-scraper) | Posts feed for any Bluesky handle |

Browse the full catalog at [apify.com/xtracto](https://apify.com/xtracto).

### Notes

- Clip rankings shift over time — the same channel scraped today vs. tomorrow can return a different set, especially for `LAST_DAY` and `LAST_WEEK` periods.
- Clips persist even after the original VOD is deleted by the streamer, so old viral moments remain reachable.
- Very new channels with fewer than 5 clips may return an empty result set.
- `viewCount` is eventually-consistent and may lag the live counter on twitch.tv by a few minutes.
- For large jobs (many channels x high `maxResults`), enable Apify Proxy rotation to avoid per-IP rate limits.

# Actor input Schema

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

List of Twitch channel handles or full channel URLs (e.g. `xqc` or `https://www.twitch.tv/xqc`). One run can process many channels.

## `period` (type: `string`):

Time window for the top-clips ranking: last day, last week, last month, or all time.

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

Maximum number of clips returned per channel, sorted by view count (descending).

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

Optional. Twitch's public API answers without a proxy, so none is used by default. Enable Apify Proxy only if your runs start getting refused.

## Actor input object example

```json
{
  "channels": [
    "xqc",
    "shroud"
  ],
  "period": "LAST_WEEK",
  "maxResults": 20,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `id` (type: `string`):

Unique identifier of the item at the source.

## `slug` (type: `string`):

URL slug of the item.

## `url` (type: `string`):

Direct link to the scraped item.

## `title` (type: `string`):

Title of the item.

## `viewCount` (type: `string`):

View count. Whole number.

## `durationSeconds` (type: `string`):

Duration Seconds.

## `createdAt` (type: `string`):

Creation timestamp, ISO 8601.

## `thumbnailURL` (type: `string`):

Link to the thumbnail u.

## `broadcaster` (type: `string`):

Broadcaster as reported by the source.

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

Game as reported by the source.

## `language` (type: `string`):

Language code of the item.

## `isFeatured` (type: `string`):

Is Featured. Boolean value.

## `_input` (type: `string`):

The input value this row was produced from.

## `_source` (type: `string`):

Which extraction strategy produced the row.

## `_scrapedAt` (type: `string`):

UTC timestamp of the scrape, ISO 8601.

## `_error` (type: `string`):

Set only on diagnostic rows - why that target produced no data.

## `_errorDetail` (type: `string`):

Extra context for the error.

# 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": [
        "xqc",
        "shroud"
    ],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("xtracto/twitch-clips").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": [
        "xqc",
        "shroud",
    ],
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("xtracto/twitch-clips").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": [
    "xqc",
    "shroud"
  ],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call xtracto/twitch-clips --silent --output-dataset

```

## MCP server setup

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

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/yD4fq8gc2gbatkgLT/builds/go0MBzBEvF1S3au8N/openapi.json
