# YouTube Channel & Playlist Transcripts (`heyitsgautham/youtube-channel-transcripts`) Actor

Transcripts for every video on a YouTube channel or playlist. Paste @handles, channel or playlist URLs and get transcript, timestamps, date and views per video. At no extra cost: likes, tags, chapters, channel stats, SRT, VTT, LLM text, chapter chunks. Only-new mode. $3 per 1,000, failures free.

- **URL**: https://apify.com/heyitsgautham/youtube-channel-transcripts.md
- **Developed by:** [Gautham Krishna](https://apify.com/heyitsgautham) (community)
- **Categories:** Videos, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.10 / 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.
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 Channel & Playlist Transcripts

Get the transcript of every video on a YouTube channel or playlist in one run, for people building an AI knowledge base, a content archive or a research dataset.

Use cases, each with a ready-to-run example:

- [Transcribe every video in a playlist](https://apify.com/heyitsgautham/youtube-channel-transcripts/examples/youtube-playlist-transcripts)
- [Get the latest podcast episodes as text](https://apify.com/heyitsgautham/youtube-channel-transcripts/examples/podcast-channel-transcripts)
- [Turn a course playlist into an LLM dataset](https://apify.com/heyitsgautham/youtube-channel-transcripts/examples/course-playlist-transcripts-llm-dataset)
- [Archive a channel with publish dates, views and likes](https://apify.com/heyitsgautham/youtube-channel-transcripts/examples/channel-transcripts-with-views-and-dates)
- [Get transcripts only for videos from a date range](https://apify.com/heyitsgautham/youtube-channel-transcripts/examples/channel-transcripts-date-range)
- [Split a channel's transcripts into chunks for RAG](https://apify.com/heyitsgautham/youtube-channel-transcripts/examples/channel-transcripts-chunks-for-rag)

Paste a channel link, an @handle or a playlist link, set how many videos you want, and get one row per video with the full transcript, timestamps, publish date and view count.
The output is ready for an LLM, a RAG index, a content audit or a spreadsheet.
Turn on likes, comment counts, tags, chapters and channel stats, or SRT, VTT, plain-text, LLM-ready Markdown and RAG chunks split by YouTube chapters, at no extra cost.

You pay **$3 per 1,000 transcripts** ($0.003 each), and less on Apify Store discount tiers (Bronze, Silver, Gold), down to $2.10 per 1,000 on Gold.
Videos without captions, private videos and sources that fail to load are **never charged**.

### At a glance

| Topic | Details |
|---|---|
| Input | Channel links, @handles, channel IDs, playlist links or playlist IDs |
| Output | One JSON row per video: transcript, timestamps, title, view count, exact publish time in UTC, channel and position. Optional: likes, comment count, category, description, tags, thumbnail, chapters, channel stats, and SRT, VTT, plain-text, LLM-ready and RAG chunk formats |
| Price | $0.003 per transcript ($3 per 1,000), or $2.70 per 1,000 on Bronze, $2.40 on Silver and $2.10 on Gold. No start fee. Videos without captions, private videos and sources that fail are free |
| Tested | Final test run on 16 Oct 2026 with every option on: 10 channels and 4 playlists listed 250 videos, and all 245 that had captions returned a transcript with every format, in 188 seconds |
| Limits | Up to 20,000 videos per source, `maxVideosPerSource: 0` takes them all. Channels go newest first, Shorts are off by default. No speech-to-text for videos without captions |

### What you get per video

| Field | What it holds |
|---|---|
| `status` | `ok`, `no_transcript`, `unavailable`, `duplicate` or `error` for videos, plus `not_found`, `no_videos` or `invalid_input` for a source that could not be listed, or that has nothing new or nothing in your date window |
| `sourceUrl`, `sourceType`, `sourceId`, `sourceTitle` | The channel or playlist the video came from, as you typed it and as YouTube names it |
| `position` | Place in the list, 1 being the newest upload on a channel or the first video of a playlist |
| `videoId`, `url`, `title` | The video |
| `publishedAt` | Exact publish time in UTC, such as `2026-09-24T22:26:18Z`. Empty in the rare case YouTube leaves it out |
| `publishedText` | Publish date as YouTube shows it in the list, such as `1 month ago` or `Streamed 2 years ago` |
| `viewCount` | Exact view count at run time |
| `channel`, `channelId`, `durationSeconds` | Video details from the same request, at no extra cost |
| `language` | Language of the returned transcript |
| `isAutoGenerated` | `true` when the captions came from YouTube's speech recognition |
| `requestedLanguageFound` | `false` when the video has no captions in your language, so you got the original ones |
| `transcript` | The full transcript as one string |
| `wordCount` | Words in the transcript |
| `segments` | `[{ "start": 12.4, "duration": 3.1, "text": "..." }]`, when timestamps are on |
| `message` | Why a row failed, on rows that are not `ok` |

### Input

```json
{
  "sources": [
    "https://www.youtube.com/@NASA",
    "https://www.youtube.com/channel/UCsXVk37bltHxD1rDPwtNM8Q",
    "https://www.youtube.com/c/LinusTechTips",
    "https://www.youtube.com/playlist?list=PLZHQObOWTQDPD3MizzM2xVFitgF8hE_ab"
  ],
  "maxVideosPerSource": 50,
  "includeShorts": false,
  "language": "en",
  "includeTimestamps": true
}
```

Sources can be:

- channel links in any form, such as `@handle`, `/channel/UC...`, `/c/name`, `/user/name`, or a channel tab like `/@name/videos`;
- playlist links with `list=...`, including a watch link that carries a playlist;
- bare `@handles`, `UC...` channel IDs and `PL...` playlist IDs.

`maxVideosPerSource` set to `0` takes every video, up to 20,000 per source.
Channels are read newest first.
With `includeShorts` off you get regular videos and past live streams.
Turn it on to get every upload, Shorts included.

A video that appears in two of your sources, or twice in one playlist, is fetched and charged once, for the first source in your list.
Each later copy is a free `duplicate` row whose `duplicateOf` names that first source.

### Video details, channel stats and output formats

All off by default and free.
They ride in the same row, so a transcript is still one charge.

`includeVideoDetails: true` adds:

| Field | What it holds |
|---|---|
| `likeCount` | Exact likes at run time. Empty when YouTube leaves it out, as on 5 of 245 videos in the final test |
| `commentCount` | Exact comment count. Empty when comments are turned off, as on NASA's videos |
| `category` | YouTube category, such as `News & Politics` |
| `description` | The video description. Emails and phone numbers in it are replaced with `[email removed]` and `[phone removed]` |
| `tags` | The uploader's tags |
| `thumbnailUrl` | The largest thumbnail YouTube returns |
| `chapters` | `[{ "title", "start", "end", "url" }]` from the description's timestamps, by YouTube's rule: the list starts at 0:00 and has at least three rising entries. Each `url` opens the video at that chapter |

`includeChannelStats: true` adds the stats of the channel that posted the video, read once per channel:

| Field | What it holds |
|---|---|
| `channelSubscriberCount` | Subscribers, rounded the way YouTube shows them, such as 4,170,000 for "4.17M". Empty when YouTube does not show it, as on 3 VEVO videos in the final test |
| `channelVideoCount` | Public videos |
| `channelViewCount` | Total views |
| `channelJoinedDate` | The day the channel was created, such as `2006-06-17` |

`outputFormats` takes any of these:

| Value | Adds | What it holds |
|---|---|---|
| `text` | `plainText` | The captions as paragraphs, one per line, split at pauses of 2 seconds or more and after about 120 words |
| `llm` | `llmText` | Markdown for an LLM: title, channel, date, URL, duration and caption type on top, a heading per chapter, a `[m:ss]` stamp per paragraph, and sound cues such as `[Music]` removed |
| `srt` | `srt` | The SubRip subtitle file as text |
| `vtt` | `vtt` | The WebVTT subtitle file as text |
| `chunks` | `chunks` | RAG chunks: one per YouTube chapter, with long chapters split evenly, or even pieces when the video has no chapters. Each has `index`, `chapter`, `start`, `end`, `wordCount`, `text` and a `url` that opens the video at that second |

`chunkSizeWords` sets the chunk size, 300 words by default.
Chunks are cut between caption lines, so one can run a little over.
In the final test the largest of 3,825 chunks held 313 words, and 94 of the 245 videos had chapters.

### Date window and only new videos

Three optional inputs, all off by default.

| Option | What it does |
|---|---|
| `publishedAfter` | Only videos published on or after a date: `2026-01-01`, `2026-01-01T12:00:00Z` (UTC), or a relative value such as `30 days` |
| `publishedBefore` | Only videos published before a date, in the same formats. Use both for a window |
| `onlyNewSinceLastRun` | For scheduled runs. Returns only videos it has not returned a transcript for before, from the same source, and nothing older than the newest one it returned last time. Videos that had no captions yet are checked again on the next run |

Each video is judged by its exact publish time.
On channels the listing stops once videos are older than `publishedAfter`, and `maxVideosPerSource` then counts only videos inside the window, newest first.
Playlists keep their own order, so the whole playlist is listed and filtered.
A source with nothing in the window, or nothing new, comes back as a free `no_videos` row.
The only-new memory is a key-value store named `youtube-channel-transcripts-monitor` in your own Apify account, one record per source.
Delete that store to start over.

### Run it on a schedule

A daily or weekly run with `onlyNewSinceLastRun: true` keeps a transcript archive of the channels you follow up to date.
We ran the same 16 channels and playlists on 15 Oct and again on 20 Oct.
The 20 Oct run returned 15 transcripts, none returned on 15 Oct, and 7 sources with nothing new came back as free `no_videos` rows.

1. Set your input with `onlyNewSinceLastRun: true` and click **Save as a new task**.
2. On the task page, click **Actions**, then **Schedule**, and pick how often it runs.
   [Apify's schedules guide](https://docs.apify.com/actors/running/schedules) covers cron times and time zones.
3. On the task's **Integrations** tab, choose where each run's results go.

| Integration | What it does |
|---|---|
| [Slack](https://docs.apify.com/integrations/slack) | Posts a message to your channel when a run finishes |
| [Google Drive](https://docs.apify.com/integrations/drive) | Saves each run's results as a file in your Drive |
| [Webhook](https://docs.apify.com/integrations/webhooks) | Sends the finished run, with its dataset ID, to your own URL |
| [Make](https://docs.apify.com/integrations/make), [Zapier](https://docs.apify.com/integrations/zapier), [n8n](https://docs.apify.com/integrations/n8n) | Adds each new row to a Google Sheet, a CRM or a database |

Each video has a stable `videoId`, so a sheet or database can skip rows it already holds.

### How language works

1. Human-made captions in your language come first.
2. Then YouTube's auto-generated captions in your language.
3. If neither exists, you get the captions in the language spoken in the video, and the row shows `requestedLanguageFound: false`.

### Output example

This is a real row from a test run on `@NASA` on 15 Oct 2026.
The `segments` array is cut to its first three entries here.
The real row has 18.

```json
{
  "sourceUrl": "@NASA",
  "sourceType": "channel",
  "sourceId": "UCLA_DiR1FfKNvjuUpBHmylQ",
  "sourceTitle": "NASA",
  "position": 10,
  "videoId": "ErAqN6gXqZQ",
  "url": "https://www.youtube.com/watch?v=ErAqN6gXqZQ",
  "status": "ok",
  "title": "NASA's SpaceX Crew-13 Mission (Official NASA Trailer)",
  "publishedAt": "2026-09-30T18:48:20Z",
  "publishedText": "2 weeks ago",
  "viewCount": 102665,
  "channel": "NASA",
  "channelId": "UCLA_DiR1FfKNvjuUpBHmylQ",
  "durationSeconds": 62,
  "language": "en",
  "requestedLanguageFound": true,
  "isAutoGenerated": false,
  "transcript": "[Luke Delaney] The first things you see a child do when they're crawling is try to understand their environment. Curiosity for everybody is there, and it's natural for us to want to go understand even more beyond Earth. Liftoff! Of the Falcon 9 and Crew Dragon! Go NASA! Go SpaceX! [Jessica Watkins] The International Space Station provides a super unique opportunity to remove gravity from the equation. And in doing so, we are able to explore new possibilities within science. We are able to manufacture in new ways. We're able to explore new technologies that we're not able to do here on Earth. [Delaney] When we find out how cells propagate and microgravity, I think we're going improve the lives of everybody. [Joshua Kutryk] Space is opportunity to solve our biggest problems that we have on Earth.",
  "wordCount": 137,
  "segments": [
    { "start": 1.301, "duration": 1.435, "text": "[Luke Delaney] The first things you see a child" },
    { "start": 2.736, "duration": 0.934, "text": "do when they're crawling" },
    { "start": 3.67, "duration": 2.069, "text": "is try to understand their environment." }
  ]
}
```

With every option on, a row looks like this one from the final test run on 16 Oct 2026, from `@CNBC`.
Long strings are cut and marked with `...`, `segments`, `plainText`, `llmText`, `srt` and `vtt` are left out, and the arrays are cut.
The real row has 14 tags, 3 chapters and 4 chunks.

```json
{
  "sourceUrl": "https://www.youtube.com/@CNBC",
  "sourceType": "channel",
  "sourceId": "UCvJJ_dzjViJCoLf5uKUTwoA",
  "sourceTitle": "CNBC",
  "position": 18,
  "videoId": "cq2ZF8nv-ik",
  "url": "https://www.youtube.com/watch?v=cq2ZF8nv-ik",
  "status": "ok",
  "title": "Inside Bracket22, A Trading Firm Powered By Al Agents",
  "publishedAt": "2026-09-13T14:00:31Z",
  "publishedText": "1 month ago",
  "viewCount": 642110,
  "channel": "CNBC",
  "channelId": "UCvJJ_dzjViJCoLf5uKUTwoA",
  "durationSeconds": 248,
  "language": "en",
  "requestedLanguageFound": true,
  "isAutoGenerated": false,
  "transcript": "Speaker 1: Hey, Houston, show me the charts from the work that Desmond did this weekend. The strateg ...",
  "wordCount": 765,
  "likeCount": 6570,
  "commentCount": 498,
  "category": "News & Politics",
  "description": "Brian Kelly previously ran a cryptocurrency hedge fund, but closed tha ...",
  "tags": ["AI Agents", "Cryptocurrency", "Anthropic"],
  "thumbnailUrl": "https://i.ytimg.com/vi/cq2ZF8nv-ik/sddefault.jpg",
  "chapters": [
    { "title": "Introduction", "start": 0, "end": 32, "url": "https://www.youtube.com/watch?v=cq2ZF8nv-ik&t=0s" },
    { "title": "AI Agents", "start": 32, "end": 192, "url": "https://www.youtube.com/watch?v=cq2ZF8nv-ik&t=32s" }
  ],
  "channelSubscriberCount": 4170000,
  "channelVideoCount": 16195,
  "channelViewCount": 2079646777,
  "channelJoinedDate": "2006-06-17",
  "chunks": [
    {
      "index": 0,
      "chapter": "Introduction",
      "start": 0,
      "end": 26.52,
      "wordCount": 93,
      "text": "Speaker 1: Hey, Houston, show me the charts from the work that Desmond did this weekend. T ...",
      "url": "https://www.youtube.com/watch?v=cq2ZF8nv-ik&t=0s"
    }
  ]
}
```

A source that cannot be listed comes back as a single free row.

```json
{
  "sourceUrl": "https://www.youtube.com/@thisHandleDoesNotExist_zq81x",
  "status": "not_found",
  "message": "YouTube says this channel or playlist does not exist"
}
```

### Measured results

In our final test, 10 channels and 4 playlists listed 250 videos.
All 245 videos that had captions came back with a transcript.
The other 5 were music videos with no captions at all, returned as free `no_transcript` rows.
With every option on, the run took 188 seconds, and every transcript row carried every format, a description and channel stats.

### Use it from AI agents

The scraper works as a tool through the [Apify MCP server](https://mcp.apify.com) in Claude, Cursor, VS Code and other MCP clients.
An agent can pass a channel handle and get back plain text it can summarise, search or index.
Each call charges only for the transcripts it returns.

You can also call it through the [Apify API](https://docs.apify.com/api/v2) or the Python and JavaScript clients, and schedule it or connect it to Make, Zapier and n8n.

### Pricing

Prices are per 1,000 transcripts.

| Event | No discount | Bronze | Silver | Gold |
|---|---|---|---|---|
| Transcript returned | $3 | $2.70 | $2.40 | $2.10 |
| Video without captions, private, members-only or failed fetch | Free | Free | Free | Free |
| Channel or playlist that does not exist or has no public videos | Free | Free | Free | Free |
| Video details, channel stats and output formats | Free | Free | Free | Free |

Bronze, Silver and Gold are Apify Store discount tiers, and Apify's Pricing tab shows them as Starter, Scale and Business.
Apify decides which tier an account is on.

A channel with 500 captioned videos costs $1.50, or $1.05 on Gold.
Set a maximum cost per run in the run options.
The scraper stops once that limit is reached.

### More from heyitsgautham

Other actors from the same account.

- [YouTube Transcript & Subtitles Scraper](https://apify.com/heyitsgautham/youtube-transcript-scraper) for specific video URLs or IDs, or a YouTube search, when you do not need a whole channel.
- [YouTube Video & Shorts Comments Scraper with Replies](https://apify.com/heyitsgautham/youtube-comments-scraper) for the comments and replies on a video or Short, for sentiment analysis and audience research.
- [YouTube Search Results & Rank Tracker Scraper](https://apify.com/heyitsgautham/youtube-search-scraper) for YouTube search results with rank, and channel discovery within a subscriber range.
- [YouTube & TikTok Transcripts MCP Server for AI Agents](https://apify.com/heyitsgautham/video-transcripts-mcp-server) for giving an AI agent YouTube and TikTok transcripts, YouTube search and comments as MCP tools, with nothing to host.
- [TikTok Video Transcript & Subtitles Scraper](https://apify.com/heyitsgautham/tiktok-transcript-scraper) for the spoken words of public TikTok videos, with an optional speech-to-text fallback for videos without captions.

### FAQ

**Why does a video show `no_transcript`?**
The uploader turned captions off and YouTube made no auto-generated ones.
Music videos often have none.
That row isn't charged.

**Where does the exact date come from?**
Channel and playlist pages only show a relative date such as "3 weeks ago", which stays in `publishedText`.
For `publishedAt` the scraper asks YouTube's player for each video's publish time, a request of about 120 bytes that is included in the price.

**Can I scrape a Mix or a radio playlist?**
No.
Mixes (`list=RD...`) are built per viewer and have no fixed list of videos.

**Does it use the official YouTube API?**
No.
It reads the same public data the YouTube website and app show, without logging in.
Only use transcripts in ways that respect the rights of the video owners.

**What about videos with no captions at all?**
They come back as free `no_transcript` rows.
Speech-to-text for those is not included.

### Limitations

- Private, members-only, age-restricted and upcoming videos come back as free `unavailable` rows.
- With Shorts off, regular videos and past live streams are merged by their relative date, so videos posted in the same week may swap places.
- Playlists keep the playlist's own order. YouTube leaves hidden and deleted videos out of the list.
- The cap is 20,000 videos per source.

# Actor input Schema

## `sources` (type: `array`):

YouTube channel or playlist URLs. Accepts @handle, /channel/UC..., /c/... and /user/... links, playlist links with list=..., and bare @handles, UC channel IDs or PL playlist IDs.

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

How many videos to take from each channel or playlist. Channels go newest first, playlists in playlist order. 0 means all videos.

## `includeShorts` (type: `boolean`):

Channels only. Off: regular videos and past live streams. On: every upload, Shorts included.

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

ISO 639-1 code such as en, es, hi or de. Uses captions in this language when the video has them. Otherwise returns the video's original captions and sets requestedLanguageFound to false.

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

Adds a segments array with start time, duration and text for each caption line. The plain transcript is always included.

## `includeVideoDetails` (type: `boolean`):

Adds likeCount, commentCount, category, description, tags, thumbnailUrl and chapters (from the description's timestamps, each with a url that opens the video there) to each transcript row, at no extra cost. Emails and phone numbers in descriptions are replaced with \[email removed] and \[phone removed].

## `includeChannelStats` (type: `boolean`):

Adds channelSubscriberCount (rounded the way YouTube shows it), channelVideoCount, channelViewCount and channelJoinedDate to each transcript row, at no extra cost. Read once per channel.

## `outputFormats` (type: `array`):

Extra fields on each transcript row, at no extra cost. text: plainText, the captions as paragraphs, one per line. llm: llmText, Markdown with the title, channel, date and URL on top, chapter headings, a \[m:ss] stamp per paragraph and sound cues such as \[Music] removed. srt and vtt: the subtitle file as text. chunks: a chunks array for RAG, one chunk per YouTube chapter, long chapters split evenly, or even pieces when the video has no chapters, each with start, end, text, wordCount and a url that opens the video at that second.

## `chunkSizeWords` (type: `integer`):

Used by the chunks format. A chunk holds at most about this many words, cut between caption lines. Chapters shorter than this stay one chunk.

## `onlyNewSinceLastRun` (type: `boolean`):

For scheduled runs. Returns only videos this actor has not returned a transcript for before, from the same channel or playlist, and nothing older than the newest one it returned last time. Videos that had no captions yet are checked again. The first run returns the usual results and remembers them. The memory is a key-value store named youtube-channel-transcripts-monitor in your Apify account.

## `publishedAfter` (type: `string`):

Only videos published on or after this date. Use a date such as 2026-10-01, an ISO time such as 2026-10-01T12:00:00Z (UTC), or a relative value such as 7 days, meaning the last 7 days. Uses each video's exact publish time. On channels the listing stops once videos are older, and Max videos per source then counts only videos inside the window.

## `publishedBefore` (type: `string`):

Only videos published before this date. Same formats as Published after. Combine both for a window, such as 2026-01-01 to 2026-04-01.

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

How many videos to fetch in parallel.

## `useProxy` (type: `boolean`):

Leave on. YouTube blocks cloud IPs.

## Actor input object example

```json
{
  "sources": [
    "https://www.youtube.com/@veritasium"
  ],
  "maxVideosPerSource": 10,
  "includeShorts": false,
  "language": "en",
  "includeTimestamps": true,
  "includeVideoDetails": false,
  "includeChannelStats": false,
  "outputFormats": [],
  "chunkSizeWords": 300,
  "onlyNewSinceLastRun": false,
  "maxConcurrency": 10,
  "useProxy": true
}
```

# Actor output Schema

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

One item per video with its source, position, title, publish date text, view count, the full transcript and optional timestamped segments. Sources that fail to list get one row with the reason. Only items with status ok are charged.

# 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 = {
    "sources": [
        "https://www.youtube.com/@veritasium"
    ],
    "maxVideosPerSource": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("heyitsgautham/youtube-channel-transcripts").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 = {
    "sources": ["https://www.youtube.com/@veritasium"],
    "maxVideosPerSource": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("heyitsgautham/youtube-channel-transcripts").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 '{
  "sources": [
    "https://www.youtube.com/@veritasium"
  ],
  "maxVideosPerSource": 10
}' |
apify call heyitsgautham/youtube-channel-transcripts --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,heyitsgautham/youtube-channel-transcripts"
        }
    }
}
```

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/AWRZCLDDcjJSSVQQP/builds/dpye0hwCpAPJGgGsb/openapi.json
