# Youtube Transcript Scraper (`excitable_pickle/youtube-transcript-summarizer-leads`) Actor

Looking for a reliable way to extract transcripts from YouTube videos? 🎥✨ Look no further! The YouTube-Transcript-Scraper has you covered. 🚀 It effortlessly retrieves transcripts while offering additional valuable insights. Ready to start? Let’s scrape away! 🕵️‍♂️💻

- **URL**: https://apify.com/excitable\_pickle/youtube-transcript-summarizer-leads.md
- **Developed by:** [Pavan](https://apify.com/excitable_pickle) (community)
- **Categories:** Automation, Developer tools, Social media
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

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

<p align="center">
  <img src="https://cdn.jsdelivr.net/npm/simple-icons@v13/icons/youtube.svg" width="90" height="90" alt="Youtube Transcript Scraper Logo" />
</p>

## Youtube Transcript Scraper

Extract clean, timestamped transcripts from any public YouTube video as structured JSON — built for **AI agents, RAG pipelines, and LLM workflows**, and just as useful for SEO, content repurposing, and research.

***

### Overview

**YouTube Transcript Scraper** pulls the full transcript of a YouTube video, segmented by timestamp, and returns it as clean, structured JSON — no HTML scraping, no manual copy-pasting, no fighting YouTube's UI.

It's built for two audiences:

- **Developers and AI builders** feeding video content into a RAG pipeline, a chatbot's knowledge base, an LLM fine-tuning set, or an autonomous agent that needs to "watch" a video without watching it.
- **Content teams and researchers** repurposing video into blog posts, generating subtitles, or pulling searchable text out of hours of video for SEO and content audits.

Works with any **public YouTube video that has captions enabled** (auto-generated or manually uploaded), in the language you request.

***

### Why use this Actor

- **Clean, structured JSON** — every transcript segment comes with a start time, duration, and text, ready to parse programmatically. No regex-scraping raw captions.
- **Built for AI agents and RAG** — the output shape is designed to be dropped straight into a vector store, a LangChain/LlamaIndex loader, or an LLM prompt.
- **Timestamp-accurate** — every line keeps its original start/duration, so you can cite, seek, or resegment by any chunk size you need.
- **Language selectable** — request the transcript in a specific language (see `targetLanguage` below) instead of whatever YouTube defaults to.
- **Fast** — a full transcript typically returns in seconds.
- **No browser or API keys needed on your side** — just a video URL.

***

### Use cases

- **RAG and AI agent pipelines**: index video transcripts as a knowledge source, or let an agent call this Actor as a tool to answer "what does this video say about X?"
- **Content repurposing**: turn a video into a blog post, newsletter, or social clips script.
- **SEO**: publish transcripts alongside video embeds to make video content indexable and searchable by Google.
- **Research and analysis**: pull text from interviews, lectures, or talks for qualitative analysis at scale.
- **Accessibility and localization**: generate a base for subtitles/captions in a target language.

***

### Input parameters

| Parameter | Type | Required | Description |
|---|---|---|---|
| `videoUrl` | String | Yes | Full URL of the YouTube video to transcribe. Example: `https://www.youtube.com/watch?v=VIDEO_ID`. |
| `targetLanguage` | String (ISO 639-1) | Yes | Language code for the returned transcript (e.g. `en`, `es`, `pt`, `fr`, `de`, `ja`...). Defaults to `en`. |

#### Example input

```json
{
  "videoUrl": "https://www.youtube.com/watch?v=VIDEO_ID",
  "targetLanguage": "en"
}
```

***

### Output

Each run pushes **one dataset item**: an object containing the ordered list of transcript segments for the requested video. Every segment has:

| Field | Type | Description |
|---|---|---|
| `start` | String | Segment start time, in seconds. |
| `dur` | String | Segment duration, in seconds. |
| `text` | String | The spoken text for that segment. |

#### Example output

```json
{
  "data": [
    { "start": "0.280", "dur": "4.440", "text": "I'm Dr Orion terban and this is psyx" },
    { "start": "2.960", "dur": "4.680", "text": "Better Living Through psychology and the" },
    { "start": "4.720", "dur": "5.879", "text": "topic of today's short talk is make her" }
  ]
}
```

Here's a real sample pulled straight from a live run, shown as a table for a quick visual check of the output shape:

| start | dur | text |
|---|---|---|
| 0.280 | 4.440 | I'm Dr Orion terban and this is psyx |
| 2.960 | 4.680 | Better Living Through psychology and the |
| 4.720 | 5.879 | topic of today's short talk is make her |
| 7.640 | 6.320 | work for it so you've probably heard the |
| 10.599 | 5.600 | fact that women disproportionately end |
| 13.960 | 4.640 | relationships like they break up and |

Results are available from the **Output**/**Storage** tab as JSON, CSV, Excel, or a rendered table — or via the Apify API/SDK, same as any Actor dataset.

***

### Integrating programmatically (API, SDKs, AI agents)

This Actor is a regular Apify Actor, so it's callable from any language via the [Apify API](https://docs.apify.com/api/v2), the official SDKs, or as a **tool for AI agents** through the [Apify MCP Server](https://mcp.apify.com) — no custom scraping code required on your end.

**JavaScript (`apify-client`)**

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: '<YOUR_API_TOKEN>' });

const run = await client.actor('excitable_pickle/youtube-transcript-scraper').call({
  videoUrl: 'https://www.youtube.com/watch?v=VIDEO_ID',
  targetLanguage: 'en',
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items[0].data); // [{ start, dur, text }, ...]
```

**Python (`apify-client`)**

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")

run = client.actor("excitable_pickle/youtube-transcript-scraper").call(run_input={
    "videoUrl": "https://www.youtube.com/watch?v=VIDEO_ID",
    "targetLanguage": "en",
})

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["data"])
```

**For AI agents**: this Actor can be exposed as a callable tool through Apify's MCP Server, so an agent (Claude, GPT, or any MCP-compatible assistant) can fetch a transcript on demand as part of answering a question or building a RAG index — without you writing a scraper.

***

### How to use

1. **Set the input** — provide `videoUrl` (required) and `targetLanguage` (defaults to `en`), either in the Apify Console or via an API call.
2. **Run the Actor** — start it from the Console, schedule it, or trigger it via the API/SDK.
3. **Read the output** — pull the transcript from the dataset in JSON, CSV, table view, or programmatically via the API.

***

### SEO benefits

Publishing transcripts alongside your video content helps you:

- **Boost keyword density** naturally, using the exact language spoken in the video.
- **Make video content crawlable** — search engines can't "watch" a video, but they can index a transcript.
- **Improve accessibility** — provide a text alternative for viewers who prefer reading or need it for accessibility reasons.

***

### Limitations

- Works only with **public YouTube videos** that have captions/transcripts enabled (auto-generated or manual).
- **Private, restricted, or caption-less videos** are not supported.
- Processes **one video per run** — for a playlist or channel, run it once per video URL (e.g. in a loop or a batch of Actor calls).

***

### Pricing

This Actor is billed via the Apify platform's usage-based pricing. See the pricing panel at the top of this page for current rates.

***

### FAQ

**Does this work for all YouTube videos?**
No — only public videos that have captions/transcripts enabled.

**Can I scrape private videos?**
No, private or restricted videos aren't supported due to YouTube's own restrictions.

**Can I get the transcript in a language other than the video's original audio?**
If YouTube provides (or auto-translates) captions in that language, yes — set `targetLanguage` to the ISO 639-1 code you want.

**Is this compatible with playlists or full channels?**
Not directly in one run — this Actor processes a single video URL at a time. Loop over video URLs (e.g. from a playlist scraper) to cover a whole playlist or channel.

**Can I use this with LangChain, an AI agent, or a RAG pipeline?**
Yes — the output is plain structured JSON with timestamped segments, and the Actor is callable via the Apify API/SDKs or as an agent tool through Apify's MCP Server.

### Related Actor

Need macro/economic context to pair with your video insights? Check out [Economic Calendar Data (Investing.com)](https://apify.com/excitable_pickle/economic-calendar-data-investing-com) — structured economic calendar events (actual, forecast, previous values, importance ratings) across 45+ countries, built for the same algo-trading and AI-agent use cases. From the same developer, [Pinto Studio](https://apify.com/excitable_pickle).

***

Start using **YouTube Transcript Scraper** today to turn any video into searchable, structured, agent-ready text. 🚀

### Connect to Claude / AI Agent (MCP)

Connect this Actor directly to Claude Desktop, Cursor, or any MCP client via the Model Context Protocol endpoint:

```text
https://mcp.apify.com/?token=YOUR_APIFY_TOKEN_HERE&tools=actors,docs,excitable_pickle/youtube-transcript-summarizer-leads
```

#### Claude Copy-Paste Prompt

```text
MCP Server URL: https://mcp.apify.com/?token=YOUR_APIFY_TOKEN_HERE&tools=actors,docs,excitable_pickle/youtube-transcript-summarizer-leads
Apify Token: YOUR_APIFY_TOKEN_HERE

Execute Actor: excitable_pickle/youtube-transcript-summarizer-leads
Task: "Execute search with parameters, extract structured results, and present key intelligence in a markdown table."
```

# Actor input Schema

## `videoUrl` (type: `string`):

The Video URL from YouTube.

## `targetLanguage` (type: `string`):

ISO 639-1 language code for the transcript

## Actor input object example

```json
{
  "videoUrl": "https://www.youtube.com/watch?v=IELMSD2kdmk",
  "targetLanguage": "en"
}
```

# Actor output Schema

## `videos` (type: `string`):

No description

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

No description

# 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 = {
    "videoUrl": "https://www.youtube.com/watch?v=IELMSD2kdmk",
    "targetLanguage": "en"
};

// Run the Actor and wait for it to finish
const run = await client.actor("excitable_pickle/youtube-transcript-summarizer-leads").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 = {
    "videoUrl": "https://www.youtube.com/watch?v=IELMSD2kdmk",
    "targetLanguage": "en",
}

# Run the Actor and wait for it to finish
run = client.actor("excitable_pickle/youtube-transcript-summarizer-leads").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 '{
  "videoUrl": "https://www.youtube.com/watch?v=IELMSD2kdmk",
  "targetLanguage": "en"
}' |
apify call excitable_pickle/youtube-transcript-summarizer-leads --silent --output-dataset

```

## MCP server setup

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

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/Tpjd4S9FLssZXhbUn/builds/PLcRRvpifZdl8BTdE/openapi.json
