# 🔥 YouTube Transcript Scraper (`powerai/youtube-transcript-scraper`) Actor

Extract transcripts and subtitles from YouTube videos efficiently. Simply provide video URLs to receive structured transcript data with optional time markers.

- **URL**: https://apify.com/powerai/youtube-transcript-scraper.md
- **Developed by:** [PowerAI](https://apify.com/powerai) (community)
- **Categories:** Social media, Videos, Automation
- **Features:** Limited permissions
- **Stats:** 8 total users, 0 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.99 / 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.

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

Extract transcripts and subtitles from YouTube videos efficiently. Simply provide video URLs to receive structured transcript data with optional time markers.

### ✨ Key Features

- 📥 Extract transcripts from multiple YouTube videos
- 📊 Get detailed video metadata including:
  - Video URL and ID
  - Video title and channel information
  - View counts and subscriber statistics
  - Complete transcript with time markers
- 🔗 Support for multiple video URLs in a single run
- 📈 Flexible output format with or without timestamps
- 📋 Clean and structured JSON output

### 💪 Why Choose This Actor?

- **Comprehensive**: Get complete transcript data from YouTube videos
- **Flexible**: Choose whether to include time markers or get plain text
- **Efficient**: Process multiple videos in a single run
- **Structured**: Clean JSON output for easy integration
- **Reliable**: Stable and consistent data extraction
- **User-Friendly**: Simple input parameters

### 🎯 Perfect For

- 📊 Content Researchers
- 📈 Data Analysts
- 💼 Content Creators
- 🏢 Market Researchers
- 🔍 Academic Researchers
- 📋 Transcription Services

### 📈 Use Cases

1. **Content Analysis**: Analyze video content and topics
2. **Accessibility**: Generate text versions of video content
3. **Research**: Extract information from educational videos
4. **Translation**: Use transcripts for translation workflows
5. **SEO**: Extract keywords and content for SEO analysis

### 📝 Input Requirements

The actor accepts the following input parameters:

- `videoUrls` (required): Array of YouTube video URLs to extract transcripts from. Each URL should be provided as an object with a `url` property.

#### Input Example

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

#### Output Example

```json
{
  "videoUrl": "https://www.youtube.com/watch?v=N3F64b7H80U",
  "videoId": "N3F64b7H80U",
  "videoTitle": "",
  "channelName": "",
  "views": "",
  "subscribers": "",
  "transcript": [
      {
        "text": "President Trump's plan to take",
        "timestamp": "0:00"
      },
      {
        "text": "Greenland. President Trump saying,",
        "timestamp": "0:01"
      },
      {
        "text": "quote, \"There is no going back.\" The",
        "timestamp": "0:02"
      },
      {
        "text": "stock market plunging 870 points today",
        "timestamp": "0:05"
      },
      {
        "text": "over the president's insistence that he",
        "timestamp": "0:07"
      },
      {
        "text": "will take Greenland and will impose",
        "timestamp": "0:09"
      },
      {
        "text": "tariffs against NATO allies who don't",
        "timestamp": "0:10"
      },
      {
        "text": "support him. The president late today",
        "timestamp": "0:13"
      },
      {
        "text": "asked, \"How far are you willing to go on",
        "timestamp": "0:15"
      },
      {
        "text": "this?\" He said, \"You'll find out.\" Mary",
        "timestamp": "0:17"
      },
      {
        "text": "Bruce at the White House",
        "timestamp": "0:19"
      },
      {
        "text": "tonight. As Wall Street plunges on",
        "timestamp": "0:21"
      },
      {
        "text": "President Trump's threat to impose new",
        "timestamp": "0:23"
      },
      {
        "text": "tariffs on NATO allies, the president",
        "timestamp": "0:25"
      },
      {
        "text": "doubling down on his quest to own",
        "timestamp": "0:27"
      },
      {
        "text": "Greenland, declaring, quote, \"There can",
        "timestamp": "0:30"
      },
      {
        "text": "be no going back.",
        "timestamp": "0:32"
      },
      {
        "text": "How far are you willing to go to acquire",
        "timestamp": "0:34"
      },
      {
        "text": "Greenland?",
        "timestamp": "0:36"
      },
      {
        "text": "You'll find out.\"",
        "timestamp": "0:37"
      },
      {
        "text": "America's NATO allies beyond frustrated.",
        "timestamp": "0:38"
      },
      {
        "text": "Trump releasing a text from French",
        "timestamp": "0:41"
      },
      {
        "text": "President Emanuel Mcronone who told him,",
        "timestamp": "0:42"
      },
      {
        "text": "\"I do not understand what you are doing",
        "timestamp": "0:45"
      },
      {
        "text": "on Greenland.\" Today at the World",
        "timestamp": "0:47"
      },
      {
        "text": "Economic Forum in Davos, Switzerland,",
        "timestamp": "0:49"
      },
      {
        "text": "Mcronone with this veiled shot.",
        "timestamp": "0:51"
      },
      {
        "text": "We need more stability in this world,",
        "timestamp": "0:53"
      },
      {
        "text": "but we do prefer respect to bullies.",
        "timestamp": "0:56"
      },
      {
        "text": "Canadian Prime Minister Mark Carney",
        "timestamp": "0:59"
      },
      {
        "text": "spoke of a rupture in the world order.",
        "timestamp": "1:01"
      },
      {
        "text": "Let me be direct. We are in the midst of",
        "timestamp": "1:04"
      },
      {
        "text": "a rupture, not a transition.",
        "timestamp": "1:07"
      },
      {
        "text": "President Trump, who's heading to Davos",
        "timestamp": "1:09"
      },
      {
        "text": "tonight, downplaying tensions with",
        "timestamp": "1:11"
      },
      {
        "text": "Mcronone and other leaders.",
        "timestamp": "1:12"
      },
      {
        "text": "I think I get along very well with them.",
        "timestamp": "1:14"
      },
      {
        "text": "I mean, they they always treat me well.",
        "timestamp": "1:16"
      },
      {
        "text": "They get a little bit rough when",
        "timestamp": "1:19"
      },
      {
        "text": "they're, you know, when I'm not around,",
        "timestamp": "1:20"
      },
      {
        "text": "but when I'm around, they treat me very",
        "timestamp": "1:22"
      },
      {
        "text": "nicely.",
        "timestamp": "1:24"
      },
      {
        "text": "But in Europe, the anger is palpable.",
        "timestamp": "1:25"
      },
      {
        "text": "Thousands taking to the streets of",
        "timestamp": "1:27"
      },
      {
        "text": "Copenhagen wearing Trump's signature red",
        "timestamp": "1:29"
      },
      {
        "text": "hats. These saying, \"Make America go",
        "timestamp": "1:31"
      },
      {
        "text": "away.\"",
        "timestamp": "1:34"
      },
      {
        "text": "Greenlanders have made it clear they",
        "timestamp": "1:35"
      },
      {
        "text": "don't want to be part of the US. Give",
        "timestamp": "1:36"
      },
      {
        "text": "the US the right to take away that",
        "timestamp": "1:38"
      },
      {
        "text": "self-determination.",
        "timestamp": "1:40"
      },
      {
        "text": "When I speak to them, I'm sure they'll",
        "timestamp": "1:40"
      },
      {
        "text": "be thrilled.",
        "timestamp": "1:41"
      },
      {
        "text": "Trump insisting there's a deal to be",
        "timestamp": "1:42"
      },
      {
        "text": "made. I think that we will work",
        "timestamp": "1:44"
      },
      {
        "text": "something out where NATO is going to be",
        "timestamp": "1:47"
      },
      {
        "text": "very happy and where we're going to be",
        "timestamp": "1:48"
      },
      {
        "text": "very happy.",
        "timestamp": "1:51"
      },
      {
        "text": "The president speaking today for an hour",
        "timestamp": "1:52"
      },
      {
        "text": "and 45 minutes in that rambling press",
        "timestamp": "1:54"
      },
      {
        "text": "conference marking the one-year",
        "timestamp": "1:56"
      },
      {
        "text": "anniversary of his inauguration, listing",
        "timestamp": "1:57"
      },
      {
        "text": "off his accomplishments. But the",
        "timestamp": "1:59"
      },
      {
        "text": "president also keenly aware of the",
        "timestamp": "2:01"
      },
      {
        "text": "polls. New CNN data shows a majority of",
        "timestamp": "2:02"
      },
      {
        "text": "Americans think Trump's first year is a",
        "timestamp": "2:05"
      },
      {
        "text": "failure and that he hasn't gone far",
        "timestamp": "2:08"
      },
      {
        "text": "enough to reduce prices. But Trump",
        "timestamp": "2:09"
      },
      {
        "text": "insists he's turned things around. David",
        "timestamp": "2:11"
      },
      {
        "text": "Mary Bruce at the White House tonight.",
        "timestamp": "2:14"
      }
  ],
  "text": "President Trump's plan to take Greenland. President Trump saying, quote, \"There is no going back.\" The stock market plunging 870 points today over the president's insistence that he will take Greenland and will impose tariffs against NATO allies who don't support him. The president late today asked, \"How far are you willing to go on this?\" He said, \"You'll find out.\" Mary Bruce at the White House tonight. As Wall Street plunges on President Trump's threat to impose new tariffs on NATO allies, the president doubling down on his quest to own Greenland, declaring, quote, \"There can be no going back. How far are you willing to go to acquire Greenland? You'll find out.\" America's NATO allies beyond frustrated. Trump releasing a text from French President Emanuel Mcronone who told him, \"I do not understand what you are doing on Greenland.\" Today at the World Economic Forum in Davos, Switzerland, Mcronone with this veiled shot. We need more stability in this world, but we do prefer respect to bullies. Canadian Prime Minister Mark Carney spoke of a rupture in the world order. Let me be direct. We are in the midst of a rupture, not a transition. President Trump, who's heading to Davos tonight, downplaying tensions with Mcronone and other leaders. I think I get along very well with them. I mean, they they always treat me well. They get a little bit rough when they're, you know, when I'm not around, but when I'm around, they treat me very nicely. But in Europe, the anger is palpable. Thousands taking to the streets of Copenhagen wearing Trump's signature red hats. These saying, \"Make America go away.\" Greenlanders have made it clear they don't want to be part of the US. Give the US the right to take away that self-determination. When I speak to them, I'm sure they'll be thrilled. Trump insisting there's a deal to be made. I think that we will work something out where NATO is going to be very happy and where we're going to be very happy. The president speaking today for an hour and 45 minutes in that rambling press conference marking the one-year anniversary of his inauguration, listing off his accomplishments. But the president also keenly aware of the polls. New CNN data shows a majority of Americans think Trump's first year is a failure and that he hasn't gone far enough to reduce prices. But Trump insists he's turned things around. David Mary Bruce at the White House tonight."

}
```

# Actor input Schema

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

List of YouTube video URLs to extract transcripts from.

## Actor input object example

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

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

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

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

```

## MCP server setup

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

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/9ThAjQpq3V2B5wAiu/builds/TgKa5LQmjOjP81Ecz/openapi.json
