# YouTube Shorts Transcript Extractor 🎬 (`scriptbase/youtube-shorts-transcript-extractor`) Actor

🎬 Convert any YouTube Short to text. Extract the transcript and captions with timestamps. Outputs JSON, SRT, or plain text. Auto-captions + speech-to-text fallback. 14+ languages. No login needed.

- **URL**: https://apify.com/scriptbase/youtube-shorts-transcript-extractor.md
- **Developed by:** [Scriptbase](https://apify.com/scriptbase) (community)
- **Categories:** Agents, SEO tools, Social media
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## YouTube Shorts Transcript Extractor

Extract transcripts from YouTube Shorts — the short-form vertical videos (up to 3 minutes) that dominate short-form discovery. Purpose-built for the Shorts format: paste a Shorts URL and get back timestamped text optimized for hook analysis, script extraction, and automated captioning.

Works with any public YouTube Short. No login required.

### What it does

1. You provide a YouTube Shorts URL (`/shorts/<id>`).
2. The actor extracts the spoken transcript with precise timestamps.
3. You get back structured text in JSON, plain text, SRT, or WebVTT — ready for creator research, caption generation, or trend analysis.

Unlike generic YouTube transcript tools, this actor is purpose-built for Shorts. It accepts only Shorts URLs, making it the right choice when your pipeline specifically targets short-form vertical content.

### Key features

- **Shorts-specific** — accepts only `/shorts/` URLs. No ambiguity about which YouTube format you are targeting.
- **Hook & script extraction** — Shorts live or die by their opening line. Get timestamped text to identify and study high-performing hooks at scale.
- **Captioning-ready output** — export SRT or WebVTT files directly usable in video editors for burned-in or soft captions.
- **Timestamped segments** — every word group has a `start` and `end` time, enabling word-for-word alignment to the video timeline.
- **4 output formats** — JSON with timestamps, plain text, SRT, or WebVTT.
- **Multi-language** — uses YouTube's caption tracks when available; speech-to-text fallback covers 14 languages.
- **No login required.**

### Supported languages

When YouTube provides caption tracks (auto-generated or manual), the actor uses them in the language you specify. When captions are absent, speech-to-text fallback supports:

| Code | Language |
|------|----------|
| `en` | English |
| `es` | Spanish |
| `fr` | French |
| `de` | German |
| `pt` | Portuguese |
| `it` | Italian |
| `nl` | Dutch |
| `ja` | Japanese |
| `ko` | Korean |
| `zh` | Chinese |
| `ar` | Arabic |
| `ru` | Russian |
| `tr` | Turkish |
| `hi` | Hindi |

### Input

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `url` | string | *(required)* | YouTube Shorts URL |
| `language` | string | `"en"` | Preferred language ([ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)) |
| `format` | string | `"json"` | `"json"`, `"text"`, `"srt"`, or `"vtt"` |

#### Supported URLs

````

https://www.youtube.com/shorts/dQw4w9WgXcQ
https://youtube.com/shorts/dQw4w9WgXcQ

````

Only `/shorts/` URL formats are accepted. Standard `watch?v=` or `youtu.be` URLs are not supported by this actor — use a YouTube transcript actor for those.

### Output example

When `format` is `json`, each dataset row looks like this:

```json
{
    "url": "https://www.youtube.com/shorts/dQw4w9WgXcQ",
    "platform": "youtube",
    "language": "en",
    "duration_sec": 58,
    "segments": [
        { "start": 0.0, "end": 2.8, "text": "Three things nobody tells you about cold email." },
        { "start": 2.8, "end": 6.1, "text": "First: your subject line is the only thing that matters in the first pass." }
    ],
    "full_text": "Three things nobody tells you about cold email. First: your subject line is the only thing that matters in the first pass."
}
````

The `platform` value is `"youtube"` because Shorts are part of the YouTube platform.

When `format` is `text`, `srt`, or `vtt`, the formatted transcript is written to the actor's key-value store under the `OUTPUT` key.

When extraction fails, the dataset row contains a clear error:

```json
{
    "error": "NOT_FOUND",
    "message": "The video is private, removed, or has no extractable transcript."
}
```

### Error codes

| Code | Meaning |
|------|---------|
| `INVALID_FORMAT` | `format` was not one of json/text/srt/vtt |
| `BAD_REQUEST` | The URL was malformed or rejected by the transcript operation |
| `UNSUPPORTED_PLATFORM` | No transcript operation serves this URL's platform |
| `UNAUTHORIZED` | The actor's ScriptBase key is missing, invalid, or revoked |
| `INSUFFICIENT_CREDITS` | The ScriptBase account behind this actor is out of credits |
| `NOT_FOUND` | The video is private, removed, or has no extractable transcript |
| `UPSTREAM_FAILED` | Every transcript source failed -- retry shortly |
| `RATE_LIMITED` | Too many requests -- retry after a short delay |
| `TIMEOUT` | Extraction took longer than the actor's poll budget |
| `INTERNAL_ERROR` | Unexpected error during extraction |

### Use cases

- **Hook analysis** — scrape the first 3–5 seconds of transcript from dozens of viral Shorts to identify which opening patterns drive views and watch time.
- **Script research & competitor analysis** — reverse-engineer scripts from top-performing creators in your niche without watching each Short manually.
- **Automated captioning** — generate SRT files for your own Shorts to boost accessibility and engagement. Research consistently shows captions increase watch time on short-form video.
- **Trend detection** — batch-extract transcripts from Shorts surfaced by a keyword search and analyze recurring phrases, topics, or calls to action.
- **Content repurposing** — turn a Short's spoken content into a tweet thread, LinkedIn post, or email hook without transcribing by hand.
- **Training data** — collect a labeled dataset of short-form spoken content across niches for NLP model fine-tuning.

### Integrations

Use this actor through the [Apify API](https://docs.apify.com/api/v2) or plug it into your automation tools:

- **Python** — `apify_client.actor("your-actor-id").call(run_input={"url": "https://www.youtube.com/shorts/dQw4w9WgXcQ"})`
- **JavaScript** — `await client.actor("your-actor-id").call({url: "https://www.youtube.com/shorts/dQw4w9WgXcQ"})`
- **Zapier / Make / n8n** — feed a list of Shorts URLs from a YouTube Shorts scraper and auto-generate transcripts for each one.
- **Webhooks** — receive the completed transcript payload instantly, triggering downstream analysis or publishing workflows.

### FAQ

**Does this work with regular YouTube videos or only Shorts?**
Only Shorts (`/shorts/<id>` URLs). For standard YouTube videos, use a YouTube transcript actor.

**Does it need a YouTube account?**
No. Any publicly accessible Short can be transcribed without credentials.

**What does `platform: "youtube"` mean in the output?**
YouTube Shorts are part of the YouTube platform, so the detected platform value is `"youtube"`.

**My Short has no captions — will it still work?**
Yes. Speech-to-text extraction runs when captions are unavailable. See the [supported languages](#supported-languages) table.

**Can I process hundreds of Shorts at once?**
Yes. Loop over a list of URLs via the Apify API or build a Make/n8n flow. Calls are independent and can run in parallel.

**What about age-restricted Shorts?**
Age-restricted content requires a login, which this actor does not support. Only public, unrestricted Shorts work.

**What does it cost?**
Pricing is per transcribed minute (1 minute = 1 charge unit, minimum 1), so you pay only for the audio actually processed — and failed extractions cost nothing. The exact per-minute price is shown on this actor's Apify Store page.

# Actor input Schema

## `url` (type: `string`):

URL of the YouTube Short.

## `language` (type: `string`):

Preferred transcript language as an ISO 639-1 code (e.g. en, es, fr, de, ja).

## `format` (type: `string`):

Choose how the transcript is returned. JSON includes timestamps per segment. Text returns the full transcript as a plain string. SRT and VTT are subtitle file formats.

## Actor input object example

```json
{
  "url": "https://www.youtube.com/shorts/fUrlyCjL8JA",
  "language": "en",
  "format": "json"
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `segments` (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 = {
    "url": "https://www.youtube.com/shorts/fUrlyCjL8JA",
    "language": "en",
    "format": "json"
};

// Run the Actor and wait for it to finish
const run = await client.actor("scriptbase/youtube-shorts-transcript-extractor").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 = {
    "url": "https://www.youtube.com/shorts/fUrlyCjL8JA",
    "language": "en",
    "format": "json",
}

# Run the Actor and wait for it to finish
run = client.actor("scriptbase/youtube-shorts-transcript-extractor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "url": "https://www.youtube.com/shorts/fUrlyCjL8JA",
  "language": "en",
  "format": "json"
}' |
apify call scriptbase/youtube-shorts-transcript-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=scriptbase/youtube-shorts-transcript-extractor",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "YouTube Shorts Transcript Extractor 🎬",
        "description": "🎬 Convert any YouTube Short to text. Extract the transcript and captions with timestamps. Outputs JSON, SRT, or plain text. Auto-captions + speech-to-text fallback. 14+ languages. No login needed.",
        "version": "0.1",
        "x-build-id": "x1AWUIGm5d6VXgMYO"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/scriptbase~youtube-shorts-transcript-extractor/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-scriptbase-youtube-shorts-transcript-extractor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/scriptbase~youtube-shorts-transcript-extractor/runs": {
            "post": {
                "operationId": "runs-sync-scriptbase-youtube-shorts-transcript-extractor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/scriptbase~youtube-shorts-transcript-extractor/run-sync": {
            "post": {
                "operationId": "run-sync-scriptbase-youtube-shorts-transcript-extractor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "url"
                ],
                "properties": {
                    "url": {
                        "title": "YouTube Shorts URL",
                        "type": "string",
                        "description": "URL of the YouTube Short."
                    },
                    "language": {
                        "title": "Language",
                        "type": "string",
                        "description": "Preferred transcript language as an ISO 639-1 code (e.g. en, es, fr, de, ja).",
                        "default": "en"
                    },
                    "format": {
                        "title": "Output Format",
                        "enum": [
                            "json",
                            "text",
                            "srt",
                            "vtt"
                        ],
                        "type": "string",
                        "description": "Choose how the transcript is returned. JSON includes timestamps per segment. Text returns the full transcript as a plain string. SRT and VTT are subtitle file formats.",
                        "default": "json"
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
