# Twitch Transcript Extractor 🟣 (`scriptbase/twitch-transcript-extractor`) Actor

🟣 Convert any Twitch VOD or clip to text. Extract transcripts and subtitles with timestamps. Outputs JSON, SRT, or plain text. Speech-to-text powered. 14+ languages. No login needed.

- **URL**: https://apify.com/scriptbase/twitch-transcript-extractor.md
- **Developed by:** [Scriptbase](https://apify.com/scriptbase) (community)
- **Categories:** Agents, Automation, Social media
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.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.

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

## Twitch VOD Transcript Extractor

Extract transcripts from Twitch VODs and clips. Give it a Twitch video URL and get back timestamped text — ideal for turning stream archives into searchable content, generating captions for highlights, or analyzing gameplay commentary at scale.

Works with any public Twitch VOD or clip. No login required.

### What it does

1. You provide a Twitch VOD or clip URL.
2. The actor extracts the spoken transcript with precise timestamps.
3. You get back structured text in JSON, plain text, SRT, or WebVTT format.

Twitch VODs can run for hours — a full stream session, a tournament broadcast, or a marathon charity event. This actor handles that scale and returns the same flat, timestamped structure regardless of duration.

### Key features

- **VOD & clip support** — works with full VOD archives (`/videos/<id>`) and short clips (`clips.twitch.tv/<slug>`).
- **Long-duration handling** — Twitch streams often exceed two hours. The actor is designed to handle extended video without truncation.
- **Timestamped segments** — every segment includes `start` and `end` times, making it possible to jump to any moment in a long VOD by text search.
- **4 output formats** — JSON with timestamps, plain text, SRT subtitles, or WebVTT for downstream video editors and players.
- **Multi-language** — uses any available captions; speech-to-text fallback covers 14 languages.
- **No login required.**

### Supported languages

When Twitch provides auto-generated or manual caption tracks, the actor uses them. When captions are unavailable, speech-to-text fallback supports:

| Code | Language |
|------|----------|
| `en` | English |
| `es` | Spanish |
| `fr` | French |
| `de` | German |
| `pt` | Portuguese |
| `it` | Italian |
| `nl` | Dutch |
| `ja` | Japanese |
| `ko` | Korean |
| `zh` | Chinese |
| `ar` | Arabic |
| `ru` | Russian |
| `tr` | Turkish |
| `hi` | Hindi |

### Input

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `url` | string | *(required)* | Twitch VOD or clip URL |
| `language` | string | `"en"` | Preferred language ([ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)) |
| `format` | string | `"json"` | `"json"`, `"text"`, `"srt"`, or `"vtt"` |

#### Supported URLs

```
https://www.twitch.tv/videos/1234567890
https://clips.twitch.tv/FunnyClipSlugHere
```

### Output example

When `format` is `json`, each dataset row looks like this:

```json
{
    "url": "https://www.twitch.tv/videos/1234567890",
    "platform": "twitch",
    "language": "en",
    "duration_sec": 7452,
    "segments": [
        { "start": 0.0, "end": 5.2, "text": "What is up everyone, welcome back to the stream." },
        { "start": 5.2, "end": 11.0, "text": "Today we are doing a full ranked grind, no breaks until Diamond." }
    ],
    "full_text": "What is up everyone, welcome back to the stream. Today we are doing a full ranked grind, no breaks until Diamond."
}
```

Note: `duration_sec` for long VODs can be in the thousands. The segments array covers the full duration.

When `format` is `text`, `srt`, or `vtt`, the formatted transcript is written to the actor's key-value store under the `OUTPUT` key.

When extraction fails, the dataset row contains a clear error:

```json
{
    "error": "NOT_FOUND",
    "message": "The video is private, removed, or has no extractable transcript."
}
```

### Error codes

| Code | Meaning |
|------|---------|
| `INVALID_FORMAT` | `format` was not one of json/text/srt/vtt |
| `BAD_REQUEST` | The URL was malformed or rejected by the transcript operation |
| `UNSUPPORTED_PLATFORM` | No transcript operation serves this URL's platform |
| `UNAUTHORIZED` | The actor's ScriptBase key is missing, invalid, or revoked |
| `INSUFFICIENT_CREDITS` | The ScriptBase account behind this actor is out of credits |
| `NOT_FOUND` | The video is private, removed, or has no extractable transcript |
| `UPSTREAM_FAILED` | Every transcript source failed -- retry shortly |
| `RATE_LIMITED` | Too many requests -- retry after a short delay |
| `TIMEOUT` | Extraction took longer than the actor's poll budget |
| `INTERNAL_ERROR` | Unexpected error during extraction |

### Use cases

- **Searchable stream archives** — full VODs are hard to skim. Extract the transcript and index it so viewers, editors, or community managers can jump to any topic by keyword.
- **Clip & highlight captioning** — export SRT or WebVTT for a clip to add burned-in or soft subtitles before posting to YouTube Shorts, TikTok, or Instagram Reels.
- **Esports & gameplay analysis** — capture commentator analysis, callouts, and strategy discussion from tournament broadcasts. Feed text into analysis pipelines or LLMs.
- **Moderation & compliance** — scan transcripts for policy violations, prohibited phrases, or brand-safety issues without watching hours of footage.
- **Content repurposing** — turn a streamer's best moments or tutorial segments into written guides, forum posts, or wiki entries.
- **Audience research** — aggregate transcripts across multiple streamers in a category to understand what language, games, and topics drive engagement.

### Integrations

Use this actor through the [Apify API](https://docs.apify.com/api/v2) or integrate it into your content pipeline:

- **Python** — `apify_client.actor("your-actor-id").call(run_input={"url": "https://www.twitch.tv/videos/1234567890"})`
- **JavaScript** — `await client.actor("your-actor-id").call({url: "https://clips.twitch.tv/FunnyClipSlugHere"})`
- **Zapier / Make / n8n** — trigger on a new VOD URL in a spreadsheet and automatically generate a transcript for your content library.
- **Webhooks** — get notified when a long VOD transcript finishes, triggering summarization or archival workflows.

### FAQ

**Does this need a Twitch account or API key?**
No. The actor works with any publicly accessible VOD or clip without credentials.

**My VOD is three hours long — will it still work?**
Yes. The actor is built to handle long-duration Twitch content. Note that extraction time scales with the length of the video; set a generous actor timeout for very long streams.

**Are subscriber-only VODs supported?**
No. Only public VODs and clips accessible without a Twitch account are supported.

**What if a clip has no captions?**
The actor applies speech-to-text extraction. See the [supported languages](#supported-languages) table for coverage.

**Can I extract transcripts from multiple VODs in one batch?**
Use the Apify API in a loop or build a Make/n8n scenario that iterates over a list of VOD URLs.

**How do I find a VOD URL if I only have a channel name?**
Browse the streamer's Videos tab on Twitch, open a VOD, and copy the URL from your browser's address bar.

**What does it cost?**
Pricing is per transcribed minute (1 minute = 1 charge unit, minimum 1), so you pay only for the audio actually processed — and failed extractions cost nothing. The exact per-minute price is shown on this actor's Apify Store page.

# Actor input Schema

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

URL of a Twitch VOD or clip.

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

Preferred transcript language as an ISO 639-1 code (e.g. en, es, fr, de, ja).

## `format` (type: `string`):

Choose how the transcript is returned. JSON includes timestamps per segment. Text returns the full transcript as a plain string. SRT and VTT are subtitle file formats.

## Actor input object example

```json
{
  "url": "https://www.twitch.tv/videos/1234567890",
  "language": "en",
  "format": "json"
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `segments` (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 = {
    "url": "https://www.twitch.tv/videos/1234567890",
    "language": "en",
    "format": "json"
};

// Run the Actor and wait for it to finish
const run = await client.actor("scriptbase/twitch-transcript-extractor").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 = {
    "url": "https://www.twitch.tv/videos/1234567890",
    "language": "en",
    "format": "json",
}

# Run the Actor and wait for it to finish
run = client.actor("scriptbase/twitch-transcript-extractor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "url": "https://www.twitch.tv/videos/1234567890",
  "language": "en",
  "format": "json"
}' |
apify call scriptbase/twitch-transcript-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=scriptbase/twitch-transcript-extractor",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/1FWc3VwTpJeFbb9ut/builds/89E0uGx7GeVj3qSeg/openapi.json
