# YouTube Transcript Scraper | Text & Timestamps (`apizy/youtube-transcript-scraper`) Actor

Get the full transcript from any YouTube video as clean text, ready for AI summarization, SEO research, and content repurposing. Add timestamped segments when you need them. Batch many URLs in one run. Transparent pricing: pay $0.004 per video, only on success. No captions means no charge.

- **URL**: https://apify.com/apizy/youtube-transcript-scraper.md
- **Developed by:** [Apizy](https://apify.com/apizy) (community)
- **Categories:** SEO tools, Videos, Social media
- **Stats:** 11 total users, 3 monthly users, 100.0% runs succeeded, 5 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $4.00 / 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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## YouTube Transcript Scraper

Scrape the full transcript from any YouTube video. Returns clean text ready for AI, SEO, or content analysis, with an optional timestamps breakdown per segment. Works on any video URL format and returns clean JSON in seconds.

You are only charged for videos that return a real transcript. Failed requests and videos without captions are free.

### What does YouTube Transcript Scraper do?

YouTube Transcript Scraper fetches the full transcript from any YouTube video and returns clean, ready-to-use data without any extra parsing on your end.

It can extract:

- Full transcript as a plain text string
- Transcript broken into timestamped segments with start time, end time, and text (optional)
- Video title
- Language code of the transcript

### Why Scrape YouTube Transcripts?

A transcript is the full spoken content of a video — every word, searchable and processable. It's the raw material that powers summarization, content repurposing, SEO research, and AI pipelines. Most video metadata tells you surface-level signals; the transcript gives you the substance.

Here are some ways you could use this data:

- Feed video transcripts into AI pipelines for summarization, classification, or Q\&A
- Extract keywords and topics from transcripts for SEO research
- Repurpose video content into blog posts, newsletters, or social media copy
- Build subtitle or caption files with timestamped segments
- Archive spoken content from videos before they get taken down
- Run bulk transcript analysis across a playlist or channel

### How to Use

Scraping a YouTube video's transcript takes about 15-20 seconds per video. No setup needed beyond the video URL.

1. Click **Try for free**
2. Enter one or more YouTube video URLs
3. Optionally enable **Include Timestamps** to get each segment with its start and end time
4. Click **Run**
5. When done, preview or download your data from the Dataset tab

### Input

```json
{
  "videoUrls": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ"]
}
```

**With timestamps**

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "https://youtu.be/WOzcFkld6_g"
  ],
  "includeTimestamps": true
}
```

#### Input Fields

| Field               | Type    | Default | Description                                                                                           |
| ------------------- | ------- | ------- | ----------------------------------------------------------------------------------------------------- |
| `videoUrls`         | array   | none    | YouTube video URLs or video IDs **(required)**. Supports `watch?v=`, `youtu.be/`, and raw 11-char IDs |
| `includeTimestamps` | boolean | `false` | If `true`, adds a `segments` array with start time, end time, and text per caption segment            |

### Output

Each video is saved as one item in the Dataset. The run summary goes to the Key-Value Store under `OUTPUT`.

**Video item**

```json
{
  "videoId": "dQw4w9WgXcQ",
  "videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "title": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
  "language": "en",
  "transcript": "We're no strangers to love you know the rules and so do I...",
  "scrapedAt": "2026-06-28T10:00:00.000Z"
}
```

With `includeTimestamps: true`, a `segments` array is added alongside `transcript`:

```json
{
  "segments": [
    { "start": 0.0, "end": 5.12, "text": "We're no strangers to love" },
    { "start": 5.12, "end": 9.8, "text": "you know the rules and so do I" }
  ]
}
```

**Run summary**

```json
{
  "summary": {
    "total": 3,
    "successCount": 3,
    "failedCount": 0,
    "totalCharged": 0.015,
    "startedAt": "2026-06-28T10:00:00.000Z",
    "finishedAt": "2026-06-28T10:01:00.000Z",
    "totalDurationSeconds": 60
  }
}
```

#### Output Fields

| Field               | Type   | Description                                                              |
| ------------------- | ------ | ------------------------------------------------------------------------ |
| `videoId`           | string | YouTube video ID (11-character string)                                   |
| `videoUrl`          | string | Direct link to the video                                                 |
| `title`             | string | Full video title                                                         |
| `language`          | string | Language code of the transcript (e.g. `en`)                              |
| `transcript`        | string | Full transcript as a single plain-text string                            |
| `segments`          | array  | Timestamped segments, only present when `includeTimestamps` is `true`    |
| `segments[].start`  | number | Segment start time in seconds                                            |
| `segments[].end`    | number | Segment end time in seconds (`null` for the last segment in some videos) |
| `segments[].text`   | string | Spoken text for this segment                                             |
| `scrapedAt`         | string | ISO timestamp of when the data was scraped                               |

### Pricing

Pay per successfully scraped video. Failed requests and videos without captions are free.

| Videos | Cost   |
| ------ | ------ |
| 1      | $0.005 |
| 10     | $0.05  |
| 100    | $0.50  |
| 1,000  | $5.00  |

$0.005 per video.

For large batches, we recommend setting the Actor's **Timeout** to unlimited (`0`) in the Run options before starting, so the run isn't cut off before all videos finish.

### Notes

- All video URL formats work: `watch?v=`, `youtu.be/`, and raw 11-character video IDs.
- Videos without captions or subtitles return no transcript and are not charged.
- `transcript` is always a plain-text string. When `includeTimestamps` is enabled, `segments` is added on top and both fields are present together.
- `segments[].end` may be `null` for the very last segment on some videos.
- Invalid URLs are skipped and logged. The run continues without interruption.

### More Actors You Might Like

Built by the same team and backed by the same transparent pricing philosophy: no hidden attempts, no wasted credits, no charge for failed results.

| Actor                                                                                     | Description                                                                                          |
| ----------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| [YouTube Video Detail Scraper](https://apify.com/apizy/youtube-video-detail-scraper)      | Full video metadata: views, likes, comments, keywords, duration, and engagement insights.            |
| [YouTube Video Scraper](https://apify.com/apizy/youtube-video-scraper)                    | Scrape all videos from a channel with views, durations, thumbnails, and per-video insights.          |
| [YouTube Comment Scraper](https://apify.com/apizy/youtube-comment-scraper)                | Scrape comments from any video with author details, like counts, reply counts, and engagement flags. |
| [YouTube Channel Scraper](https://apify.com/apizy/youtube-channel-scraper)                | Channel profiles with subscriber counts, engagement rates, contact info, and social links.           |
| [YouTube Channel Scraper Fast](https://apify.com/apizy/youtube-channel-scraper-innertube) | Same channel data at faster speed. Better for large batches.                                         |

### Get in Touch

Have questions, need custom scraping solutions, or want to integrate with your existing stack? We're here to help!

- **Email:** apizy.studio@gmail.com

We build custom scraping solutions tailored to your specific needs that are fast, reliable, and transparent.

# Actor input Schema

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

One or more YouTube video URLs (supports youtube.com/watch?v=, youtu.be/, and bare video IDs).

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

When enabled, transcript is returned as an array of { start, duration, text } objects (start and duration in seconds). When disabled, transcript is a plain string.

## Actor input object example

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "includeTimestamps": true
}
```

# Actor output Schema

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

Dataset containing one item per video with its full transcript.

## `output` (type: `string`):

Complete run output including summary and all transcript results.

# 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=dQw4w9WgXcQ"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("apizy/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=dQw4w9WgXcQ"] }

# Run the Actor and wait for it to finish
run = client.actor("apizy/youtube-transcript-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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=dQw4w9WgXcQ"
  ]
}' |
apify call apizy/youtube-transcript-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=apizy/youtube-transcript-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/bA19J7bJE6M2sE1L3/builds/GyCcr9VAwVnrVvhLU/openapi.json
