# YouTube Video Scraper \[FAST] | Views, Duration & Thumbnails (`apizy/youtube-video-scraper`) Actor

Turn any YouTube channel into a clean dataset. Pull titles, url, views, durations, thumbnails, and publish dates for up to 1,000 videos in one run, great for content research, competitor tracking. Most runs finish in under 10 seconds. Pay $0.005 per video, only when it succeeds. Failures are free.

- **URL**: https://apify.com/apizy/youtube-video-scraper.md
- **Developed by:** [Apizy](https://apify.com/apizy) (community)
- **Categories:** Social media, Videos, Lead generation
- **Stats:** 7 total users, 4 monthly users, 100.0% runs succeeded, 3 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $5.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

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

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## YouTube Video Scraper

Scrape videos from any YouTube channel and get titles, views, durations, thumbnails, publish dates, and per-video insights. Works on any channel URL format and returns clean JSON in seconds.

You are only charged for videos that come back with real data. Failed requests and empty results are free.

### What does YouTube Video Scraper do?

YouTube Video Scraper pulls video data directly from any YouTube channel and turns it into a clean, structured dataset ready to use.

It can extract:

- Video titles and URLs
- View counts (raw string and normalized integer)
- Video durations (string, milliseconds, and seconds)
- Thumbnail URLs
- Publish dates
- Per-video insights: views per day, views per second, watch hours, and duration category

### Why Scrape YouTube Videos?

A channel's video list tells you more than just what was posted. Views, duration, and publish date together reveal what content actually performs, how often a channel publishes, and which formats drive the most watch time.

Here are some ways you could use this data:

- Track competitor channels and monitor new uploads over time
- Identify which video lengths and topics get the most views in a niche
- Build datasets for content research, trend analysis, or machine learning
- Feed video metadata into dashboards, spreadsheets, or automation tools
- Analyze upload frequency and publishing patterns across channels

### How to Use

Scraping a YouTube channel takes about 10 seconds. No setup needed beyond the channel URL.

1. Click **Try for free**
2. Enter the YouTube channel URL, for example: `https://www.youtube.com/@mkbhd`
3. Pick how many videos to fetch: 10, 20, 50, 100, 300, 500, or 1,000
4. Click **Run**
5. When done, preview or download your data from the Dataset tab

To continue from where a previous run stopped, paste the `nextCursor` value from the last output into the `cursor` field.

### Input

```json
{
  "channelUrl": "https://www.youtube.com/@mkbhd",
  "maxVideos": "100"
}
````

To resume from a previous run:

```json
{
  "channelUrl": "https://www.youtube.com/@mkbhd",
  "maxVideos": "100",
  "cursor": "4qmFsgLdCBIYVUNCSnljc21kdXZZRUw4M1JfVTRK..."
}
```

#### Input Fields

| Field        | Type   | Default | Description                                                                                     |
| ------------ | ------ | ------- | ----------------------------------------------------------------------------------------------- |
| `channelUrl` | string | none    | YouTube channel URL **(required)**. Supports `/@handle`, `/channel/ID`, `/c/name`, `/user/name` |
| `maxVideos`  | string | `"20"`  | How many videos to scrape. Options: `10`, `20`, `50`, `100`, `300`, `500`, `1000`               |
| `cursor`     | string | none    | Value from a previous run's `pagination.nextCursor`. Leave empty to start from the top.         |

### Output

Each video is saved as one item in the Dataset. The run summary goes to the Key-Value Store under `OUTPUT`. Pagination info is saved separately under `PAGINATION`.

**Video item**

```json
{
  "videoId": "QrT4S9i3agE",
  "title": "Top 5 Android 17 Features: I Swear It's New!",
  "videoUrl": "https://www.youtube.com/watch?v=QrT4S9i3agE",
  "publishedAt": "2026-06-24",
  "publishedAtRaw": "18 hours ago",
  "duration": "9:24",
  "durationMs": 564000,
  "durationSeconds": 564,
  "views": 781000,
  "viewsRaw": "781K views",
  "thumbnailUrl": "https://i.ytimg.com/vi/QrT4S9i3agE/hqdefault.jpg",
  "insight": {
    "ageInDays": 1,
    "viewsPerDay": 781000,
    "viewsPerSecond": 1384.75,
    "estimatedWatchHours": 121805.56,
    "durationCategory": "5-15 min"
  }
}
```

**Run summary**

```json
{
  "summary": {
    "channelName": "Marques Brownlee",
    "channelId": "UCBJycsmduvYEL83R_U4JriQ",
    "channelUrl": "https://www.youtube.com/@mkbhd",
    "successCount": 100,
    "failedCount": 0,
    "successRate": "100%",
    "totalCharged": 0.5,
    "startedAt": "2026-06-25T10:00:00.000Z",
    "finishedAt": "2026-06-25T10:00:05.000Z",
    "totalDurationSeconds": 5
  }
}
```

#### Output Fields

**Video data**

| Field             | Description                                           |
| ----------------- | ----------------------------------------------------- |
| `videoId`         | YouTube video ID                                      |
| `title`           | Video title                                           |
| `videoUrl`        | Direct link to the video                              |
| `publishedAt`     | Publish date in `YYYY-MM-DD` format                   |
| `publishedAtRaw`  | Raw publish string from YouTube (e.g. `"3 days ago"`) |
| `duration`        | Duration in `MM:SS` or `HH:MM:SS`                     |
| `durationMs`      | Duration in milliseconds                              |
| `durationSeconds` | Duration in seconds                                   |
| `views`           | View count as an integer (`781000`, not `"781K"`)     |
| `viewsRaw`        | Raw view string from YouTube (e.g. `"781K views"`)    |
| `thumbnailUrl`    | Thumbnail URL                                         |

**Insight** (nested inside each video item)

| Field                 | Description                                                 |
| --------------------- | ----------------------------------------------------------- |
| `ageInDays`           | How many days since the video was published                 |
| `viewsPerDay`         | Average views per day since publish date                    |
| `viewsPerSecond`      | Views per second of video content                           |
| `estimatedWatchHours` | Total estimated watch hours (`views x duration / 3600`)     |
| `durationCategory`    | `< 1 min`, `1-5 min`, `5-15 min`, `15-30 min`, or `30+ min` |

**Pagination** (separate dataset)

| Field         | Description                                                     |
| ------------- | --------------------------------------------------------------- |
| `currentPage` | Page number of this run, starting at 1                          |
| `pageSize`    | Number of videos requested                                      |
| `totalPages`  | Estimated total pages based on channel video count              |
| `hasNextPage` | `true` if more videos are available                             |
| `nextCursor`  | Pass this as `cursor` on the next run to get the following page |

### Pricing

Pay per successfully scraped video. Failed requests are free.

| Videos | Cost  | Est. time |
| ------ | ----- | --------- |
| 10     | $0.05 | ~2s       |
| 100    | $0.50 | ~5s       |
| 300    | $1.50 | ~15s      |
| 500    | $2.50 | ~20s      |
| 1,000  | $5.00 | ~40s      |

$0.005 per video.

For runs over 500 videos, set **No timeout** in Run options.

### Notes

- All channel URL formats work: `/@handle`, `/channel/ID`, `/c/name`, `/user/name`
- View counts are integers, not strings. `781000` instead of `"781K"`, ready to sort and filter without extra parsing.
- Duration comes in three formats: raw string (`"9:24"`), milliseconds, and seconds.
- Pagination is cursor-based. Pass `nextCursor` back as `cursor` on the next run. No duplicates or gaps between runs.

### More Actors You Might Like

Built by the same team and backed by the same transparent pricing philosophy: no hidden attempts, no wasted credits, no charge for failed results.

| Actor                                                                                     | Description                                                                                          |
| ----------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| [YouTube Video Detail Scraper](https://apify.com/apizy/youtube-video-detail-scraper)      | Full video metadata: views, likes, comments, keywords, duration, and engagement insights.            |
| [YouTube Comment Scraper](https://apify.com/apizy/youtube-comment-scraper)                | Scrape comments from any video with author details, like counts, reply counts, and engagement flags. |
| [YouTube Channel Scraper](https://apify.com/apizy/youtube-channel-scraper)                | Channel profiles with subscriber counts, engagement rates, contact info, and social links.           |
| [YouTube Channel Scraper Fast](https://apify.com/apizy/youtube-channel-scraper-innertube) | Same channel data at faster speed. Better for large batches.                                         |
| [YouTube Transcript Scraper](https://apify.com/apizy/youtube-transcript-scraper)          | Extract the full transcript from any YouTube video, with optional timestamps per segment.            |

### Get in Touch

Have questions, need custom scraping solutions, or want to integrate with your existing stack? We're here to help!

- **Email:** apizy.studio@gmail.com

We build custom scraping solutions tailored to your specific needs that are fast, reliable, and transparent.

# Actor input Schema

## `channelUrl` (type: `string`):

YouTube channel URL. Supports /@handle, /channel/ID, /c/name, /user/name formats.

## `maxVideos` (type: `string`):

Number of videos to scrape per run.

## `cursor` (type: `string`):

Opaque cursor from a previous run's output (pagination.nextCursor) to fetch the next page. Leave empty to start from the beginning.

## Actor input object example

```json
{
  "channelUrl": "https://www.youtube.com/@mkbhd",
  "maxVideos": "20"
}
```

# Actor output Schema

## `results` (type: `string`):

Dataset containing one item per scraped video.

## `output` (type: `string`):

Channel info, success/fail counts, and total charge for this run.

## `pagination` (type: `string`):

Current page, total pages, and nextCursor to pass into the next run.

# 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 = {
    "channelUrl": "https://www.youtube.com/@mkbhd"
};

// Run the Actor and wait for it to finish
const run = await client.actor("apizy/youtube-video-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 = { "channelUrl": "https://www.youtube.com/@mkbhd" }

# Run the Actor and wait for it to finish
run = client.actor("apizy/youtube-video-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 '{
  "channelUrl": "https://www.youtube.com/@mkbhd"
}' |
apify call apizy/youtube-video-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "YouTube Video Scraper [FAST] | Views, Duration & Thumbnails",
        "description": "Turn any YouTube channel into a clean dataset. Pull titles, url, views, durations, thumbnails, and publish dates for up to 1,000 videos in one run, great for content research, competitor tracking. Most runs finish in under 10 seconds. Pay $0.005 per video, only when it succeeds. Failures are free.",
        "version": "0.0",
        "x-build-id": "LEMjJQw5NR2FglJbZ"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/apizy~youtube-video-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-apizy-youtube-video-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/apizy~youtube-video-scraper/runs": {
            "post": {
                "operationId": "runs-sync-apizy-youtube-video-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/apizy~youtube-video-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-apizy-youtube-video-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",
                "required": [
                    "channelUrl"
                ],
                "properties": {
                    "channelUrl": {
                        "title": "Channel URL",
                        "type": "string",
                        "description": "YouTube channel URL. Supports /@handle, /channel/ID, /c/name, /user/name formats."
                    },
                    "maxVideos": {
                        "title": "Max Videos",
                        "enum": [
                            "10",
                            "20",
                            "50",
                            "100",
                            "300",
                            "500",
                            "1000"
                        ],
                        "type": "string",
                        "description": "Number of videos to scrape per run.",
                        "default": "20"
                    },
                    "cursor": {
                        "title": "Cursor",
                        "type": "string",
                        "description": "Opaque cursor from a previous run's output (pagination.nextCursor) to fetch the next page. Leave empty to start from the beginning."
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
