# YouTube Transcript Scraper (`lurkapi-com/youtube-transcript-scraper`) Actor

Get the transcript of any YouTube video or Short: timed segments plus the full text, in the language you pick. $1 per 1,000 transcripts.

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

## Pricing

$1.00 / 1,000 results

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 Scraper

Get what's said in any YouTube video or Short that has captions: every caption segment with its start and end time, plus the whole transcript as one block of text. Pick a language, or get English when the video has it and its main language otherwise.

**$1 per 1,000 results** · no login or cookies · results in seconds · [monitored every hour](https://lurkapi.com/status?utm_source=apify\&utm_medium=actor\&utm_campaign=youtube-transcript-scraper)

### What you can scrape

- **Video URLs**: Watch, youtu.be, /shorts/, /live/ or /embed/ links, or 11-character video ids.

### Use cases

- Feeding videos into ChatGPT, Claude or a RAG pipeline
- Summaries, show notes and blog posts from videos
- Searching what creators said about a brand
- Subtitles and translation

### Input

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ]
}
```

Every field is explained on the Input tab.

### Output

One item per result, with the input it came from in `input`. Here's one, shortened:

```json
{
  "input": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "videoId": "dQw4w9WgXcQ",
  "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "language": "English",
  "languageCode": "en",
  "isGenerated": false,
  "transcript": [
    {
      "text": "♪ We're no strangers to love ♪",
      "startMs": 18640,
      "endMs": 21880,
      "startTimeText": "0:18"
    },
    {
      "text": "♪ You know the rules and so do I ♪",
      "startMs": 22640,
      "endMs": 26960,
      "startTimeText": "0:22"
    }
  ],
  "transcript_only_text": "♪ We're no strangers to love ♪ ♪ You know the rules and so do I ♪",
  "availableLanguages": [
    {
      "code": "en",
      "name": "English",
      "isGenerated": false
    },
    {
      "code": "en",
      "name": "English",
      "isGenerated": true
    }
  ]
}
```

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

### Pricing

**$1 per 1,000 results**, and nothing for inputs that return none. Set a maximum charge per run and the Actor stops there. Apify's free plan includes $5 a month, enough for about 5,000 results.

### Need it as an API?

This Actor runs on [LurkAPI](https://lurkapi.com/?utm_source=apify\&utm_medium=actor\&utm_campaign=youtube-transcript-scraper), a social media data API. To call it from your own code, or for more volume, the same data is one HTTP request away:

```bash
curl "https://api.lurkapi.com/v1/youtube/video/transcript?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DdQw4w9WgXcQ" \
  -H "x-api-key: YOUR_KEY"
```

- From $0.45 per 1,000 requests, with 100 free credits when you sign up
- 88 endpoints across 16 platforms: TikTok, Instagram, YouTube, Facebook, Reddit, LinkedIn, Google and more
- An MCP server for Claude, ChatGPT and Cursor

[Docs for this endpoint](https://lurkapi.com/docs/youtube/transcript?utm_source=apify\&utm_medium=actor\&utm_campaign=youtube-transcript-scraper)

### FAQ

**Is it legal?** It reads public data only: what anyone sees without logging in. How you use it is up to you, and personal data falls under laws like the GDPR, so ask a lawyer if you're unsure.

**Do I need a YouTube account or cookies?** No. Add your inputs and run.

**How fresh is the data?** It's fetched when you run the Actor, or comes from a cache at most 720 hours old.

**Something wrong or missing?** Open an issue on the Issues tab or write to support@lurkapi.com.

# Actor input Schema

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

Watch, youtu.be, /shorts/, /live/ or /embed/ links, or 11-character video ids.

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

Language code, e.g. <code>en</code>, <code>es</code> or <code>pt-BR</code>. <code>pt</code> also matches <code>pt-BR</code>. Default: English if the video has it, else its main language.

## Actor input object example

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ]
}
```

# Actor output Schema

## `results` (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 = {
    "videoUrls": [
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("lurkapi-com/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 = { "videoUrls": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ"] }

# Run the Actor and wait for it to finish
run = client.actor("lurkapi-com/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 '{
  "videoUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ]
}' |
apify call lurkapi-com/youtube-transcript-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,lurkapi-com/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/mxAHb6A6ZaIG0H4hc/builds/RGGAJICGoXuC88EJy/openapi.json
