# Twitch Top Clips Finder (for clippers) (`datacraft-tools/twitch-top-clips`) Actor

Most viewed Twitch clips of channels or games in the last 24h/7d/30d via the official API, with views, links and VOD timestamps.

- **URL**: https://apify.com/datacraft-tools/twitch-top-clips.md
- **Developed by:** [Datacraft Tools](https://apify.com/datacraft-tools) (community)
- **Categories:** Videos, Social media
- **Features:** Limited permissions
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 clips

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/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 Top Clips Finder

Find the **most viewed Twitch clips** of any channel or game in the last 24 hours, 7 days or 30 days. Built for
**clippers** and short-form editors who need to know what is already going viral from a streamer before cutting it
for YouTube Shorts, TikTok and Instagram Reels.

Uses the **official Twitch Helix API**. It does not scrape pages, needs no login, and runs fast and cheap.

### What you get

| Field | Meaning |
|---|---|
| `source`, `sourceType`, `rank` | Channel or game, and the clip's rank by views |
| `title`, `url`, `embedUrl`, `thumbnailUrl` | The clip |
| `views`, `durationSec`, `createdAt` | Performance and timing |
| `broadcaster`, `creator`, `game`, `language` | Who streamed it, who clipped it, the category |
| `vodUrl`, `vodId`, `vodOffsetSec` | Link to the exact moment in the full VOD, so you can cut a longer or better version |
| `isFeatured` | Featured by the streamer |

### How to use

1. Add **channels** (e.g. `kaicenat`, `xqc`) and/or **games** (e.g. `Just Chatting`).
2. Pick a **time window**: last 24 hours for trending moments, last 7 days for the weekly best.
3. Optionally set **minimum views** and **language**.
4. Run it, then open the **Top clips** table or export CSV, JSON or Excel.

```json
{
  "channels": ["kaicenat", "plaqueboymax"],
  "period": "24h",
  "maxClipsPerSource": 10,
  "minViews": 1000
}
```

### Tips for clippers

- Clipping-campaign streamers post their best moments fast. Run this every few hours on a **schedule** and clip the newest top moments first.
- `vodUrl` opens the full stream at that moment, so you can include the setup before the punchline.

### Credentials

The Actor uses its own built-in Twitch app by default. If you hit rate limits on very large runs, add your own free
Client ID and Secret from [dev.twitch.tv/console](https://dev.twitch.tv/console).

Not affiliated with Twitch.

# Actor input Schema

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

Twitch channel names (logins), e.g. kaicenat, xqc.

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

Exact Twitch category names, e.g. Just Chatting, Fortnite.

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

Clips created in this window.

## `maxClipsPerSource` (type: `integer`):

How many top clips to return for each channel or game.

## `minViews` (type: `integer`):

Skip clips with fewer views.

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

Two-letter language code to keep (e.g. en). Empty = all.

## `twitchClientId` (type: `string`):

Your own Twitch app Client ID from dev.twitch.tv/console. Leave empty to use the Actor's built-in app.

## `twitchClientSecret` (type: `string`):

Your own Twitch app Client Secret. Leave empty to use the Actor's built-in app.

## Actor input object example

```json
{
  "channels": [
    "kaicenat",
    "xqc"
  ],
  "games": [],
  "period": "7d",
  "maxClipsPerSource": 20,
  "minViews": 0,
  "language": ""
}
```

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

// Run the Actor and wait for it to finish
const run = await client.actor("datacraft-tools/twitch-top-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": [
        "kaicenat",
        "xqc",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("datacraft-tools/twitch-top-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": [
    "kaicenat",
    "xqc"
  ]
}' |
apify call datacraft-tools/twitch-top-clips --silent --output-dataset

```

## MCP server setup

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