# Video Transcript Scraper: YouTube, TikTok, Instagram & Facebook (`automation-lab/video-transcript-scraper`) Actor

Turn YouTube, TikTok, Instagram Reels and Facebook videos into text with timestamps, in one run. Uses captions when they exist and AI speech-to-text when they don't. SRT and VTT included. Pay only for transcripts delivered.

- **URL**: https://apify.com/automation-lab/video-transcript-scraper.md
- **Developed by:** [Automation Lab](https://apify.com/automation-lab) (community)
- **Categories:** Social media
- **Features:** Limited permissions
- **Stats:** 244 total users, 23 monthly users, 99.9% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.40 / 1,000 youtube transcript extracteds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## Video Transcript Scraper

Turn **YouTube, TikTok, Instagram Reels and Facebook videos** into text with timestamps, in one run. Paste video URLs and get full transcripts plus ready-to-use SRT and VTT subtitles. It uses the platform's captions when they exist and **AI speech-to-text when they don't**. No API key, no login.

> **Supports:** YouTube (videos, Shorts, live, embeds) · TikTok · Instagram Reels and video posts · Facebook videos and Reels

***

### What does Video Transcript Scraper do?

Video Transcript Scraper turns public videos into structured text with timestamps. Give it a list of video URLs from any supported platform and it returns the full transcript, ready-to-use SRT and WebVTT subtitle documents, individual timed segments, word count, and video metadata (title, author, thumbnail).

For multilingual YouTube workflows, set `preferredLanguage` to an exact YouTube caption language code such as `es`, `de`, or `pt-BR`. The Actor prefers a manual track and then an auto-generated track in that language. When this option is omitted, selection remains English-first and then falls back to the first available track.

YouTube transcripts come from the video's caption tracks. Instagram and Facebook have no public caption files, so the Actor downloads the public video and transcribes its speech with AI (Whisper). TikTok uses its caption file when the page exposes one and speech-to-text otherwise. The `transcriptSource` field tells you which one each row used. Speech-to-text finds speech only: a music-only clip returns an error row and costs nothing.

Try it free on the [Apify Store](https://apify.com/automation-lab/video-transcript-scraper).

***

### Who is it for?

**📢 Content marketers and social media managers**

- Repurpose video content into blog posts, newsletters, or social captions
- Extract key quotes from interview-style Reels for ad copy
- Audit influencer content for brand mentions before partnerships

**🎓 Researchers and academics**

- Analyze linguistic patterns across thousands of TikTok or YouTube videos
- Build datasets of spoken language from social media for NLP training
- Study how topics are discussed across different video platforms

**🤖 AI and automation engineers**

- Feed transcripts into LLMs for summarization, sentiment analysis, or Q\&A
- Build RAG pipelines indexing video content as searchable text
- Automate transcript generation for video archives

**💼 SEO and content strategists**

- Convert YouTube video content into text for programmatic SEO pages
- Identify top-performing topics by analyzing what high-view videos say
- Extract transcript data from competitor channels for content gap analysis

***

### Why use Video Transcript Scraper?

- 🎯 **Multi-platform in one run** — mix TikTok, YouTube, Instagram, and Facebook URLs in a single input list
- 🎙️ **Works without captions** — AI speech-to-text covers Instagram, Facebook and TikTok videos that have no caption file
- ⚡ **Fast YouTube** — one to a few seconds per video, no browser
- 🗣️ **Optional YouTube caption language** — use `preferredLanguage` for an exact available track, or omit it for English-first selection
- 🕐 **Ready-to-use subtitles** — each successful result includes complete `srt` and `vtt` documents generated from the timed segments
- 📄 **Clean text output** — `transcriptText` is a single clean string, while every segment retains `startTime` and `endTime` in seconds
- 🔁 **Graceful error handling** — failed or no-caption videos don't crash the run; they return an `error` field
- 🛡️ **No proxy setup** — the Actor picks the route each platform needs, and proxy traffic is included in the price
- 💳 **Pay for delivery** — the start fee and the per-video price apply only when a transcript is delivered
- 🔗 **No login required** — works on public videos without any account credentials
- 📊 **Structured JSON output** — every result includes platform, videoId, author, thumbnail, duration, language, segments, and word count

***

### What data can you extract?

| Field | Description | Example |
|-------|-------------|---------|
| `videoUrl` | Original input URL | `https://youtube.com/watch?v=...` |
| `platform` | Platform name | `youtube` / `tiktok` / `instagram` / `facebook` |
| `videoId` | Platform video ID | `dQw4w9WgXcQ` |
| `title` | Video title | `"10 Python Tips You Didn't Know"` |
| `author` | Channel or username | `"@techcreator"` |
| `thumbnailUrl` | Thumbnail image URL | `https://img.youtube.com/vi/.../maxresdefault.jpg` |
| `duration` | Duration in seconds | `243` |
| `description` | Video description or post caption, when exposed | `"How we built it"` |
| `viewCount` | View or play count, when exposed | `18800000` |
| `language` | Caption language code, or the language detected by speech-to-text | `en` |
| `transcriptSource` | `captions` or `speech-to-text` | `speech-to-text` |
| `billedMinutes` | Started minutes of audio charged on a speech-to-text row, otherwise null | `2` |
| `transcriptText` | Full transcript as plain text | `"Today we're going to talk about..."` |
| `srt` | Complete SubRip subtitle document (null on errors) | `1\n00:00:01,250 --> ...` |
| `vtt` | Complete WebVTT subtitle document (null on errors) | `WEBVTT\n\n00:00:01.250 --> ...` |
| `segments` | Array of timed caption segments | `[{startTime, endTime, text}, ...]` |
| `segmentCount` | Number of caption segments | `87` |
| `wordCount` | Approximate word count | `1243` |
| `scrapedAt` | Extraction timestamp | `2026-04-04T12:00:00.000Z` |
| `error` | Why there is no transcript (null if successful) | `"No speech was detected..."` |

**Segment object fields:**

| Field | Type | Description |
|-------|------|-------------|
| `startTime` | number | Segment start time in seconds |
| `endTime` | number | Segment end time in seconds |
| `text` | string | Caption text for this segment |

***

### How much does it cost to extract video transcripts?

This Actor uses **pay-per-event pricing**: you pay for transcripts delivered, nothing else.

| Event | BRONZE price | Charged |
|-------|-------|---------|
| Run started | $0.003 | Once per run, with the first transcript delivered |
| YouTube transcript | $0.003 | Per video |
| Instagram transcript | $0.0065 | Per started minute of audio |
| TikTok transcript | $0.012 | Per started minute of audio. A TikTok with its own caption file counts as one unit at any length |
| Facebook transcript | $0.0065 | Per started minute of audio |

**Why per minute?** Speech-to-text takes compute in proportion to the audio's length, up to the 10-minute limit. A 40-second Reel is one unit, a 3-minute video is three, and a 10-minute video is ten. Each row's `billedMinutes` field shows what was charged.

**Plan discounts** apply to the transcript prices, and the start fee stays the same:

| Apify plan | YouTube per video | Instagram and Facebook per minute | TikTok per minute |
|------------|-------------------|-----------------------------------|-------------------|
| FREE and BRONZE | $0.003 | $0.0065 | $0.012 |
| SILVER | $0.0027 | $0.00585 | $0.0108 |
| GOLD and above | $0.0024 | $0.0052 | $0.0096 |

**Failed extractions are not charged** — a video without captions or speech, a private video or a failed extraction costs nothing. A run that delivers no transcript has no start fee either. A spending limit is respected: the run stops before a transcript it could not pay for.

**Real-world cost examples (BRONZE):**

- 50 YouTube transcripts: $0.003 + (50 × $0.003) = **$0.153**
- 50 Instagram Reels under a minute: $0.003 + (50 × $0.0065) = **$0.328**
- One 10-minute Facebook video: $0.003 + (10 × $0.0065) = **$0.068**

### How to extract video transcripts

1. Go to [Video Transcript Scraper on Apify Store](https://apify.com/automation-lab/video-transcript-scraper)
2. Click **Try for free**
3. In the **Video URLs** field, paste one or more video URLs (one per line)
4. *(Optional)* Set **Preferred YouTube caption language** to an exact code such as `es`; leave it empty for English-first selection
5. *(Optional)* Adjust **Max retries** for flaky connections
6. Click **Start** and wait for results
7. Download results as **JSON, CSV, or Excel** — or connect to downstream tools

**Supported URL formats:**

```
## YouTube
https://www.youtube.com/watch?v=dQw4w9WgXcQ
https://youtu.be/dQw4w9WgXcQ
https://www.youtube.com/shorts/dQw4w9WgXcQ

## TikTok
https://www.tiktok.com/@username/video/7123456789012345678

## Instagram
https://www.instagram.com/reel/ABC123def/

## Facebook
https://www.facebook.com/reel/123456789
```

**Example input (JSON):**

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "https://www.youtube.com/shorts/5-WE64bwEMI",
    "https://www.tiktok.com/@nasa/video/7234567890123456789"
  ],
  "preferredLanguage": "es",
  "maxRetries": 2
}
```

**Example input — batch content analysis:**

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=VIDEO_ID_1",
    "https://www.youtube.com/watch?v=VIDEO_ID_2",
    "https://www.tiktok.com/@creator/video/TIKTOK_ID"
  ],
  "maxRetries": 3
}
```

***

### Input parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `videoUrls` | array of strings | ✅ Yes | — | Video URLs to transcribe. Mix platforms freely. |
| `preferredLanguage` | string | No | English-first | Exact YouTube caption language code (for example `es` or `pt-BR`). Manual tracks are preferred over generated tracks. You get an error row if the requested language is unavailable. This option does not affect other platforms or translate captions. |
| `maxVideoDurationSeconds` | integer | No | 600 | Videos needing speech-to-text beyond this length return an error row, not charged (10–600). |
| `maxRetries` | integer | No | 2 | Max retry attempts per URL on failure (0–5). |
| `proxy` | object | No | Automatic | Optional proxy override. The default route works for every platform. |

**Memory:** the default of 1024 MB suits every platform. Speech-to-text needs at least 1024 MB.

***

### Output examples

**Successful YouTube transcript:**

```json
{
  "videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "platform": "youtube",
  "videoId": "dQw4w9WgXcQ",
  "title": "Rick Astley - Never Gonna Give You Up (Official Music Video)",
  "author": "Rick Astley",
  "thumbnailUrl": "https://i.ytimg.com/vi/dQw4w9WgXcQ/maxresdefault.jpg",
  "duration": 213,
  "language": "en",
  "transcriptText": "We're no strangers to love You know the rules and so do I...",
  "srt": "1\n00:00:18,560 --> 00:00:20,560\nWe're no strangers to love\n\n2\n00:00:20,560 --> 00:00:22,560\nYou know the rules and so do I\n",
  "vtt": "WEBVTT\n\n00:00:18.560 --> 00:00:20.560\nWe're no strangers to love\n\n00:00:20.560 --> 00:00:22.560\nYou know the rules and so do I\n",
  "segments": [
    { "startTime": 18.56, "endTime": 20.56, "text": "We're no strangers to love" },
    { "startTime": 20.56, "endTime": 22.56, "text": "You know the rules and so do I" }
  ],
  "segmentCount": 54,
  "wordCount": 312,
  "scrapedAt": "2026-04-04T12:00:00.000Z",
  "error": null
}
```

**No speech in the video:**

```json
{
  "videoUrl": "https://www.tiktok.com/@creator/video/1234567890",
  "platform": "tiktok",
  "videoId": "1234567890",
  "title": "My TikTok video",
  "transcriptText": null,
  "srt": null,
  "vtt": null,
  "segments": [],
  "segmentCount": 0,
  "wordCount": 0,
  "error": "No speech was detected in the video audio, so there is no transcript. No charge."
}
```

***

### Tips for best results

- 🎯 **Check `transcriptSource`** — caption text comes from the platform; speech-to-text is AI output, so names and rare words can differ from what was said.
- 📋 **Caption availability** — Not all videos have captions. Auto-generated captions are available on most YouTube videos. TikTok and Instagram auto-captions are only available on a subset of videos (typically creators who have enabled them).
- 🗣️ **Language selection is exact and YouTube-only** — `preferredLanguage` selects an existing YouTube caption track; it does not translate or generate captions. If that exact language is unavailable, the result contains an honest error and no transcript extraction event is charged.
- 📦 **Batch freely** — mix platforms in one run. Speech-to-text takes about 30 seconds per short video, and the default run timeout is one hour.
- 🔄 **Use maxRetries: 3 for large batches** — transient failures are common with social media platforms. Set retries higher for unattended automation runs.
- 📅 **Schedule for monitoring** — use Apify's scheduler to run weekly transcript extraction on channels you monitor, and connect to Google Sheets for automatic updates.
- 🚀 **Start small to test** — run 5-10 URLs first to check the videos are public and contain speech.

***

### Integrations

**📊 Video Transcript Scraper → Google Sheets (content monitoring)**
Connect output via Apify webhooks to automatically append new transcripts to a Google Sheet. Use the built-in Google Sheets integration in Apify Console → Integrations.

**🤖 Video Transcript Scraper → OpenAI / Claude (AI summarization)**
Feed `transcriptText` into an LLM prompt via Make.com or Zapier: "Summarize this video transcript in 3 bullet points and extract 5 key quotes." Build content briefs automatically from competitor videos.

**📧 Video Transcript Scraper → Email alerts (keyword monitoring)**
Schedule weekly runs on a YouTube channel's latest videos. Use a Make.com filter on `transcriptText` to check for keyword mentions, then send a Slack or email alert when your brand or competitor is mentioned.

**🗂️ Video Transcript Scraper → RAG pipeline (AI search)**
Export JSON output, chunk `segments` arrays by timestamp windows, embed with OpenAI, and index into Pinecone or Weaviate. Build a searchable knowledge base of video content queryable by natural language.

**📝 Video Transcript Scraper → WordPress / CMS (SEO content)**
Pipe YouTube transcripts into a templating system that auto-generates blog post drafts. Each transcript becomes a lightly-edited article, turning a video library into an SEO content moat.

***

### API usage

Run Video Transcript Scraper programmatically from any language or CI/CD pipeline.

**Node.js:**

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

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

const run = await client.actor('automation-lab/video-transcript-scraper').call({
  videoUrls: [
    'https://www.youtube.com/watch?v=dQw4w9WgXcQ',
    'https://www.youtube.com/shorts/5-WE64bwEMI',
  ],
  maxRetries: 2,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

**Python:**

```python
from apify_client import ApifyClient

client = ApifyClient(token="YOUR_API_TOKEN")

run = client.actor("automation-lab/video-transcript-scraper").call(run_input={
    "videoUrls": [
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
        "https://www.tiktok.com/@nasa/video/7234567890",
    ],
    "maxRetries": 2,
})

items = client.dataset(run["defaultDatasetId"]).list_items().items
for item in items:
    print(item["platform"], item["wordCount"], item["transcriptText"][:100])
```

**cURL:**

```bash
curl -X POST \
  "https://api.apify.com/v2/acts/automation-lab~video-transcript-scraper/runs" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "videoUrls": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ"],
    "maxRetries": 2
  }'
```

***

### Use with AI agents via MCP

Video Transcript Scraper is available as a tool for AI assistants that support the [Model Context Protocol (MCP)](https://docs.apify.com/platform/integrations/mcp).

Add the Apify MCP server to your AI client — this gives you access to all Apify actors, including this one:

#### Setup for Claude Code

```bash
claude mcp add --transport http apify "https://mcp.apify.com?tools=automation-lab/video-transcript-scraper"
```

#### Setup for Claude Desktop, Cursor, or VS Code

Add this to your MCP config file:

```json
{
    "mcpServers": {
        "apify": {
            "url": "https://mcp.apify.com?tools=automation-lab/video-transcript-scraper"
        }
    }
}
```

Your AI assistant will use OAuth to authenticate with your Apify account on first use.

#### Example prompts

Once connected, try asking your AI assistant:

- "Use automation-lab/video-transcript-scraper to get the transcript of this YouTube video: https://www.youtube.com/watch?v=dQw4w9WgXcQ"
- "Extract transcripts from these 5 TikTok videos and summarize the main topics covered in each"
- "Get transcripts for all videos in this list and tell me which ones mention the keyword 'climate change'"

Learn more in the [Apify MCP documentation](https://docs.apify.com/platform/integrations/mcp).

***

### Legality

This actor extracts **publicly available caption data** from public videos on social media platforms. It does not:

- Bypass any authentication walls
- Download video or audio content
- Access private or unlisted videos
- Store or redistribute video content

Caption data scraped is functionally equivalent to reading the closed captions a user can already see while watching a video.

**Best practices:**

- Only scrape public videos
- Respect platform terms of service for your use case
- Do not use transcript data to reproduce original creative works in full
- Review [Apify's terms of service](https://apify.com/terms-of-use) and the responsible scraping guidelines

This actor is intended for research, analysis, content repurposing, and automation workflows using publicly available data.

***

### FAQ

**Which platform has the highest transcript success rate?**
YouTube works for most videos with captions, including auto-generated ones. TikTok, Instagram and Facebook work for public videos that contain speech, because the audio is transcribed when there is no caption file. Music-only videos, private posts and photo posts return a free error row.

**How much does it cost to transcribe 100 videos?**
Depends on the platform and length. On BRONZE, 100 YouTube videos cost $0.003 + (100 × $0.003) = **$0.303**. 100 Instagram Reels under a minute cost $0.003 + (100 × $0.0065) = **$0.653**. Videos longer than a minute cost one unit per started minute, and videos with no transcript are not charged.

**How is this different from the official YouTube Transcript API?**
YouTube has no official transcript API. This actor uses the internal timedtext endpoint that the YouTube player uses — the same data that shows as closed captions when you watch a video. It works for any public video with captions, including auto-generated ones.

**Why do some videos return no transcript?**
The video has no speech (music-only clips are common on TikTok and Reels), is private or deleted, or is longer than `maxVideoDurationSeconds`. The row's `error` field says which, and none of these are charged.

**Can I extract transcripts from private or unlisted videos?**
No. This actor only works with publicly accessible videos. Private videos require authentication, which is outside the scope of this tool.

**What languages are supported?**
For YouTube, any existing caption track can be requested with `preferredLanguage` (for example `es`, `de`, or `pt-BR`). Selection prefers an exact manual track and then an exact generated track. Leave the option empty for the existing English-first behavior, which prefers English and then falls back to the first available track. For TikTok, Instagram and Facebook, speech-to-text detects the spoken language by itself. `preferredLanguage` does not apply to those platforms, and it never translates or generates captions. If the requested YouTube language is unavailable, the result is an error row rather than a silent English fallback.

**How fast does it run?**
YouTube transcripts take a few seconds each. Speech-to-text adds the download plus a few seconds for a short video, so a Reel usually finishes in well under a minute.

***

### Privacy of diagnostics

Failed operations send sanitized diagnostic input, exceptions and Actor, build and run IDs to our private GlitchTip service for repair. Secret fields and URL queries are removed, and reports are retained for 30 days.

***

### Other video and social media scrapers

Looking for related tools? Check out these other automation-lab actors:

- 🎵 [TikTok Scraper](https://apify.com/automation-lab/tiktok-scraper) — Extract TikTok videos, profiles and stats
- 📺 [YouTube Scraper](https://apify.com/automation-lab/youtube-scraper) — Scrape YouTube video data, channel info, and comments
- 📸 [Instagram Transcript Scraper](https://apify.com/automation-lab/instagram-reel-video-transcripts) — Instagram-only transcripts with source metadata
- 📝 [YouTube Transcript Scraper](https://apify.com/automation-lab/youtube-transcript) — YouTube-only transcripts, including channels and playlists
- 🛒 [Amazon Reviews Scraper](https://apify.com/automation-lab/amazon-reviews-scraper) — Extract product reviews from Amazon for sentiment analysis

# Changelog

This Actor's version history is a separate document: https://apify.com/automation-lab/video-transcript-scraper/changelog.md

# Actor input Schema

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

Public video URLs, one per line: YouTube (videos, Shorts, live, embed), TikTok, Instagram Reels and video posts, Facebook videos and Reels. Mix platforms freely.

## `preferredLanguage` (type: `string`):

Optional exact YouTube caption language code, such as es, de, or pt-BR. The Actor prefers a manual track, then an auto-generated track, in that language. Leave empty to keep the default English-first fallback. This setting does not affect TikTok, Instagram or Facebook and does not translate.

## `maxVideoDurationSeconds` (type: `integer`):

Videos without captions that run longer than this return an error row and are not charged. Applies to TikTok, Instagram and Facebook speech-to-text, which is charged per started minute of audio, so a lower limit also caps the cost per video.

## `maxRetries` (type: `integer`):

How many times to retry a video URL if extraction fails. Increase for flaky connections.

## `proxy` (type: `object`):

Optional. Leave empty: the Actor picks the proxy route it needs for each platform, and you do not pay for proxy traffic separately.

## Actor input object example

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

# Actor output Schema

## `transcripts` (type: `string`):

Dataset view containing full transcript text and identifying video metadata.

## `subtitles` (type: `string`):

Dataset view containing ready-to-use SRT and WebVTT subtitle documents.

# 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"
    ],
    "maxRetries": 2
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation-lab/video-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"],
    "maxRetries": 2,
}

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,automation-lab/video-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/J3tMddzAftFqh34nD/builds/uVIPCshNbEw7lMFdm/openapi.json
