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

Search public YouTube videos and save spoken captions as transcripts. Enter any phrase, then export titles, channels, watch links, and timed caption text. For research, quotes, notes, and monitoring. No YouTube login.

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

## Pricing

from $0.37 / 1,000 transcripts

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

The **YouTube Transcript Scraper** turns a YouTube search into transcripts. Type any phrase and get public videos with the spoken caption text, timed segments, channel, and title. No YouTube login.

![YouTube](https://upload.wikimedia.org/wikipedia/commons/thumb/0/09/YouTube_full-color_icon_%282017%29.svg/240px-YouTube_full-color_icon_%282017%29.svg.png)

Use it when you need the words from a video without watching it: notes, quotes, research, subtitles, or a searchable archive of a topic.

### Key features

- **Search in, transcripts out** — one query returns several videos and their caption text
- **Timed segments** — each caption line keeps a start time and duration
- **Manual captions first** — automatic captions are used when you allow them and no manual track exists
- **Per-query limit** — `maxItems` caps transcripts for each search phrase
- **Schedule it** — run the same query daily from an Apify schedule and send new rows to a dataset, webhook, or spreadsheet
- **Residential proxies included** — every run uses Apify residential proxies. There is no proxy setting to turn off
- **No login** — public videos only

### Why scrape YouTube transcripts?

Videos are slow to scan. The caption text is what you can search, quote, and compare.

- **Research** — collect what several videos say about the same topic
- **Notes and quotes** — pull the spoken lines with timestamps
- **Monitoring** — schedule a query and collect new transcripts as videos appear
- **Exports** — download JSON, CSV, or Excel, or read the dataset from the Apify API

### Who is it for?

- **Researchers** comparing how different videos cover one topic
- **Writers and editors** who need quotes with a link back to the video
- **Analysts** turning a search into a text dataset
- **Developers** sending transcripts into their own app with a scheduled Actor run

### How much does it cost?

You pay Apify for the run. This Actor does not keep platform costs on the developer account.

- **Transcript** — $0.49 per 1,000 transcripts on the free Store tier ($0.00049 each). Bronze, Silver, and Gold discounts apply.
- **Actor start** — $0.00005 per run at 1 GB of memory.
- **Platform usage** — compute, residential proxy traffic, and storage are billed to the account that starts the run. For the first 14 days after pricing is turned on, that usage is charged as a pass-through event at Apify's cost plus Apify's 20% commission. After that, Apify bills the same usage directly on your account and the pass-through event stops.

A short test of one video is usually well under $0.05 before the transcript fee.

### How to use it

1. Open the Actor in [Apify Console](https://console.apify.com/).
2. Enter one or more **search queries**.
3. Set **maximum videos** per query (start with 3).
4. Leave **caption language** on `en`, or switch it to another code such as `de`.
5. Click **Start**. Residential proxies are applied automatically.
6. Open the dataset. Each row is one video. `transcript` is the full caption text. `segments` keeps the timestamps.

### Input

```json
{
  "searchQueries": ["how to change a tire"],
  "maxItems": 3,
  "language": "en",
  "includeAutoCaptions": true
}
```

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `searchQueries` | string\[] | — | YouTube search phrases. One dataset group per phrase. |
| `maxItems` | integer | `3` | Maximum transcripts saved for each phrase. |
| `language` | string | `en` | Caption language code. |
| `includeAutoCaptions` | boolean | `true` | Use automatic captions when a manual track is missing. |

A search reads the first page of video results and keeps going until it has saved `maxItems` transcripts. Age-restricted, private, and members-only videos are skipped. Runs always use Apify residential proxies.

### Output

```json
{
  "imageUrl": "https://i.ytimg.com/vi/VIDEO_ID/hqdefault.jpg",
  "query": "how to change a tire",
  "videoId": "VIDEO_ID",
  "videoUrl": "https://www.youtube.com/watch?v=VIDEO_ID",
  "title": "How to Change a Tire",
  "channelName": "Example Channel",
  "authorAvatarUrl": "https://yt3.ggpht.com/example=s240-c-k-c0x00ffffff-no-rj",
  "durationSeconds": 420,
  "language": "en",
  "captionKind": "manual",
  "transcript": "Full caption text…",
  "segments": [
    { "startSec": 1.2, "durationSec": 2.4, "text": "This is the first line." }
  ],
  "failureReason": null,
  "scrapedAt": "2026-10-28T16:00:00.000Z"
}
```

| Field | Meaning |
| --- | --- |
| `imageUrl` | Video thumbnail |
| `authorAvatarUrl` | Channel avatar image. `null` when the search result has none |
| `query` | Search phrase that found the video |
| `videoUrl` | Public watch link |
| `captionKind` | `manual` or `asr` (automatic) |
| `transcript` | Caption text |
| `segments` | Caption lines with `startSec` and `durationSec` |
| `failureReason` | `null` on a saved transcript |

### Tips

- Use the words you would type into YouTube. A narrower phrase returns a tighter set of videos.
- Only videos with caption text are saved. A video with no captions is skipped.
- Pair a scheduled run with a webhook when you want new transcripts in another tool.
- Residential proxy traffic is part of every run, including small tests.

### Image credit

YouTube icon: [Wikimedia Commons](https://commons.wikimedia.org/wiki/File:YouTube_full-color_icon_\(2017\).svg)

# Actor input Schema

## `searchQueries` (type: `array`):

YouTube search phrases. Example: how to change a tire.

## `maxItems` (type: `integer`):

Maximum number of transcripts to save per search query.

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

Preferred caption language code, for example en or de.

## `includeAutoCaptions` (type: `boolean`):

Save YouTube automatic captions when a manual track is missing.

## Actor input object example

```json
{
  "searchQueries": [
    "how to change a tire"
  ],
  "maxItems": 3,
  "language": "en",
  "includeAutoCaptions": true
}
```

# Actor output Schema

## `overview` (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 = {
    "searchQueries": [
        "how to change a tire"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("rainminer/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 = { "searchQueries": ["how to change a tire"] }

# Run the Actor and wait for it to finish
run = client.actor("rainminer/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 '{
  "searchQueries": [
    "how to change a tire"
  ]
}' |
apify call rainminer/youtube-transcript-scraper --silent --output-dataset

```

## MCP server setup

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