# 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:** 4 total users, 2 monthly users, 100.0% runs succeeded, 2 bookmarks
- **User rating**: No ratings yet

## 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 a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "YouTube Transcript Scraper | Text & Timestamps",
        "description": "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.",
        "version": "0.0",
        "x-build-id": "GyCcr9VAwVnrVvhLU"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/apizy~youtube-transcript-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-apizy-youtube-transcript-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/apizy~youtube-transcript-scraper/runs": {
            "post": {
                "operationId": "runs-sync-apizy-youtube-transcript-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/apizy~youtube-transcript-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-apizy-youtube-transcript-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "videoUrls"
                ],
                "properties": {
                    "videoUrls": {
                        "title": "Video URLs",
                        "type": "array",
                        "description": "One or more YouTube video URLs (supports youtube.com/watch?v=, youtu.be/, and bare video IDs).",
                        "items": {
                            "type": "string"
                        }
                    },
                    "includeTimestamps": {
                        "title": "Include Timestamps",
                        "type": "boolean",
                        "description": "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.",
                        "default": true
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
