# YouTube Channel & Shorts Scraper | Viral Videos, Views/Hour (`tactful_anvil/youtube-channel-shorts-scraper`) Actor

Scrape any channel's Videos + Shorts tabs or run YouTube searches with date/sort filters. Every video with views, age, duration, views/hour; details add exact views, likes, comments, publish date; top comments too. No API key. $1 per 1,000 videos.

- **URL**: https://apify.com/tactful\_anvil/youtube-channel-shorts-scraper.md
- **Developed by:** [Mr Zack](https://apify.com/tactful_anvil) (community)
- **Categories:**
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 videos

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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 Channel & Shorts Scraper — Viral Videos, Views/Hour, Comments

Scrape any YouTube channel's **Videos and Shorts tabs**, or run **keyword searches with upload-date and sort filters**, and get every video as clean JSON with **velocity metrics** (views per hour / per day since upload). Turn on details for **exact view count, likes, comment count, publish date, description, hashtags** and pull the **top comments**. No API key, no quota, no browser — **$1 per 1,000 videos**.

### Who uses this

- **Clippers & short-form editors** — find the videos exploding *right now* (`searchQueries` + "This week" + "View count" → `viewsPerHour`), then clip them.
- **Creators & channel managers** — benchmark competitors: median views, outperformers (≥3× median), like rate, comments per 1k views (free `channel-summary` row).
- **Agencies & sponsors** — vet channels before a deal: subscribers, cadence, real engagement, top videos.
- **Researchers / trend tools** — schedule keyword searches hourly and feed the dataset into your own scoring.

### Input

| Field | Description |
|---|---|
| `channels` | Channel URLs, `@handles` or `UC…` ids. |
| `searchQueries` | YouTube searches. |
| `videoUrls` | Video URLs/IDs → details (and comments). |
| `contentType` | `both` / `videos` / `shorts`. |
| `maxVideos` | Per channel tab and per search type (max 1000). |
| `channelSort` | `latest` / `popular` / `oldest` for the channel Videos tab. |
| `uploadedWithin`, `sortBy` | Search filters: hour/today/week/month/year × relevance/upload\_date/view\_count/rating. |
| `minViews` | Free pre-filter. |
| `includeDetails` | Exact views/likes/comments/date/description per video. |
| `maxCommentsPerVideo` | Top comments per video (requires details). |

```json
{ "searchQueries": ["air fryer recipe"], "contentType": "shorts", "uploadedWithin": "week", "sortBy": "view_count", "maxVideos": 100, "includeDetails": true, "maxCommentsPerVideo": 20 }
```

### Output

**`video`** (channel card):

```json
{ "type": "video", "position": 1, "videoId": "gTKS8SAwUzE", "title": "We Survived The Most Extreme Places On Earth", "url": "https://www.youtube.com/watch?v=gTKS8SAwUzE",
  "viewCount": 49000000, "publishedText": "1 day ago", "publishedAt": "2026-09-06T10:59:05Z", "durationSec": 1408, "isShort": false,
  "channelName": "MrBeast", "channelId": "UCX6OQ3DkcsbYNE6H8uQQuVA", "channelHandle": "@MrBeast", "channelSubscribers": 516000000,
  "hoursSincePublished": 24, "viewsPerHour": 2041666.7, "viewsPerDay": 49000000, "source": "channel" }
```

**`video`** with `includeDetails` adds: `likeCount`, `commentCount`, exact `publishedAt` (`publishedDateText`), `description`, `hashtags`, `channelSubscribers`, `likeRatePct`, `commentsPer1kViews`, `isPremiere`, `wasLive`.

**`comment`**:

```json
{ "type": "comment", "videoId": "kJQP7kiw5Fk", "commentId": "Ugz…", "text": "who's here after 9 billion??", "author": "@YouTube", "authorChannelId": "UC…", "authorIsVerified": true,
  "likeCount": 78000, "replyCount": 973, "publishedText": "4 months ago", "publishedAt": "2026-05-10T…" }
```

**`channel-summary`** (free): `subscriberCount, videoCount, videosScanned, shortsScanned, medianViews, avgViews, topVideoId/Title/Views, medianViewsPerHour, outperformers[]`.

Unavailable videos / unresolvable channels are pushed as `type: "failed"` and are **never charged**.

### Pricing (pay per event)

| Event | Price |
|---|---|
| Video card | $0.001 |
| Video (detailed) | $0.002 |
| Comment | $0.0005 |
| Actor start | $0.001 |

1,000 videos ≈ **$1** · 1,000 detailed ≈ **$2** · 1,000 comments ≈ **$0.50**.

### Notes

- Card `viewCount` is YouTube's rounded figure ("49M"); `includeDetails` gives the exact number. Shorts cards have no upload age (YouTube doesn't show it) — details add the exact date.
- `publishedAt` on cards is estimated from "x days ago"; details give the real date.
- Search honours YouTube's own filters; "Shorts" results are detected from the Shorts shelf and `/shorts/` links.
- Need transcripts? See our **YouTube Transcript Scraper**. Need TikTok/Amazon product data? See the other actors on this profile.

### Changelog

- 0.0.6 (10 Sep 2026) — Maintenance: billing safety (`chargeSafely` — a failed charge can no longer kill a run that already has data), test suite wiring, README.
- 0.0.1 (7 Sep 2026) — Launch.

### Found this useful? A review helps more than you'd think

If this Actor saved you time, a short review on the **Reviews** tab of this Store page takes 30 seconds and is the only signal other buyers have before they spend anything. If something is broken instead, open a ticket on the **Issues** tab — parser bugs and field requests get fixed.

**Related Actors from the same account**

- [Kick Trending Clips Scraper](https://apify.com/tactful_anvil/kick-trending-clips-scraper)
- [YouTube Transcript Scraper](https://apify.com/tactful_anvil/youtube-transcript-scraper)
- [Skool Communities Scraper](https://apify.com/tactful_anvil/skool-communities-scraper)
- [Google News Scraper](https://apify.com/tactful_anvil/google-news-scraper)

# Actor input Schema

## `channels` (type: `array`):

Channel URLs, @handles or UC… ids, one per line. Videos and/or Shorts tabs are scraped.

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

YouTube searches, one per line. Combine with Uploaded within + Sort by to find what is going viral right now.

## `videoUrls` (type: `array`):

watch?v=…, /shorts/…, youtu.be/… or 11-char ids → exact details (and comments if enabled).

## `contentType` (type: `string`):

Which tabs (channels) / result types (search) to collect.

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

Per channel tab and per search type (30 per page).

## `channelSort` (type: `string`):

Order of the channel Videos tab (Shorts tab is always latest).

## `uploadedWithin` (type: `string`):

YouTube upload-date filter for search queries.

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

YouTube sort order for search queries.

## `minViews` (type: `integer`):

Drop cards below this view count (free filter, applied before charging).

## `includeDetails` (type: `boolean`):

Adds exact views, likes, comment count, exact publish date, description, hashtags, channel subscribers, like rate. Charged as Video (detailed) instead of Video.

## `maxCommentsPerVideo` (type: `integer`):

0 = no comments. Requires details. Top comments (YouTube default order), 20 per page.

## `includeChannelSummary` (type: `boolean`):

Per channel: subscribers, median/avg views, top video, median views/hour, outperformers (≥3× median). Never charged.

## Actor input object example

```json
{
  "channels": [
    "@MrBeast"
  ],
  "contentType": "both",
  "maxVideos": 50,
  "channelSort": "latest",
  "uploadedWithin": "any",
  "sortBy": "relevance",
  "minViews": 0,
  "includeDetails": false,
  "maxCommentsPerVideo": 0,
  "includeChannelSummary": true
}
```

# Actor output Schema

## `videos` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "channels": [
        "@MrBeast"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("tactful_anvil/youtube-channel-shorts-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 = { "channels": ["@MrBeast"] }

# Run the Actor and wait for it to finish
run = client.actor("tactful_anvil/youtube-channel-shorts-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "channels": [
    "@MrBeast"
  ]
}' |
apify call tactful_anvil/youtube-channel-shorts-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,tactful_anvil/youtube-channel-shorts-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/sPEfoeeyInpPxjj3s/builds/dBOswGVjqF0aQYdMh/openapi.json
