# YouTube Transcript Scraper — Captions & Subtitles to Text (`hipersoft/youtube-transcript-scraper`) Actor

Get the full transcript of any YouTube video: clean text plus timestamped segments, in any available language (auto-translation supported). Paste video URLs and export as JSON, CSV or Excel — perfect for summaries, subtitles, research and LLMs.

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

## Pricing

from $0.0025 / transcript scraped

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
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

## YouTube Transcript Scraper — Captions & Subtitles to Text

Get the **full transcript of any YouTube video** — clean, readable text plus timestamped segments — in any available language, with **auto-translation** when your language isn't published natively. Paste video links and export to **JSON, CSV or Excel**, or pull straight from the API.

Perfect for **video summaries, content repurposing, subtitles and captions, SEO, research, accessibility, and feeding transcripts to LLMs and RAG pipelines**.

***

### What you get

One row per video:

| Field | Description |
|---|---|
| `videoId` / `videoUrl` / `videoTitle` | The video |
| `hasTranscript` | Whether a transcript was found |
| `language` / `langName` | Transcript language |
| `isAutoGenerated` | Auto (ASR) captions vs. human-written |
| `isAutoTranslated` | Whether it was auto-translated to your language |
| `segmentCount` | Number of caption lines |
| `durationSeconds` | Length covered by the transcript |
| `fullText` | The complete transcript as one clean string |
| `segments` | Timestamped lines: `{ start, end, dur, text }` *(when timestamps are enabled)* |
| `availableLanguages` | Languages offered for the video *(when no transcript in your language)* |
| `collectedAt` | When the row was scraped |

***

### How to use

#### 1. Add videos

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=arj7oStGLkU",
    "https://youtu.be/dQw4w9WgXcQ"
  ],
  "language": "en",
  "includeTimestamps": true,
  "maxItems": 200
}
```

#### 2. Options

- **Language** — a 2-letter code (`en`, `es`, `fr`, `de`, `pt`, `hi`, `ar`, `ja`, …). If the video has no native track in that language, it's auto-translated. Use `auto` for the video's default track.
- **Include timestamped segments** — add per-line `{start, end, text}` alongside the full text.
- **Max videos** — cap the number processed (0 = no limit).

***

### Example output

```json
{
  "videoId": "arj7oStGLkU",
  "videoTitle": "Inside the Mind of a Master Procrastinator | Tim Urban | TED",
  "hasTranscript": true,
  "language": "en",
  "isAutoGenerated": false,
  "isAutoTranslated": false,
  "segmentCount": 315,
  "durationSeconds": 842.6,
  "fullText": "So in college, I was a government major, which means I had to write a lot of papers…",
  "segments": [
    { "start": 12.645, "end": 14.015, "dur": 1.37, "text": "So in college," }
  ],
  "collectedAt": "2026-09-20T09:00:00.000Z"
}
```

***

### Common use cases

- **Summaries & repurposing** — turn talks and tutorials into articles, notes or threads.
- **Subtitles & captions** — export text for translation, editing or reuse.
- **SEO & content** — mine video transcripts for keywords and quotes.
- **Research & analysis** — search across many videos' transcripts at once.
- **LLMs & RAG** — feed clean transcripts into models and knowledge bases.

***

### Frequently asked questions

**Do I need any login, account or key?** No. Just paste video links and run.

**Which languages are supported?** Whatever the video offers, plus auto-translation into your chosen language when a native track isn't available.

**Does it work for auto-generated captions?** Yes — both human-written and auto-generated (ASR) captions are returned; `isAutoGenerated` tells you which.

**What if a video has captions disabled?** The row is returned with `hasTranscript: false` — the run never fails.

**Can I process many videos at once?** Yes — list multiple videos and set Max videos.

**What format is the data?** A flat table you can export as JSON, CSV or Excel, or fetch from the Apify API.

***

### Related scrapers

Building a YouTube toolkit? Pair this with our YouTube comments scraper, YouTube channel scraper and YouTube search scraper — all with the same clean, one-row-per-item output.

# Actor input Schema

## `videoUrls` (type: `array`):

One or more YouTube videos to get transcripts for. Paste watch URLs (https://www.youtube.com/watch?v=…), youtu.be links, Shorts URLs, or bare 11-character video IDs.

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

Preferred transcript language as a 2-letter code (en, es, fr, de, pt, hi, ar, ja …). If the video has no native track in that language, it is auto-translated. Use 'auto' to take the video's default track.

## `includeTimestamps` (type: `boolean`):

Include the per-line timestamped segments (start, end, text) in addition to the full transcript text.

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

Maximum number of videos to process (0 = no limit).

## Actor input object example

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=arj7oStGLkU"
  ],
  "language": "en",
  "includeTimestamps": true,
  "maxItems": 100
}
```

# Actor output Schema

## `results` (type: `string`):

The results as dataset items.

# 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 = {
    "videoUrls": [
        "https://www.youtube.com/watch?v=arj7oStGLkU"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("hipersoft/youtube-transcript-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 = { "videoUrls": ["https://www.youtube.com/watch?v=arj7oStGLkU"] }

# Run the Actor and wait for it to finish
run = client.actor("hipersoft/youtube-transcript-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 '{
  "videoUrls": [
    "https://www.youtube.com/watch?v=arj7oStGLkU"
  ]
}' |
apify call hipersoft/youtube-transcript-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,hipersoft/youtube-transcript-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/UpxbnfTDjVj9YIwZa/builds/tIIrCncmVOY8i2a0d/openapi.json
