# YouTube Video Downloader - MP4 up to 4K & MP3 (`coder2077/youtube-video-downloader`) Actor

Download YouTube videos, Shorts and music as MP4 (144p to 4K 2160p) or MP3/M4A audio. Get a direct download link in seconds, plus title, duration and thumbnails. Fast and stable, no proxies needed. $0.99 per 1,000 videos.

- **URL**: https://apify.com/coder2077/youtube-video-downloader.md
- **Developed by:** [FastSaver](https://apify.com/coder2077) (community)
- **Categories:** Videos, Social media, Developer tools
- **Stats:** 12 total users, 9 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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

## YouTube Video Downloader - MP4 up to 4K & MP3 Audio

Download **YouTube videos, Shorts and music** as **MP4 from 144p up to 4K (2160p)** or as **MP3 / M4A audio**. Paste YouTube links, pick a quality and get a **direct download link** in seconds, plus title, duration and thumbnails. Built on one of the fastest and most stable YouTube download backends on the market, serving millions of requests a day.

### What does YouTube Video Downloader do?

- YouTube video downloader - **144p, 240p, 360p, 480p, 720p, 1080p**
- YouTube **2K (1440p) and 4K (2160p)** downloader
- YouTube to **MP3** and **M4A** audio converter
- YouTube **Shorts** downloader
- Direct `download_url` that needs no API key - hand it straight to your users

### Why use it?

- **Fast and stable** - runs on the same infrastructure as [fastsaver.io](https://fastsaver.io) and [@fastsaver_bot](https://t.me/fastsaver_bot), serving **millions of requests a day**. When a platform changes, it gets fixed here first.
- **No proxies, cookies or logins** - blocks and bot checks are our problem, not yours.
- **Bulk** - paste hundreds of links, processed in parallel.
- **Cheap and predictable** - pay only for successful results. Failed links are free.
- **Developer-friendly** - clean JSON, same shape for every platform, ready for the Apify API, webhooks, Make, Zapier and n8n.

### Use cases

- Download YouTube videos for offline viewing, editing and content repurposing
- Convert YouTube to MP3 for podcasts, music apps and Telegram bots
- Build a YouTube downloader site, app or bot without fighting YouTube blocks yourself
- Collect YouTube videos as training data or for AI transcription and summarization

### How to use it

1. Click **Try for free**.
2. Paste your links into the input.
3. Click **Start** and wait a few seconds.
4. Download results as **JSON, CSV, Excel** or get them through the **Apify API**.

### Input

```json
{
  "urls": [
    "https://www.youtube.com/watch?v=6dG1WWjew8s",
    "https://youtu.be/HanBb8FonWs",
    "https://www.youtube.com/shorts/xxxxxxxxxxx"
  ],
  "format": "1080p"
}
```

### Output

```json
{
  "inputUrl": "https://www.youtube.com/watch?v=6dG1WWjew8s",
  "platform": "youtube",
  "format": "2160p",
  "ok": true,
  "video_id": "6dG1WWjew8s",
  "duration": 577,
  "filename": "THE POWER OF TESTOSTERONE - LITVINOV FIT (2160p, av1, youtube).mp4",
  "download_url": "https://api.fastsaver.io/v1/tunnel?id=UJLUoLGd1m2t1ScSTW1Lw...",
  "thumbnails": {
    "low": "https://i.ytimg.com/vi/6dG1WWjew8s/mqdefault.jpg",
    "max": "https://i.ytimg.com/vi/6dG1WWjew8s/maxresdefault.jpg"
  },
  "url": "https://www.youtube.com/watch?v=6dG1WWjew8s"
}
```

`download_url` stays valid for **10 minutes** and redirects to the file, so a browser, `curl -L` or a download manager can follow it. Need sizes before choosing a quality? Use **YouTube Video Info Scraper**.

Failed links do not stop the run - they appear as `{ "ok": false, "inputUrl": "...", "error": "..." }` and are **not billed**.

### Pricing

Pay per result. You only pay for successful results.

| Result | Price per 1,000 |
|---|---|
| YouTube download (up to 1080p or audio) | $0.99 |
| YouTube download in 2K / 4K | $1.65 |

Plus $0.00005 per run start. Apify's free plan includes $5 of monthly credit, enough for tens of thousands of results.

### Use it as an API

Run the actor and get results in one HTTP call:

```bash
curl -X POST "https://api.apify.com/v2/acts/coder2077~youtube-video-downloader/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"urls":["https://www.youtube.com/watch?v=6dG1WWjew8s","https://youtu.be/HanBb8FonWs","https://www.youtube.com/shorts/xxxxxxxxxxx"],"format":"1080p"}'
```

Works the same from Python (`apify-client`), Node.js (`apify-client`), Make, Zapier, n8n and any HTTP client.

### FAQ

#### Which qualities are supported?

144p, 240p, 360p, 480p, 720p, 1080p, 1440p (2K), 2160p (4K), and audio only as MP3 or M4A. 1440p and 2160p are billed at the 2K/4K rate.

#### Does it download YouTube Shorts?

Yes. Paste youtube.com/shorts/... links like any other video.

#### Do I need proxies or cookies?

No. Proxies, cookies and YouTube bot checks are handled on our side.

#### How long is the download link valid?

10 minutes from the run. Download the file right away or re-run the actor.

#### Is it legal to download content from social media?

The actor only accesses publicly available content. Respect copyright and each platform's terms: download content you own, have permission to use, or use under fair use. Do not redistribute other people's content without permission.

#### Something does not work?

Open an issue in the **Issues** tab with the link that failed - we usually fix it the same day.

### More downloaders by the same developer

- [Instagram Downloader - Reels, Video, Photo & Stories](https://apify.com/coder2077/instagram-downloader)
- [TikTok Downloader - No Watermark Video & Music](https://apify.com/coder2077/tiktok-downloader)
- [YouTube Search Scraper - Videos by Keyword](https://apify.com/coder2077/youtube-search-scraper)
- [YouTube Video Info Scraper - Formats, Sizes & Metadata](https://apify.com/coder2077/youtube-video-info)
- [Pinterest, Facebook & X (Twitter) Video Downloader](https://apify.com/coder2077/pinterest-facebook-x-downloader)
- [All-in-One Social Media Downloader - Instagram, TikTok, YouTube](https://apify.com/coder2077/social-media-downloader)

Need a plain REST API instead? See [FastSaverAPI](https://api.fastsaver.io).

# Actor input Schema

## `urls` (type: `array`):

Links to YouTube videos or Shorts (youtube.com/watch?v=..., youtu.be/..., youtube.com/shorts/...).

## `format` (type: `string`):

Video quality from 144p to 2160p (4K), or audio only (MP3 / M4A). 1440p and 2160p are billed as 2K/4K downloads.

## Actor input object example

```json
{
  "urls": [
    "https://www.youtube.com/watch?v=HanBb8FonWs"
  ],
  "format": "720p"
}
```

# Actor output Schema

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

All results as a dataset (JSON, CSV, Excel).

# 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 = {
    "urls": [
        "https://www.youtube.com/watch?v=HanBb8FonWs"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("coder2077/youtube-video-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 = { "urls": ["https://www.youtube.com/watch?v=HanBb8FonWs"] }

# Run the Actor and wait for it to finish
run = client.actor("coder2077/youtube-video-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 '{
  "urls": [
    "https://www.youtube.com/watch?v=HanBb8FonWs"
  ]
}' |
apify call coder2077/youtube-video-downloader --silent --output-dataset

```

## MCP server setup

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