# YouTube Shorts Scraper (`rexreus/youtube-shorts-scraper`) Actor

Ultra-fast, lightweight YouTube Shorts scraper extracting video metrics, audio tracks, viral engagement rates, channel statistics, and transcripts.

- **URL**: https://apify.com/rexreus/youtube-shorts-scraper.md
- **Developed by:** [REXREUS D.O](https://apify.com/rexreus) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.60 / 1,000 results

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?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

<p align="center">
  <h1 align="center">YouTube Shorts Scraper &amp; Analytics</h1>
  <img src="https://res.cloudinary.com/ewnqk3k9/image/upload/v1791158848/apify-actors/youtube-shorts-scraper-banner.png" alt="YouTube Shorts Scraper extracting metrics, engagement rate, audio tracks, and transcripts" align="center" width="100%">
  <p align="center">
    <strong>Ultra-fast, lightweight YouTube Shorts scraper extracting video metrics, audio tracks, viral engagement rates, channel statistics, and transcripts.</strong>
  </p>
  <p align="center">
    <em>100% Pure HTTP-First Architecture • Zero Browser Overhead • 90% Cheaper Compute</em>
  </p>
  <p align="center">
    <a href="#quick-start"><img src="https://img.shields.io/badge/Quick_Start-Apify_Console-green?style=flat-square" alt="Quick Start"></a>
    <a href="https://apify.com"><img src="https://img.shields.io/badge/Runs_on-Apify-ff443e?style=flat-square" alt="Apify"></a>
    <a href="https://nodejs.org"><img src="https://img.shields.io/badge/Node.js-≥20-339933?style=flat-square&logo=node.js&logoColor=white" alt="Node.js"></a>
  </p>
</p>

***

### Why this Actor?

| Feature | What you get |
|---|---|
| **⚡ 100% Pure HTTP-First** | Runs on 256MB RAM with sub-second speeds. Completely avoids heavy Playwright/Puppeteer crashes. |
| **🎵 Audio & Music Track Pivot** | Extracts background music track title, artist name, audio ID, and original sound indicators for trend analysis. |
| **📊 Automated Engagement Rate** | Computes `(likes + comments) / views * 100` automatically, eliminating manual post-processing. |
| **📝 Free Subtitles & Captions** | Automatically extracts native and auto-generated transcripts without exorbitant per-minute charges. |
| **🎯 5 Versatile Input Modes** | Accepts direct Short URLs, Channel `/shorts` tabs, Search keywords, Hashtags (`#shorts`), and Audio source links. |
| **👤 Creator & Channel Metadata** | Captures channel handle (`@...`), channel ID, avatar image URL, and verification status. |
| **🛡️ Built-in Anti-Bot Defense** | Native Apify Residential proxy support with automatic session rotation and exponential jitter backoff. |
| **📁 Clean Dataset Exports** | Flat JSON/CSV/Excel format with zero debug provenance clutter and standardized status codes. |

***

### Quick start

1. Open the Actor on **Apify Console** and click **Start**.
2. Enter YouTube Shorts URLs, Channel links (e.g. `https://www.youtube.com/@MrBeast/shorts`), or search queries.
3. Download the results as JSON, CSV, or Excel from the Dataset tab.

```json
{
  "startUrls": [
    {
      "url": "https://www.youtube.com/@MrBeast/shorts"
    }
  ],
  "maxResults": 20,
  "downloadSubtitles": true
}
```

***

### How it works

```
Input (URLs, Channels, Keywords)
       │
       ▼
Trust-Boundary Input Sanitizer & SSRF Gate
       │
       ▼
YouTube HTML & InnerTube Client (Zero Browser)
       │
       ▼
Extraction: Video Metrics + Audio Pivot + Captions + Engagement Rate
       │
       ▼
Batch Dataset Output (JSON / CSV / Excel)
```

***

### Input Parameters

| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| `startUrls` | `array` | No | `["https://www.youtube.com/@MrBeast/shorts"]` | List of YouTube Short URLs, Channel shorts tabs, Hashtags, or Audio sources. |
| `searchQueries` | `array` | No | `[]` | Search terms to discover Shorts by keyword (e.g. `["tech gadgets", "gym tips"]`). |
| `maxResults` | `integer` | No | `50` | Maximum total number of Shorts to scrape across all inputs. |
| `maxResultsPerUrl` | `integer` | No | `50` | Maximum number of Shorts to extract per channel or search query. |
| `downloadSubtitles` | `boolean` | No | `true` | Whether to extract plain text transcripts and subtitles when available. |
| `includeComments` | `boolean` | No | `false` | Whether to extract top comments for each Short. |
| `maxCommentsPerShort` | `integer` | No | `10` | Maximum number of comments to extract per video if enabled. |
| `proxyConfiguration` | `object` | No | `{ "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"] }` | Proxy configuration settings. Residential proxies recommended. |

***

### Output Dataset Sample

Each item pushed to the default dataset represents a clean, flattened record:

```json
{
  "id": "CEJXqm2eiJ0",
  "url": "https://www.youtube.com/shorts/CEJXqm2eiJ0",
  "title": "What’s Inside My Briefcase?",
  "description": null,
  "viewCount": 40835329,
  "viewCountText": "40,835,329",
  "likeCount": 730000,
  "commentCount": 16000,
  "engagementRate": 1.83,
  "durationSeconds": 40,
  "publishedAt": "2026-09-27T09:00:14-07:00",
  "uploadDate": "2026-09-27T09:00:14-07:00",
  "channelName": "MrBeast",
  "channelId": "UCX6OQ3DkcsbYNE6H8uQQuVA",
  "channelUrl": "https://www.youtube.com/channel/UCX6OQ3DkcsbYNE6H8uQQuVA",
  "channelHandle": "@MrBeast",
  "channelAvatarUrl": "https://yt3.ggpht.com/nxYrc_1_2f77DoBadyxMTmv7ZpRZapHR5jbuYe7PlPd5cIRJxtNNEYyOC0ZsxaDyJJzXrnJiuDE=s48-c-k-c0x00ffffff-no-rj",
  "channelVerified": false,
  "audioTitle": "What’s Inside My Briefcase?",
  "audioArtist": "@MrBeast",
  "audioId": "8AEByAMkogYVAah2qTPvii39qz7sR9lYnj2Q43_okAcC",
  "isOriginalAudio": false,
  "captionsText": null,
  "topComments": null,
  "tags": [],
  "hashtags": [],
  "thumbnailUrl": "https://i.ytimg.com/vi/CEJXqm2eiJ0/sardefault.jpg",
  "status": "SUCCESS",
  "httpStatus": 200,
  "scrapedAt": "2026-10-04T23:23:16.947Z"
}
```

***

### Cost, Limits & Performance

- **Memory Allocation:** 256 MB – 512 MB RAM (Lightweight container).
- **Execution Speed:** 250ms – 400ms per Short.
- **Compute Unit (CU) Consumption:** ~0.01 – 0.02 CU per 1,000 items (up to 95% cheaper than browser scrapers).
- **Proxy Recommendation:** Apify Proxy with `RESIDENTIAL` group for high-volume scraping without 429 rate limits.

***

### Recipes

#### Recipe 1: Channel Shorts Competitor Audit

Extract recent Shorts from top creator channels with audio info and engagement rates:

```json
{
  "startUrls": [
    { "url": "https://www.youtube.com/@MrBeast/shorts" },
    { "url": "https://www.youtube.com/@creator/shorts" }
  ],
  "maxResults": 100,
  "maxResultsPerUrl": 50,
  "downloadSubtitles": true
}
```

#### Recipe 2: Keyword Trend Discovery

Discover trending videos for specific search queries:

```json
{
  "searchQueries": ["artificial intelligence", "tech productivity"],
  "maxResults": 50,
  "maxResultsPerUrl": 25,
  "downloadSubtitles": true
}
```

#### Recipe 3: Viral Sound / Audio Source Tracking

Track all Shorts using a specific viral sound:

```json
{
  "startUrls": [
    { "url": "https://www.youtube.com/source/8AEByAMkogYVAah2qTPvii39qz7sR9lYnj/shorts" }
  ],
  "maxResults": 30
}
```

***

### Troubleshooting

| Status Code / Symptom | Root Cause | Solution |
|---|---|---|
| `BLOCKED` (429) | YouTube detected high request volume on datacenter IP | Ensure Apify Proxy is set to `RESIDENTIAL` groups in input settings. |
| `NOT_FOUND` (404) | Short was deleted or URL is invalid | Verify URL format. The item is safely marked with `status: "NOT_FOUND"`. |
| `RESTRICTED` (403) | Age-restricted or country-blocked video | Video requires account login; item is marked `status: "RESTRICTED"`. |
| `PARTIAL` | Basic details parsed but optional captions or comments absent | Video author did not provide subtitles or disabled comments. |

***

### FAQ

**Q: Do I need a Google or YouTube account or API key to use this Actor?**\
A: No. This Actor operates 100% on public endpoints without requiring any YouTube API keys, Google accounts, or login credentials.

**Q: Can this Actor download the actual video files (.mp4)?**\
A: No. To keep execution ultra-fast and compute costs minimal, the Actor extracts structured metadata, thumbnails, audio tracks, and transcripts, but does not download raw heavy video binaries.

**Q: How accurate is the engagement rate?**\
A: Engagement rate is calculated directly using YouTube's exact view count, like count, and total comment count via the formula: `((likes + comments) / views) * 100`.

**Q: Does it work for private or unlisted Shorts?**\
A: No. Only publicly accessible Shorts can be scraped.

**Q: Can I run this locally using the Apify CLI?**\
A: Yes! Run `apify run --purge` in the repository directory to execute against your local input.

***

### Limitations

- Scrapes publicly available data only.
- Users are responsible for complying with YouTube's Terms of Service and local data regulations.

***

### Run it

Ready to extract YouTube Shorts data? Open the Actor on **Apify Console** and hit **Start**.

***

### License

**Proprietary. All rights reserved.** Copyright (c) 2026 REXREUS.

You may run this Actor on Apify. You may not copy, rebrand, republish, or claim this Actor as your own. See [LICENSE](./LICENSE).

# Actor input Schema

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

YouTube Shorts URLs, Channel Shorts tabs (e.g. https://www.youtube.com/@MrBeast/shorts), Hashtag URLs, or Audio source URLs.

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

Keyword search terms to discover YouTube Shorts (e.g., 'coding tips', 'travel vlog').

## `maxResults` (type: `integer`):

Maximum total number of Shorts to scrape across all inputs.

## `maxResultsPerUrl` (type: `integer`):

Maximum number of Shorts to scrape per channel, hashtag, or search query.

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

Whether to extract plain text subtitles/captions when available.

## `includeComments` (type: `boolean`):

Whether to extract top comments for each Short (increases request count slightly).

## `maxCommentsPerShort` (type: `integer`):

Number of top comments to extract per Short if comments extraction is enabled.

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

Select Apify Proxy (RESIDENTIAL recommended for YouTube) or custom proxies.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.youtube.com/@MrBeast/shorts"
    }
  ],
  "searchQueries": [],
  "maxResults": 25,
  "maxResultsPerUrl": 25,
  "downloadSubtitles": true,
  "includeComments": false,
  "maxCommentsPerShort": 10,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `dataset` (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 = {
    "startUrls": [
        {
            "url": "https://www.youtube.com/@MrBeast/shorts"
        }
    ]
};

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

# Run the Actor and wait for it to finish
run = client.actor("rexreus/youtube-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 '{
  "startUrls": [
    {
      "url": "https://www.youtube.com/@MrBeast/shorts"
    }
  ]
}' |
apify call rexreus/youtube-shorts-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rexreus/youtube-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/hpPXJcR6hNKFO3xY5/builds/gxqmmw0h4y1rnxI5Y/openapi.json
