# Youtube Transcript Scraper (`topaz_sharingan/youtube-transcript-scraper`) Actor

Are you in search of a robust solution for extracting transcripts from YouTube videos? Look no further 😉, YouTube-Transcript-Scraper will meet your needs. Our software not only efficiently retrieves transcripts but also provides additional valuable information .👍 😀 Scrap away 🕵‍♂️.

- **URL**: https://apify.com/topaz\_sharingan/youtube-transcript-scraper.md
- **Developed by:** [Moses Ceaser](https://apify.com/topaz_sharingan) (community)
- **Categories:** Developer tools, Social media
- **Stats:** 4,609 total users, 38 monthly users, 100.0% runs succeeded, 133 bookmarks
- **User rating**: 4.89 out of 5 stars

## Pricing

$20.00/month + usage

To use this Actor, you pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month after the free trial period.You also pay for the Apify platform usage, which gets cheaper the higher Apify subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#rental-actors

## 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 Actor

### Introduction

#### What is the actor's purpose?

The YouTube Transcript Actor is a powerful tool designed to extract transcripts from YouTube videos. This actor takes a YouTube video URL as input and returns the transcript of the video.

#### Key Features

- Extract transcripts from YouTube videos
- Support for multiple languages
- Customize the output format to suit your needs

#### Typical Use Cases

- Content creators can use this actor to generate transcripts for their videos
- Researchers can analyze video transcripts for sentiment analysis, topic modeling, or other natural language processing tasks
- Accessibility enthusiasts can use this actor to make video content more accessible to everyone

### Inputs

#### What kind of data does the actor take in?

The YouTube Transcript Actor takes the following input:

- **YouTube Video URL** (required): The URL of the YouTube video you want to extract the transcript from

#### Restrictions on Input Data

There are no specific restrictions on the input data other than providing a valid YouTube Video URL.

#### Examples of Input Data

```
"startUrls": ["https://www.youtube.com/watch?v=aAkMkVFwAoo"
```

### Outputs

#### What kind of data does the actor produce?

The YouTube Transcript Actor produces the following output:

- **Transcript**: The extracted transcript of the YouTube video in the specified format (e.g., plain text, JSON, etc.)

#### Restrictions on Output Data

The availability of the transcript data depends on the input YouTube video. Some videos may not have transcripts available.

#### Examples of Output Data

**Transcript:**

```
"(Light cheerful music) ♪ I don't want a lot for Christmas, ♪ ♪ there is just one thing I need. ♪ ♪ I don't care about the presents ♪ ♪ underneath the Christmas tree. ♪ ♪ I just want you for my own, ♪ ♪ more than you could ever know. ♪ ♪ Make my wish come true, ♪ ♪ all I want for Christmas is you. ♪ ♪ Yeah, ♪ ♪ I don't want a lot for Christmas, ♪ ♪ there is just one thing I need. ♪ ♪ And I don't care about the presents ♪ ♪ underneath the Christmas tree. ♪ ♪ I don't need to hang my stocking ♪ \nthere upon the fireplace. ♪ ♪ Santa Claus won't make me happy ♪ \nwith a toy on Christmas Day. ♪ ♪ I just want you for my own, ♪ \nmore than you could ever know. ♪ ♪ Make my wish come true, ♪ \n♪ all I want for Christmas is you. ♪ ♪ You, baby, ♪ \n♪ oh, I won't ask for much this Christmas. ♪ \n♪ I won't even wish for snow. ♪ \n♪ And I, I'm just gonna keep on waiting ♪ \n♪ underneath the mistletoe. ♪ \n♪ I won't make a list and send it ♪ \n♪ to the North Pole for Saint Nick. ♪ \n♪ I won't even stay awake to ♪ \nhear those magic reindeer click. ♪ \n♪ 'Cause I just want you here tonight ♪ \n♪ holding on to me so tight. ♪ \n♪ What more can I do, ♪ \noh, baby, all I want \nfor Christmas is you. ♪ \n♪ You, baby, ♪ \n♪ oh oh, all the lights are \nshining so brightly everywhere. ♪ \n♪ So brightly, baby, ♪ \n♪ and the sound of children's \nlaughter fills the air. ♪ \n♪ And everyone is singing, ♪ \n♪ I hear those sleigh bells ringing. ♪ \n♪ Santa, won't you bring \nme the one I really need? ♪ \n♪ Won't you please bring my baby to me? ♪ \n♪ Oh, I don't want a lot for Christmas, ♪ \n♪ this is all I'm asking for. ♪ \n♪ I just wanna see my baby \nstanding right outside my door. ♪ \n♪ Oh, I just want you for my own, ♪ \n♪ more than you could ever know. ♪ \n♪ Make my wish come true, ♪ \noh, baby, all I want \nfor Christmas is you. ♪ \n♪ You, baby, ♪ \n♪ all I want for Christmas is you, baby. ♪ \n♪ All I want for Christmas is you, baby. ♪ \n♪ All I want for Christmas is you, baby. ♪ \n♪ All I want for Christmas is you, baby. ♪ \n♪ All I want for Christmas is you, baby. ♪"
```

### Usage

#### How to Run the Actor

1. Go to the Apify platform (https://apify.com) and log in or sign up for an account.
2. Create a new task and select the "YouTube Transcript Actor".
3. Configure the input by providing the YouTube Video URL.
4. Start the task, and the actor will begin extracting the transcript.

#### How to Interpret the Actor's Results

The actor will provide you with the extracted transcript in the specified format. You can use this data for analysis, content optimization, or any other purpose that suits your needs.

#### Examples of Usage

##### Example 1: Extract Transcript from a YouTube Video

Input:

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

Output:

```json
{
    "channelName": "MariahCareyVEVO",
    "channelSubscription": "10.9M subscribers",
    "videoTitle": "Mariah Carey - All I Want for Christmas Is You (Make My Wish Come True Edition) - YouTube",
    "url": "https://www.youtube.com/watch?v=aAkMkVFwAoo",
    "views": "572,070,938 views",
    "videoPostDate": "Premiered on 19 Dec 2019",
    "transcript": "(Light cheerful music) ♪ I don't want a lot for Christmas, ♪ ♪ there is just one thing I need. ♪ ♪ I don't care about the presents ♪ ♪ underneath the Christmas tree. ♪ ♪ I just want you for my own, ♪ ♪ more than you could ever know. ♪ ♪ Make my wish come true, ♪ ♪ all I want for Christmas is you. ♪ ♪ Yeah, ♪ ♪ I don't want a lot for Christmas, ♪ ♪ there is just one thing I need. ♪ ♪ And I don't care about the presents ♪ ♪ underneath the Christmas tree. ♪ ♪ I don't need to hang my stocking ♪ \nthere upon the fireplace. ♪ ♪ Santa Claus won't make me happy ♪ \nwith a toy on Christmas Day. ♪ ♪ I just want you for my own, ♪ \nmore than you could ever know. ♪ ♪ Make my wish come true, ♪ \n♪ all I want for Christmas is you. ♪ ♪ You, baby, ♪ \n♪ oh, I won't ask for much this Christmas. ♪ \n♪ I won't even wish for snow. ♪ \n♪ And I, I'm just gonna keep on waiting ♪ \n♪ underneath the mistletoe. ♪ \n♪ I won't make a list and send it ♪ \n♪ to the North Pole for Saint Nick. ♪ \n♪ I won't even stay awake to ♪ \nhear those magic reindeer click. ♪ \n♪ 'Cause I just want you here tonight ♪ \n♪ holding on to me so tight. ♪ \n♪ What more can I do, ♪ \noh, baby, all I want \nfor Christmas is you. ♪ \n♪ You, baby, ♪ \n♪ oh oh, all the lights are \nshining so brightly everywhere. ♪ \n♪ So brightly, baby, ♪ \n♪ and the sound of children's \nlaughter fills the air. ♪ \n♪ And everyone is singing, ♪ \n♪ I hear those sleigh bells ringing. ♪ \n♪ Santa, won't you bring \nme the one I really need? ♪ \n♪ Won't you please bring my baby to me? ♪ \n♪ Oh, I don't want a lot for Christmas, ♪ \n♪ this is all I'm asking for. ♪ \n♪ I just wanna see my baby \nstanding right outside my door. ♪ \n♪ Oh, I just want you for my own, ♪ \n♪ more than you could ever know. ♪ \n♪ Make my wish come true, ♪ \noh, baby, all I want \nfor Christmas is you. ♪ \n♪ You, baby, ♪ \n♪ all I want for Christmas is you, baby. ♪ \n♪ All I want for Christmas is you, baby. ♪ \n♪ All I want for Christmas is you, baby. ♪ \n♪ All I want for Christmas is you, baby. ♪ \n♪ All I want for Christmas is you, baby. ♪"
}
```

### Troubleshooting

#### Common Problems and How to Solve Them

1. **Invalid YouTube Video URL**: Make sure you provide a valid YouTube video URL.
2. **Transcript Not Available**: If the video does not have a transcript available, the actor will return "null".

### Additional Information

#### Links to Related Resources

- [Alternative YouTube Transcript Actor](https://apify.com/vistics/youtube-transcript-scraper-2-1k-results)
- [Apify Platform](https://apify.com)
- [Checkout my profile](https://apify.com/topaz_sharingan)

#### Acknowledgments

This actor was developed with the support of the Apify community and the YouTube API. We thank all contributors for their valuable input and feedback in making this tool available.

# Actor input Schema

## `timestamps` (type: `boolean`):

If true, returns transcript array with timestamps. If false, returns joined text only.

## `startUrls` (type: `array`):

List of YouTube video URLs to scrape transcripts from

## Actor input object example

```json
{
  "timestamps": false,
  "startUrls": [
    "https://www.youtube.com/watch?v=SieELGaJV8k"
  ]
}
```

# 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 = {
    "startUrls": [
        "https://www.youtube.com/watch?v=SieELGaJV8k"
    ]
};

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

# Run the Actor and wait for it to finish
run = client.actor("topaz_sharingan/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 '{
  "startUrls": [
    "https://www.youtube.com/watch?v=SieELGaJV8k"
  ]
}' |
apify call topaz_sharingan/youtube-transcript-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/CTQcdDtqW5dvELvur/builds/OcKKjL8zFv6JgEifr/openapi.json
