# YouTube Transcript Scraper: Bulk Captions with Timestamps (`lavidarossi.bv/youtube-transcript-scraper`) Actor

YouTube transcript scraper: get the transcript (captions, subtitles) of any video with timestamps, chapters and the language you pick. Paste video links, channels or playlists; bulk runs in one go. Optional AI summary with your own API key.

- **URL**: https://apify.com/lavidarossi.bv/youtube-transcript-scraper.md
- **Developed by:** [Lavida Data](https://apify.com/lavidarossi.bv) (community)
- **Categories:** Videos, AI, Marketing
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.80 / 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/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: Bulk Captions with Timestamps

Get the YouTube transcript of any public video: the full text, timestamped segments and chapters, in the caption language you pick. Paste video links, channel links or @handles, or playlist links, and the Actor returns one row per video. It reads the captions YouTube already publishes (made by the uploader or generated by YouTube), so there is no speech-to-text cost and runs are fast.

### What it does

- Bulk input: video links or IDs, channel links, channel IDs or @handles, and playlist links in one run.
- Pick caption languages in order of preference; uploader captions are chosen over auto-generated ones unless you turn that off.
- Full transcript text plus timestamped segments (start and duration in seconds).
- Chapters from the video description when the video has them.
- Lists every caption language a video has, so you can run again for another language.
- Optional AI summary and key points with your own OpenAI-compatible API key (off by default, no extra charge from us).

### Use cases

- Feed video transcripts to an LLM or AI agent for research, Q\&A or RAG.
- Turn a channel's latest videos into blog posts, newsletters or show notes.
- Study how competitors open their videos: read the first 30 seconds of every upload.
- Search what was said in a playlist of talks or tutorials without watching them.

### How to use it

1. Fill in the input (or keep the example).
2. Click Start.
3. Download the results from the Output tab, or connect them to your tools with the Apify API or integrations.

The prefilled input is a small test: it stops after 10 results, so the first run costs at most $0.02.

### Input

| Field | Type | Required | Default | Example | Description |
| --- | --- | --- | --- | --- | --- |
| `videos` | array | no |  | \["https://www.youtube.com/watch?v=WN5O4vWCa54"] | YouTube video links or 11-character video IDs. Watch, Shorts, live, embed and youtu.be links all work. One per line. |
| `channels` | array | no |  | \["@GoogleDevelopers"] | Channel links, @handles or channel IDs (UC followed by 22 characters). The Actor takes the latest 15 uploads of each channel, as listed in the channel's public feed. |
| `playlists` | array | no |  | \["https://www.youtube.com/playlist?list=PLOU2XLYxmsIJGErt... | Playlist links or playlist IDs. The Actor takes up to 15 videos per playlist, as listed in the playlist's public feed. |
| `languages` | array | no |  | \["en"] | Language codes in order of preference, for example en, nl, de or pt-BR. Leave empty to take the video's own language. |
| `preferManualCaptions` | boolean | no | true | true | Take captions made by the uploader over YouTube's auto-generated ones in the same language. |
| `fallbackToAnyLanguage` | boolean | no | true | true | When none of your languages exists, return the captions in the video's own language instead of skipping the video. |
| `includeSegments` | boolean | no | true | true | Add the segments array (start, duration, text). Turn off when you only need the full text. |
| `aiSummary` | boolean | no | false | false | Add a short summary and key points made by an LLM. Needs your own OpenAI-compatible API key and model below; the LLM provider bills you directly. Off by default. |
| `aiApiKey` | string | no |  |  | API key for an OpenAI-compatible chat completions endpoint. Stored encrypted by Apify. Only needed when AI summary is on. |
| `aiModel` | string | no |  |  | Model name at your provider, for example the name of a small, cheap chat model. Only needed when AI summary is on. |
| `aiBaseUrl` | string | no | "https://api.openai.com/v1" | https://api.openai.com/v1 | Base URL of the OpenAI-compatible API (the part before /chat/completions). |
| `proxyConfiguration` | object | no | {"useApifyProxy":true,"apifyProxyGroups":\["RESIDENTIAL"]} | {"useApifyProxy":true,"apifyProxyGroups":\["RESIDENTIAL"]} | YouTube asks some data-centre IP addresses to sign in. Residential Apify Proxy avoids that; the proxy cost is included in the price per transcript. |
| `maxResults` | integer | no | 100 | 10 | The run stops after this many results. You pay per result. |

Example input:

```json
{
  "videos": [
    "https://www.youtube.com/watch?v=WN5O4vWCa54"
  ],
  "channels": [
    "@GoogleDevelopers"
  ],
  "languages": [
    "en"
  ],
  "maxResults": 20
}
```

### Output

Each result is one row in the dataset. Download it as JSON, CSV, Excel or HTML, or read it through the Apify API.

| Field | Type | Description |
| --- | --- | --- |
| `videoId` | string | 11-character YouTube video ID |
| `url` | string | Watch link of the video |
| `title` | string | Video title |
| `channelId` | string | ID of the channel that published the video (UC...) |
| `durationSeconds` | integer | Video length in seconds |
| `viewCount` | integer | View count when the transcript was fetched |
| `language` | string | Language code of the returned captions |
| `languageLabel` | string | Caption track name as YouTube shows it, for example English (auto-generated) |
| `isAutoGenerated` | boolean | True when YouTube generated the captions, false when the uploader made them |
| `availableLanguages` | array | Every caption language of the video; auto-generated ones end in -auto |
| `transcript` | string | Full caption text in one string |
| `wordCount` | integer | Number of words in the transcript |
| `segments` | array | Timestamped caption lines: start and duration in seconds, and text. Null when segments are turned off |
| `chapters` | array | Chapters from the description: start in seconds and title. Empty when the video has none |
| `source` | string | video, channel or playlist: which input field the video came from |
| `sourceInput` | string | The input line the video came from |
| `aiSummary` | string | Short summary by your LLM. Null when AI summary is off |
| `aiKeyPoints` | array | Key points by your LLM. Null when AI summary is off |
| `scrapedAt` | string | When the transcript was fetched (ISO 8601) |

#### Example output

| Title | Video URL | Language | Auto-generated | Duration (s) | Words |
| --- | --- | --- | --- | --- | --- |
| 5 developer tips for working with Gemini 4 | https://www.youtube.com/watch?v=WN5O4vWCa54 | en | false | 256 | 759 |

Example result:

```json
{
  "videoId": "WN5O4vWCa54",
  "url": "https://www.youtube.com/watch?v=WN5O4vWCa54",
  "title": "5 developer tips for working with Gemini 4",
  "channelId": "UC_x5XG1OV2P6uZZ5FSM9Ttw",
  "durationSeconds": 256,
  "viewCount": 24724,
  "language": "en",
  "languageLabel": "English",
  "isAutoGenerated": false,
  "availableLanguages": [
    "ar-auto",
    "bn-auto",
    "nl-auto",
    "en",
    "en-auto",
    "fr-auto",
    "de-auto",
    "iw-auto",
    "hi-auto",
    "id-auto",
    "it-auto",
    "ja-auto",
    "ko-auto",
    "ml-auto",
    "pl-auto",
    "pt-auto",
    "ru-auto",
    "es-auto",
    "uk-auto"
  ],
  "transcript": "With Gemini 4, we've gone from prompting one turn at a time to handing off large and complex engineering tasks that run from start to finish without losing the thread. And when a model can work for that long on its own, how you structure your workflow matters a lot more than just...",
  "wordCount": 759,
  "segments": [
    {
      "start": 0.16,
      "duration": 3,
      "text": "With Gemini 4, we've gone from prompting one turn at a time"
    },
    {
      "start": 3.16,
      "duration": 2.44,
      "text": "to handing off large and complex engineering tasks"
    },
    {
      "start": 5.6,
      "duration": 2.38,
      "text": "that run from start to finish without losing the thread."
    }
  ],
  "chapters": [],
  "source": "video",
  "sourceInput": "https://www.youtube.com/watch?v=WN5O4vWCa54",
  "aiSummary": null,
  "aiKeyPoints": null,
  "scrapedAt": "2026-11-27T01:19:00.000Z"
}
```

### Pricing

This Actor uses pay-per-event pricing. You pay for results, not for compute time or proxies.

| Event | When it is charged | Price | Per 1,000 |
| --- | --- | --- | --- |
| Transcript | One video transcript written to the dataset | $0.0018 | $1.80 |
| Actor start | Charged by Apify once per run, plus once per GB of memory above 1 GB | $0.00005 | $0.05 |

Example: 1,000 results cost $1.80 in total for one run.
Set "Maximum cost per run" in the run options to cap spending; the Actor stops cleanly when the cap is reached.

### Use it from an AI agent or the API

**MCP (Claude, Cursor, ChatGPT and other MCP clients):** add the Apify MCP server with this Actor as a tool: `https://mcp.apify.com?tools=lavidarossi.bv/youtube-transcript-scraper`. The agent sees it as the tool `lavidarossi-dot-bv--youtube-transcript-scraper` with the input fields above. Without the parameter, agents can still find it with the `search-actors` tool.

**API:** run it and get the rows in one call (replace `<APIFY_TOKEN>` with your token):

```bash
curl -X POST "https://api.apify.com/v2/acts/lavidarossi.bv~youtube-transcript-scraper/run-sync-get-dataset-items" \
  -H "Authorization: Bearer <APIFY_TOKEN>" -H "Content-Type: application/json" \
  -d '{"videos":["https://www.youtube.com/watch?v=WN5O4vWCa54"],"languages":["en"],"preferManualCaptions":true,"fallbackToAnyLanguage":true,"includeSegments":true,"aiSummary":false,"aiBaseUrl":"https://api.openai.com/v1","proxyConfiguration":{"useApifyProxy":true,"apifyProxyGroups":["RESIDENTIAL"]},"maxResults":10}'
```

### FAQ

**Where do the transcripts come from?**

From the captions YouTube publishes for the video: made by the uploader, or generated by YouTube. The Actor does not log in and does not download audio.

**What if a video has no captions?**

It is skipped and not charged. The log names every skipped video and the reason (no captions, private, removed, age-restricted).

**Do I pay for the AI summary?**

Not to us. You give your own API key and your LLM provider bills you. The price per transcript stays the same.

**Can I get a translated transcript?**

Not yet. Pick a language the video already has; availableLanguages lists them.

**What happens when a request fails?**

Each request is retried up to 4 times. If a request still fails, the run ends with status Failed and the RUN_SUMMARY record in the key-value store lists the failed URLs. Results saved before that stay in the dataset.

**Can I run it on a schedule?**

Yes. Create a task with your input and add a schedule in Apify Console. Each run is charged per result.

### Limits

- Only videos with captions return a row. Live streams that are still running usually have no captions yet.
- Channels and playlists come from YouTube's public feeds: the latest 15 uploads per channel and up to 15 videos per playlist.
- Private, removed, members-only and age-restricted videos are skipped.
- YouTube can change its player at any time. The run then fails with a clear error and we fix it.

### Related Actors

- [TikTok & Video Transcript](https://apify.com/lavidarossi.bv/short-video-transcript): TikTok videos and mp4/mp3 links to text with Whisper.
- [Keyword Suggestions Scraper](https://apify.com/lavidarossi.bv/keyword-suggestions-scraper): autocomplete keyword ideas from Google, YouTube, Bing and Amazon.
- [TikTok Top Ads Scraper](https://apify.com/lavidarossi.bv/tiktok-top-ads-scraper): top ads from the TikTok Creative Center by country and industry.

### Data

- The Actor returns content metadata and caption text only: video ID, title, channel ID, captions. It does not return channel names, descriptions, comments or any profile data.
- Captions can contain what people say on camera. Use transcripts in line with the GDPR and YouTube's terms, for example for research, accessibility or analysis of public content.

# Actor input Schema

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

YouTube video links or 11-character video IDs. Watch, Shorts, live, embed and youtu.be links all work. One per line.

## `channels` (type: `array`):

Channel links, @handles or channel IDs (UC followed by 22 characters). The Actor takes the latest 15 uploads of each channel, as listed in the channel's public feed.

## `playlists` (type: `array`):

Playlist links or playlist IDs. The Actor takes up to 15 videos per playlist, as listed in the playlist's public feed.

## `languages` (type: `array`):

Language codes in order of preference, for example en, nl, de or pt-BR. Leave empty to take the video's own language.

## `preferManualCaptions` (type: `boolean`):

Take captions made by the uploader over YouTube's auto-generated ones in the same language.

## `fallbackToAnyLanguage` (type: `boolean`):

When none of your languages exists, return the captions in the video's own language instead of skipping the video.

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

Add the segments array (start, duration, text). Turn off when you only need the full text.

## `aiSummary` (type: `boolean`):

Add a short summary and key points made by an LLM. Needs your own OpenAI-compatible API key and model below; the LLM provider bills you directly. Off by default.

## `aiApiKey` (type: `string`):

API key for an OpenAI-compatible chat completions endpoint. Stored encrypted by Apify. Only needed when AI summary is on.

## `aiModel` (type: `string`):

Model name at your provider, for example the name of a small, cheap chat model. Only needed when AI summary is on.

## `aiBaseUrl` (type: `string`):

Base URL of the OpenAI-compatible API (the part before /chat/completions).

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

YouTube asks some data-centre IP addresses to sign in. Residential Apify Proxy avoids that; the proxy cost is included in the price per transcript.

## `maxResults` (type: `integer`):

The run stops after this many results. You pay per result.

## Actor input object example

```json
{
  "videos": [
    "https://www.youtube.com/watch?v=WN5O4vWCa54"
  ],
  "channels": [
    "@GoogleDevelopers"
  ],
  "playlists": [
    "https://www.youtube.com/playlist?list=PLOU2XLYxmsIJGErt5rrCqaSGTMyyqNt2H"
  ],
  "languages": [
    "en"
  ],
  "preferManualCaptions": true,
  "fallbackToAnyLanguage": true,
  "includeSegments": true,
  "aiSummary": false,
  "aiBaseUrl": "https://api.openai.com/v1",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  },
  "maxResults": 10
}
```

# Actor output Schema

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

One dataset item per result, with every field described in the dataset schema.

## `runSummary` (type: `string`):

Counts of results, finished, failed and skipped requests, and whether the charge limit was reached.

# 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=WN5O4vWCa54"
    ],
    "languages": [
        "en"
    ],
    "preferManualCaptions": true,
    "fallbackToAnyLanguage": true,
    "includeSegments": true,
    "aiSummary": false,
    "aiBaseUrl": "https://api.openai.com/v1",
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    },
    "maxResults": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("lavidarossi.bv/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=WN5O4vWCa54"],
    "languages": ["en"],
    "preferManualCaptions": True,
    "fallbackToAnyLanguage": True,
    "includeSegments": True,
    "aiSummary": False,
    "aiBaseUrl": "https://api.openai.com/v1",
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
    "maxResults": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("lavidarossi.bv/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=WN5O4vWCa54"
  ],
  "languages": [
    "en"
  ],
  "preferManualCaptions": true,
  "fallbackToAnyLanguage": true,
  "includeSegments": true,
  "aiSummary": false,
  "aiBaseUrl": "https://api.openai.com/v1",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  },
  "maxResults": 10
}' |
apify call lavidarossi.bv/youtube-transcript-scraper --silent --output-dataset

```

## MCP server setup

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