# YouTube Transcript API & Scraper with Timestamps (`morgan-studio/youtube-transcript-scraper`) Actor

YouTube transcript API and transcript extractor: get the transcript of any YouTube video with captions, full text plus timestamped segments, as JSON, text or CSV. Videos, Shorts, channels and playlists, any caption language, human or auto-generated. Videos without captions are free.

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

## Pricing

from $5.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 API & Scraper

### What is YouTube Transcript API & Scraper?

**YouTube Transcript API & Scraper** is a **YouTube transcript API** and **transcript extractor**: it gets the **transcript of any YouTube video that has captions**, captions and subtitles alike: the full text in one field, plus timestamped segments (start, duration, text) for every caption line. Paste watch URLs, youtu.be links, Shorts URLs, or bare video ids, in any mix, or give it channels and playlists, and choose your preferred caption languages. Human-made captions are used first; YouTube's auto-generated captions are the fallback, and you can switch them off.

Each video also comes back with its title, channel, channel id, duration, publish date, view count, the caption language used, whether it was auto-generated, and the list of every caption language the video offers.

You pay per transcript delivered: **$0.005 per transcript** ($5 per 1,000), platform usage included. **Videos without captions, unavailable videos, and blocked requests are reported in the dataset and free.**

The easiest way to try it: paste a few video links into the **Videos** field and press **Start**.

### What data can you extract from YouTube videos?

| Field | Example |
|---|---|
| `videoId`, `url` | `iG9CE55wbtY`, `https://www.youtube.com/watch?v=iG9CE55wbtY` |
| `title` | Do schools kill creativity? | Sir Ken Robinson | TED |
| `channelName`, `channelId` | TED, `UCAuUUnT6oDeKwE6v1NGQxug` |
| `durationSeconds` | 1203 |
| `publishDate` | 2007-01-06T21:00:34-08:00 |
| `viewCount` | 25037463 |
| `language`, `languageName` | `en`, English |
| `isAutoGenerated` | false (human-made captions) |
| `isAutoDubbed` | false (see Limits) |
| `matchedPreferredLanguage` | true |
| `availableLanguages` | every caption track: `[{ languageCode, name, isAutoGenerated, isAutoDubbed }]` |
| `transcriptText` | the whole transcript as one string |
| `segments` | `[{ "start": 1.36, "duration": 1.68, "text": "..." }]` (seconds) |
| `segmentCount`, `wordCount`, `characterCount` | 427, 3170, 17574 |
| `sourceUrl`, `sourceName` | the channel or playlist a video came from (`null` for videos you listed yourself) |
| `fetchStatus`, `error` | `ok`, `null` |

Example record (segments shortened):

```json
{
  "videoId": "dQw4w9WgXcQ",
  "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "title": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
  "channelName": "Rick Astley",
  "channelId": "UCuAXFkgsw1L7xaCfnd5JJOw",
  "durationSeconds": 213,
  "publishDate": "2009-10-24T23:57:33-07:00",
  "viewCount": 1826397375,
  "language": "en",
  "languageName": "English",
  "isAutoGenerated": false,
  "isAutoDubbed": false,
  "matchedPreferredLanguage": true,
  "availableLanguages": [
    { "languageCode": "en", "name": "English", "isAutoGenerated": false, "isAutoDubbed": false },
    { "languageCode": "en", "name": "English (auto-generated)", "isAutoGenerated": true, "isAutoDubbed": false }
  ],
  "transcriptText": "[♪♪♪] ♪ We're no strangers to love ♪ ♪ You know the rules and so do I ♪ ...",
  "segments": [
    { "start": 1.36, "duration": 1.68, "text": "[♪♪♪]" },
    { "start": 18.64, "duration": 3.24, "text": "♪ We're no strangers to love ♪" }
  ],
  "segmentCount": 61,
  "wordCount": 487,
  "characterCount": 2089,
  "input": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "fetchedAt": "2026-10-14T04:50:12.306Z",
  "fetchStatus": "ok",
  "error": null
}
```

### Why use this YouTube transcript scraper?

- **Every video comes back.** Each input line produces a record, including failures, with a `fetchStatus` and an `error` message. Nothing is dropped silently, and failed records are free.
- **Built for YouTube's bot check.** YouTube answers many cloud IPs with "Sign in to confirm you're not a bot". When that happens the actor moves to a fresh Apify Proxy session and keeps the sessions YouTube lets through, instead of failing the video.
- **Tested before release.** In the release verification runs on Apify (2026-10-13), 17 of 17 captioned test videos returned full transcripts: human and auto-generated captions; English, Spanish, German, Japanese, Korean and French; 19 seconds to 3 hours 37 minutes; a Short, music videos, and uploads from the same day. A 60-video run over ten channels returned transcripts for all 58 videos that had captions. The video without captions, the removed video, and the malformed input came back as free failure records. A channel run (Veritasium, 10 newest videos) and a playlist run (10 videos) listed and transcribed 20 of 20.
- **Original speech first.** On videos with YouTube's AI auto-dubbing, auto-generated tracks in dubbed languages transcribe the dub, not what was said. The actor prefers the original-language track and flags dub tracks with `isAutoDubbed`.
- **No browser, no sign-in.** Plain HTTP requests, no YouTube account and no cookies.

### How to scrape YouTube transcripts

1. Open the **Input** tab.
2. Add videos to **Videos**, one per line: `https://www.youtube.com/watch?v=...`, `https://youtu.be/...`, `https://www.youtube.com/shorts/...`, or an 11-character id. Or add **Channels** or **Playlists** and set **Max videos per channel or playlist**.
3. Set **Preferred languages** (default `en`). Add more codes in order of preference, for example `es`, `de`.
4. Leave **Allow auto-generated captions** on unless you need human-made captions only.
5. Leave **Proxy configuration** on Apify Proxy.
6. Press **Start**. When the run finishes, open the **Output** tab or download the dataset as JSON, CSV, or Excel.

### Call the YouTube transcript API from code

Call the actor over the Apify API and get the transcripts back in the same request:

```bash
curl -X POST "https://api.apify.com/v2/acts/morgan-studio~youtube-transcript-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"videoUrls": ["https://www.youtube.com/watch?v=jNQXAC9IVRw"], "preferredLanguages": ["en"]}'
```

From Python, with the `apify-client` package:

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("morgan-studio/youtube-transcript-scraper").call(
    run_input={"videoUrls": ["https://www.youtube.com/watch?v=jNQXAC9IVRw"]}
)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["title"], item["transcriptText"][:200])
```

The requests run on Apify's servers, not your IP, so a blocked IP on your side doesn't stop them. The API tab above has snippets for JavaScript, the CLI and MCP.

### YouTube transcript extractor for channels and playlists

Put channel URLs in **Channels** or playlist URLs in **Playlists** and set **Max videos per channel or playlist**. Each video comes back as its own record, so a whole playlist's transcripts export in one run.

### Download YouTube transcripts as JSON, text or CSV

Each record carries the full transcript in `transcriptText` and the timestamped lines in `segments`. Download the dataset from the Output tab as JSON, CSV or Excel, or from `https://api.apify.com/v2/datasets/<datasetId>/items?format=json`.

### Input

- **Videos** (`videoUrls`): watch, youtu.be, Shorts, embed or live URLs, or bare 11-character ids. Duplicates are skipped.
- **Channels** (`channelUrls`): `https://www.youtube.com/@handle`, `/channel/UC...`, `/c/...` or `/user/...`. The newest videos on the Videos tab; add `/shorts` or `/streams` for those tabs.
- **Playlists** (`playlistUrls`): any URL with `?list=...`, in playlist order.
- **Max videos per channel or playlist** (`maxVideosPerSource`): default 20, up to 1,000.
- **Preferred languages** (`preferredLanguages`): caption language codes in order, default `["en"]`. For each language a human-made track is used first, then an auto-generated one. If none exist, the actor returns the video's own track (human-made first) and sets `matchedPreferredLanguage` to `false`.
- **Allow auto-generated captions** (`allowAutoGenerated`): default on.
- **Include timestamped segments** (`includeTimestamps`): default on. Off returns `transcriptText` only.
- **Max concurrency** (`maxConcurrency`): videos fetched at once, default 3, up to 10.
- **Proxy configuration** (`proxyConfiguration`): default Apify Proxy. Strongly recommended.

Example input:

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=iG9CE55wbtY",
    "https://youtu.be/jNQXAC9IVRw",
    "https://www.youtube.com/shorts/aNI2jv7lBPQ",
    "kJQP7kiw5Fk"
  ],
  "preferredLanguages": ["en", "es"],
  "allowAutoGenerated": true,
  "includeTimestamps": true
}
```

### How much does it cost to scrape YouTube transcripts?

You pay per transcript delivered. There is no separate charge for Apify platform usage; it is included in the price.

| Event | Price |
|---|---|
| Transcript (`fetchStatus: "ok"`) | $0.005 ($5 per 1,000) |
| Actor start | $0.00005 per run |

Only videos that came back with a transcript are charged. Videos without captions, unavailable or private videos, blocked requests, and invalid input are free. They are still written to the dataset so you can see what happened.

For example, 200 videos where 180 have captions cost 180 × $0.005 = $0.90.

You can cap a run's total charge in the run options (maximum cost per run). When the next transcript would pass the cap, the run stops and logs how many videos were not processed.

### Limits

- **Videos without captions have no transcript.** The actor reads YouTube's caption tracks; it does not run speech-to-text. Such videos come back as `no-captions` (free).
- **YouTube changes this path; failures are free.** The actor uses the caption data YouTube's mobile apps receive. YouTube changes these internals without notice, and tightens its bot check from time to time. When a change breaks a request, the affected videos come back as `error` or `blocked` records and are not charged.
- **Use the proxy.** Without Apify Proxy, most cloud runs get the bot check and the videos come back as `blocked`.
- **Auto-dubbed tracks.** YouTube's AI dubbing adds auto-generated caption tracks in the dubbed languages. These are listed in `availableLanguages` with `isAutoDubbed: true` and used only when no original-language track fits.
- **Age-restricted, members-only, and private videos** need a signed-in account; they come back as `login-required` or `private` (free).
- Channel and playlist listing reads the same pages a signed-out visitor sees. A channel or playlist that cannot be listed comes back as one `source-not-found` or `source-error` record (free).

### How failures are reported

Every input line produces one record. Each record has a `fetchStatus`:

- `ok`: the transcript was read.
- `no-captions`: the video has no caption tracks (or only auto-generated ones while those are switched off).
- `unavailable`, `private`, `login-required`: YouTube will not play this video to a signed-out visitor.
- `blocked`: YouTube kept answering with its bot check on 10 proxy sessions in a row.
- `invalid-input`: the line is not a YouTube video, channel, or playlist URL or id.
- `source-not-found`, `source-error`, `source-empty`: a channel or playlist could not be listed, or lists no videos.
- `error`: the caption download failed repeatedly, or the response could not be read.

The `error` field says what happened. The run log ends with a summary line: transcripts, failures by kind, bot checks seen, proxy sessions retired, requests, elapsed time, and usage.

### FAQ

**What about "YouTube transcript API IP blocked" errors?** Those come from fetching transcripts from a cloud server's IP. This actor runs through Apify Proxy and retries on a fresh session when YouTube answers with a bot check, so your own IP never touches YouTube.

**How do I export a YouTube playlist's transcripts?** Paste the playlist URL into **Playlists**, set how many videos to take, run, and download the dataset. One record per video.

**Can I get the transcript as JSON?** Yes. Every record is JSON, with `transcriptText` (one string) and `segments` (start, duration, text). Switch off **Include timestamped segments** if you only want the text.

**Does it need a YouTube API key or a login?** No. It reads the captions YouTube shows to a signed-out viewer.

**Which languages are supported?** Any language a video has captions in. Put the codes you want in **Preferred languages**, in order. `availableLanguages` lists every track the video offers.

**Can it transcribe videos that have no captions?** No. This actor returns YouTube's own captions only. Videos without them are reported as `no-captions` and not charged.

**Can I call it from my code or an AI agent?** Yes. Like any Apify actor it runs through the Apify API: start a run with your input and read the dataset as JSON. `transcriptText` is ready to pass to a language model.

**Can I transcribe a whole channel or playlist?** Yes. Put it in **Channels** or **Playlists** and raise **Max videos per channel or playlist**. Each video is charged only if it has a transcript.

**How do I keep costs under control?** Set a maximum cost per run in the run options. You are only charged for transcripts actually delivered.

**Is it legal to scrape YouTube transcripts?** The actor reads only data that a signed-out visitor can see. Whether your use is allowed depends on what you do with the data and where you are. If you are unsure, ask a lawyer.

### Ready-made examples

Each one opens with its input filled in; copy it to your account and run.

- [Download YouTube Shorts transcripts](https://apify.com/morgan-studio/youtube-transcript-scraper/examples/download-youtube-shorts-transcripts)
- [Export YouTube playlist transcripts](https://apify.com/morgan-studio/youtube-transcript-scraper/examples/export-youtube-playlist-transcripts)
- [YouTube channel transcripts: latest videos](https://apify.com/morgan-studio/youtube-transcript-scraper/examples/youtube-channel-transcripts-latest-videos)
- [YouTube transcript text for AI and LLMs](https://apify.com/morgan-studio/youtube-transcript-scraper/examples/youtube-transcript-text-for-ai-and-llms)
- [YouTube video transcripts with timestamps](https://apify.com/morgan-studio/youtube-transcript-scraper/examples/youtube-video-transcripts-with-timestamps)

### More actors from the same developer

- [Amazon Product Scraper & Price API (ASIN, Keyword)](https://apify.com/morgan-studio/amazon-product-price-scraper)
- [App Store Reviews Scraper: Apple & Google Play API](https://apify.com/morgan-studio/app-store-reviews-scraper)
- [Zillow Scraper API: Property, Search & Zestimate](https://apify.com/morgan-studio/zillow-property-scraper)

### Changelog

- **2026-10-15**: README and listing reworded for search; new sections on API use, scheduling and export; links to the ready-made examples. No change to the scraper or the prices.
- **0.1** (2026-10-13): First release. Transcripts from video URLs and ids, channels, and playlists, preferred languages, human or auto-generated captions, timestamped segments, auto-dub detection, proxy session rotation on YouTube's bot check. Pay per transcript: $0.005, failures free.

# Actor input Schema

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

One video per line: a watch URL (https://www.youtube.com/watch?v=...), a youtu.be link, a Shorts URL, an embed or live URL, or the bare 11-character video id. Duplicates are skipped. You can leave this empty and use channels or playlists instead.

## `channelUrls` (type: `array`):

Channel URLs, one per line: https://www.youtube.com/@handle, /channel/UC..., /c/name or /user/name. The newest videos from the channel's Videos tab are transcribed (add /shorts or /streams to the URL for those tabs), up to Max videos per channel or playlist.

## `playlistUrls` (type: `array`):

Playlist URLs, one per line (any URL with ?list=...). Videos are transcribed in playlist order, up to Max videos per channel or playlist.

## `maxVideosPerSource` (type: `integer`):

How many videos to take from each channel or playlist (1 to 1000).

## `preferredLanguages` (type: `array`):

Caption language codes in order of preference (en, es, de, ja, pt-BR, ...). For each language the actor takes a human-made track first, then an auto-generated one. If none of them exist, it returns the video's own track (human first) and sets matchedPreferredLanguage to false.

## `allowAutoGenerated` (type: `boolean`):

Use YouTube's automatic (speech recognition) captions when no human-made track is available. Turn off to accept human-made captions only; videos that only have automatic captions are then reported as no-captions and not charged.

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

Add a segments array with start time, duration (seconds) and text for every caption line. Off: only the joined transcriptText.

## `maxConcurrency` (type: `integer`):

How many videos to fetch at the same time (1 to 10).

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

Apify Proxy is strongly recommended. YouTube asks many cloud IPs to sign in; the actor moves to a fresh proxy session whenever that happens. Without a proxy most videos come back as blocked (free).

## Actor input object example

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=iG9CE55wbtY",
    "https://youtu.be/jNQXAC9IVRw",
    "https://www.youtube.com/shorts/aNI2jv7lBPQ"
  ],
  "channelUrls": [
    "https://www.youtube.com/@kurzgesagt"
  ],
  "playlistUrls": [
    "https://www.youtube.com/playlist?list=PLFs4vir_WsTwEd-nJgVJCZPNL3HALHHpF"
  ],
  "maxVideosPerSource": 20,
  "preferredLanguages": [
    "en",
    "es"
  ],
  "allowAutoGenerated": true,
  "includeTimestamps": true,
  "maxConcurrency": 3,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `transcripts` (type: `string`):

One record per video: title, channel, language, auto-generated flag, word count, transcript text and fetchStatus.

## `allRecords` (type: `string`):

Every record with all fields, including the timestamped segments.

# 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=iG9CE55wbtY",
        "https://youtu.be/jNQXAC9IVRw"
    ],
    "preferredLanguages": [
        "en"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("morgan-studio/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=iG9CE55wbtY",
        "https://youtu.be/jNQXAC9IVRw",
    ],
    "preferredLanguages": ["en"],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("morgan-studio/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=iG9CE55wbtY",
    "https://youtu.be/jNQXAC9IVRw"
  ],
  "preferredLanguages": [
    "en"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call morgan-studio/youtube-transcript-scraper --silent --output-dataset

```

## MCP server setup

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