# YouTube Transcript Scraper (`tacps126/youtube-transcripts`) Actor

YouTube transcripts for videos, playlists, channels and searches: full text, timestamps, language choice, translation, plus title, channel, views and publish date. Only-new monitoring and an instant API. From $2.50 per 1,000 transcripts.

- **URL**: https://apify.com/tacps126/youtube-transcripts.md
- **Developed by:** [Tapaswai Ashok Choudhary](https://apify.com/tacps126) (community)
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 transcripts

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 — Videos, Playlists, Channels & Search

Get the **full transcript of any YouTube video** — and of every video in a **playlist**, a **channel** or a **search** — as clean text with timestamps, plus the video's title, channel, publish date, length, views, description and keywords.

**Built for** AI and RAG pipelines, content repurposing (blogs, newsletters, shorts), research and media monitoring, SEO and keyword analysis, accessibility, and developers who need captions without an API key.

### What you get

| Field | Example |
|---|---|
| `videoId`, `url` | `dQw4w9WgXcQ`, the watch link |
| `title`, `channel`, `channelId`, `channelUrl` | the video's details |
| `publishedAt`, `lengthSeconds`, `views` | `2009-10-25`, `213`, `1700000000` |
| `transcript` | the whole transcript as one text |
| `segments` | every caption line: `start`, `duration`, `time` (`01:02`), `text` |
| `language`, `captionLanguage`, `isAutoGenerated` | `en`, `en`, `false` |
| `availableLanguages`, `wordCount` | every caption language of the video, words |
| `description`, `keywords` | the uploader's text and tags |

### How to use it

```json
{
  "videos": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "https://www.youtube.com/@Fireship",
    "https://www.youtube.com/playlist?list=PLrAXtmErZgOeiKm4sgNOknGvNjby9efdf"
  ],
  "searchQueries": ["rust async tutorial"],
  "maxVideosPerSource": 10,
  "languages": ["en"]
}
```

- **Videos, playlists, channels, searches.** Paste any mix: links, bare video ids, `@handles`, channel links, playlist links. Channels give the newest videos first.
- **Your language.** Give languages in order of preference; a written transcript beats an auto-generated one. Set `translateTo` to ask for a machine translation; this is best effort: when YouTube refuses, the original language is returned with a `translationNote`.
- **Plain text or timestamps.** `includeSegments` adds every caption line with its start time; turn it off for smaller output.
- **Follow new uploads.** Turn on *Only new videos* and schedule the Actor: each run returns only videos earlier runs haven't delivered, so you pay only for new transcripts.

### Pricing

**$2.50 per 1,000 transcripts** plus a small start fee per run. Videos without captions (or private or removed ones) are listed in the run summary and are **not charged**.

Free-plan runs return up to 100 transcripts per run.

### Good to know

- Videos need captions: a written track from the uploader, or YouTube's auto-generated captions. Videos with captions switched off, private, removed or age-restricted ones are reported and skipped.
- The Actor also runs in **Standby mode** — an always-ready endpoint that returns transcripts in the response, handy for apps and AI agents. Find the URL on the **Standby** tab.
- Need another source or a private feed? **Contact tacps126@gmail.com**.

### FAQ

**Does it need a YouTube API key?** No.

**Can I get only the text?** Yes: turn off *Include timestamps* and *Include video details*; `transcript` still holds the text.

**Why is a video missing?** It has no captions, or it is private, removed or restricted. The run summary says which and why.

# Actor input Schema

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

YouTube video links or ids, playlist links, and channels (a @handle or channel link). One per line.

## `searchQueries` (type: `array`):

Read the top videos of these YouTube searches.

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

How many videos to take from each playlist, channel (newest first) or search.

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

Caption languages in order of preference, e.g. en, de, pt-BR. A written transcript is preferred over an auto-generated one; if none match, any available one is used.

## `translateTo` (type: `string`):

Optional language code (e.g. en) to machine-translate the captions into. Best effort: if YouTube refuses, the original language is returned with a translationNote.

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

Add every caption line with its start time, duration and a mm:ss label (`segments`). Turn off for plain text only.

## `includeDetails` (type: `boolean`):

Add title, channel, publish date, length, views, description and keywords.

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

Stop after this many transcripts. You pay per transcript delivered; videos without captions are free.

## `onlyNew` (type: `boolean`):

Skip videos an earlier run with the same input already delivered. Ideal for a scheduled channel or search monitor.

## `monitorName` (type: `string`):

Optional name for the “only new” history, so several monitors can run side by side.

## `delivery` (type: `object`):

Webhook: {"webhookUrl": "https://…", "format": "json" | "slack" | "discord", "onlyWhenResults": true, "includeItems": 10}. Google Sheets: {"spreadsheetId": "<id from the sheet URL>", "sheetName": "Sheet1"} plus the service account key below; share the sheet with the service account's e-mail first. Leave empty to only save results in the dataset.

## `googleServiceAccountJson` (type: `string`):

Only for Google Sheets delivery: paste the service account's JSON key. Stored encrypted; the account sees only sheets you share with it.

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

Not needed for most runs. If YouTube turns a connection away, the run retries through Apify Proxy by itself.

## `tenantId` (type: `string`):

Optional label used to keep separate histories for different clients or teams.

## `debug` (type: `boolean`):

Save extra diagnostics with the run (for support requests).

## Actor input object example

```json
{
  "videos": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "maxVideosPerSource": 20,
  "languages": [
    "en"
  ],
  "includeSegments": true,
  "includeDetails": true,
  "maxItems": 100,
  "onlyNew": false,
  "proxyConfiguration": {
    "useApifyProxy": false
  },
  "debug": false
}
```

# Actor output Schema

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

One record per video: transcript text, timestamps and video details.

## `summary` (type: `string`):

Counts, warnings, and whether the run stopped early.

# 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=dQw4w9WgXcQ"
    ],
    "languages": [
        "en"
    ]
};

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

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

```

## MCP server setup

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