# YouTube Metadata Scraper (`scraperx/youtube-metadata-scraper`) Actor

Scrape YouTube metadata, transcripts, and comments with proxy fallback and rich logging.

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

## Pricing

$19.99/month + usage

To use this Actor, you pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month after the free trial period.You also pay for the Apify platform usage, which gets cheaper the higher Apify subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#rental-actors

## 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 Metadata Scraper

YouTube Metadata Scraper is a fast, reliable YouTube video metadata extractor that collects structured details from public videos — titles, descriptions, tags, channel info, view/like/comment counts, transcripts, and more. It solves the challenge of gathering complete, analytics-ready video data without the official API, making it a practical YouTube metadata API alternative for marketers, developers, data analysts, and researchers who need to extract YouTube video details at scale. Run it to build trustworthy datasets for SEO, analytics, and automation workflows.

### What data / output can you get?

The actor saves each processed video as a structured item with rich fields for analysis and automation.

| Data field | Description | Example value |
| --- | --- | --- |
| id | YouTube video ID | dQw4w9WgXcQ |
| url | Video URL | https://www.youtube.com/watch?v=dQw4w9WgXcQ |
| title | Video title | Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster) |
| description | Video description | The official video for “Never Gonna Give You Up” by Rick Astley... |
| lengthInSeconds | Video length in seconds | 213 |
| uploadDatetime | Upload date/time | 2009-10-24T23:57:33-07:00 |
| publish_date_since | Relative publish date | 16 years ago |
| category | Video category | Music |
| tags | Video tags | ["rick astley", "Never Gonna Give You Up"] |
| thumbnail | Thumbnail URL | https://i.ytimg.com/vi/dQw4w9WgXcQ/hqdefault.jpg |
| thumbnails_urls | All discovered thumbnail variants | ["https://i.ytimg.com/vi/dQw4w9WgXcQ/hqdefault.jpg", "https://i.ytimg.com/vi_webp/dQw4w9WgXcQ/maxresdefault.webp"] |
| channelID | Channel ID | UCuAXFkgsw1L7xaCfnd5JJOw |
| channelURL | Channel URL | https://www.youtube.com/channel/UCuAXFkgsw1L7xaCfnd5JJOw |
| channelUsername | Channel username (handle-like) | rickastley |
| channelDisplayName | Channel display name | Rick Astley |
| channelSubscribers | Subscriber count | 4.44M |
| author_avatar_url | Channel avatar image URL | https://yt3.ggpht.com/xxx=s176-c-k-c0x00ffffff-no-rj |
| is_verified | Channel verification badge | true |
| viewCount | View count | 1726805028 |
| likeCount | Like count | 18702878 |
| commentCount | Comment count | 2400000 |
| is_live_now | Whether video is live | false |
| description_links | Unwrapped URLs from the description | ["https://linktr.ee/rickastleynever", "https://RickAstley.lnk.to/YTSubID"] |
| is_comments_off | Whether comments are disabled | false |
| is_members_only | Whether video is members-only | false |
| is_paid_content | Whether video is paid content | false |
| transcripts | Transcripts/captions (plain text or timestamped segments) | [{ "language": "EN", "content": "We're no strangers to love ..." }] |
| comments | Top-level comments with metadata | [{ "id": "Ugzge340dBgB75hWBm54AaABAg", "text": "can confirm: he never gave us up", "author": "@YouTube", "likeCount": 153000, "publishedTime": "8 months ago", "replyCount": 960 }] |

Bonus: You can export results from Apify in JSON, CSV, or Excel for dashboards, SEO audits, and ML pipelines.

### Key features

- 🔄 Robust proxy fallback & resiliency  
  Automatically escalates connection mode during blocks (none → datacenter → residential) with retries to keep runs stable.

- 🔎 Keyword search with sorting & paging  
  Resolve videos from keywords and sort by relevance, upload_date, view_count, or rating. Control breadth with max_results_per_keyword.

- 🗣️ Transcript & subtitle capture  
  Toggle transcript download and choose the format: plain text or timestamps. Include auto-generated English captions and/or non-English tracks.

- 💬 Comment extraction with limits  
  Fetch top-level comments using YouTube’s continuation API with a configurable max_comments per video.

- 📊 Comprehensive video & channel metadata  
  Collect titles, descriptions, categories, tags, counts (views/likes/comments), channel fields (ID, URL, display name, subscribers), and status flags (live, comments off, members-only, paid content).

- ⚙️ Parallel processing & per-video saves  
  Videos are processed concurrently and each result is saved to the dataset as it’s ready, with rich logs for real-time visibility.

- 🧑‍💻 Developer-friendly & automation-ready  
  Built on the Apify platform (Python). Trigger via API, integrate with your Python or Node.js pipelines, and export to JSON/CSV/Excel for downstream analytics.

- 🔗 Description link extraction  
  Unwrap and extract all outgoing links from the video description for off-YouTube analysis.

- 🛡️ Production-ready logging  
  Structured logs summarize every collected row (views, channel, transcripts, comments). The actor also sets key-value store records OUTPUT (results) and SUMMARY (processed/failed counts).

### How to use YouTube Metadata Scraper - step by step

1. 🔐 Sign in to Apify  
   Create a free Apify account or log in.

2. 🔍 Open the actor  
   Search for “YouTube Metadata Scraper” in the Apify Store and click Try for free.

3. 📥 Provide inputs  
   - Paste YouTube video URLs or IDs under urls, and/or enter keywords under keywords.  
   - Sorting for keyword searches can be set via sort_order.

4. ⚙️ Configure options  
   - Set max_results_per_keyword (1–100).  
   - Choose include_transcripts and transcript_format ("text" or "timestamps").  
   - Toggle include_english_auto and include_non_english for captions.  
   - Set max_comments (0–5000).  
   - Leave proxyConfiguration as default to let the actor manage proxy fallback automatically.

5. ▶️ Start the run  
   Click Start. The actor resolves video IDs from URLs and/or keywords, processes them concurrently, and pushes each result to the dataset as it completes.

6. 🔎 Monitor progress  
   Follow logs for per-video summaries (views, channel, transcripts count, comments). OUTPUT and SUMMARY records are written to the key-value store for quick review.

7. 💾 Export your data  
   Download results from the dataset in JSON, CSV, or Excel for SEO audits, enrichment, or analytics stacks.

Pro tip: Trigger runs via the Apify API from Python or Node.js to keep your YouTube metadata datasets fresh on a schedule.

### Use cases

| Use case | Description |
| --- | --- |
| SEO teams – tag & keyword analysis | Analyze titles, descriptions, tags, and engagement to optimize metadata and content strategy. |
| Competitor benchmarking | Track view/like/comment trends and channel subscriber counts over time. |
| Research & analytics | Build datasets for trend analysis or academic studies with transcripts and top-level comments. |
| Data enrichment pipelines | Feed structured YouTube video data into ETL jobs, then export to CSV/Excel for BI dashboards. |
| Content strategy | Study categories, topics, and audience engagement to inform production. |
| Link & funnel mapping | Extract thumbnail URLs and all description links to map off-site journeys (landing pages, stores). |
| Automation via API | Integrate with Python/Node.js via the Apify API to refresh datasets programmatically. |

### Why choose YouTube Metadata Scraper?

This YouTube metadata scraper tool is built for precision, scale, and automation — without fragile browser hacks.

- ✅ Accurate, structured outputs: Real fields for videos, channels, transcripts, and comments.
- 🌍 Multilingual transcripts: Include manual and auto-generated captions (English and non-English).
- 📈 Scales with your needs: Parallel processing and per-video saving with robust retry logic.
- 🧑‍💻 Developer access: Integrates easily with Python or Node.js via Apify’s API and exports in JSON/CSV/Excel.
- 🔒 Ethical by design: Extracts only public metadata from video pages; no login or cookies required.
- 🧱 More reliable than extensions: Proxy fallback and retries keep jobs stable and production-ready.

In short, it’s a production-grade YouTube video metadata extractor that outperforms brittle alternatives while staying simple to automate.

### Is it legal / ethical to use YouTube Metadata Scraper?

Yes — when used responsibly. This actor extracts publicly available data from YouTube video pages and does not access private or authenticated content. Follow these guidelines:
- Scrape only public metadata and respect YouTube’s Terms of Service.
- Avoid private or copyrighted materials.
- Ensure your use complies with local data protection laws (e.g., GDPR/CCPA) and your organization’s policies.

Note: YouTube may modify or remove metadata. Always use this tool responsibly.

### Input parameters & output format

#### Example JSON input
```json
{
  "urls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "keywords": [
    "best 80s music videos"
  ],
  "sort_order": "relevance",
  "max_results_per_keyword": 20,
  "max_comments": 20,
  "include_transcripts": true,
  "transcript_format": "text",
  "include_english_auto": false,
  "include_non_english": false,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
````

#### Parameters

| Field | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| urls | array of strings | No (provide at least one of urls or keywords) | — | Provide YouTube video URLs or IDs. You can mix URLs and plain keywords; each entry is one target. |
| keywords | array of strings | No (provide at least one of urls or keywords) | — | Search YouTube by keyword(s). Results can be sorted and paged. |
| sort\_order | string ("relevance","upload\_date","view\_count","rating") | No | relevance | Sort keyword search results: relevance, upload date, view count, or rating. |
| max\_results\_per\_keyword | integer (1–100) | No | 20 | Maximum number of videos to fetch per keyword (with paging). |
| max\_comments | integer (0–5000) | No | 20 | Maximum number of top-level comments to retrieve per video. |
| include\_transcripts | boolean | No | true | Toggle to download closed captions and transcripts when available. |
| transcript\_format | string ("text","timestamps") | No | text | Choose whether transcripts are returned as plain text or with timestamps. |
| include\_english\_auto | boolean | No | false | Enable to include YouTube's auto-generated English captions. |
| include\_non\_english | boolean | No | false | Enable to include transcripts in non-English languages. |
| proxyConfiguration | object | No | {"useApifyProxy": false} | Configure Apify proxies. Leave as default to start without a proxy and allow automatic fallback management. |

Note: While none of the fields are strictly required by schema, the run will fail if both urls and keywords are empty.

#### Example JSON output

```json
{
  "id": "dQw4w9WgXcQ",
  "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "title": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
  "description": "The official video for “Never Gonna Give You Up” by Rick Astley...",
  "lengthInSeconds": 213,
  "uploadDatetime": "2009-10-24T23:57:33-07:00",
  "publish_date_since": "16 years ago",
  "category": "Music",
  "tags": ["rick astley", "Never Gonna Give You Up", "nggyu"],
  "thumbnail": "https://i.ytimg.com/vi/dQw4w9WgXcQ/hqdefault.jpg",
  "thumbnails_urls": [
    "https://i.ytimg.com/vi/dQw4w9WgXcQ/hqdefault.jpg",
    "https://i.ytimg.com/vi_webp/dQw4w9WgXcQ/maxresdefault.webp"
  ],
  "channelID": "UCuAXFkgsw1L7xaCfnd5JJOw",
  "channelURL": "https://www.youtube.com/channel/UCuAXFkgsw1L7xaCfnd5JJOw",
  "channelUsername": "rickastley",
  "channelDisplayName": "Rick Astley",
  "channelSubscribers": "4.44M",
  "author_avatar_url": "https://yt3.ggpht.com/xxx=s176-c-k-c0x00ffffff-no-rj",
  "is_verified": true,
  "viewCount": 1726805028,
  "likeCount": 18702878,
  "commentCount": 2400000,
  "is_live_now": false,
  "description_links": [
    "https://linktr.ee/rickastleynever",
    "https://RickAstley.lnk.to/YTSubID"
  ],
  "is_comments_off": false,
  "is_members_only": false,
  "is_paid_content": false,
  "transcripts": [
    {
      "language": "EN",
      "content": "We're no strangers to love ... Never gonna give you up ..."
    }
  ],
  "comments": [
    {
      "id": "Ugzge340dBgB75hWBm54AaABAg",
      "text": "can confirm: he never gave us up",
      "author": "@YouTube",
      "authorChannelId": "UCBR8-60-B28hp2BmDPdntcQ",
      "likeCount": 153000,
      "publishedTime": "8 months ago",
      "replyCount": 960
    }
  ]
}
```

Fields like channelSubscribers may return "Unknown" when the value isn’t publicly available at the time of extraction.

### FAQ

#### Is there a free tier and how is pricing handled?

Yes. You can start on Apify’s free plan to test the YouTube Metadata Scraper and then upgrade as needed. The actor runs in Apify’s cloud with pay‑as‑you‑go resources or a monthly plan.

#### Do I need to log in or provide API keys?

No. This tool works with publicly available pages and does not require credentials or the official API.

#### Can it capture transcripts and subtitles?

Yes. Enable include\_transcripts and choose transcript\_format as "text" or "timestamps". You can also include auto‑generated English captions and non‑English tracks.

#### Can I scrape by keyword instead of URLs?

Yes. Provide keywords and set sort\_order plus max\_results\_per\_keyword to collect videos from YouTube search automatically.

#### How many comments can it extract per video?

You control this via max\_comments. Set any value from 0 to 5000 to limit top‑level comment retrieval.

#### What does the output include for comments?

Each comment item includes id, text, author, authorChannelId, likeCount, publishedTime, and replyCount.

#### Does it handle live videos or members‑only content?

Yes. The output includes is\_live\_now, is\_members\_only, and is\_paid\_content to flag live and gated content.

#### Can I automate this from Python or Node.js?

Yes. Use the Apify API to trigger runs and export data to JSON/CSV/Excel for integration into your pipelines.

### Final thoughts

YouTube Metadata Scraper is built to extract, analyze, and export comprehensive video insights at scale — from titles, tags, and channel fields to transcripts and comments. It’s ideal for marketers, developers, data analysts, and researchers who need a dependable YouTube video info scraper without relying on the official API. Integrate via the Apify API (Python/Node.js), export to JSON/CSV/Excel, and start extracting smarter YouTube intelligence today.

### 🔗 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 Channel Email Scraper](https://apify.com/scraperx/youtube-channel-email-scraper) | 📝 [YouTube Transcript Scraper](https://apify.com/scraperx/youtube-transcript-scraper) |
| 📞 [YouTube Channel Phone Number Scraper](https://apify.com/scraperx/youtube-channel-phone-number-scraper) | 📈 [YouTube Trending Scraper](https://apify.com/scraperx/youtube-trending-scraper) |
| 💬 [YouTube Comments Scraper](https://apify.com/scraperx/youtube-comments-scraper) | 🧠 [YouTube Video Summarizer](https://apify.com/scraperx/youtube-video-summarizer) |
| 📺 [YouTube Channel Scraper](https://apify.com/scraperx/youtube-channel-scraper) | 🎥 [YouTube Video Scraper by Hashtag](https://apify.com/scraperx/youtube-video-scraper-by-hashtag) |
| 🗂️ [YouTube Metadata Scraper](https://apify.com/scraperx/youtube-metadata-scraper) | 🔍 [YouTube Channel Finder](https://apify.com/scraperx/youtube-channel-finder) |
| ▶️ [YouTube Playlist Scraper](https://apify.com/scraperx/youtube-playlist-scraper) | 🔎 [YouTube Search Scraper](https://apify.com/scraperx/youtube-search-scraper) |
| 🧰 [YouTube Scraper](https://apify.com/scraperx/youtube-scraper) | 📝 [YouTube Community Posts Scraper](https://apify.com/scraperx/youtube-community-posts-scraper) |
| 🎥 [YouTube Shorts Scraper](https://apify.com/scraperx/youtube-shorts-scraper) | 🎥 [YouTube Video Details Scraper](https://apify.com/scraperx/youtube-video-details-scraper) |

# Actor input Schema

## `urls` (type: `array`):

Provide YouTube video URLs or IDs. You can mix URLs and plain keywords; each entry is one target.

## `keywords` (type: `array`):

Search YouTube by keyword(s). Results can be sorted and paged.

## `sort_order` (type: `string`):

Sort keyword search results: relevance, upload date, view count, or rating.

## `max_results_per_keyword` (type: `integer`):

Maximum number of videos to fetch per keyword (with paging).

## `max_comments` (type: `integer`):

Maximum number of top-level comments to retrieve per video.

## `include_transcripts` (type: `boolean`):

Toggle to download closed captions and transcripts when available.

## `transcript_format` (type: `string`):

Choose whether transcripts are returned as plain text or with timestamps.

## `include_english_auto` (type: `boolean`):

Enable to include YouTube's auto-generated English captions.

## `include_non_english` (type: `boolean`):

Enable to include transcripts in non-English languages.

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

Configure Apify proxies. Leave as default to start without a proxy and allow automatic fallback management.

## Actor input object example

```json
{
  "urls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "sort_order": "relevance",
  "max_results_per_keyword": 20,
  "max_comments": 20,
  "include_transcripts": true,
  "transcript_format": "text",
  "include_english_auto": false,
  "include_non_english": false,
  "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 = {
    "urls": [
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
    ]
};

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

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

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "YouTube Metadata Scraper",
        "description": "Scrape YouTube metadata, transcripts, and comments with proxy fallback and rich logging.",
        "version": "0.1",
        "x-build-id": "Wj2ThURTfQ8266u5a"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/scraperx~youtube-metadata-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-scraperx-youtube-metadata-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/scraperx~youtube-metadata-scraper/runs": {
            "post": {
                "operationId": "runs-sync-scraperx-youtube-metadata-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/scraperx~youtube-metadata-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-scraperx-youtube-metadata-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": {
                    "urls": {
                        "title": "Video URLs or IDs",
                        "type": "array",
                        "description": "Provide YouTube video URLs or IDs. You can mix URLs and plain keywords; each entry is one target.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "keywords": {
                        "title": "Search Keywords",
                        "type": "array",
                        "description": "Search YouTube by keyword(s). Results can be sorted and paged.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "sort_order": {
                        "title": "Sort / Filter by",
                        "enum": [
                            "relevance",
                            "upload_date",
                            "view_count",
                            "rating"
                        ],
                        "type": "string",
                        "description": "Sort keyword search results: relevance, upload date, view count, or rating.",
                        "default": "relevance"
                    },
                    "max_results_per_keyword": {
                        "title": "Max Videos per Keyword",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Maximum number of videos to fetch per keyword (with paging).",
                        "default": 20
                    },
                    "max_comments": {
                        "title": "Maximum Comments",
                        "minimum": 0,
                        "maximum": 5000,
                        "type": "integer",
                        "description": "Maximum number of top-level comments to retrieve per video.",
                        "default": 20
                    },
                    "include_transcripts": {
                        "title": "Include Transcripts",
                        "type": "boolean",
                        "description": "Toggle to download closed captions and transcripts when available.",
                        "default": true
                    },
                    "transcript_format": {
                        "title": "Transcript Format",
                        "enum": [
                            "text",
                            "timestamps"
                        ],
                        "type": "string",
                        "description": "Choose whether transcripts are returned as plain text or with timestamps.",
                        "default": "text"
                    },
                    "include_english_auto": {
                        "title": "Include English Auto-generated",
                        "type": "boolean",
                        "description": "Enable to include YouTube's auto-generated English captions.",
                        "default": false
                    },
                    "include_non_english": {
                        "title": "Include Non-English",
                        "type": "boolean",
                        "description": "Enable to include transcripts in non-English languages.",
                        "default": false
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Configure Apify proxies. Leave as default to start without a proxy and allow automatic fallback management.",
                        "default": {
                            "useApifyProxy": false
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
