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

Scrapes Twitch clips by category and keyword including views, creator, broadcaster, game, and clip metadata.

- **URL**: https://apify.com/w3crawler/twitch-clips-scraper.md
- **Developed by:** [w3crawler](https://apify.com/w3crawler) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 1,000 clips

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

### What does Twitch Clips Scraper do?

This Actor extracts public clip-card metadata from one Twitch game category or channel page. It uses bounded HTTPS HTML requests to official Twitch hosts, follows only official redirects, deduplicates canonical clip URLs, and preserves public titles, channels, games, views, duration, age, and thumbnails. It does not use browser automation, private APIs, credentials, or proxy-bypass techniques.

Twitch may return a page without rendered clip cards or block a request. Those outcomes become minimal four-field diagnostics and are summarized in `OUTPUT`; no placeholder clip is emitted.

### Why use it?

Use it for small public clip inventories, category checks, channel highlights, and scheduled public-page monitoring through Apify's API, scheduling, monitoring, and integrations. Twitch does not expose a verified public overall-clips directory, so provide exactly one `gameName` or `channelName`.

### How to run

1. Open the Actor's **Input** tab.
2. Provide either a public game/category name or a Twitch channel login.
3. Choose the time range and bounded item/response/request controls.
4. Run the Actor and inspect normal clip rows, diagnostics, and `OUTPUT`.

### Input

| Field | Required | Description |
| --- | --- | --- |
| `gameName` | One of | Public Twitch game/category; mutually exclusive with `channelName`. |
| `channelName` | One of | Public Twitch channel login; `@` is accepted. |
| `timeRange` | No | `24h`, `7d`, `30d`, or `all`; default `7d`. |
| `maxItems` | No | Maximum unique clips, from 1 to 500; default `50`. |
| `timeoutMs` | No | Request timeout from 5000 to 120000 ms. |
| `maxResponseBytes` | No | Response limit from 100000 to 10000000 bytes. |
| `maxRequestRetries` | No | Bounded retries from 0 to 2; default `0`. |
| `requestDelayMs` | No | Polite delay before the request, maximum `10000`. |
| `proxyConfiguration` | No | Direct by default; optional Apify Proxy routing. |
| `fixtureFile` | No | Actor-relative JSON fixture for deterministic local QA. |

Example input:

```json
{
  "gameName": "Minecraft",
  "timeRange": "7d",
  "maxItems": 10,
  "timeoutMs": 30000,
  "maxRequestRetries": 0,
  "proxyConfiguration": { "useApifyProxy": false }
}
```

### Output

Normal rows use `recordType: "clip"` and include canonical clip URL/slug, title, public channel and creator fields, game, views, duration, age, thumbnail, query/source provenance, and timestamp. Transport, response-size, extraction-stage, and run-summary fields stay out of dataset rows.

Example normal output:

```json
{
  "recordType": "clip",
  "position": 1,
  "clipTitle": "Speedrun to the Nether",
  "clipUrl": "https://www.twitch.tv/pixelpilot/clip/AbC_123",
  "clipSlug": "AbC_123",
  "channelName": "PixelPilot",
  "gameName": "Minecraft",
  "viewCount": 12400,
  "duration": "1:23",
  "timeRange": "7d",
  "queryUrl": "https://www.twitch.tv/directory/category/minecraft/clips?range=7d",
  "scrapedAt": "2026-09-08T00:00:00.000Z"
}
```

Example diagnostic:

```json
{
  "url": "https://www.twitch.tv/directory/category/minecraft/clips?range=7d",
  "error": "The public Twitch page returned no extractable clip cards. No placeholder clip was emitted.",
  "errorCode": "NO_PUBLIC_CLIP_DATA",
  "scrapedAt": "2026-09-08T00:00:00.000Z"
}
```

`OUTPUT` contains status, query, time range, transport, extracted/stored clip counts, diagnostic count, data availability, generator provenance, and completion time. You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.

### Tips, FAQ, and responsible use

Use fixture mode while changing extraction logic. `BLOCKED`, `TIMEOUT`, `HTTP_ERROR`, `REQUEST_FAILED`, and `NO_PUBLIC_CLIP_DATA` reflect the public response observed by this run. Missing title, views, duration, or thumbnail fields are omitted rather than invented.

This Actor is not affiliated with Twitch. Follow Twitch terms, robots guidance, rate limits, privacy rules, and applicable law. Use only public information and do not use this Actor to evade access controls.

# Changelog

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

# Actor input Schema

## `gameName` (type: `string`):

Twitch game/category name. Cannot be used with Channel name.

## `channelName` (type: `string`):

Twitch channel login. Cannot be used with Game name.

## `timeRange` (type: `string`):

Time window used by Twitch's public clips page.

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

Maximum number of unique public clip records to save.

## `timeoutMs` (type: `integer`):

Per-request timeout for the direct public Twitch page request.

## `maxResponseBytes` (type: `integer`):

Maximum Twitch HTML response size to read.

## `maxRequestRetries` (type: `integer`):

Retries only bounded transport failures, maximum 2.

## `requestDelayMs` (type: `integer`):

Polite delay before the public request, maximum 10000 ms.

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

Optional proxy transport. Start direct; enable Apify Proxy only when the public page blocks or omits content.

## `fixtureFile` (type: `string`):

Optional Actor-relative JSON fixture used instead of a network request; never a URL.

## Actor input object example

```json
{
  "timeRange": "7d",
  "maxItems": 50,
  "timeoutMs": 30000,
  "maxResponseBytes": 4000000,
  "maxRequestRetries": 0,
  "requestDelayMs": 0,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

No description

## `keyValueStore` (type: `string`):

No description

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

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

```

## MCP server setup

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