# 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)
- **Categories:**
- **Stats:** 1 total users, 1 monthly users, 96.3% runs succeeded, 1 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $2.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?

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 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.98% reliability over the last 30 days** — [live track record](https://vidkraken.com/reliability)

***

### 🤨 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.98% reliability** with a public 30-day track record 📈

***

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

This Store Actor is about **~$2 / GB** (PPE `BandwidthMB`).

Buyers can get about **~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 | About **~$2 / GB** | 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.98% 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 ~90% savings above.

***

### 💵 Pricing

PPE event **`BandwidthMB`** at **$0.002 / MB** (about **~$2 / GB**). Dataset-item pricing is off for this Actor.

For the ~$2 / GB vs ~$0.15–$0.25 / GB story, see the section about ~90% 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 ~90% savings above (~$2 / 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/UMvwpa3OVs1pdwHl2/openapi.json
