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

YouTube Transcript Scraper SD - YouTube Transcript Scraper is a powerful tool that extracts full transcripts, timed segments, word counts and caption languages from YouTube videos and Shorts by video URL and language - YouTube transcript extractor for AI and content research.

- **URL**: https://apify.com/neuro-scraper/youtube-transcript-scraper.md
- **Developed by:** [Neuro Scraper](https://apify.com/neuro-scraper) (community)
- **Categories:** Videos, AI
- **Features:** Full permissions
- **Stats:** 2 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.49 / 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.
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 - full transcripts with timestamps from YouTube videos and Shorts

The YouTube Transcript Scraper turns YouTube captions into text you can use. Paste video or Shorts links and get the full transcript as plain text plus timed segments with start, end and duration.

Pick the language you want. The YouTube Transcript Scraper prefers captions written by the creator, falls back to YouTube's auto-generated captions, and can ask YouTube to auto-translate when your language is missing.

No login, no Google account and no YouTube Data API key. Every row is ready to export as JSON, CSV or Excel, or to send straight into an AI pipeline.

#### What the YouTube Transcript Scraper does

For every video URL, the YouTube Transcript Scraper lists the caption tracks YouTube has for that video, chooses the best one for your language and caption type, and downloads it.

The result is one dataset row per video: title, channel, duration, the language used, whether it was auto-generated or translated, the full text, a word count and the timed segments.

The row also lists every caption language the video offers, so you can see at a glance what else is available.

#### Who uses the YouTube Transcript Scraper

AI and LLM builders who need clean video text for summaries, retrieval, chatbots and training data.

Content teams who repurpose videos into blog posts, newsletters, show notes and social posts.

Researchers who analyse what is said in lectures, interviews, news clips or product reviews.

SEO and accessibility teams who need searchable text and subtitles for their own and competitors' videos.

### Input fields for the YouTube Transcript Scraper

Only `startUrls` is required. The defaults give English transcripts, creator captions first.

| Field | Type | Default | Meaning |
|---|---|---|---|
| `startUrls` | array | 2 example videos | Video or Shorts URLs, youtu.be links or 11-character ids |
| `language` | string | `en` | Language code you want: en, es, de, fr, pt, hi, ja ... (en-US, pt-BR also work) |
| `captionType` | select | `any` | `any` (creator captions first), `manual` (creator only), `auto` (auto-generated only) |
| `fallback` | select | `original` | If your language is missing: `original` (video's own language), `translate` (YouTube auto-translation) or `skip` |
| `includeSegments` | boolean | `true` | Add the timed segments; off = full text only |
| `maxItems` | integer | empty | Optional cap on the number of transcripts |
| `proxyConfiguration` | object | Apify RESIDENTIAL, US | Proxy used for every request |

The `startUrls` field keeps its name from earlier versions of the YouTube Transcript Scraper, so saved tasks keep working.

### Output of the YouTube Transcript Scraper

One row per video. The schema is the same for every video, so a JSON or CSV export of the YouTube Transcript Scraper maps cleanly into any tool.

| Field | Meaning |
|---|---|
| `videoId`, `url`, `title` | The video |
| `channelName`, `channelId` | The uploader |
| `durationSeconds` | Video length |
| `language`, `languageName` | Language of the returned transcript |
| `isAutoGenerated` | True for YouTube's automatic captions |
| `isTranslated` | True when YouTube auto-translated the track |
| `sourceLanguage` | Language of the caption track used |
| `selectedBy` | Why this track was chosen, e.g. "requested language" |
| `availableLanguages` | Every caption track of the video: code, name, auto-generated flag |
| `segmentCount`, `wordCount` | Size of the transcript |
| `text` | Full transcript as one plain text |
| `segments` | List of `start`, `end`, `duration` (seconds), `startTime` (HH:MM:SS.mmm) and `text` |
| `inputUrl`, `scrapedAt` | Run context and ISO timestamp |

#### Example row (shortened)

```json
{"videoId": "aircAruvnKk", "title": "But what is a neural network? | Deep learning chapter 1", "channelName": "3Blue1Brown", "language": "en", "isAutoGenerated": false, "isTranslated": false, "segmentCount": 286, "wordCount": 3357, "text": "This is a 3. It's sloppily written and rendered at an extremely low resolution of 28x28 pixels, ...", "segments": [{"start": 4.22, "end": 5.4, "duration": 1.18, "startTime": "00:00:04.220", "text": "This is a 3."}]}
```

### How to run the YouTube Transcript Scraper

Open the YouTube Transcript Scraper, paste your video URLs, set the language code, and press Start. Each transcript is saved as soon as it is ready.

For text-only use, switch off `includeSegments`. For subtitles or clip cutting, keep the segments: each one has an exact start and end time.

If you only want the creator's own captions, set `captionType` to `manual`. If you want YouTube's speech recognition, set it to `auto`.

#### How the YouTube Transcript Scraper picks a caption track

First it looks for a track in your language, creator captions before auto-generated ones. A regional code such as `pt-BR` also matches `pt`, and `en` matches `en-US`.

If there is none, the YouTube Transcript Scraper follows your `fallback`: the video's original track (the one YouTube marks as the default for its audio), a YouTube auto-translation into your language, or no row.

The chosen path is written into `selectedBy`, so every row of the YouTube Transcript Scraper tells you exactly where its text came from.

#### Batch jobs with the YouTube Transcript Scraper

Paste hundreds of URLs into one run. The YouTube Transcript Scraper works through them one after another, and a video without captions or a broken link never stops the rest.

Each video without a transcript gets its own log line with the reason, and the run ends with a summary that counts them and names the first ten, so you know what to retry or skip.

#### Measured results of the YouTube Transcript Scraper

All numbers come from local test runs of the YouTube Transcript Scraper on a home connection:

- Two videos in 5 seconds: 286 segments and 3,357 words, and 154 segments and 990 words.
- Five videos in 18 to 25 seconds, including a Short (7 segments, auto-generated) and a 19-second video (6 segments).
- A music video in Spanish: 91 segments and 655 words with `language: es`.
- One lecture video listed 31 caption tracks in `availableLanguages`.

### How the YouTube Transcript Scraper works

We tested every route first. YouTube's web player now protects its caption files: logged out, the web caption links return an empty file, and the web "Show transcript" request is refused.

The YouTube Transcript Scraper therefore asks YouTube for the caption list the way the YouTube iOS app does. That list is open, and its caption files download normally.

The app version used for this is read live on every run from Apple's public App Store listing, and the visitor data comes from the video page itself. Nothing is hardcoded, so updates on YouTube's side do not silently break the YouTube Transcript Scraper.

### YouTube Transcript Scraper limits, stated plainly

The YouTube Transcript Scraper can only return captions that exist. Videos without any captions produce no row, and the log says so; in our tests a movie clip and an ended live stream had none.

Auto-generated captions are YouTube's own speech recognition and can contain recognition mistakes. The YouTube Transcript Scraper returns them exactly as YouTube has them and marks them with `isAutoGenerated`.

YouTube's auto-translation is rate-limited. In our tests it worked on the first request and then answered HTTP 429 to further translations from the same IP address, while normal transcripts kept loading.

When a translation is refused, the YouTube Transcript Scraper retries it through fresh proxy IPs on the Apify platform, and otherwise returns the original-language transcript with `selectedBy` explaining why. In our final test that fallback returned the Bengali original of the video.

Private, deleted and members-only videos are out of reach.

### YouTube Transcript Scraper pricing

The YouTube Transcript Scraper uses pay-per-event pricing: you pay per dataset row (event "result"), plus the Apify platform usage of your run. The run stops at your `maxItems` or at the charge limit you set. A video without captions produces no row, so it is not charged as a result.

Free-plan users get up to 30 rows per run, which is enough to test the YouTube Transcript Scraper on real data. The current price per 1,000 results is on the Pricing tab.

### Using the YouTube Transcript Scraper in a workflow

Pair it with the YouTube Scraper: search for a topic, take the video URLs from that dataset and pass them to the YouTube Transcript Scraper. You get a searchable text corpus for a whole niche.

Send transcripts to Google Sheets, Notion or a vector database through the Apify integrations, or with Make, Zapier and n8n. A webhook can start your summarisation automation the moment a run finishes.

Developers call the YouTube Transcript Scraper from Python with the Apify API client:

```python
from apify_client import ApifyClient
client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("neuro-scraper/youtube-transcript-scraper").call(run_input={"startUrls": [{"url": "https://www.youtube.com/watch?v=aircAruvnKk"}], "language": "en", "includeSegments": False})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["title"], item["wordCount"])
    print(item["text"][:500])
```

#### Feeding transcripts to an LLM

Use `text` for summaries and question answering. Use `segments` when the model must cite timestamps: each segment's `startTime` can become a deep link to that moment of the video.

The `wordCount` field helps you budget tokens before you send a transcript to a model.

### Related scrapers

The YouTube Transcript Scraper is part of a family of YouTube and social media scrapers by the same developer.

| Actor | What it extracts |
|---|---|
| [YouTube Scraper](https://apify.com/neuro-scraper/youtube-comment-scraper) | Search results and video data by keyword, channel or playlist |
| [YouTube Comments Scraper](https://apify.com/neuro-scraper/youtube-comments-scraper) | Comments and replies of any video |
| [YouTube Video Details Scraper](https://apify.com/neuro-scraper/youtube-video-details-scraper) | Exact views, likes, tags and chapters |
| [YouTube Channel Scraper](https://apify.com/neuro-scraper/my-actor-11) | Channel profile and videos |
| [YouTube Playlist Scraper](https://apify.com/neuro-scraper/my-actor-10) | Every video of a playlist |
| [YouTube Shorts Scraper](https://apify.com/neuro-scraper/youtube-shorts-scraper) | Shorts of a channel or a search |
| [YouTube Video Downloader](https://apify.com/neuro-scraper/youtube-video-downloader) | Video or audio files |
| [Facebook Transcript Scraper](https://apify.com/neuro-scraper/facebook-transcript-scraper) | Transcripts of Facebook videos |
| [Facebook Video Details Scraper](https://apify.com/neuro-scraper/facebook-video-details-scraper) | Details of public Facebook videos |
| [TikTok Video Details Scraper](https://apify.com/neuro-scraper/tiktok-video-details-scraper) | Stats of TikTok videos |
| [Instagram Reels Scraper](https://apify.com/neuro-scraper/instagram-reels-scraper) | Reels of public Instagram profiles |

### Leave a review

If the YouTube Transcript Scraper saved you time, please leave a star rating and a short review on the Actor page. Reviews help other users decide and tell me what to improve.

If a video did not work, open an issue with the run link and it will be looked at.

### Frequently asked questions

#### Does the YouTube Transcript Scraper need a YouTube API key?

No. The YouTube Transcript Scraper does not use the YouTube Data API. It reads public caption tracks without any login or key.

#### Does the YouTube Transcript Scraper work with YouTube Shorts?

Yes. Paste the Shorts URL. In tests a 31-second Short returned 7 segments of auto-generated English captions.

#### Can the YouTube Transcript Scraper get transcripts in other languages?

Yes. Set `language` to any code such as `es`, `de` or `hi`. If the video has captions in that language, the YouTube Transcript Scraper returns them; otherwise `fallback` decides what happens.

#### What if a video has no captions in my language?

With `fallback: original` you get the transcript in the video's own language. With `translate`, YouTube's auto-translation is requested. With `skip`, the video is left out and the log lists the languages it does have.

#### Why was my translated transcript returned in the original language?

YouTube refused the translation with HTTP 429, which it does after a few translations from one IP. The YouTube Transcript Scraper retried through other proxy IPs and then returned the original transcript, as `selectedBy` explains.

#### Are auto-generated transcripts included?

Yes, when no creator captions exist in your language, or always if you set `captionType: auto`. The `isAutoGenerated` field tells you which kind you got.

#### Can I get SRT subtitles from the YouTube Transcript Scraper?

Each segment has start and end times, which is everything an SRT or VTT file needs. Convert the `segments` list with a few lines of Python or in a spreadsheet.

#### Which formats can I export transcripts in?

JSON, CSV, Excel, XML and HTML from the console, and the same data through the Apify API and integrations.

#### How long does the YouTube Transcript Scraper take per video?

In our local tests two videos took 5 seconds and five videos 18 to 25 seconds in total. Runs on the Apify platform go through a residential proxy, so times there can differ.

#### Is it legal to use the YouTube Transcript Scraper?

The YouTube Transcript Scraper reads only captions that YouTube shows publicly to any visitor. What you do with the text, for example republishing it, is governed by copyright and YouTube's terms, so check them for your use case.

#### Do I need my own proxy for the YouTube Transcript Scraper?

No. The YouTube Transcript Scraper uses Apify's residential proxy by default.

# Actor input Schema

## `startUrls` (type: `array`):

YouTube video or Shorts URLs, or 11-character video ids. Accepted: youtube.com/watch?v=..., youtu.be/..., youtube.com/shorts/... Example: https://www.youtube.com/watch?v=aircAruvnKk

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

Language code of the transcript you want: en, es, de, fr, pt, hi, ja ... Regional codes work too (en-US, pt-BR).

## `captionType` (type: `string`):

'Any' prefers captions written by the creator and falls back to YouTube's auto-generated ones.

## `fallback` (type: `string`):

What to do when the video has no captions in your language: return the video's original-language transcript, ask YouTube to auto-translate into your language, or skip the video.

## `includeSegments` (type: `boolean`):

Add the list of timed segments (start, end, duration, text). Turn off to get only the full text.

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

Optional cap on the number of transcripts. Leave empty to process every URL.

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

Apify Proxy, RESIDENTIAL group in the United States, is used by default. You can pick another country or group; the run then follows YouTube's answers for that location.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.youtube.com/watch?v=aircAruvnKk"
    },
    {
      "url": "https://youtu.be/9kmw3mImC8E?si=Ou_khz-Kx2M3rGJ8"
    }
  ],
  "language": "en",
  "captionType": "any",
  "fallback": "original",
  "includeSegments": true,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

# 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 = {
    "startUrls": [
        {
            "url": "https://www.youtube.com/watch?v=aircAruvnKk"
        },
        {
            "url": "https://youtu.be/9kmw3mImC8E?si=Ou_khz-Kx2M3rGJ8"
        }
    ],
    "language": "en",
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "US"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("neuro-scraper/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 = {
    "startUrls": [
        { "url": "https://www.youtube.com/watch?v=aircAruvnKk" },
        { "url": "https://youtu.be/9kmw3mImC8E?si=Ou_khz-Kx2M3rGJ8" },
    ],
    "language": "en",
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "US",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("neuro-scraper/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 '{
  "startUrls": [
    {
      "url": "https://www.youtube.com/watch?v=aircAruvnKk"
    },
    {
      "url": "https://youtu.be/9kmw3mImC8E?si=Ou_khz-Kx2M3rGJ8"
    }
  ],
  "language": "en",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}' |
apify call neuro-scraper/youtube-transcript-scraper --silent --output-dataset

```

## MCP server setup

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