# YouTube Transcript Scraper (`piotrv1001/youtube-transcript-scraper`) Actor

Get the full transcript of any YouTube video as clean text plus timestamped segments, in the language you choose. Works with manual and auto-generated captions and lists every available language. Adds title, channel, views, length and description. Bulk video URLs or IDs, export to JSON/CSV.

- **URL**: https://apify.com/piotrv1001/youtube-transcript-scraper.md
- **Developed by:** [FalconScrape](https://apify.com/piotrv1001) (community)
- **Categories:** Social media, AI, Videos
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 transcripts

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/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

Get the **full transcript of any YouTube video** as clean text plus timestamped segments. The **YouTube Transcript Scraper** reads manual and auto-generated captions, lets you pick the language, and adds the video's title, channel, views, length, description and tags. Paste one video or thousands and download the results as JSON, CSV or Excel. Use it to feed LLMs and RAG pipelines, summarize videos, repurpose content, research topics or build searchable archives.

### ✨ Features

- 📝 **Full Text + Timestamps**: The whole transcript as one text field, plus every caption line with its start time and duration in seconds.
- 🌍 **Any Language**: Ask for a language (`en`, `es`, `de`, `pt-BR`…). Manual captions are preferred over auto-generated ones.
- 🤖 **Auto-Generated Captions**: Works on videos that only have YouTube's automatic captions; `isAutoGenerated` tells you which you got.
- 🗂️ **All Available Languages**: Each row lists every caption language the video has.
- 🎬 **Video Details Included**: Title, channel, view count, duration, description, tags and thumbnail.
- 🔗 **Any Link Format**: `watch?v=`, `youtu.be`, Shorts, live and embed links, or plain 11-character video IDs.

### 🛠️ How It Works

1. **Paste video URLs or IDs** – one per line.
2. **Optionally pick a language** – leave it empty to get the video's original language.
3. **Run the Scraper** – one row per video, ready to download as JSON, CSV or Excel or to pull through the API.

### ⚙️ Input

| Field                  | What it does                                                                                                      |
| ---------------------- | ----------------------------------------------------------------------------------------------------------------- |
| **Video URLs or IDs**  | YouTube links (watch, youtu.be, Shorts, live) or video IDs, one per line.                                         |
| **Language**           | Optional language code. If the video has no captions in it, you get the original-language transcript instead.   |
| **Max transcripts**    | Stop after this many transcripts. Default 50.                                                                     |

```json
{
    "videos": ["https://www.youtube.com/watch?v=XVv6mJpFOb0", "dQw4w9WgXcQ"],
    "language": "en",
    "maxItems": 100
}
```

Videos without any captions (some music videos, sports broadcasts, very new uploads) are listed in the run's status message and are **not charged**. Translated captions are not generated: if the language you ask for doesn't exist, `requestedLanguageFound` is `false` and you get the original language.

### 💰 Pricing

Pay only for the transcripts you get. No monthly rental.

| Event           | Price                                     | What you get                                                                 |
| --------------- | ----------------------------------------- | ---------------------------------------------------------------------------- |
| **Transcript**  | $0.004 per transcript ($4 per 1,000)      | Full text, timestamped segments, language info and video details for one video |
| **Actor start** | $0.00005 per run                          | Charged once when the run starts.                                            |

Examples: 50 videos = $0.20 · 1,000 videos = $4.00.

### 📊 Sample Output Data

```json
{
    "videoId": "CRi7QMCscf0",
    "url": "https://www.youtube.com/watch?v=CRi7QMCscf0",
    "title": "❗I got this casserole recipe from my friend in France!🔝My family asks me to cook it every day!",
    "channelName": "Delicious and simple meals",
    "channelId": "UCT_AVj8skF0iZkoevQyYHww",
    "channelUrl": "https://www.youtube.com/channel/UCT_AVj8skF0iZkoevQyYHww",
    "durationSeconds": 1417,
    "viewCount": 2419832,
    "isLive": false,
    "description": "Welcome to my kitchen! Today, I'm sharing a delicious casserole recipe I got from a friend in France…",
    "keywords": ["dinner", "recipe"],
    "thumbnailUrl": "https://i.ytimg.com/vi/CRi7QMCscf0/sddefault.jpg",
    "language": "en",
    "languageName": "English",
    "isAutoGenerated": false,
    "requestedLanguageFound": null,
    "availableLanguages": [
        { "code": "ar", "name": "Arabic", "isAutoGenerated": false },
        { "code": "en", "name": "English", "isAutoGenerated": false }
    ],
    "segmentCount": 106,
    "wordCount": 1089,
    "text": "Hello and welcome to my kitchen. Let's dive into the recipe. Take 4 eggs and break them into a bowl…",
    "segments": [
        { "start": 0.4, "duration": 2.2, "text": "Hello and welcome to my kitchen." },
        { "start": 2.88, "duration": 2, "text": "Let's dive into the recipe." }
    ],
    "scrapedAt": "2026-10-17T06:07:32.792Z"
}
```

### ❓ FAQ

**Do I need a YouTube account or API key?** No. Paste links and run.

**What if a video is private, removed or age-restricted?** It is skipped, named in the status message and not charged.

**I pasted the same video twice. Do I pay twice?** No. Each video is saved and charged once per run.

**Can I get transcripts for a whole channel or a search?** Get the video URLs with the [YouTube Channel Videos Scraper](https://apify.com/piotrv1001/youtube-channel-videos-scraper) or [YouTube Search Scraper](https://apify.com/piotrv1001/youtube-search-scraper), then paste them here.

### 🔗 More YouTube Actors

- [YouTube Comments Scraper](https://apify.com/piotrv1001/youtube-comments-scraper): comments and replies with likes, authors, pinned and hearted flags.
- [YouTube Channel Videos Scraper](https://apify.com/piotrv1001/youtube-channel-videos-scraper): every video, Short or live stream of a channel with views and duration.
- [YouTube Search Scraper](https://apify.com/piotrv1001/youtube-search-scraper): search results for any keyword with date, length and view filters.

# Actor input Schema

## `videos` (type: `array`):

YouTube video links (watch, youtu.be, shorts, live) or 11-character video IDs, one per line.

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

Optional language code (en, es, de, pt-BR…). If the video has no captions in it, you get the original-language transcript. Leave empty for the original language.

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

Stop after this many transcripts.

## Actor input object example

```json
{
  "videos": [
    "https://www.youtube.com/watch?v=XVv6mJpFOb0",
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "maxItems": 50
}
```

# 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 = {
    "videos": [
        "https://www.youtube.com/watch?v=XVv6mJpFOb0",
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
    ],
    "maxItems": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("piotrv1001/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 = {
    "videos": [
        "https://www.youtube.com/watch?v=XVv6mJpFOb0",
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    ],
    "maxItems": 50,
}

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

```

## MCP server setup

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