# YouTube AI Transcript Extractor (`dev00/youtube-transcript-api`) Actor

Extract structured timestamped transcripts from YouTube/Shorts URLs using AI speech-to-text.

- **URL**: https://apify.com/dev00/youtube-transcript-api.md
- **Developed by:** [dev00](https://apify.com/dev00) (community)
- **Categories:** Videos, Social media
- **Stats:** 5 total users, 5 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$20.00 / 1,000 youtube video transcriptions

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/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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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 AI Transcript Extractor (Speech-to-Text & Timestamps)

Extract complete, structured transcripts from YouTube video and Shorts URLs using high-performance AI speech-to-text. This Actor reverse-engineers advanced Automated Speech Recognition (ASR) pipelines to process video audio tracks, returning clean sentence-level paragraphs with exact millisecond timestamps.

Perfect for content repurposing, video summarization, automatic captioning/subtitles, social media monitoring, SEO search indexing, and LLM-ready text processing.

***

### ⚡ Key Features

1. **High-Fidelity AI Transcription:**
   Decodes audio tracks and converts spoken words into highly accurate text. Automatically detects spoken languages (English, Spanish, French, German, etc.).

2. **Sentence-Level Timestamps:**
   Splits transcripts into natural sentences with exact start times (`start_time_ms`), end times (`end_time_ms`), and calculated durations (`duration_seconds`) so you can align captions instantly.

3. **Enterprise Reliability:**
   Bypasses YouTube WAF challenge screens, stream restrictions, and network blocks.

4. **Clean JSON Format:**
   Filters out large, redundant trace files to present a structured payload containing only the metadata, title, duration, and transcript arrays.

***

### 📥 Input Parameter Schema

- `url` (string, required): The target YouTube video or Shorts URL to transcribe (e.g. `https://www.youtube.com/shorts/amMvXqzXB38`).

***

### 📤 Output Dataset Example (JSON)

When execution completes, each record is saved to the default Apify Dataset in the following format:

```json
{
  "status": "success",
  "video_title": "What is the best love advice you've ever heard? #podcast #jayshetty #relationship",
  "duration": 7,
  "language": "en",
  "transcription": {
    "full_text": "What is the best love advice you've ever heard or received? No one is perfect. Figure out what you can tolerate and what you can't tolerate.",
    "sentences": [
      {
        "text": "What is the best love advice you've ever heard or received?",
        "start_time_ms": 0,
        "end_time_ms": 3620,
        "duration_ms": 3620,
        "duration_seconds": 3.62
      },
      {
        "text": "No one is perfect.",
        "start_time_ms": 3620,
        "end_time_ms": 4860,
        "duration_ms": 1240,
        "duration_seconds": 1.24
      },
      {
        "text": "Figure out what you can tolerate and what you can't tolerate.",
        "start_time_ms": 4860,
        "end_time_ms": 7460,
        "duration_ms": 2600,
        "duration_seconds": 2.6
      }
    ]
  }
}
```

***

### ❓ Frequently Asked Questions (FAQ)

**Q1: How long does the transcription process take?**
A1: The extraction and AI speech-to-text transcription process typically takes between 30 to 90 seconds, depending on the video's length and current server load.

**Q2: How does the API prevent connection timeouts?**
A2: We use an HTTP connection keep-alive streaming system. The API immediately returns a 200 OK status and streams space characters (` `) every 3 seconds to keep the socket alive. Once transcription finishes, the clean JSON payload is outputted at the end of the stream. Standard JSON parsers automatically ignore leading whitespace.

**Q3: Does the API support multiple languages?**
A3: Yes! The ASR transcription engine automatically detects the language spoken in the video (English, Spanish, French, German, Arabic, etc.) and processes it with high accuracy.

**Q4: Do I need personal credentials or YouTube cookies to run searches?**
A4: No. The API operates fully autonomously. It bypasses WAF blocks and handles YouTube stream retrieval internally, requiring only a video URL.

**Q5: Can I paginate or request specific segments?**
A5: The API returns the full transcript segmented into individual sentences with exact timestamps, allowing you to easily index or slice specific segments on your client side.

***

### 🏷️ Keywords:

`youtube transcript api`, `youtube subtitles scraper`, `video audio transcriber`, `youtube caption downloader`, `speech to text api`, `social video text extractor`, `content repurposing tool`, `podcast transcription api`, `youtube shorts transcriber`.

# Actor input Schema

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

YouTube video or Shorts URL to transcribe (e.g. https://www.youtube.com/shorts/amMvXqzXB38).

## Actor input object example

```json
{
  "url": "https://www.youtube.com/shorts/amMvXqzXB38"
}
```

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

// Run the Actor and wait for it to finish
const run = await client.actor("dev00/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 = { "url": "https://www.youtube.com/shorts/amMvXqzXB38" }

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

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/zFV8NPG1r1XVN0Hkx/builds/Q0sYnvm4ZGm2RAIoJ/openapi.json
