# Youtube Scraper (`api-empire/youtube-scraper`) Actor

YouTube Scraper helps you extract public YouTube data quickly. Collect videos, channels, comments, subscribers, views, likes, and metadata for competitor research, content analysis, lead generation, influencer discovery, and marketing intelligence.

- **URL**: https://apify.com/api-empire/youtube-scraper.md
- **Developed by:** [API Empire](https://apify.com/api-empire) (community)
- **Categories:** Videos, Lead generation, Social media
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.00005 / actor start

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 a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.md):

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

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.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/platform/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 Scraper

Scrape YouTube search results, video metadata, channel info, transcripts, and more — all from a simple search term or direct URL. Built for the Apify platform with robust proxy fallback and anti-blocking.

### Why Choose This Scraper?

- **No YouTube API key required** — Scrapes directly from YouTube's internal endpoints.
- **Comprehensive data** — Titles, views, likes, comments, subscribers, descriptions, hashtags, thumbnails, transcripts.
- **Smart proxy fallback** — Automatically escalates from no proxy → datacenter → residential if YouTube blocks requests.
- **Browser impersonation** — Uses [impit](https://github.com/apify/impit) to bypass TLS/HTTP fingerprinting detection.
- **Fast & concurrent** — Batch-fetches video metadata concurrently for maximum speed.
- **Flexible filters** — Filter by HD, 4K, HDR, Live, 360°, 3D, VR180, CC, location, and more.
- **Transcript download** — SRT, plain text, or timestamped JSON formats.

### Key Features

| Feature | Description |
|---------|-------------|
| **Search scraping** | Scrape videos from any YouTube search term |
| **Direct URL support** | Scrape individual video, channel, or playlist URLs |
| **Video metadata** | Title, views, likes, comments, subscribers, duration, date |
| **Transcripts/Subtitles** | Download in SRT, text, or timestamped JSON format |
| **Channel info** | Channel name, URL, username, subscriber count |
| **Smart filtering** | HD, 4K, HDR, Live, 360°, 3D, VR180, CC, location filters |
| **Pagination** | Automatically follows pagination to collect all results |
| **Proxy escalation** | No proxy → Datacenter → Residential (3 retries) |
| **Date filtering** | Filter videos by publish date (absolute or relative) |

### Input

```json
{
  "searchTerms": ["Crawlee"],
  "maxVideos": 10,
  "maxShorts": 0,
  "maxStreams": 0,
  "downloadSubtitles": false,
  "subtitlesLanguage": "en",
  "subtitlesFormat": "srt",
  "isHD": false,
  "is4K": false,
  "proxyConfiguration": { "useApifyProxy": false }
}
````

| Field | Type | Description |
|-------|------|-------------|
| `searchTerms` | array | YouTube search queries |
| `maxVideos` | integer | Max regular videos per query (0 = skip) |
| `maxShorts` | integer | Max Shorts per query (0 = skip) |
| `maxStreams` | integer | Max live streams per query (0 = skip) |
| `startUrls` | array | Direct video/channel URLs |
| `downloadSubtitles` | boolean | Enable transcript download |
| `subtitlesLanguage` | string | Language code (en, es, fr, etc.) |
| `subtitlesFormat` | string | srt, text, or timestamp |
| `isHD`, `is4K`, etc. | boolean | Feature filters |
| `proxyConfiguration` | object | Proxy settings |

### Output

```json
{
  "title": "Video Title",
  "translatedTitle": null,
  "type": "video",
  "id": "dQw4w9WgXcQ",
  "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "thumbnailUrl": "https://i.ytimg.com/vi/dQw4w9WgXcQ/hq720.jpg",
  "viewCount": 1500000,
  "date": "2025-01-15T00:00:00.000Z",
  "likes": 50000,
  "location": null,
  "channelName": "Channel Name",
  "channelUrl": "https://www.youtube.com/@channelname",
  "channelUsername": "channelname",
  "collaborators": null,
  "channelId": "UCxxxxxxxxxxxxxxxxxxxxxxxx",
  "numberOfSubscribers": 1000000,
  "duration": "00:03:33",
  "commentsCount": 12000,
  "text": "Video description...",
  "translatedText": null,
  "descriptionLinks": [{"url": "https://example.com", "text": "https://example.com"}],
  "subtitles": null,
  "order": 0,
  "commentsTurnedOff": false,
  "fromYTUrl": "https://www.youtube.com/results?search_query=example",
  "isMonetized": null,
  "hashtags": ["#example"]
}
```

### How to Use the Actor (via Apify Console)

1. Log in at <https://console.apify.com> and go to **Actors**.
2. Find **YouTube Scraper** and click it.
3. Enter your search terms or direct YouTube URLs.
4. Configure video limits, filters, and transcript settings.
5. Optionally adjust proxy settings (auto-fallback is built in).
6. Click **Start** to run the actor.
7. Monitor real-time logs in the **Log** tab.
8. Access results in the **Dataset** tab.
9. Export results to JSON, CSV, or Excel.

### Best Use Cases

- **Market research** — Analyze trending videos and competitor content.
- **Content discovery** — Find relevant videos by keyword with full metadata.
- **Academic research** — Collect video transcripts for NLP analysis.
- **SEO analysis** — Track video performance metrics across channels.
- **Social listening** — Monitor brand mentions and sentiment on YouTube.

### Frequently Asked Questions

**Q: Do I need a YouTube API key?**
A: No. This scraper works without any API key by using YouTube's internal web endpoints.

**Q: What happens if YouTube blocks the request?**
A: The actor automatically escalates through proxy levels (no proxy → datacenter → residential) with up to 3 retries on residential.

**Q: Can I scrape video transcripts?**
A: Yes. Enable "Download subtitles" and choose your preferred language and format (SRT, text, or timestamped JSON).

**Q: How many videos can I scrape?**
A: There's no hard limit. Set `maxVideos` and `maxShorts` to control how many results you collect per search term.

### Support and Feedback

If you have any issues or suggestions, please open an issue on the actor's GitHub repository or contact us through the Apify platform.

### Cautions

- Data is collected only from **publicly available sources**.
- No data is taken from private accounts or password-protected content.
- The end user is responsible for ensuring legal compliance (copyright, privacy, data protection, etc.).

### What are other Youtube scraping tools?

If you want to scrape specific Youtube data, you can use any of the dedicated scrapers below for faster and more targeted results.

| Scraper Name | Scraper Name |
|---|---|
| [Youtube B2b Email Scraper](https://apify.com/api-empire/youtube-b2b-email-scraper) | [YouTube Most Replayed Scraper](https://apify.com/api-empire/youtube-most-replayed-scraper) |
| [Youtube B2b Lead Scraper](https://apify.com/api-empire/youtube-b2b-lead-scraper) | [Youtube Phone Number Scraper](https://apify.com/api-empire/youtube-phone-number-scraper) |
| [Youtube B2b Phone Number Scraper](https://apify.com/api-empire/youtube-b2b-phone-number-scraper) | [YouTube Playlist Extractor](https://apify.com/api-empire/youtube-playlist-extractor) |
| [Youtube Channel Email Scraper](https://apify.com/api-empire/youtube-channel-email-scraper) | [Youtube Search And Channel Scraper](https://apify.com/api-empire/youtube-search-and-channel-scraper) |
| [Youtube Channel Finder](https://apify.com/api-empire/youtube-channel-finder) | [Youtube Search Scraper](https://apify.com/api-empire/youtube-search-scraper) |
| [Youtube Channel Lead Scraper](https://apify.com/api-empire/youtube-channel-lead-scraper) | [Youtube Shorts Scraper](https://apify.com/api-empire/youtube-shorts-scraper) |
| [Youtube Channel Phone Number Scraper](https://apify.com/api-empire/youtube-channel-phone-number-scraper) | [Youtube Transcript Scraper](https://apify.com/api-empire/youtube-transcript-scraper) |
| [Youtube Channel Scraper](https://apify.com/api-empire/youtube-channel-scraper) | [Youtube Trending Scraper](https://apify.com/api-empire/youtube-trending-scraper) |
| [Youtube Comments Scraper](https://apify.com/api-empire/youtube-comments-scraper) | [Youtube Video Details Scraper](https://apify.com/api-empire/youtube-video-details-scraper) |
| [YouTube Community Posts Scraper](https://apify.com/api-empire/youtube-community-posts-scraper) | [YouTube Video Scraper By Hashtag](https://apify.com/api-empire/youtube-video-scraper-by-hashtag) |
| [Youtube Email Scraper](https://apify.com/api-empire/youtube-email-scraper) | [YouTube Video Subtitles Scraper](https://apify.com/api-empire/youtube-video-subtitles-scraper) |
| [YouTube Lead Scraper](https://apify.com/api-empire/youtube-lead-scraper) | [YouTube Video Summarizer](https://apify.com/api-empire/youtube-video-summarizer) |
| [Youtube Metadata Scraper](https://apify.com/api-empire/youtube-metadata-scraper) |  |

# Actor input Schema

## `searchTerms` (type: `array`):

Enter one or more YouTube search keywords (for example "Crawlee", "fitness workout"). The actor will run a full scrape for each term and collect matching videos, shorts, and streams.

💬 For custom solutions or feature requests, contact us at dev.scraperengine@gmail.com

## `maxVideos` (type: `integer`):

Set how many regular (non‑Shorts, non‑live) videos to scrape for each search term. Use 0 to skip long‑form videos completely and focus only on Shorts or streams.

## `maxShorts` (type: `integer`):

Control how many YouTube Shorts (vertical clips) to collect per keyword. Use 0 if you do not want to include Shorts in your dataset.

## `maxStreams` (type: `integer`):

Limit how many live or upcoming streams are scraped for each search term. Use 0 to ignore live content entirely.

## `startUrls` (type: `array`):

Provide direct YouTube video, channel, playlist, or results page URLs to scrape without using search terms. This is ideal for monitoring specific assets.

## `downloadSubtitles` (type: `boolean`):

Download video subtitles/transcripts when available. When enabled, the actor will try to fetch caption tracks and optionally full transcripts for each scraped video.

## `saveSubtitlesToKvs` (type: `boolean`):

When enabled, every downloaded transcript is stored in the default Apify key‑value store under its own key (e.g. "transcript-VIDEO\_ID") so you can download large subtitle files separately from the main dataset.

## `subtitlesLanguage` (type: `string`):

Choose the primary language for subtitles/transcripts (e.g. en, es, fr, de). The actor will look for this language first and fall back to available tracks where possible.

## `preferAutoGenerated` (type: `boolean`):

If turned on, the actor will prefer auto‑generated subtitles over manually uploaded caption tracks. This can increase coverage for less localized videos at the cost of some accuracy.

## `subtitlesFormat` (type: `string`):

Decide how transcripts should look in the output: classic SRT (with timestamps), simple plain text, or structured timestamped JSON that is easy to post‑process programmatically.

## `sortingOrder` (type: `string`):

Sort the final dataset by relevance (original order), upload date, view count, or rating. Applied as post-processing for reliable results.

## `dateFilter` (type: `string`):

Apply YouTube’s built‑in "Upload date" filter: last hour, today, this week, this month, or this year — just like clicking the filter in the YouTube interface.

## `videoTypeFilter` (type: `string`):

Filter to only standard videos (exclude Shorts). Select 'video' to keep only long-form videos. Channel/playlist/movie apply when supported.

## `lengthFilter` (type: `string`):

Use YouTube’s length presets to keep only short clips, medium‑length videos, or long‑form content over 20 minutes.

## `isHD` (type: `boolean`):

Only include HD videos (720p or higher). The actor inspects YouTube's streaming formats to verify resolution before including the video.

## `hasCC` (type: `boolean`):

Only include videos that have at least one proper closed‑caption track (not just auto‑generated). Great for accessibility‑critical workflows.

## `isCreativeCommons` (type: `boolean`):

Filter for videos marked by YouTube as Creative Commons licensed. This can help discover content that is more remix‑friendly (always check final license conditions yourself).

## `is3D` (type: `boolean`):

Keep only stereoscopic 3D videos that YouTube flags as special 3D content.

## `isLive` (type: `boolean`):

Restrict results to live or live‑style content. Combine this with maxStreams to build focused dashboards of live events or streams.

## `isPurchased` (type: `boolean`):

Best-effort filter for purchased/paid content. YouTube rarely exposes this in scraped data, so results may be limited. Use for niche use cases only.

## `is4K` (type: `boolean`):

Keep only videos that offer at least one 2160p (4K) stream in their available formats.

## `is360` (type: `boolean`):

Filter results down to immersive 360° videos (spherical / equirectangular projection) that can be explored in all directions.

## `hasLocation` (type: `boolean`):

Only keep videos where YouTube exposes explicit location metadata in the player response (for example city/country information).

## `isHDR` (type: `boolean`):

Limit the dataset to High Dynamic Range (HDR) videos, detected from color information and HDR‑specific flags in the available formats.

## `isVR180` (type: `boolean`):

Filter for VR180 immersive content suitable for VR headsets when YouTube marks the video as VR180.

## `publishedAfter` (type: `string`):

Only include videos published after this date. Pick a date in the calendar (absolute format YYYY-MM-DD). Leave empty to include all dates.

## `sortBy` (type: `string`):

After scraping, optionally sort the final dataset by a chosen field (date, viewCount, or likes) so that the default dataset view is ordered exactly how you like it.

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

Select the starting proxy setup for this actor. By default it uses no proxy and, if YouTube blocks the traffic, the actor automatically escalates to Apify datacenter proxy and then to residential proxy with up to 3 retries, locking onto residential for the rest of the run.

## Actor input object example

```json
{
  "searchTerms": [
    "Crawlee"
  ],
  "maxVideos": 10,
  "maxShorts": 0,
  "maxStreams": 0,
  "startUrls": [],
  "downloadSubtitles": false,
  "saveSubtitlesToKvs": false,
  "subtitlesLanguage": "en",
  "preferAutoGenerated": false,
  "subtitlesFormat": "srt",
  "sortingOrder": "",
  "dateFilter": "",
  "videoTypeFilter": "",
  "lengthFilter": "",
  "isHD": false,
  "hasCC": false,
  "isCreativeCommons": false,
  "is3D": false,
  "isLive": false,
  "isPurchased": false,
  "is4K": false,
  "is360": false,
  "hasLocation": false,
  "isHDR": false,
  "isVR180": false,
  "publishedAfter": "",
  "sortBy": "",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# 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 = {
    "searchTerms": [
        "Crawlee"
    ],
    "startUrls": [],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("api-empire/youtube-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 = {
    "searchTerms": ["Crawlee"],
    "startUrls": [],
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("api-empire/youtube-scraper").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 '{
  "searchTerms": [
    "Crawlee"
  ],
  "startUrls": [],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call api-empire/youtube-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Youtube Scraper",
        "description": "YouTube Scraper helps you extract public YouTube data quickly. Collect videos, channels, comments, subscribers, views, likes, and metadata for competitor research, content analysis, lead generation, influencer discovery, and marketing intelligence.",
        "version": "0.1",
        "x-build-id": "3Vy536jgJ4xfUueuZ"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/api-empire~youtube-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-api-empire-youtube-scraper",
                "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/api-empire~youtube-scraper/runs": {
            "post": {
                "operationId": "runs-sync-api-empire-youtube-scraper",
                "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/api-empire~youtube-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-api-empire-youtube-scraper",
                "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",
                "properties": {
                    "searchTerms": {
                        "title": "🔍 Search terms",
                        "type": "array",
                        "description": "Enter one or more YouTube search keywords (for example \"Crawlee\", \"fitness workout\"). The actor will run a full scrape for each term and collect matching videos, shorts, and streams.\n\n💬 For custom solutions or feature requests, contact us at dev.scraperengine@gmail.com",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxVideos": {
                        "title": "🎞️ Maximum videos per search term",
                        "minimum": 0,
                        "maximum": 9999,
                        "type": "integer",
                        "description": "Set how many regular (non‑Shorts, non‑live) videos to scrape for each search term. Use 0 to skip long‑form videos completely and focus only on Shorts or streams.",
                        "default": 10
                    },
                    "maxShorts": {
                        "title": "📱 Maximum Shorts per search term",
                        "minimum": 0,
                        "maximum": 9999,
                        "type": "integer",
                        "description": "Control how many YouTube Shorts (vertical clips) to collect per keyword. Use 0 if you do not want to include Shorts in your dataset.",
                        "default": 0
                    },
                    "maxStreams": {
                        "title": "📡 Maximum streams per search term",
                        "minimum": 0,
                        "maximum": 9999,
                        "type": "integer",
                        "description": "Limit how many live or upcoming streams are scraped for each search term. Use 0 to ignore live content entirely.",
                        "default": 0
                    },
                    "startUrls": {
                        "title": "🔗 Direct URLs",
                        "type": "array",
                        "description": "Provide direct YouTube video, channel, playlist, or results page URLs to scrape without using search terms. This is ideal for monitoring specific assets.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "downloadSubtitles": {
                        "title": "💬 Download subtitles",
                        "type": "boolean",
                        "description": "Download video subtitles/transcripts when available. When enabled, the actor will try to fetch caption tracks and optionally full transcripts for each scraped video.",
                        "default": false
                    },
                    "saveSubtitlesToKvs": {
                        "title": "🗄️ Save subtitles to key‑value store",
                        "type": "boolean",
                        "description": "When enabled, every downloaded transcript is stored in the default Apify key‑value store under its own key (e.g. \"transcript-VIDEO_ID\") so you can download large subtitle files separately from the main dataset.",
                        "default": false
                    },
                    "subtitlesLanguage": {
                        "title": "🌐 Subtitle language",
                        "enum": [
                            "en",
                            "es",
                            "fr",
                            "de",
                            "pt",
                            "it",
                            "ru",
                            "ja",
                            "ko",
                            "zh",
                            "ar",
                            "hi",
                            "bn",
                            "tr",
                            "pl",
                            "nl",
                            "sv",
                            "id",
                            "th",
                            "vi"
                        ],
                        "type": "string",
                        "description": "Choose the primary language for subtitles/transcripts (e.g. en, es, fr, de). The actor will look for this language first and fall back to available tracks where possible.",
                        "default": "en"
                    },
                    "preferAutoGenerated": {
                        "title": "⚙️ Prefer automatically generated subtitles",
                        "type": "boolean",
                        "description": "If turned on, the actor will prefer auto‑generated subtitles over manually uploaded caption tracks. This can increase coverage for less localized videos at the cost of some accuracy.",
                        "default": false
                    },
                    "subtitlesFormat": {
                        "title": "📄 Subtitle format",
                        "enum": [
                            "srt",
                            "text",
                            "timestamp"
                        ],
                        "type": "string",
                        "description": "Decide how transcripts should look in the output: classic SRT (with timestamps), simple plain text, or structured timestamped JSON that is easy to post‑process programmatically.",
                        "default": "srt"
                    },
                    "sortingOrder": {
                        "title": "🧮 Sorting order",
                        "enum": [
                            "",
                            "relevance",
                            "date",
                            "viewCount",
                            "rating"
                        ],
                        "type": "string",
                        "description": "Sort the final dataset by relevance (original order), upload date, view count, or rating. Applied as post-processing for reliable results.",
                        "default": ""
                    },
                    "dateFilter": {
                        "title": "🕒 Date filter",
                        "enum": [
                            "",
                            "hour",
                            "today",
                            "week",
                            "month",
                            "year"
                        ],
                        "type": "string",
                        "description": "Apply YouTube’s built‑in \"Upload date\" filter: last hour, today, this week, this month, or this year — just like clicking the filter in the YouTube interface.",
                        "default": ""
                    },
                    "videoTypeFilter": {
                        "title": "📂 Video type filter",
                        "enum": [
                            "",
                            "video",
                            "channel",
                            "playlist",
                            "movie"
                        ],
                        "type": "string",
                        "description": "Filter to only standard videos (exclude Shorts). Select 'video' to keep only long-form videos. Channel/playlist/movie apply when supported.",
                        "default": ""
                    },
                    "lengthFilter": {
                        "title": "⏱️ Length filter",
                        "enum": [
                            "",
                            "short",
                            "medium",
                            "long"
                        ],
                        "type": "string",
                        "description": "Use YouTube’s length presets to keep only short clips, medium‑length videos, or long‑form content over 20 minutes.",
                        "default": ""
                    },
                    "isHD": {
                        "title": "📺 HD",
                        "type": "boolean",
                        "description": "Only include HD videos (720p or higher). The actor inspects YouTube's streaming formats to verify resolution before including the video.",
                        "default": false
                    },
                    "hasCC": {
                        "title": "📝 Subtitles / CC",
                        "type": "boolean",
                        "description": "Only include videos that have at least one proper closed‑caption track (not just auto‑generated). Great for accessibility‑critical workflows.",
                        "default": false
                    },
                    "isCreativeCommons": {
                        "title": "⚖️ Creative Commons",
                        "type": "boolean",
                        "description": "Filter for videos marked by YouTube as Creative Commons licensed. This can help discover content that is more remix‑friendly (always check final license conditions yourself).",
                        "default": false
                    },
                    "is3D": {
                        "title": "🕶️ 3D",
                        "type": "boolean",
                        "description": "Keep only stereoscopic 3D videos that YouTube flags as special 3D content.",
                        "default": false
                    },
                    "isLive": {
                        "title": "📺 Live only",
                        "type": "boolean",
                        "description": "Restrict results to live or live‑style content. Combine this with maxStreams to build focused dashboards of live events or streams.",
                        "default": false
                    },
                    "isPurchased": {
                        "title": "💳 Purchased content",
                        "type": "boolean",
                        "description": "Best-effort filter for purchased/paid content. YouTube rarely exposes this in scraped data, so results may be limited. Use for niche use cases only.",
                        "default": false
                    },
                    "is4K": {
                        "title": "🖥️ 4K only",
                        "type": "boolean",
                        "description": "Keep only videos that offer at least one 2160p (4K) stream in their available formats.",
                        "default": false
                    },
                    "is360": {
                        "title": "🌐 360° video",
                        "type": "boolean",
                        "description": "Filter results down to immersive 360° videos (spherical / equirectangular projection) that can be explored in all directions.",
                        "default": false
                    },
                    "hasLocation": {
                        "title": "📍 With location",
                        "type": "boolean",
                        "description": "Only keep videos where YouTube exposes explicit location metadata in the player response (for example city/country information).",
                        "default": false
                    },
                    "isHDR": {
                        "title": "🌈 HDR only",
                        "type": "boolean",
                        "description": "Limit the dataset to High Dynamic Range (HDR) videos, detected from color information and HDR‑specific flags in the available formats.",
                        "default": false
                    },
                    "isVR180": {
                        "title": "🥽 VR180 only",
                        "type": "boolean",
                        "description": "Filter for VR180 immersive content suitable for VR headsets when YouTube marks the video as VR180.",
                        "default": false
                    },
                    "publishedAfter": {
                        "title": "📆 Scrape videos published after (date)",
                        "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$|^$",
                        "type": "string",
                        "description": "Only include videos published after this date. Pick a date in the calendar (absolute format YYYY-MM-DD). Leave empty to include all dates.",
                        "default": ""
                    },
                    "sortBy": {
                        "title": "📊 Sort by (post‑processing)",
                        "enum": [
                            "",
                            "date",
                            "viewCount",
                            "likes"
                        ],
                        "type": "string",
                        "description": "After scraping, optionally sort the final dataset by a chosen field (date, viewCount, or likes) so that the default dataset view is ordered exactly how you like it.",
                        "default": ""
                    },
                    "proxyConfiguration": {
                        "title": "🛡️ Proxy configuration & anti‑blocking",
                        "type": "object",
                        "description": "Select the starting proxy setup for this actor. By default it uses no proxy and, if YouTube blocks the traffic, the actor automatically escalates to Apify datacenter proxy and then to residential proxy with up to 3 retries, locking onto residential for the rest of the run."
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
