# YouTube Transcript Scraper: Captions to Text, Timestamps & SRT (`poised_beardlichen/youtube-transcript-scraper`) Actor

Use this when you need YouTube video transcripts as text, timestamped segments or SRT. $0.004/transcript; videos without captions are free. Input: {"videos":\["https://youtu.be/aircAruvnKk"],"languages":\["en"]}. Output: text, segments, title, channel, language.

- **URL**: https://apify.com/poised_beardlichen/youtube-transcript-scraper.md
- **Developed by:** [Isaac](https://apify.com/poised_beardlichen) (community)
- **Categories:** Videos, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$4.00 / 1,000 transcript fetcheds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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: Captions to Text, Timestamps & SRT

**Use this when** you or your AI agent need the transcript of one or many YouTube videos as clean text, timestamped lines or SRT subtitles. Paste URLs or video IDs and get JSON back in seconds. **$0.004 per transcript** ($4 per 1,000). Videos without captions, private, removed or invalid videos are free.

**Good for...**

- feeding video content to ChatGPT, Claude or a RAG pipeline (summaries, Q\&A, notes)
- repurposing videos into blog posts, show notes or social posts
- research and content analysis across many videos or channels
- subtitles: download captions as SRT with timestamps

### What you get

- Full transcript as one `text` string, plus timestamped `segments` (start, duration, text)
- Optional `srt` subtitle file
- Video title, channel, channel ID, length and view count
- Which caption track was used (language, manual or auto-generated) and every language available
- Works with watch URLs, youtu.be links, Shorts, embeds, live replays and bare 11-character IDs

### Input example

```json
{
  "videos": ["https://www.youtube.com/watch?v=aircAruvnKk", "https://youtu.be/8jPQjjsBbIc"],
  "languages": ["en"],
  "includeSegments": true,
  "includeSrt": false
}
```

`languages` is an order of preference. Manually written captions are chosen before auto-generated ones in the same language. If none of your languages exist, you get the video's main caption track, and `availableLanguages` tells you what else there is.

### Output example

```json
{
  "videoId": "aircAruvnKk",
  "url": "https://www.youtube.com/watch?v=aircAruvnKk",
  "ok": true,
  "title": "But what is a neural network? | Deep learning chapter 1",
  "channel": "3Blue1Brown",
  "channelId": "UCYO_jab_esuFRV4b17AJtAw",
  "lengthSeconds": 1120,
  "viewCount": 25022230,
  "language": "English",
  "languageCode": "en",
  "isGenerated": false,
  "wordCount": 3357,
  "text": "This is a 3. It's sloppily written and rendered at an extremely low resolution of 28x28 pixels, but your brain has no trouble recognizing it as a 3...",
  "availableLanguages": [{"language": "English", "languageCode": "en", "isGenerated": false}, {"language": "Spanish", "languageCode": "es", "isGenerated": false}],
  "segments": [
    {"start": 4.22, "duration": 1.18, "text": "This is a 3."},
    {"start": 6.06, "duration": 4.65, "text": "It's sloppily written and rendered at an extremely low resolution of 28x28 pixels,"}
  ]
}
```

Videos that can't be transcribed come back as `{"ok": false, "error": "NoCaptions"}` (or `VideoUnavailable`, `LoginRequired`) and are not charged.

### Pricing

Pay per event, no subscription, no monthly fee:

| Event | Price |
|---|---|
| Transcript fetched | $0.004 ($4 per 1,000 videos) |
| No captions, private, removed or invalid video | Free |

Set a maximum cost per run in Apify and the run stops cleanly when it's reached.

### Use it from the API or with AI agents

```bash
curl -X POST "https://api.apify.com/v2/acts/poised_beardlichen~youtube-transcript-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" -d '{"video": "dQw4w9WgXcQ", "includeSegments": false}'
```

### Use in ChatGPT or Claude

Add this tool to your AI assistant as a custom connector (MCP server) with this URL:

```
https://mcp.apify.com?tools=poised_beardlichen/youtube-transcript-scraper
```

- **ChatGPT:** Settings → Apps & Connectors → Create (needs Developer mode), paste the URL, choose OAuth and sign in to Apify.
- **Claude:** Settings → Connectors → Add custom connector, paste the URL, then click Connect.

Runs go on your own Apify account at the same per-event prices, so the free plan's monthly credit applies.

### FAQ

**Does it work for videos without captions?** No. It reads YouTube's own captions (manual or auto-generated). Most spoken videos have auto-generated captions. For a video with none, use our [Audio & Video Transcriber](https://apify.com/poised_beardlichen/audio-video-transcriber) on the audio file instead. Videos without captions are free.

**Can it translate?** Not at the moment. YouTube heavily rate-limits its auto-translated captions, so we return the original captions instead of failing.

**Is it reliable?** Requests that YouTube blocks are retried automatically through fresh residential IPs. In our tests every video that had captions returned a transcript.

**Is this legal?** It reads publicly available captions. You are responsible for how you use the content, including copyright.

### Other tools by us

- [Audio & Video Transcriber (Whisper)](https://apify.com/poised_beardlichen/audio-video-transcriber): MP3, WAV, M4A and MP4 to text, timed segments and SRT subtitles at $0.006 per audio minute.
- [Website Screenshot & PDF API](https://apify.com/poised_beardlichen/website-screenshot-pdf): bulk screenshots and PDFs of any page with cookie banners and pop-ups removed.
- [Website Screenshot & PDF for AI Agents](https://apify.com/poised_beardlichen/website-screenshot-pdf-agent): fast single-page screenshots and PDFs for agents, from $0.0015 per screenshot.
- [PDF to Text & Markdown with OCR](https://apify.com/poised_beardlichen/pdf-to-text-markdown-ocr): turn PDFs, DOCX and scans into clean, LLM-ready Markdown.
- [Image to Text OCR API](https://apify.com/poised_beardlichen/image-to-text-ocr): extract text from PNG, JPEG, TIFF and WebP images in 27 languages.
- [Bulk PageSpeed & Lighthouse Checker](https://apify.com/poised_beardlichen/pagespeed-lighthouse-checker): Lighthouse scores, Core Web Vitals and top fixes for many URLs.
- [Website Tech Stack Detector](https://apify.com/poised_beardlichen/tech-stack-detector): CMS, ecommerce, analytics, CDN and 7,600+ other technologies behind any website.
- [Research Paper Search](https://apify.com/poised_beardlichen/research-paper-search): arXiv, PubMed and Crossref papers plus legal open-access full text from $0.0015 per paper.
- [SEC EDGAR Financials & Filings](https://apify.com/poised_beardlichen/sec-edgar-financials): US company financials, filings and 10-K sections as compact JSON.
- [Website Legitimacy & Scam Check](https://apify.com/poised_beardlichen/website-legitimacy-check): domain age, SSL, look-alike brands, VAT and LEI signals at $0.008 per site.
- [Bulk Phone Number Validator](https://apify.com/poised_beardlichen/phone-number-validator): validity, E.164 format, line type and region for any number at $0.70 per 1,000.
- [Company Contact & Profile Extractor](https://apify.com/poised_beardlichen/company-contact-extractor): generic emails, phones, socials and profile from any company website at $0.004 per site.
- [UK & Australia Company Check](https://apify.com/poised_beardlichen/company-registry-check): ABN, ACN, ASIC and Companies House status and red flags from $0.003 per company.
- [Company Careers & Open Jobs Lookup](https://apify.com/poised_beardlichen/careers-jobs-lookup): open jobs from Greenhouse, Lever, Ashby and more at $0.0015 per job.
- [Domain Intelligence](https://apify.com/poised_beardlichen/domain-intelligence): WHOIS/RDAP, DNS, SPF/DMARC/DKIM and SSL for any domain at $0.002 per domain.
- [Bulk Email Verifier & Validator](https://apify.com/poised_beardlichen/email-verifier-bulk): syntax, MX, disposable and role checks at $0.0003 per email.

### Support

Found a problem or need a feature? Open an issue on the **Issues** tab.

# Actor input Schema

## `videos` (type: `array`):

YouTube video URLs (watch, youtu.be, Shorts, embed, live) or 11-character video IDs, one per line. Duplicates are skipped.

## `video` (type: `string`):

Shortcut for one URL or ID, e.g. "dQw4w9WgXcQ". Combined with the list above.

## `languages` (type: `array`):

Language codes in order of preference, e.g. en, es, de. Manually created captions are preferred over auto-generated ones. If none match, the first available language is returned.

## `includeSegments` (type: `boolean`):

Add a 'segments' array with start time, duration and text for each caption line.

## `includeSrt` (type: `boolean`):

Add an 'srt' field with the transcript as an SRT subtitle file.

## `maxConcurrency` (type: `integer`):

How many videos to fetch at the same time.

## Actor input object example

```json
{
  "videos": [
    "https://www.youtube.com/watch?v=aircAruvnKk",
    "https://youtu.be/8jPQjjsBbIc"
  ],
  "languages": [
    "en"
  ],
  "includeSegments": true,
  "includeSrt": false,
  "maxConcurrency": 5
}
```

# Actor output Schema

## `results` (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 = {
    "videos": [
        "https://www.youtube.com/watch?v=aircAruvnKk",
        "https://youtu.be/8jPQjjsBbIc"
    ],
    "languages": [
        "en"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("poised_beardlichen/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 = {
    "videos": [
        "https://www.youtube.com/watch?v=aircAruvnKk",
        "https://youtu.be/8jPQjjsBbIc",
    ],
    "languages": ["en"],
}

# Run the Actor and wait for it to finish
run = client.actor("poised_beardlichen/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 '{
  "videos": [
    "https://www.youtube.com/watch?v=aircAruvnKk",
    "https://youtu.be/8jPQjjsBbIc"
  ],
  "languages": [
    "en"
  ]
}' |
apify call poised_beardlichen/youtube-transcript-scraper --silent --output-dataset

```

## MCP server setup

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