# Youtube Transcript Scraper (`bigibyte/youtube-transcript-scraper`) Actor

Extract YouTube transcripts with timestamps, plus title, channel, views, likes, duration and keywords. Paste video links or IDs and export clean JSON, CSV or Excel.

- **URL**: https://apify.com/bigibyte/youtube-transcript-scraper.md
- **Developed by:** [BigiByte](https://apify.com/bigibyte) (community)
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## 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 Scraper: Get Video Transcripts with Timestamps

![YouTube to Text Conversion](https://images.bigibyte.com/projects/YouTube%20to%20Text%20Conversion%20Icon.webp)

YouTube Transcript Scraper turns any YouTube video into clean, searchable text. Give it a link or a video ID and it returns the full transcript, a version with timestamps on every line, and the details you usually have to click around for: title, channel, publish date, length, views, likes, tags and thumbnail.

It reads every common link format, including Shorts, youtu.be links, embeds, live links and bare 11-character IDs. If a video has no captions, you still get a result that says so instead of a crashed run.

### Use cases

- **Repurpose videos into written content**: turn a talk, podcast or tutorial into a blog post, newsletter or social thread without typing it out
- **Feed AI tools and LLM pipelines**: send transcripts to summarizers, chatbots, RAG indexes or training sets
- **Keyword and SEO research**: see the exact words top channels in your niche use on camera
- **Subtitles, translation and accessibility**: start from timestamped text instead of a blank file
- **Content analysis**: extract and analyze what's said in product demos, tutorials, or educational videos

### What data does this YouTube transcript extractor return?

The video result includes:

- **The transcript three ways**: one plain text block, one text block with `[mm:ss]` timestamps, and an optional list of lines with start and end times in seconds
- **Video details**: title, description, category, tags, publish date, duration in seconds and as `mm:ss`, view count, like count, thumbnail
- **Channel details**: channel name, channel ID and channel URL
- **Language info**: the caption track used, its language code, and every caption language the video offers
- **Handy counts**: word count and number of transcript lines
- **An `error` field**: null when things worked, a short reason when they did not

### Input

| Field | Type | Default | What it does |
|---|---|---|---|
| `video` | string | required | YouTube video URL or ID |
| `includeSegments` | boolean | `true` | Add the list of timed transcript lines |
| `includeTimestampedText` | boolean | `true` | Add the transcript as text with `[mm:ss]` before each line |
| `requestTimeoutSecs` | integer | `60` | Seconds to wait for the request |
| `proxyConfiguration` | object | Apify Proxy (on) | Proxy type and location to use for requests |

#### Link formats it understands

```
https://www.youtube.com/watch?v=aiS5qH7UMX4
https://youtu.be/aiS5qH7UMX4
https://www.youtube.com/shorts/aqz-KE-bpKQ
https://www.youtube.com/embed/aiS5qH7UMX4
https://www.youtube.com/live/aiS5qH7UMX4
https://m.youtube.com/watch?v=aiS5qH7UMX4
aiS5qH7UMX4
```

### Example inputs

#### Basic: One video, everything included

```json
{
    "video": "https://www.youtube.com/watch?v=aiS5qH7UMX4"
}
```

#### Plain text only (smaller output)

Good for AI tools and spreadsheets.

```json
{
    "video": "https://www.youtube.com/watch?v=aiS5qH7UMX4",
    "includeSegments": false,
    "includeTimestampedText": false
}
```

#### Using a bare video ID

```json
{
    "video": "aiS5qH7UMX4"
}
```

### Output

#### A successful video (trimmed)

```json
{
    "videoId": "aiS5qH7UMX4",
    "url": "https://www.youtube.com/watch?v=aiS5qH7UMX4",
    "input": "https://www.youtube.com/watch?v=aiS5qH7UMX4",
    "title": "Sell Anywhere (SELL TO ANY CUSTOMER in 2018)",
    "channelName": "Alex Hormozi",
    "channelId": "UCUyDOdBWhC1MCxEjC46d-zw",
    "channelUrl": "http://www.youtube.com/@AlexHormozi",
    "description": "Download your free scaling roadmap here...",
    "category": "People & Blogs",
    "keywords": ["sell anywhere", "sales skills", "gym sales"],
    "publishedAt": "2018-07-20T12:48:49-07:00",
    "durationSeconds": 83,
    "durationText": "01:23",
    "viewCount": 457271,
    "likeCount": 3704,
    "thumbnailUrl": "https://i.ytimg.com/vi/aiS5qH7UMX4/maxresdefault.jpg",
    "isFamilySafe": true,
    "isLive": false,
    "language": "English (auto-generated)",
    "languageCode": "en",
    "availableLanguages": [{ "label": "English (auto-generated)", "languageCode": "en" }],
    "wordCount": 211,
    "segmentCount": 30,
    "fullTranscript": "hey guys I wanted to show you something kind of cool a little bit of a humble brag...",
    "timestampedTranscript": "[00:00] hey guys I wanted to show you something\n[00:01] kind of cool a little bit of a humble\n...",
    "segments": [
        { "startSeconds": 0.06, "endSeconds": 3.33, "startTime": "00:00", "text": "hey guys I wanted to show you something" },
        { "startSeconds": 1.56, "endSeconds": 5.97, "startTime": "00:01", "text": "kind of cool a little bit of a humble" }
    ],
    "scrapedAt": "2026-10-11T15:04:04.979314+00:00",
    "error": null
}
```

#### A video without captions

```json
{
    "videoId": "zzzzzzzzzzz",
    "url": "https://www.youtube.com/watch?v=zzzzzzzzzzz",
    "title": null,
    "segmentCount": 0,
    "fullTranscript": null,
    "segments": [],
    "error": "Transcript not available"
}
```

#### Something that is not a YouTube link

```json
{
    "videoId": null,
    "input": "not a url",
    "error": "Not a valid YouTube URL or video ID"
}
```

#### Output field reference

| Field | Type | Description |
|---|---|---|
| `videoId` | string | 11-character video ID |
| `url` | string | Canonical watch URL |
| `input` | string | What you typed for this video |
| `title` | string | Video title. The JSON row keeps this name. |
| `videoTitle` | string | Same title. This is the Title column on the Output table. |
| `channelName` | string | Channel name |
| `channelId` | string | Channel ID |
| `channelUrl` | string | Link to the channel |
| `description` | string | Full video description. The JSON row keeps this name. |
| `videoDescription` | string | Same description. The Output table can show this column. |
| `category` | string | YouTube category |
| `keywords` | array | Video tags |
| `publishedAt` | string | Publish date and time, ISO 8601 |
| `durationSeconds` | integer | Length in seconds |
| `durationText` | string | Length as `mm:ss` or `hh:mm:ss` |
| `viewCount` | integer | Views when scraped |
| `likeCount` | integer | Likes when scraped |
| `thumbnailUrl` | string | Largest available thumbnail |
| `isFamilySafe` | boolean | Family-safe flag |
| `isLive` | boolean | Whether it is a live stream |
| `language` | string | Name of the caption track used |
| `languageCode` | string | Language code of that track |
| `availableLanguages` | array | Every caption track on the video |
| `wordCount` | integer | Words in the transcript |
| `segmentCount` | integer | Lines in the transcript |
| `fullTranscript` | string | The whole transcript. The Output overview shows this as Description. |
| `timestampedTranscript` | string | The transcript with `[mm:ss]` on each line |
| `segments` | array | Lines with `startSeconds`, `endSeconds`, `startTime`, `text` |
| `scrapedAt` | string | When the row was collected (UTC) |
| `error` | string | Reason for failure, or `null` |

Some fields can be `null` when YouTube does not show them for a video, for example like counts on videos where likes are hidden.

Export the dataset as JSON, CSV, Excel, XML or HTML, or read it through the Apify API.

### How it works

1. The input is cleaned up and turned into a video ID. Invalid input gets an error result right away.
2. The video is fetched through Apify Proxy.
3. The video data is extracted and structured as a single result, whether it worked or not.

### Integrations

Connect YouTube Transcript Scraper to Make, Zapier, n8n, Google Sheets, Slack, Airtable or your own webhook with Apify integrations. Call the actor from Python or JavaScript with the Apify API client to automate transcript extraction.

***

### Need a Custom Scraper?

[![Custom Scrapers for Your SaaS or AI Tools](https://images.bigibyte.com/projects/YouTube%20to%20Custom%20Scrapers.webp)](https://bigibyte.com)

Building a SaaS or AI tool that needs custom data extraction? We create production-ready scrapers tailored to your needs.

**Contact us**: [bigibyte.com](https://bigibyte.com)

***

If you need YouTube transcripts with timestamps and real video data, ready for spreadsheets and AI tools, this actor delivers clean, structured results.

# Actor input Schema

## `video` (type: `string`):

Single video to process. Accepts watch URLs, youtu.be short links, Shorts, embed and live URLs, or a bare 11-character video ID.

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

Add a list of transcript lines, each with start and end time in seconds and an mm:ss timestamp.

## `includeTimestampedText` (type: `boolean`):

Add the transcript as one readable text block with a \[mm:ss] timestamp before each line.

## `requestTimeoutSecs` (type: `integer`):

Maximum seconds to wait for the video's transcript. Long videos can take a little longer.

## `proxyConfiguration` (type: `object`):

Select proxies to use for requests. Helps avoid IP blocking and rate limits.

## Actor input object example

```json
{
  "video": "https://www.youtube.com/watch?v=mSp96bsKvsI",
  "includeSegments": true,
  "includeTimestampedText": true,
  "requestTimeoutSecs": 60,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

One row per video in the overview table.

## `dataset` (type: `string`):

Full dataset for this run.

## `items` (type: `string`):

Dataset items as JSON.

# 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 = {
    "video": "https://www.youtube.com/watch?v=aiS5qH7UMX4",
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("bigibyte/youtube-transcript-scraper").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 = {
    "video": "https://www.youtube.com/watch?v=aiS5qH7UMX4",
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("bigibyte/youtube-transcript-scraper").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 '{
  "video": "https://www.youtube.com/watch?v=aiS5qH7UMX4",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call bigibyte/youtube-transcript-scraper --silent --output-dataset

```

## MCP server setup

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

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/OyI8uAHniA8ViNWor/builds/A68L04ksHJG2BHLrC/openapi.json
