# YouTube Scraper Pro: Videos, Channels, Comments & Transcripts (`scrapemint/youtube-scraper`) Actor

Scrape YouTube videos, channels, playlists, shorts, and live streams. Each row ships engagement, transcripts, top comments with replies, chapters, most replayed heatmap, channel stats, related videos, and music credits. 16 regions. Pay per video.

- **URL**: https://apify.com/scrapemint/youtube-scraper.md
- **Developed by:** [Kennedy Mutisya](https://apify.com/scrapemint) (community)
- **Categories:** Videos, Social media
- **Stats:** 4 total users, 3 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

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

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

## 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 Pro: Videos, Channels, Comments & Transcripts

Scrape YouTube videos, channels, playlists, shorts, and live streams. Each row ships video metadata, channel intelligence, engagement metrics, transcripts in multiple languages, top comments with replies, chapters, most replayed heatmap, related videos, and music credits. 16 regions, 16 languages, no API quota. Pay per video.

**Built for** content marketers tracking competitor performance, brand teams monitoring mentions across creators, AI researchers harvesting transcripts for training data, journalists investigating viral content, sponsorship platforms benchmarking creator audiences, social listening tools, and BI teams piping YouTube catalog data into a warehouse.

**Keywords this actor ranks for:** youtube scraper, youtube api alternative, youtube data extractor, youtube video scraper, youtube channel scraper, youtube comments scraper, youtube transcript scraper, youtube shorts scraper, youtube playlist scraper, youtube hashtag scraper, youtube to JSON, youtube to CSV, youtube most replayed, youtube heatmap api, youtube chapters api.

---

### Why this actor

| Other YouTube scrapers | **This actor** |
|---|---|
| Search terms only | Five input modes: search terms, URLs, video IDs, channel handles, playlists |
| Title and view count only | Full engagement: likes, comments, engagement rate, view count |
| English transcripts only | Multi language transcripts with priority fallback |
| No comment data | Top comments with author handle, like count, pinned + hearted flags, replies |
| No heatmap | Most replayed segments (timestamp + intensity 0 to 1) |
| No chapters | Chapter timeline with start times and thumbnails |
| Single region | 16 regions, 16 interface languages |
| No channel enrichment | Subscriber count, video count, country, links, keywords |
| Skips music credits | Song title, artist, album, license from the music panel |
| Search filters lacking | Sort by recent / view count / rating, filter by 4K / live / HD / CC license |

---

### How it works

```mermaid
flowchart LR
    A[Search terms<br/>URLs<br/>Video IDs<br/>Channel handles<br/>Playlists] --> B[Listing crawl<br/>collect video IDs]
    A --> C[Direct watch<br/>per video ID]
    B --> C
    C --> D[Watch page<br/>Playwright + fingerprinted Chrome]
    D --> E[Parse ytInitialData<br/>+ ytInitialPlayerResponse]
    E --> F[Enrichment fetches<br/>transcript + comments + channel stats]
    F --> G[One row per video]
    G --> H[(JSON CSV API)]
````

Pages render with Playwright behind rotating fingerprints. YouTube consent walls dismiss automatically. Channel stats resolve once per channel and cache across the run.

***

### What you get per row

```mermaid
flowchart LR
    R[Video row] --> R1[Identity<br/>videoId url type duration]
    R --> R2[Channel<br/>name handle subs verified]
    R --> R3[Engagement<br/>views likes comments rate]
    R --> R4[Transcript<br/>multi language timed segments]
    R --> R5[Comments<br/>top thread replies pinned]
    R --> R6[Chapters<br/>timestamps and thumbnails]
    R --> R7[Heatmap<br/>most replayed intensity]
    R --> R8[Music credits<br/>song artist album]
    R --> R9[Related videos<br/>up next sidebar]
    R --> R10[End screens<br/>cards info cards]
```

Toggle on `extractStreamUrls` and the row carries the available video and audio stream URLs and bitrates.

***

### Quick start

**Scrape a search with 4K filter, sorted by view count**

```json
{
  "searchTerms": ["drone footage iceland"],
  "maxVideosPerSearch": 50,
  "sortBy": "viewCount",
  "features": ["fourK"],
  "uploadDate": "year"
}
```

**Direct video IDs with transcripts and chapters**

```json
{
  "videoIds": ["arj7oStGLkU", "ZbZSe6N_BXs", "AKJfakEsgy0"],
  "extractTranscript": true,
  "transcriptLanguages": ["en", "es"],
  "extractChapters": true,
  "extractMostReplayed": true
}
```

**Track a creator's catalog with date range**

```json
{
  "channelHandles": ["@MrBeast"],
  "maxVideosPerChannel": 50,
  "dateFrom": "2026-01-01",
  "extractTopComments": true,
  "maxComments": 100
}
```

**Multi region listening (US + Brazil + Japan)**

```json
{
  "searchTerms": ["world cup highlights"],
  "region": "BR",
  "language": "pt",
  "maxVideosPerSearch": 30
}
```

**Playlist export with engagement and channel stats**

```json
{
  "startUrls": ["https://www.youtube.com/playlist?list=PLrAXtmRdnEQy6nuLMHjMZOz59Oq8B9oT9"],
  "maxVideosPerPlaylist": 200,
  "extractChannelStats": true,
  "extractRelatedVideos": true
}
```

***

### Sample output

```json
{
  "videoId": "arj7oStGLkU",
  "url": "https://www.youtube.com/watch?v=arj7oStGLkU",
  "embedUrl": "https://www.youtube.com/embed/arj7oStGLkU",
  "type": "video",
  "title": "Inside the Mind of a Master Procrastinator | Tim Urban | TED",
  "description": "Tim Urban knows that procrastination doesn't make sense...",
  "durationSeconds": 836,
  "durationText": "13:56",
  "publishDate": "2016-04-06T00:00:00-07:00",
  "category": "Education",
  "keywords": ["TED", "TED Talk", "Tim Urban", "procrastination"],
  "channel": {
    "name": "TED",
    "channelId": "UCAuUUnT6oDeKwE6v1NGQxug",
    "handle": "@TED",
    "url": "https://www.youtube.com/@TED",
    "subscriberCount": 25700000,
    "videoCount": 4521,
    "isVerified": true,
    "country": "US"
  },
  "engagement": {
    "viewCount": 61194372,
    "likeCount": 1372411,
    "commentCount": 32198,
    "engagementRate": 0.02243
  },
  "flags": {
    "isLive": false,
    "isShort": false,
    "isFamilySafe": true,
    "hasCaptions": true,
    "hasChapters": true,
    "hasMostReplayed": true
  },
  "thumbnails": {
    "default": "https://i.ytimg.com/vi/arj7oStGLkU/default.jpg",
    "high": "https://i.ytimg.com/vi/arj7oStGLkU/hqdefault.jpg",
    "maxres": "https://i.ytimg.com/vi/arj7oStGLkU/maxresdefault.jpg"
  },
  "chapters": [
    { "title": "The procrastinator's brain", "startSeconds": 142, "thumbnail": "https://..." },
    { "title": "The Panic Monster", "startSeconds": 412, "thumbnail": "https://..." }
  ],
  "mostReplayed": [
    { "startSeconds": 388.4, "durationSeconds": 8.36, "intensityScore": 1.0 },
    { "startSeconds": 412.7, "durationSeconds": 8.36, "intensityScore": 0.92 }
  ],
  "transcript": {
    "language": "en",
    "isAutogenerated": false,
    "segments": [
      { "start": 0.0, "duration": 4.2, "text": "So in college I was a government major..." }
    ],
    "text": "So in college I was a government major, which means..."
  },
  "topComments": [
    {
      "author": "@viewer123",
      "channelHandle": "@viewer123",
      "text": "This talk changed my life",
      "likeCount": "12K",
      "pinned": false,
      "hearted": true,
      "replyCountText": "48 replies"
    }
  ],
  "scrapedAt": "2026-04-26T08:00:00.000Z"
}
```

***

### Who uses this

| Role | Use case |
|---|---|
| Content marketer | Audit a competitor's channel. Pull every video with views, likes, engagement rate, and chapter topics. |
| Brand monitor | Search terms across mentions of your brand. Watch for sentiment shifts via comments. |
| AI / RAG team | Pull transcripts from a topic cluster. Each segment has timecodes for citation. |
| Sponsorship platform | Benchmark creator audiences. Subscriber count, country, video frequency, engagement rate. |
| News and research | Investigate viral patterns. Most replayed heatmap shows where viewers rewind. |
| Music labels | Track which shorts use a song. Music credits panel returns title, artist, album, license. |
| Educator / publisher | Export playlists with chapter timestamps for course mapping. |
| BI analyst | Pipe YouTube catalog data into Snowflake. Each row is API ready. |

***

### Input reference

| Field | Type | What it does |
|---|---|---|
| `searchTerms` | string\[] | YouTube search queries. |
| `startUrls` | string\[] | Mix watch, channel, playlist, shorts, hashtag, results URLs. |
| `videoIds` | string\[] | Direct 11 character video IDs. Fastest input mode. |
| `channelHandles` | string\[] | Channel handles like `@MrBeast`. |
| `maxVideosPerSearch` | integer | Cap on regular videos per search. |
| `maxShortsPerSearch` | integer | Cap on shorts per search. |
| `maxStreamsPerSearch` | integer | Cap on live streams per search. |
| `maxVideosPerChannel` | integer | Cap when scraping channel catalogs. |
| `maxVideosPerPlaylist` | integer | Cap when scraping playlists. |
| `uploadDate` | enum | hour, today, week, month, year, any. |
| `duration` | enum | short (<4m), medium (4-20m), long (>20m), any. |
| `sortBy` | enum | relevance, uploadDate, viewCount, rating. |
| `features` | string\[] | live, fourK, hd, subtitles, creativeCommons, vr360, hdr. |
| `dateFrom`, `dateTo` | string | ISO date bounds for channel and playlist scraping. |
| `extractTranscript` | boolean | Multi language transcript with timecodes. |
| `transcriptLanguages` | string\[] | Priority list of language codes. |
| `extractTopComments` | boolean | Top comment thread with author and like count. |
| `maxComments` | integer | Cap on top level comments per video. |
| `extractCommentReplies` | boolean | Walk into each thread and pull replies. |
| `extractChapters` | boolean | Chapter timestamps and thumbnails. |
| `extractRelatedVideos` | boolean | Up next sidebar suggestions. |
| `extractChannelStats` | boolean | Subscriber count, video count, country, links. |
| `extractMusicAndCredits` | boolean | Song title, artist, album, license. |
| `extractMostReplayed` | boolean | Heatmap segments with intensity scores. |
| `extractStreamUrls` | boolean | Direct video and audio stream URLs. |
| `extractEndScreens` | boolean | End screen elements and info cards. |
| `region` | enum | gl param. 16 regions including US, GB, JP, BR, IN, KR, DE. |
| `language` | enum | hl param. 16 interface languages. |
| `dedupe` | boolean | Skip video IDs already pushed across runs. |
| `concurrency` | integer | Parallel pages. Three to five is safe. |
| `proxyConfiguration` | object | Apify proxy. Datacenter is fine. Residential for high volume. |

***

### API call

```bash
curl -X POST \
  "https://api.apify.com/v2/acts/YOUR_USER~youtube-scraper/runs?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "channelHandles": ["@MrBeast"],
    "maxVideosPerChannel": 20,
    "extractTranscript": true,
    "extractMostReplayed": true,
    "extractChapters": true
  }'
```

***

### Pricing

The first few videos per run are free so you can validate the output before paying. After that, one charge per video row. Chapters, channel stats, related videos, end screens, and most replayed are included at no extra cost. Transcripts and comments add modest extra processing.

***

### FAQ

#### What is the difference between this and the YouTube Data API?

YouTube's official API has a 10,000 unit per day quota. One search costs 100 units, one comment fetch costs 1 unit. Realistically you get a few thousand videos per day. This actor has no quota and no API key. Plus you get fields the official API does not expose: most replayed heatmap, full transcripts, music credits, chapters with thumbnails, and end screen cards.

#### Does it pull transcripts in non English languages?

Yes. Pass `transcriptLanguages: ["es", "en"]` to prefer Spanish and fall back to English. The actor walks the available caption tracks for the video and returns the first match. Auto generated tracks are flagged via `isAutogenerated: true`.

#### How does the most replayed feature work?

YouTube ships an internal heatmap with `intensityScoreNormalized` values from 0 to 1 across video segments. The actor returns every segment so you can find the highest engagement moments programmatically. Useful for clip generation, viewer retention analysis, and content research.

#### Can I scrape comments?

Yes. Toggle on `extractTopComments` and the actor scrolls the comment thread and returns the top N comments. Each comment ships with author, channel handle, text, like count, posted time, pinned and hearted flags, and reply count. Toggle on `extractCommentReplies` for the first batch of replies per thread.

#### How do you handle the YouTube consent wall?

The actor sets `CONSENT=YES+1` and `SOCS=CAI` cookies before navigation, which dismisses the EU consent banner without a click. If a consent dialog still renders, the actor clicks the accept button automatically.

#### What if a video is age gated?

Age gated videos require a signed-in session. The actor logs a warning and skips them. For pre-shipping content audits, age gating is a small minority of cases.

#### Can I filter by upload date and duration in search?

Yes. Pass `uploadDate: "month"` and `duration: "long"` and the actor builds the YouTube `sp=` filter parameter. Combine with `sortBy: "viewCount"` to find the highest performing month-old long form videos in any niche.

#### Does it work for shorts?

Yes. Shorts are detected automatically and tagged with `type: "short"` and `flags.isShort: true`. The row carries both `url` and `shortsUrl`. Pass `maxShortsPerSearch` to control how many shorts come back per query.

#### Is scraping YouTube allowed?

This actor reads HTML any anonymous viewer can see. Do not redistribute video files or transcripts you have no lawful basis to publish. Respect YouTube's terms.

***

### Related actors

- **TikTok Scraper**. Videos, profiles, hashtags, and music data with optional video file and subtitle downloads.
- **Instagram Scraper**. Posts, reels, stories, comments, and follower data.
- **LinkedIn Jobs Scraper Pro**. Search URL, company URL, and recruiter contact extraction.
- **Website Content Crawler**. Websites to clean Markdown with token counts and RAG ready chunks.
- **Google Maps Scraper**. Local business data with reviews.
- **Amazon Product Scraper**. Product details, BSR, variants, ratings histogram across 10 marketplaces.

# Actor input Schema

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

YouTube search queries. Each term runs an independent search. Combine with sortBy, uploadDate, duration, and features filters below.

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

Mix any of: video URL (/watch?v= or youtu.be/), channel URL (/@handle, /channel/UC..., /c/, /user/), playlist URL (/playlist?list=), shorts URL (/shorts/), hashtag URL (/hashtag/), or search results URL (/results?search\_query=).

## `videoIds` (type: `array`):

11 character YouTube video IDs (e.g. dQw4w9WgXcQ). Fastest input mode. Skip the listing crawl and fetch each video directly.

## `channelHandles` (type: `array`):

Channel handles like @MrBeast or @veritasium. Pulls the channel's video catalog up to maxVideosPerChannel. Combine with dateFrom or dateTo to slice the catalog by upload date.

## `maxVideosPerSearch` (type: `integer`):

Cap on regular videos returned per search. 0 means everything YouTube exposes (typically up to a few hundred).

## `maxShortsPerSearch` (type: `integer`):

Cap on shorts returned per search. 0 disables shorts in search results.

## `maxStreamsPerSearch` (type: `integer`):

Cap on live streams returned per search. 0 disables live results.

## `maxVideosPerChannel` (type: `integer`):

Cap on videos pulled per channel handle or channel URL. Older catalogs scroll deep, so this is the safest knob to control cost.

## `maxVideosPerPlaylist` (type: `integer`):

Cap on videos pulled per playlist URL.

## `uploadDate` (type: `string`):

Restrict search results by recency. Applies to searchTerms only.

## `duration` (type: `string`):

Restrict search results by length. Applies to searchTerms only.

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

Sort order for searchTerms. Default is relevance.

## `features` (type: `array`):

Restrict search to videos with these features. Multiple values stack. Applies to searchTerms only.

## `dateFrom` (type: `string`):

ISO date (YYYY-MM-DD). Drops videos uploaded before this date when crawling channels or playlists. Leave blank for no lower bound.

## `dateTo` (type: `string`):

ISO date (YYYY-MM-DD). Drops videos uploaded after this date when crawling channels or playlists. Leave blank for no upper bound.

## `extractTranscript` (type: `boolean`):

Pull the auto generated or human written transcript. Each segment carries start time, duration, and text. Useful for AI summarization, content audits, and SEO research.

## `transcriptLanguages` (type: `array`):

Preferred transcript language codes in priority order (e.g. en, es, de, ja, hi). The first available track is used. Leave default to take whatever YouTube serves first.

## `extractTopComments` (type: `boolean`):

Pull the top comments thread. Each comment carries author, channel ID, text, like count, reply count, posted time, and pinned or hearted flag.

## `maxComments` (type: `integer`):

Cap on top level comments returned per video. Ignored if extractTopComments is off.

## `extractCommentReplies` (type: `boolean`):

Walk into each top level comment and pull the first batch of replies. Adds latency. Off by default.

## `extractChapters` (type: `boolean`):

Pull the chapter timeline if the creator added one (or YouTube auto generated one). Each chapter has title, start time, and thumbnail.

## `extractRelatedVideos` (type: `boolean`):

Pull the up next sidebar (video ID, title, channel, view count). Useful for content recommendation graphs.

## `extractChannelStats` (type: `boolean`):

Resolve subscriber count, total video count, joined date, country, and links for every distinct channel encountered. One extra page hit per channel.

## `extractMusicAndCredits` (type: `boolean`):

Pull the music tracks panel (song title, artist, album, license) and the credit list (people, locations) if present.

## `extractMostReplayed` (type: `boolean`):

Pull the most replayed segment markers (timestamp + intensity 0 to 1). Lets analysts find the highest engagement moments programmatically.

## `extractStreamUrls` (type: `boolean`):

Capture available video and audio stream URLs and bitrates from the player response. Some streams are signed and time bounded.

## `extractEndScreens` (type: `boolean`):

Pull end screen elements and info cards. Useful for cross promotion analysis on creator networks.

## `region` (type: `string`):

Two letter country code passed as gl. Affects which results YouTube returns and which currency monetary fields show.

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

Two letter language code passed as hl. Affects which language YouTube renders metadata in.

## `dedupe` (type: `boolean`):

Skip video IDs already pushed in previous runs. Turn off to refresh stale rows.

## `concurrency` (type: `integer`):

Number of pages processed in parallel. Three to five is safe. Higher values trigger consent walls and rate limits.

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

Apify proxy. Datacenter is fine for YouTube at modest volume. Switch to residential if consent or age gates appear.

## Actor input object example

```json
{
  "searchTerms": [
    "crawlee tutorial"
  ],
  "startUrls": [],
  "videoIds": [],
  "channelHandles": [],
  "maxVideosPerSearch": 50,
  "maxShortsPerSearch": 0,
  "maxStreamsPerSearch": 0,
  "maxVideosPerChannel": 100,
  "maxVideosPerPlaylist": 200,
  "uploadDate": "any",
  "duration": "any",
  "sortBy": "relevance",
  "features": [],
  "dateFrom": "",
  "dateTo": "",
  "extractTranscript": false,
  "transcriptLanguages": [
    "en"
  ],
  "extractTopComments": false,
  "maxComments": 50,
  "extractCommentReplies": false,
  "extractChapters": true,
  "extractRelatedVideos": false,
  "extractChannelStats": true,
  "extractMusicAndCredits": false,
  "extractMostReplayed": false,
  "extractStreamUrls": false,
  "extractEndScreens": false,
  "region": "US",
  "language": "en",
  "dedupe": true,
  "concurrency": 4,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": []
  }
}
```

# 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 tutorial"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": []
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapemint/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 tutorial"],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": [],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("scrapemint/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 tutorial"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": []
  }
}' |
apify call scrapemint/youtube-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "YouTube Scraper Pro: Videos, Channels, Comments & Transcripts",
        "description": "Scrape YouTube videos, channels, playlists, shorts, and live streams. Each row ships engagement, transcripts, top comments with replies, chapters, most replayed heatmap, channel stats, related videos, and music credits. 16 regions. Pay per video.",
        "version": "0.1",
        "x-build-id": "eLijmjec12cnBFEdt"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/scrapemint~youtube-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-scrapemint-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/scrapemint~youtube-scraper/runs": {
            "post": {
                "operationId": "runs-sync-scrapemint-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/scrapemint~youtube-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-scrapemint-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": "YouTube search queries. Each term runs an independent search. Combine with sortBy, uploadDate, duration, and features filters below.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "startUrls": {
                        "title": "YouTube URLs",
                        "type": "array",
                        "description": "Mix any of: video URL (/watch?v= or youtu.be/), channel URL (/@handle, /channel/UC..., /c/, /user/), playlist URL (/playlist?list=), shorts URL (/shorts/), hashtag URL (/hashtag/), or search results URL (/results?search_query=).",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "videoIds": {
                        "title": "Direct video IDs",
                        "type": "array",
                        "description": "11 character YouTube video IDs (e.g. dQw4w9WgXcQ). Fastest input mode. Skip the listing crawl and fetch each video directly.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "channelHandles": {
                        "title": "Channel handles",
                        "type": "array",
                        "description": "Channel handles like @MrBeast or @veritasium. Pulls the channel's video catalog up to maxVideosPerChannel. Combine with dateFrom or dateTo to slice the catalog by upload date.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxVideosPerSearch": {
                        "title": "Max videos per search term",
                        "minimum": 0,
                        "maximum": 5000,
                        "type": "integer",
                        "description": "Cap on regular videos returned per search. 0 means everything YouTube exposes (typically up to a few hundred).",
                        "default": 50
                    },
                    "maxShortsPerSearch": {
                        "title": "Max shorts per search term",
                        "minimum": 0,
                        "maximum": 5000,
                        "type": "integer",
                        "description": "Cap on shorts returned per search. 0 disables shorts in search results.",
                        "default": 0
                    },
                    "maxStreamsPerSearch": {
                        "title": "Max live streams per search term",
                        "minimum": 0,
                        "maximum": 5000,
                        "type": "integer",
                        "description": "Cap on live streams returned per search. 0 disables live results.",
                        "default": 0
                    },
                    "maxVideosPerChannel": {
                        "title": "Max videos per channel",
                        "minimum": 0,
                        "maximum": 10000,
                        "type": "integer",
                        "description": "Cap on videos pulled per channel handle or channel URL. Older catalogs scroll deep, so this is the safest knob to control cost.",
                        "default": 100
                    },
                    "maxVideosPerPlaylist": {
                        "title": "Max videos per playlist",
                        "minimum": 0,
                        "maximum": 10000,
                        "type": "integer",
                        "description": "Cap on videos pulled per playlist URL.",
                        "default": 200
                    },
                    "uploadDate": {
                        "title": "Upload date filter",
                        "enum": [
                            "any",
                            "hour",
                            "today",
                            "week",
                            "month",
                            "year"
                        ],
                        "type": "string",
                        "description": "Restrict search results by recency. Applies to searchTerms only.",
                        "default": "any"
                    },
                    "duration": {
                        "title": "Duration filter",
                        "enum": [
                            "any",
                            "short",
                            "medium",
                            "long"
                        ],
                        "type": "string",
                        "description": "Restrict search results by length. Applies to searchTerms only.",
                        "default": "any"
                    },
                    "sortBy": {
                        "title": "Sort search results",
                        "enum": [
                            "relevance",
                            "uploadDate",
                            "viewCount",
                            "rating"
                        ],
                        "type": "string",
                        "description": "Sort order for searchTerms. Default is relevance.",
                        "default": "relevance"
                    },
                    "features": {
                        "title": "Feature filters",
                        "type": "array",
                        "description": "Restrict search to videos with these features. Multiple values stack. Applies to searchTerms only.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "live",
                                "fourK",
                                "hd",
                                "subtitles",
                                "creativeCommons",
                                "vr360",
                                "hdr",
                                "purchased"
                            ],
                            "enumTitles": [
                                "Live now",
                                "4K resolution",
                                "HD resolution",
                                "Has subtitles or CC",
                                "Creative Commons license",
                                "VR 360",
                                "HDR",
                                "Purchased"
                            ]
                        },
                        "default": []
                    },
                    "dateFrom": {
                        "title": "Date from (channel + playlist scraping)",
                        "type": "string",
                        "description": "ISO date (YYYY-MM-DD). Drops videos uploaded before this date when crawling channels or playlists. Leave blank for no lower bound.",
                        "default": ""
                    },
                    "dateTo": {
                        "title": "Date to (channel + playlist scraping)",
                        "type": "string",
                        "description": "ISO date (YYYY-MM-DD). Drops videos uploaded after this date when crawling channels or playlists. Leave blank for no upper bound.",
                        "default": ""
                    },
                    "extractTranscript": {
                        "title": "Download transcript",
                        "type": "boolean",
                        "description": "Pull the auto generated or human written transcript. Each segment carries start time, duration, and text. Useful for AI summarization, content audits, and SEO research.",
                        "default": false
                    },
                    "transcriptLanguages": {
                        "title": "Transcript languages",
                        "type": "array",
                        "description": "Preferred transcript language codes in priority order (e.g. en, es, de, ja, hi). The first available track is used. Leave default to take whatever YouTube serves first.",
                        "default": [
                            "en"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "extractTopComments": {
                        "title": "Extract top comments",
                        "type": "boolean",
                        "description": "Pull the top comments thread. Each comment carries author, channel ID, text, like count, reply count, posted time, and pinned or hearted flag.",
                        "default": false
                    },
                    "maxComments": {
                        "title": "Max comments per video",
                        "minimum": 0,
                        "maximum": 5000,
                        "type": "integer",
                        "description": "Cap on top level comments returned per video. Ignored if extractTopComments is off.",
                        "default": 50
                    },
                    "extractCommentReplies": {
                        "title": "Extract comment replies",
                        "type": "boolean",
                        "description": "Walk into each top level comment and pull the first batch of replies. Adds latency. Off by default.",
                        "default": false
                    },
                    "extractChapters": {
                        "title": "Extract chapters",
                        "type": "boolean",
                        "description": "Pull the chapter timeline if the creator added one (or YouTube auto generated one). Each chapter has title, start time, and thumbnail.",
                        "default": true
                    },
                    "extractRelatedVideos": {
                        "title": "Extract related videos",
                        "type": "boolean",
                        "description": "Pull the up next sidebar (video ID, title, channel, view count). Useful for content recommendation graphs.",
                        "default": false
                    },
                    "extractChannelStats": {
                        "title": "Enrich with channel stats",
                        "type": "boolean",
                        "description": "Resolve subscriber count, total video count, joined date, country, and links for every distinct channel encountered. One extra page hit per channel.",
                        "default": true
                    },
                    "extractMusicAndCredits": {
                        "title": "Extract music tracks and credits",
                        "type": "boolean",
                        "description": "Pull the music tracks panel (song title, artist, album, license) and the credit list (people, locations) if present.",
                        "default": false
                    },
                    "extractMostReplayed": {
                        "title": "Extract most replayed heatmap",
                        "type": "boolean",
                        "description": "Pull the most replayed segment markers (timestamp + intensity 0 to 1). Lets analysts find the highest engagement moments programmatically.",
                        "default": false
                    },
                    "extractStreamUrls": {
                        "title": "Extract direct stream URLs",
                        "type": "boolean",
                        "description": "Capture available video and audio stream URLs and bitrates from the player response. Some streams are signed and time bounded.",
                        "default": false
                    },
                    "extractEndScreens": {
                        "title": "Extract end screens and cards",
                        "type": "boolean",
                        "description": "Pull end screen elements and info cards. Useful for cross promotion analysis on creator networks.",
                        "default": false
                    },
                    "region": {
                        "title": "Region (gl)",
                        "enum": [
                            "US",
                            "GB",
                            "CA",
                            "AU",
                            "DE",
                            "FR",
                            "IT",
                            "ES",
                            "NL",
                            "SE",
                            "PL",
                            "TR",
                            "BR",
                            "MX",
                            "JP",
                            "KR",
                            "IN",
                            "ID"
                        ],
                        "type": "string",
                        "description": "Two letter country code passed as gl. Affects which results YouTube returns and which currency monetary fields show.",
                        "default": "US"
                    },
                    "language": {
                        "title": "Interface language (hl)",
                        "enum": [
                            "en",
                            "es",
                            "fr",
                            "de",
                            "it",
                            "pt",
                            "ja",
                            "ko",
                            "zh",
                            "hi",
                            "ar",
                            "ru",
                            "tr",
                            "nl",
                            "pl",
                            "sv"
                        ],
                        "type": "string",
                        "description": "Two letter language code passed as hl. Affects which language YouTube renders metadata in.",
                        "default": "en"
                    },
                    "dedupe": {
                        "title": "Deduplicate across runs",
                        "type": "boolean",
                        "description": "Skip video IDs already pushed in previous runs. Turn off to refresh stale rows.",
                        "default": true
                    },
                    "concurrency": {
                        "title": "Concurrency",
                        "minimum": 1,
                        "maximum": 16,
                        "type": "integer",
                        "description": "Number of pages processed in parallel. Three to five is safe. Higher values trigger consent walls and rate limits.",
                        "default": 4
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Apify proxy. Datacenter is fine for YouTube at modest volume. Switch to residential if consent or age gates appear.",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": []
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
