# YouTube Transcript API: Captions with Timestamps (`steady-scrape/youtube-transcripts`) Actor

Get YouTube video transcripts from video URLs or IDs: full caption text, timestamped segments and language. Uses the video's existing captions only, no AI guessing. Videos without captions are free.

- **URL**: https://apify.com/steady-scrape/youtube-transcripts.md
- **Developed by:** [SteadyScrape](https://apify.com/steady-scrape) (community)
- **Categories:** Videos, AI, Developer tools
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 transcripts

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 API: Captions with Timestamps

Get the transcript of any public YouTube video from its URL or video ID: full caption text, timestamped segments (start/end in seconds) and video link. Paste one link or a list of up to 200 videos and get clean JSON, CSV or Excel back. $0.005 per transcript; videos without captions are free.

**Only real captions.** We return the captions that exist on the video (creator-uploaded or YouTube auto-generated). No AI guessing, no speech-to-text, no invented text. If a video has no captions, you get a clear `no_captions` row and you are **not charged**.

### What you can use it for

- Feed video transcripts into LLMs, RAG pipelines and summarizers
- Content research, SEO and repurposing videos into articles
- Searching what was said in a video, with timestamps to jump to
- Subtitle analysis across many videos

### Input

| Field | Description |
|---|---|
| `videos` | YouTube links (watch, youtu.be, shorts, embed, live) or 11-character IDs. Duplicates removed. Max 200 per run. |
| `includeSegments` | Timestamped caption lines (default on). Turn off for plain text only. |
| `mock` | Test mode: returns sample text (not real captions) so you can test your integration. Free. |

```json
{ "videos": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ", "https://youtu.be/9bZkp7q19f0"], "includeSegments": true }
```

### Output (one row per video, illustrative example)

```json
{
  "videoId": "dQw4w9WgXcQ",
  "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "status": "ok",
  "language": null,
  "requestedLanguage": "en",
  "text": "We're no strangers to love ...",
  "chars": 2089,
  "segmentCount": 61,
  "durationSec": 211.3,
  "segments": [{ "start": 18.6, "end": 21.9, "text": "We're no strangers to love" }],
  "truncated": false,
  "chargeEvent": "transcript"
}
```

`status` is one of: `ok`, `no_captions`, `unavailable` (private, removed or restricted), `invalid` (not a YouTube video link), `timeout`, `failed`, `skipped`. Only `ok` rows are charged.

**Language fields:** `language` is `null` in this version because the data source does not reliably report which caption track it returned. `requestedLanguage` is only the preference sent with the request, not the spoken or caption language. Captions are returned as the video provides them; translation is not offered.

**no_captions vs unavailable:** the data source often cannot tell a video without captions apart from a deleted, private or mistyped video ID, so those may all show as `no_captions`. All of them are free.

### Pricing

Pay only when you get transcripts:

- **$0.005 per transcript returned** (status `ok`)
- **$0.003 per run**, charged only if the run returned at least one transcript
- Plus Apify's standard $0.00005 Actor start fee.

Videos without captions, unavailable or invalid videos, timeouts, errors, skipped videos and test mode are free. A run where no video had a transcript pays only the Apify start fee.

**Examples:** 1 video = $0.008. 10 videos with captions = $0.053. 1,000 videos with captions (5 runs of 200) = $5.015.

### Limits

- Public videos with existing captions only. No logins, no cookies, no private or members-only videos. No AI or audio transcription.
- Up to 200 videos per run; very long transcripts are cut at 1,000,000 characters (`truncated: true`).
- Captions are usually ready within a minute; a video still pending after 5 minutes is returned as `timeout` (free) so you can retry it.
- **Maximum charge per run is respected:** videos are only sent when the remaining budget can pay for them; the rest are returned as `skipped` (free).
- **Runs full of videos without captions stop early:** a run stops after 25 videos without a transcript, plus one more for each transcript returned. Remaining videos are `skipped` (free); split very large lists or remove videos without captions.
- Free Apify plan: up to 10 videos per run and a daily usage limit per account.
- Comments, video stats and search are not included.

### FAQ

**Do you generate transcripts with AI?** No. Only captions already on the video (uploaded or YouTube auto-generated).
**Why is `language` empty?** The data source doesn't reliably say which caption track it returned, so we don't guess.
**Can I translate captions?** Not in this version.
**Can I use it from my code or AI agent?** Yes: Apify API, scheduling, webhooks, Make, Zapier, n8n and MCP clients all work with this Actor.

### Data source & terms

Captions are retrieved from YouTube via the DataForSEO API. This service is not affiliated with or endorsed by YouTube or Google. The service is not offered to customers in Russia, Belarus, Syria, North Korea, or occupied Crimea.

### More from SteadyScrape

- [YouTube Search Scraper & API: Views, Transcripts](https://apify.com/steady-scrape/youtube-search-video-stats): ranked YouTube search results, video stats and transcripts for any keyword, to find the videos worth transcribing.
- [PDF to Text Markdown Extractor (Digital, No OCR)](https://apify.com/steady-scrape/pdf-text-markdown): bulk-convert digital PDFs from URLs to clean text and Markdown with page counts; scanned files are flagged and free.
- [AI Page to JSON: URL + Schema Extractor](https://apify.com/steady-scrape/ai-page-to-json): turn public web pages into validated JSON from your own field list or JSON Schema; failed, blocked and JS-only pages are free.
- [Google Trends Scraper & API: Breakout Alerts](https://apify.com/steady-scrape/google-trends-api): Google Trends interest, momentum and breakout queries for the topics you watch.

See every **SteadyScrape (steady-scrape)** Actor on [our Apify profile](https://apify.com/steady-scrape).

### Support

Questions or a video that should have worked? Open an issue in the Issues tab.

Built and maintained by SteadyScrape.

# Actor input Schema

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

YouTube video links (watch, youtu.be, shorts, embed, live) or 11-character video IDs. Duplicates are removed. Up to 200 per run.

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

Add each caption line with start and end time in seconds. Turn off for text only.

## `mock` (type: `boolean`):

Returns sample text, not real captions, to test your integration. Nothing is charged.

## Actor input object example

```json
{
  "videos": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "includeSegments": true,
  "mock": false
}
```

# Actor output Schema

## `transcripts` (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 = {
    "videos": [
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("steady-scrape/youtube-transcripts").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=dQw4w9WgXcQ"] }

# Run the Actor and wait for it to finish
run = client.actor("steady-scrape/youtube-transcripts").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=dQw4w9WgXcQ"
  ]
}' |
apify call steady-scrape/youtube-transcripts --silent --output-dataset

```

## MCP server setup

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

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/fFJ9hEgKJXfo14ea8/builds/yNePndHfagcmjMFBW/openapi.json
