# YouTube Video & Audio Downloader - Reliable (`vidkraken/youtube-video-audio-downloader-reliable`) Actor

YouTube video & audio downloader that's actually reliable. 99.98% success rate in the last 30 days.

- **URL**: https://apify.com/vidkraken/youtube-video-audio-downloader-reliable.md
- **Developed by:** [VidKraken](https://apify.com/vidkraken) (community)
- **Features:** Limited permissions
- **Stats:** 81 total users, 35 monthly users, 99.4% runs succeeded, 2 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $4.00 / 1,000 1 mb video 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 Video & Audio Downloader - Reliable

Fast, reliable YouTube video and audio downloads with **direct download URLs that work from anywhere** — not Google URLs that break on servers.

Download in any format — **1080p (Full HD)** to **audio only**.

**Run this Actor → poll `pollUrl` → fetch the direct `downloadUrl`.** Media is delivered via VidKraken direct links, not Google URLs that fail from Apify / datacenters.

📈 **99.99% of downloads succeeded over the last 30 days** (2.5M+ downloads on the Vid Kraken API) — [live track record](https://vidkraken.com/reliability)

> Apify's run stats for this Actor show a lower number because a run fails whenever the request is rejected up front: an invalid URL, a deleted or private video, or a live stream that's still running. Those runs aren't charged.

***

### 🤨 How are we different

#### ⚠️ Typical YouTube download Actors on the Store

- ‼️ **Google links** that fail from servers / datacenters ❌
- ‼️ **Silent / video-only** muxes unless you pick a bad quality 🔇
- ‼️ **Sync timeouts** on long videos ⏳
- ‼️ **Your infra gets banned** when extractors run on your side 🚫
- ‼️ **Opaque compute quotas** that don’t match real bandwidth 💸

#### 🚀 This Actor (VidKraken on Apify)

- ✅ **Direct download URLs that work from anywhere** (`proxy.vidkraken.com`) 🔥
- ✅ **Audio always on** for video formats (or pick `audio`) 🔊
- ✅ **No VidKraken API key** for Store users 🔒
- ✅ **99.99% success rate** with a public 30-day track record 📈

***

### 💰 Over 90% cheaper on vidkraken.com direct

This Store Actor costs **$0.004 / MB ($4 / GB)** (PPE `BandwidthMB`), plus Apify platform usage.

Buyers can get **over 90% cheaper** pricing by using VidKraken **directly** at [vidkraken.com](https://vidkraken.com) — typically **~$0.15–$0.25 / GB** on published plans (custom volume can go lower).

**Easy 1-line migration:** same request/response JSON shapes as the direct API — only auth/headers change (Apify Actor input/output mirrors `POST /download` + job status).

| | 🛒 Apify Store (this Actor) | 🏠 Direct [vidkraken.com](https://vidkraken.com) |
|--|-----------------------------|----------------------------------|
| Price story | **$4 / GB** + Apify platform usage | About **~$0.15–$0.25 / GB** on published plans |
| Metering | Upper-end **estimate** (`BandwidthMB` PPE) | **Actual** completed file size |
| Auth | Apify account / Actor run | VidKraken API key |
| Status | Absolute **`pollUrl`** from Actor output (no key) | `pollUrl` or authenticated job status |

Live reliability: **99.99% of downloads over 30 days** — [vidkraken.com/reliability](https://vidkraken.com/reliability)

***

### 🏆 Formats

| Format | Type | Resolution | Use case |
|--------|------|------------|----------|
| `1080` | Video | 1920×1080 | Pro / presentations |
| `720` | Video | 1280×720 | Web / social |
| `480` | Video | 854×480 | General web |
| `360` | Video | 640×360 | Mobile / low bandwidth |
| `audio` | Audio | N/A | Podcasts, music, voice |

***

### 🚀 How to use

**Same flow as Rapid/Zyla:** run the Actor → poll `pollUrl` → fetch `downloadUrl`.\
Or include `webhookUrl` and still keep `pollUrl` as backup.

#### 1️⃣ Run the Actor

```json
{ "url": "https://youtu.be/dQw4w9WgXcQ", "format": "audio" }
```

Optional fields: `startTime`, `endTime`, `language`, `webhookUrl`.

Response (job enqueued):

```json
{
  "jobId": "69cfc45e8a3b4d2f9c1e0a7b",
  "title": "Rick Astley - Never Gonna Give You Up",
  "duration": 213,
  "status": "IN_QUEUE",
  "pollUrl": "https://vidkraken.com/api/v2/poll/xYzAbC_examplePollToken_32bytes",
  "estimatedBandwidthMb": 20
}
```

#### 2️⃣ Poll `pollUrl` (no auth keys)

```json
{
  "jobId": "69cfc45e8a3b4d2f9c1e0a7b",
  "status": "COMPLETED",
  "format": "audio",
  "downloadUrl": "https://proxy.vidkraken.com/downloads/.../audio.m4a",
  "fileSize": 3407872
}
```

#### 3️⃣ Download from `downloadUrl`

When status is `COMPLETED`, fetch the file from `downloadUrl`. Direct download URLs **work from anywhere** and expire about **12 hours** after completion.

#### Optional webhook

Include `webhookUrl` in input. Return **HTTP 2xx** quickly when VidKraken POSTs the final status. You can still poll `pollUrl`.

***

### 📐 How we estimate BandwidthMB

This Actor charges an **upper-end size estimate** via Apify PPE event `BandwidthMB` (not the final file size).

| Format | MB / minute |
|--------|-------------|
| `1080` | 18 |
| `720` | 8 |
| `480` | 5.5 |
| `360` | 3.5 |
| `audio` | 1.5 |

```text
BandwidthMB = ceil(minutes × rate)
```

- Clip length uses `startTime` / `endTime` when set
- Failed / invalid runs are **not** billed for `BandwidthMB`

Direct [vidkraken.com](https://vidkraken.com) bills **actual MB** instead — see the section about savings above.

***

### 💵 Pricing

PPE event **`BandwidthMB`** at **$0.004 / MB** ($4 / GB), plus Apify platform usage. Dataset-item pricing is off for this Actor.

For the $4 / GB vs ~$0.15–$0.25 / GB comparison, see the section about savings above.

***

### ❓ FAQ

**Q: Do I need a VidKraken API key?**\
A: No. Run the Actor from your Apify account.

**Q: How do I check job status?**\
A: `GET` the absolute **`pollUrl`** from the Actor output. No Apify key and no VidKraken key.

**Q: Are failed downloads charged?**\
A: No. Only a successful enqueue bills `BandwidthMB`.

**Q: How long does `downloadUrl` last?**\
A: About **12 hours**. The direct download URL works from anywhere while it is valid.

**Q: What formats are supported?**\
A: `1080`, `720`, `480`, `360`, and `audio`.

**Q: Why is direct VidKraken cheaper?**\
A: See the section about savings above ($4 / GB here vs ~$0.15–$0.25 / GB on published direct plans).

***

### 🔒 Acceptable use

You must have the rights to download and use the content you request. See [vidkraken.com/terms](https://vidkraken.com/terms).

# Actor input Schema

## `url` (type: `string`):

YouTube video URL (youtube.com/watch, youtu.be, youtube.com/live, …).

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

Requested output format. Defaults to audio server-side if omitted.

## `startTime` (type: `integer`):

Optional clip start time in seconds. Affects BandwidthMB estimate.

## `endTime` (type: `integer`):

Optional clip end time in seconds. Affects BandwidthMB estimate.

## `language` (type: `string`):

Optional BCP-47 language tag (e.g. en, es) for audio track preference.

## `webhookUrl` (type: `string`):

Optional HTTPS URL. VidKraken POSTs the final job status (same shape as poll) when COMPLETED or FAILED. Marketplace buyers typically do not verify signatures.

## Actor input object example

```json
{
  "url": "https://youtu.be/dQw4w9WgXcQ",
  "format": "audio",
  "language": "en",
  "webhookUrl": "https://example.com/hooks/vidkraken"
}
```

# Actor output Schema

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

Dataset items with jobId, pollUrl, estimatedBandwidthMb, chargedBandwidthMb, status, title, and related fields.

## `OUTPUT` (type: `string`):

Key-value store record with the same enqueue response as the latest successful (or error) run output.

# 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 = {
    "url": "https://youtu.be/dQw4w9WgXcQ",
    "format": "audio"
};

// Run the Actor and wait for it to finish
const run = await client.actor("vidkraken/youtube-video-audio-downloader-reliable").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 = {
    "url": "https://youtu.be/dQw4w9WgXcQ",
    "format": "audio",
}

# Run the Actor and wait for it to finish
run = client.actor("vidkraken/youtube-video-audio-downloader-reliable").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 '{
  "url": "https://youtu.be/dQw4w9WgXcQ",
  "format": "audio"
}' |
apify call vidkraken/youtube-video-audio-downloader-reliable --silent --output-dataset

```

## MCP server setup

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

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/pFtDSwt5YOtOpfBet/builds/BaHup2FCbD8G9fS8k/openapi.json
