# YouTube Transcript API | Bulk Captions & Timestamps (`fierce_colleague_4uu/youtube-transcript-api`) Actor

Get timestamped English YouTube transcripts for up to 500 video URLs or IDs. No YouTube Data API key for direct video requests. $1.50 per 1,000 completed transcripts. Failed videos are free. JSON captions, per-video statuses, and retry batches.

- **URL**: https://apify.com/fierce_colleague_4uu/youtube-transcript-api.md
- **Developed by:** [Admin](https://apify.com/fierce_colleague_4uu) (community)
- **Categories:** Videos, AI, Developer tools
- **Features:** Limited permissions
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.50 / 1,000 complete 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 | Bulk Captions & Timestamps

Get timestamped English YouTube transcripts for up to 500 video URLs or IDs. Direct video requests need no YouTube Data API key. Pay $1.50 per 1,000 completed transcripts at the listed rate. Failed videos are free.

### Get transcripts

Pass one `videos` array. It accepts YouTube video URLs and 11-character video IDs in the same batch.

```json
{"videos":["https://www.youtube.com/watch?v=wjxOhCeb9bI","e6XbYLGWmOs"]}
```

Each completed video gets one dataset row. Use `videoId` to match the row to your input and `segments` for quotes with start and end times in seconds. The Actor prefers creator-provided English captions, then automatic English captions. Use `timingSource` to distinguish original timing from reconstructed cue end times.

### Call through Apify MCP

Connect to the [Apify MCP server](https://docs.apify.com/mcp). Use `call-actor` with the arguments below. For a direct connection, use `https://mcp.apify.com?tools=fierce_colleague_4uu/rs-bulk-youtube-captions-pilot`.

```json
{
  "actor": "fierce_colleague_4uu/rs-bulk-youtube-captions-pilot",
  "input": {"videos": ["https://www.youtube.com/watch?v=wjxOhCeb9bI", "e6XbYLGWmOs"]},
  "waitSecs": 30,
  "callOptions": {"maxTotalChargeUsd": 0.003}
}
```

If the run is still in progress, use `get-actor-run` with its run ID until it finishes. Then use `get-key-value-store-record` with the run's `defaultKeyValueStoreId` and `recordKey: "AGENT_SUMMARY"`. The summary contains:

| Field | Use |
| --- | --- |
| `datasetId`, `datasetItemsUrl` | Read full transcript rows on demand using your Apify credentials. In MCP, use `get-dataset-items` with the dataset ID. |
| `completedVideoIds`, `alreadyDeliveredVideoIds` | Match each success to its video and identify results an existing watch already delivered. |
| `misses` | Per-video status and whether it can be retried immediately or through a recurring watch. Scheduled retries include their earliest time. |
| `retryBatches` | Ready-to-run `videos` inputs for misses eligible for another immediate run, with the watch, output options and previous-miss labels when applicable. |
| `recoveredVideoIds` | IDs from `previousMissingVideoIds` that this run completed. |
| `sourceFailures` | Channel or playlist discovery errors, if you supplied collection inputs. |

A failure such as `upstream_blocked` may be retryable. `budget_exhausted` requires a new run with enough budget. A miss with `nextRetryAt` is managed by the recurring watch. Use `retryBatches` for immediate retries and leave published-video failures such as `unavailable` out of those calls. A one-off run can return an empty transcript dataset and still provide the statuses in its summary.

For REST, make the same input the body of `POST /v2/acts/cim6EkswoSZZFcaga/runs?maxTotalChargeUsd=0.003`. In n8n, wait for the Actor run, read `AGENT_SUMMARY` from the run's key-value store, and use its `datasetId` in Get Dataset Items. Existing integrations can continue reading `OUTPUT` and `RECOVERY`.

### Migrate an existing caption job

The direct-video caption step can keep sending a single `youtube_url` or an array of YouTube video URLs. This input returns `video_id`, `url`, `timestamped` (text, start, duration), `non_timestamped`, `success`, caption language and basic video fields. Existing video-ID jobs keep the native schema unless they select `outputMode: "johnvc"`. Channel-listing jobs, translations and extended metadata need a separate migration. Failures are available in the free recovery report, while the billable dataset holds only completed transcripts.

In n8n, configure a workflow that starts the Actor and retrieves its default dataset. Bind an n8n Header Auth credential with the Apify bearer token on all four HTTP Request nodes. In **Configure caption job**, choose your public video URLs, watch name and spend cap. Use **Transcripts for downstream** to feed the same caption field names into existing nodes, and read **Job receipt** for the run ID, recovery report, and current Apify usage. A receipt reports unsettled charges separately. Test manually before publishing the schedule.

### Schedule channel or playlist runs

Supply `channelIds` for recent channel uploads or `playlistIds` for playlist entries. These options require your own YouTube Data API key in the secret input field `youtubeApiKey`. Use `maxVideosPerSource` to read 1 to 100 entries per source. Enable `onlyNew` and keep one `watchKey` for the same recurring Apify task. The first run returns available tracks from its discovery window. Later runs skip the IDs delivered by that watch and can try previously failed IDs again.

The `OUTPUT` record lists `alreadyDelivered`, per-video `failures`, any `sourceFailures`, and a ready-to-use `retryInput` for transient failures and IDs skipped by a cap. Keep the same watch name when retrying a recurring run. Inputs beyond the 500-video processing cap are reported as `batch_limit`.

### Find and recover missing transcripts

`RECOVERY` has one entry per distinct video considered in the run, including cached deliveries, upstream deliveries, already-delivered IDs, and failures. Supply `previousMissingVideoIds` to list which videos from an earlier provider's miss list were recovered. The report records retry eligibility and scheduled times.

Recurring watches automatically retry transient misses on later runs, with three follow-ups after roughly 5 minutes, 30 minutes and 2 hours. For a public upload up to seven days old that has no captions yet, the watch retries after roughly 15 minutes, 2 hours and 12 hours. These are minimum waits from each attempt. Due retries are carried into later runs of the same watch, even if the videos have scrolled out of its channel window. Unavailable, out-of-scope, and oversized individual results have explicit statuses. Large batches are split automatically. A watch stops retrying a video after its retry budget is exhausted. You can still request the ID separately in a new watch or a one-off run.

### What counts as a result

A completed track requires a verified video ID, an intact caption response, a known duration and valid ordered timestamps. The track can start after the video begins and end before it finishes. Accuracy depends on YouTube's source captions. Saved captions can still be returned if the original video later becomes unavailable on YouTube. Videos without English captions, invalid results and unavailable videos have separate failure statuses.

The only charged event is a completed row in the run's default dataset. Duplicate IDs, failures, previously delivered watch IDs and retry attempts do not produce an event. Apify shows the active price before a paid run.

# Actor input Schema

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

Preferred input for direct video requests. Mix YouTube video URLs and 11-character IDs in one array. Up to 500 across all direct video inputs. Timestamped English transcript rows use the native schema by default. No YouTube Data API key is needed.

## `videoIds` (type: `array`):

Existing video-ID integrations can keep using this field. For new direct video requests, use videos.

## `youtube_url` (type: `string,array`):

Compatibility input for johnvc workflows. Accepts one video URL or an array. New integrations should use videos.

## `outputMode` (type: `string`):

Defaults to native for videos or videoIds. Legacy youtube_url defaults to johnvc-compatible fields when videos is empty or omitted.

## `previousMissingVideoIds` (type: `array`):

Optional. Use the IDs another provider missed to see which ones this run recovered. Only requested videos are processed.

## `channelIds` (type: `array`):

Up to ten YouTube channel IDs beginning with UC. Requires a YouTube Data API key.

## `playlistIds` (type: `array`):

Up to ten YouTube playlist IDs. Requires a YouTube Data API key.

## `youtubeApiKey` (type: `string`):

Used only to list channels and playlists. Video IDs work without a key.

## `maxVideosPerSource` (type: `integer`):

Maximum number of uploads or playlist entries to consider each run.

## `onlyNew` (type: `boolean`):

Skip videos already delivered by this watch.

## `watchKey` (type: `string`):

Use the same lowercase name for the same recurring job. Required when only-new is enabled.

## Actor input object example

```json
{
  "videos": [
    "wjxOhCeb9bI"
  ],
  "maxVideosPerSource": 30,
  "onlyNew": false
}
```

# Actor output Schema

## `agentSummary` (type: `string`):

No description

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

No description

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

No description

## `recovery` (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": [
        "wjxOhCeb9bI"
    ]
};

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

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

```

## MCP server setup

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

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/cim6EkswoSZZFcaga/builds/xBXAV3PVJpoCFakyu/openapi.json
