# YouTube Shorts Media Downloader (`w3crawler/youtube-shorts-downloader`) Actor

Download verified YouTube Shorts as playable media files into the default key-value store and emit checksummed storage references with rich metadata.

- **URL**: https://apify.com/w3crawler/youtube-shorts-downloader.md
- **Developed by:** [w3crawler](https://apify.com/w3crawler) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 1,000 shorts downloads

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/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

## YouTube Shorts Media Downloader

Download verified public YouTube Shorts as playable media files. The actor uses yt-dlp's default public extractor, validates the downloaded container with ffprobe, stores the bytes in the run's default key-value store, and writes a checksum-bearing metadata record.

The actor does not select private/alternate player clients, spoof fingerprints, bypass CAPTCHA, require a login, or store request identities. Public availability and media URLs can change, so each file is downloaded and verified during the run.

### Input

| Field | Required | Description |
| --- | --- | --- |
| **videoUrls** | Yes | Public Shorts, watch, youtu.be, embed URLs, or 11-character video IDs. Generic references are accepted only when duration confirms a Short. |
| **maxItems** | No | Integer from 1 to 100; default 20. |
| **quality** | No | best, hd, sd, or lowest; default best. |
| **proxyConfiguration** | No | Optional account-authorized Apify Proxy or credential-free proxy URLs. |
| **enableProxyFallback** | No | Compatibility option that allows an authorized Apify Proxy fallback when no explicit proxy config is supplied. Default false. |
| **includeDiagnostics** | No | Defaults to true; writes exact four-field diagnostics. |
| **requestDelayMs** | No | Pacing delay from 0 to 5000 ms; default 250. |
| **requestTimeoutSecs** | No | Bounded timeout from 15 to 180 seconds; default 90. |

```json
{
  "videoUrls": ["https://www.youtube.com/shorts/jNQXAC9IVRw"],
  "maxItems": 1,
  "quality": "lowest",
  "includeDiagnostics": true,
  "requestDelayMs": 250,
  "requestTimeoutSecs": 90,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["BUYPROXIES94952"]
  }
}
```

### Output

Successful rows contain verified Short identity, public title/channel/uploader information, upload and engagement data, description, categories, tags, hashtags, availability flags, thumbnail URLs, requested quality, available public formats, file size, SHA-256, MIME type, ffprobe media facts, and the key-value-store key and URL for the media bytes.

The row has no proxy URL, proxy identity, client identity, cookies, or fingerprint fields. Diagnostics always use exactly url, error, errorCode, and scrapedAt. OUTPUT stores status, counts, blocked failures, and proxy configuration state.

You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.

### Media storage

Media bytes are stored under keys such as media\_jNQXAC9IVRw.mp4 in the run's default key-value store. The dataset record includes a URL-encoded retrieval URL and checksum. The actor refuses to emit a success row until ffprobe confirms a positive-duration video stream and matching file size.

### Reliability and limitations

yt-dlp uses ordinary public extraction with bounded retries and timeout. An authorized proxy can improve reachability but cannot make private, region-blocked, removed, age-gated, or login-gated videos downloadable. Residential routing is used only when explicitly configured by the caller.

### Local validation

```powershell
python -m src
npx --yes apify validate-schema
```

On a machine with ffmpeg/ffprobe and yt-dlp installed, run the Actor with INPUT.json and inspect both the dataset row and media\_\* key.

# Changelog

This Actor's version history is a separate document: https://apify.com/w3crawler/youtube-shorts-downloader/changelog.md

# Actor input Schema

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

YouTube Shorts, watch, youtu.be, embed URLs, or bare 11-character video IDs. Generic references must resolve to a video no longer than three minutes.

## `maxItems` (type: `integer`):

Maximum number of submitted unique items to process.

## `quality` (type: `string`):

Preferred playable video quality. The actor falls back when the exact quality is unavailable.

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

Optional account-authorized Apify Proxy or credential-free proxy URLs. Proxy state is summarized in OUTPUT and never stored in dataset rows.

## `enableProxyFallback` (type: `boolean`):

After a direct attempt, try ordinary Apify Proxy; add residential only when RESIDENTIAL is explicitly selected in proxyConfiguration.

## `includeDiagnostics` (type: `boolean`):

Write bounded four-field diagnostics for invalid, unavailable, blocked, or failed downloads.

## `requestDelayMs` (type: `integer`):

Pacing delay between submitted video downloads.

## `requestTimeoutSecs` (type: `integer`):

Bounded timeout for each metadata and media download attempt.

## Actor input object example

```json
{
  "videoUrls": [
    "https://www.youtube.com/shorts/jNQXAC9IVRw"
  ],
  "maxItems": 20,
  "quality": "lowest",
  "proxyConfiguration": {
    "useApifyProxy": false
  },
  "enableProxyFallback": true,
  "includeDiagnostics": true,
  "requestDelayMs": 250,
  "requestTimeoutSecs": 90
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `keyValueStore` (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 = {
    "videoUrls": [
        "https://www.youtube.com/shorts/jNQXAC9IVRw"
    ],
    "maxItems": 20,
    "quality": "lowest",
    "proxyConfiguration": {
        "useApifyProxy": false
    },
    "enableProxyFallback": true,
    "includeDiagnostics": true,
    "requestDelayMs": 250,
    "requestTimeoutSecs": 90
};

// Run the Actor and wait for it to finish
const run = await client.actor("w3crawler/youtube-shorts-downloader").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 = {
    "videoUrls": ["https://www.youtube.com/shorts/jNQXAC9IVRw"],
    "maxItems": 20,
    "quality": "lowest",
    "proxyConfiguration": { "useApifyProxy": False },
    "enableProxyFallback": True,
    "includeDiagnostics": True,
    "requestDelayMs": 250,
    "requestTimeoutSecs": 90,
}

# Run the Actor and wait for it to finish
run = client.actor("w3crawler/youtube-shorts-downloader").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 '{
  "videoUrls": [
    "https://www.youtube.com/shorts/jNQXAC9IVRw"
  ],
  "maxItems": 20,
  "quality": "lowest",
  "proxyConfiguration": {
    "useApifyProxy": false
  },
  "enableProxyFallback": true,
  "includeDiagnostics": true,
  "requestDelayMs": 250,
  "requestTimeoutSecs": 90
}' |
apify call w3crawler/youtube-shorts-downloader --silent --output-dataset

```

## MCP server setup

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

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/CoazezaNMaHlaYZCh/builds/8evfVyxGTQezo4lDS/openapi.json
