# YouTube Transcript API: Downloader, Extractor, Subtitles & JSON (`s-r/free-youtube-transcript`) Actor

Paste YouTube video links or ids and download each video's full YouTube transcript as JSON: text, language, word count, optional timestamps. Manual or auto-generated captions in any language, in bulk. Use it as a YouTube transcript API for AI pipelines and research teams. $0.005 per transcript.

- **URL**: https://apify.com/s-r/free-youtube-transcript.md
- **Developed by:** [SR](https://apify.com/s-r) (community)
- **Categories:** Videos, Developer tools, AI
- **Features:** Limited permissions
- **Stats:** 52 total users, 8 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

$5.00 / 1,000 video 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 Downloader & Extractor: Subtitles to JSON

Download a YouTube transcript as structured JSON from a video URL or video id.
Paste one link or a long list, choose preferred languages, keep manual subtitles
when available, and optionally include timestamps for every subtitle segment.
You receive one dataset row for each nonblank input, in the same order, ready
for AI pipelines, search indexes, research notes or a spreadsheet.

The actor reads the captions available for the video. It supports manual
subtitles and automatically generated subtitles. It does not create a transcript
from audio, translate a video, or invent missing subtitles. When a video cannot
provide subtitles, its result explains the failure and carries no transcript
charge.

### Input

`videoUrls` is required and accepts a list of strings. Each string may be a
standard YouTube watch URL, a shortened youtu.be URL, a mobile watch URL, a shorts
URL, an embed URL, a /v/ URL, or an eleven-character video id. Surrounding spaces
are removed. Blank entries are skipped; if every entry is blank, the run produces
no dataset rows and records an input error.

This input was used in an actual run:

```json
{
  "videoUrls": [
    "https://youtu.be/jNQXAC9IVRw",
    "8jPQjjsBbIc",
    "https://www.youtube.com/watch?v=UF8uR6Z6KLc&t=10s"
  ]
}
```

| Field | Default | Meaning |
|---|---|---|
| `videoUrls` | Required | Video URLs or ids to process |
| `preferred_languages` | `["en"]` | Preferred subtitle language codes, in priority order |
| `prefer_manual` | `true` | Prefer requested manual tracks before automatic tracks |
| `include_segments` | `false` | Include every segment with its start and duration |
| `concurrency` | `10` | Requested concurrency from 1 to 50 |

You may submit the same video more than once. Each occurrence remains a separate
result. The order of the returned rows follows the input order, even when videos
finish at different times. A start-time parameter in a watch URL does not trim
the transcript; the result covers the complete selected subtitle track.

### Language selection

With `prefer_manual` enabled, the actor first checks all requested languages for
manual subtitles, then checks those languages for automatic subtitles. With it
disabled, each requested language is checked in order, with manual subtitles
still preferred within that language. If none of the requested languages is
available, the first available manual track is selected, followed by an
automatic track when there are no manual tracks.

Language matching ignores letter case. For example, `pt-BR` selects an available
Brazilian Portuguese track and the result keeps YouTube's original language
code. A regional language code still differs from its shorter counterpart:
`en-US` is not treated as `en`. The actual selected language always appears on
the result, so check that field when fallback matters to your application.

### YouTube transcript output

This is a real row from the run above, for the input `https://youtu.be/jNQXAC9IVRw`:

```json
{
  "input": "https://youtu.be/jNQXAC9IVRw",
  "video_id": "jNQXAC9IVRw",
  "fetched_at": "2026-10-02T02:13:46.407Z",
  "video_url": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
  "source": "youtube-transcript",
  "platform": "youtube",
  "language": "en",
  "is_generated": false,
  "segments": 6,
  "segment_count": 6,
  "word_count": 39,
  "duration_seconds": 18.88,
  "transcript": "All right, so here we are, in front of the elephants the cool thing about these guys is that they have really... really really long trunks and that's cool (baaaaaaaaaaahhh!!) and that's pretty much all there is to say",
  "text": "All right, so here we are, in front of the elephants the cool thing about these guys is that they have really... really really long trunks and that's cool (baaaaaaaaaaahhh!!) and that's pretty much all there is to say"
}
```

With `include_segments` set to true and German preferred, the same video returned
these timed segments in an actual run:

```json
"segments_data": [
  {"start": 0, "duration": 5.07, "text": "Also hier sind wir vor den Elefanten."},
  {"start": 5.07, "duration": 7.4, "text": "Das Coole an den Typen ist dass sie sehr, sehr, sehr, lange Rüssel haben."},
  {"start": 12.47, "duration": 1.8, "text": "Und das ist cool."},
  {"start": 17.07, "duration": 3.93, "text": "Ansonsten gibt es nicht wirklich viel zu sagen."}
]
```

Successful rows contain these established fields:

| Field | Type | Meaning |
|---|---|---|
| `input` | string | Original input after trimming |
| `video_id` | string | Extracted video id |
| `video_url` | string | Canonical watch URL |
| `language` | string | Selected subtitle language |
| `is_generated` | boolean | Whether subtitles were generated automatically |
| `segments` | integer | Number of subtitle segments |
| `word_count` | integer | Word count in the joined text |
| `duration_seconds` | number | End time of the last subtitle segment |
| `transcript` | string | Complete joined subtitle text |
| `segments_data` | array | Segment objects, only when requested |

Each segment object has `start`, `duration`, and `text`. Times are measured in
seconds and rounded to two decimal places. Segment text retains line breaks,
while the joined transcript normalizes whitespace. HTML entities are decoded
and formatting tags are removed.

Additional fields make the rows easier to combine with other data: `source`,
`platform`, `fetched_at`, `text`, and `segment_count`. `text` contains the same
content as `transcript`; `segment_count` contains the same count as `segments`.
Existing fields retain their names and types.

The run summary counts all dataset rows, including video error rows. Video
failures do not increment the run-level input error count. The `OUTPUT` record
also reports delivered results, successful charge counts, completion information,
and any warnings.

### Errors and unavailable videos

An unparseable input produces a row with the original input, a null `video_id`,
and an `error` string. It has no canonical video URL. A parseable but unavailable
video keeps its id and canonical URL and includes an error such as
`VideoUnavailable`. These two rows come from an actual run:

```json
[
  {"input": "not a youtube link", "video_id": null, "fetched_at": "2026-10-02T02:27:49.089Z", "error": "could not parse video id"},
  {"input": "zzzzzzzzzzz", "video_id": "zzzzzzzzzzz", "fetched_at": "2026-10-02T02:27:49.089Z", "video_url": "https://www.youtube.com/watch?v=zzzzzzzzzzz", "error": "VideoUnavailable: The video is no longer available"}
]
```

Disabled subtitles, restricted videos, and temporary video
access failures also appear as individual error rows.

One failed video does not discard the successful transcripts from other videos.
A run containing only video errors still completes and returns those error rows.
No video event is charged for them. Input errors are recorded separately in the
key-value store, using the established `bad_input` code.

### Pricing

The price is **$0.005 per successfully delivered, nonempty video transcript**.
There is one chargeable event, `video`, and no transcript start fee. Video error
rows and empty transcript text are free. Requesting segment timestamps does not
add a separate event. Requesting the same successful video twice produces two
transcript rows and two video events.

Users without a paid Apify plan receive at most ten results per run. Video error
rows also occupy a result position, but remain free. Nine successful transcripts
and one video error count as ten delivered rows and nine chargeable transcripts.
Paying users can submit larger lists. Large lists are processed in batches
automatically; inspect the completion information if a run reaches its time limit.

### Use cases for YouTube transcripts

- **AI and RAG pipelines.** Feed the `transcript` text into a language model to
  summarize a talk, answer questions about a lecture, or build a searchable
  knowledge base from a channel's videos.
- **Content repurposing.** Turn a video into a blog post draft, show notes, a
  newsletter or social posts without typing it out.
- **Research and monitoring.** Collect what speakers, competitors or creators say
  across many videos and search the text for brands, products or topics.
- **Subtitles and accessibility.** Keep `segments_data` to align quotes with
  playback times, create chapter markers, or check a caption track.
- **Language work.** Request the same video in several languages through
  `preferred_languages` and compare the tracks the video offers.

### YouTube transcript API: using the results

Download the dataset from the Apify console as JSON, CSV or Excel, or read it with
the Apify API from your own code. The actor works as a YouTube transcript API: start
a run with a list of links and fetch the dataset items when it finishes.
Use `transcript` for text search, summarization, research notes, or document ingestion.
Use `segments_data` when you need to connect a passage to a playback timestamp.
Keep `video_id`, `video_url`, and `language` alongside the text so your application
can identify the source and the selected track.

### Comparison with other ways to get a YouTube transcript

| Approach | Bulk lists | Language choice | Timestamps | Setup |
|---|---|---|---|---|
| Copying "Show transcript" in the YouTube player | No, one video at a time | Only what the player shows | Visible, not exportable | None, but manual |
| Running an open-source transcript library yourself | Yes, if you write the loop | Yes | Yes | Code, hosting and upkeep when YouTube changes |
| Speech-to-text transcription services | Yes | Depends on the model | Yes | Higher cost per minute of audio |
| This actor | Yes, one row per input in order | Ordered preferences with fallback | Optional per segment | Paste links and run |

This actor reads the subtitles that already exist for a video, so results are fast
and cheap and match what the video's captions say. When a video has no subtitles at
all, a speech-to-text service is the better tool; this actor then returns a free
error row instead of guessing.

### FAQ

#### Can I request a specific language?

Yes. Put the preferred codes in `preferred_languages`, in priority order.
The selected track must exist on the video. If your languages are unavailable,
the actor falls back to an available track and reports its actual language.

#### Does this actor transcribe videos without captions?

No. It downloads existing subtitles. It does not perform speech recognition or
produce estimated text when YouTube has no available subtitle track.

#### Are timestamps included by default?

No. Set `include_segments` to true for individual segment start times, durations,
and text. Without that option, `segments_data` is absent rather than null.

#### Will one unavailable video fail my entire list?

No. Its row contains an error and is free. Other videos continue and successful
transcripts retain the order of their inputs.

#### What does the free-plan limit count?

It counts delivered input positions, including video error rows, up to ten per
run. Charges count only the nonempty transcripts among those delivered rows.

#### Is this YouTube transcript downloader free?

Every user can try it: users without a paid Apify plan get up to ten results per
run. Each successful transcript costs $0.005; error rows and empty transcripts are
always free.

#### Is this a YouTube transcript generator?

It downloads the transcript YouTube already has for a video, manual or
auto-generated, so you get the same text the player shows under "Show transcript".
It does not generate new text from the audio when a video has no subtitles.

#### Which links can I paste?

Standard watch links, youtu.be short links, mobile links, shorts, embed and /v/
links, and bare eleven-character video ids. Mixed lists are fine.

#### Can I export transcripts to CSV or Excel?

Yes. The dataset downloads as JSON, CSV, Excel and other formats from the Apify
console or the API.

# Actor input Schema

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

List of YouTube video URLs or video IDs (e.g. https://www.youtube.com/watch?v=dQw4w9WgXcQ or just dQw4w9WgXcQ).

## `preferred_languages` (type: `array`):

Language codes in priority order (e.g. en, nl, de). The first available transcript wins; falls back to any language if none match.

## `prefer_manual` (type: `boolean`):

If true, manually-created transcripts beat auto-generated even when the language matches both. Auto-generated as fallback.

## `include_segments` (type: `boolean`):

If true, include the full segments\[] array (start, duration, text). If false, only the joined transcript text + metadata.

## `concurrency` (type: `integer`):

Concurrent transcript fetches (1-50). Higher = faster but may hit YouTube rate limits.

## Actor input object example

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "preferred_languages": [
    "en"
  ],
  "prefer_manual": true,
  "include_segments": false,
  "concurrency": 10
}
```

# Actor output Schema

## `results` (type: `string`):

Dataset rows produced by this run.

## `output` (type: `string`):

OUTPUT record with the run's counts and status flags.

## `errors` (type: `string`):

Failures with a code and a redacted message. Absent when the run had none.

# 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"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("s-r/free-youtube-transcript").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"] }

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

```

## MCP server setup

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

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/MfvcNnyCMMHnewnRj/builds/7mzHuofQqSmbQPyVF/openapi.json
