YouTube Video Downloader - Videos, Audio and Metadata avatar

YouTube Video Downloader - Videos, Audio and Metadata

Pricing

from $9.00 / 1,000 media file saveds

Go to Apify Store
YouTube Video Downloader - Videos, Audio and Metadata

YouTube Video Downloader - Videos, Audio and Metadata

Download permitted YouTube videos or audio to Apify key-value storage from one or more URLs. Duration and file-size caps keep runs bounded, and each row returns metadata plus storage keys.

Pricing

from $9.00 / 1,000 media file saveds

Rating

0.0

(0)

Developer

Khadin Akbar

Khadin Akbar

Maintained by Community

Actor stats

0

Bookmarked

72

Total users

19

Monthly active users

9 days ago

Last modified

Features

Limited permissions

Share

Give this Actor YouTube links. For each one you get a saved video (up to 4K), an audio file (M4A or MP3), or just the video details, plus a direct download link and optional free subtitles. You pay only for files that were actually saved. A video that is too long, too large, live, private or blocked is reported with a plain reason and is not charged.

You getDetails
Media fileMP4 or WebM up to 4K, or M4A / MP3 audio, saved to run storage with downloadUrl
Video detailsTitle, channel, subscribers, views, likes, comments, description, tags, category, language, tallest quality available
Subtitles (free)SRT files in the languages you pick, including automatic captions, with links
Honest statusEach row says success, skipped or failed with the reason. A run where nothing could be saved ends as failed, never green
SpeedThree videos at once, one page read per video, direct connection first (proxy only when YouTube blocks)

Use it only for videos you own or have permission to download.

What's new

  • Honest run status: if nothing is saved the run now ends Failed and nothing is charged.
  • One page read per video instead of two, and three videos processed in parallel.
  • Direct connection first. The proxy is used only when YouTube blocks the request, so large HD and 4K files do not burn proxy traffic.
  • New fields: downloadUrl, description, likeCount, commentCount, channelFollowerCount, tags, categories, language, maxAvailableHeight, route.
  • Free subtitles, playlist links (capped), and a plain-words agentSummary for AI agents.

Pricing

Pay per event, plus Apify platform usage billed to your account. See the Pricing tab for the live source of truth.

EventWhen it is chargedPrice (Free plan)Price (Gold plan)
Actor startOnce per run$0.00005$0.00005
Media file savedPer video or audio file saved$0.012$0.009
Metadata onlyPer link read in metadata-only mode$0.003$0.002

Bronze and Silver plans sit in between. Example: five 720p videos on the Free plan = 5 × $0.012 + $0.00005 = $0.06005, plus platform usage of roughly $0.002 per video on a direct connection ($0.005 to $0.02 when YouTube blocks direct and a proxy is used). Skipped and failed videos cost nothing.

Input

FieldDefaultWhat it does
videoUrlsone sample linkYouTube links: watch, youtu.be, Shorts, embed, or a playlist link
downloadModevideovideo, audio or metadataOnly
videoQuality720pHighest picture height: 360p up to 2160p (4K) or best
preferredContainermp4mp4, webm or any
audioFormatm4am4a, mp3 or best (original audio)
maxDurationMinutes60Skip longer videos (1–720)
maxFileSizeMb250Skip bigger files (1–1000)
includeSubtitles / subtitleLanguagesoff / enFree SRT subtitles, up to 5 languages
maxPlaylistVideos10Videos taken from each playlist link (1–50)
maxConcurrency3Videos processed at the same time (1–5)
includeMetadataJsononAlso save the full detail file with a link
cookiesTxtemptyYour own cookies for videos that need your sign-in
proxyOnlyWhenBlockedonDirect first, proxy only if blocked
tryDatacenterProxyonOne low-cost proxy try before the residential proxy
proxyConfigurationresidentialProxy used when direct is blocked
maxProxyFileSizeMb150Lower size cap for files fetched through a proxy (proxy traffic is billed as usage, residential about $8 per GB)
{
"videoUrls": [{ "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ" }],
"downloadMode": "video",
"videoQuality": "1080p",
"includeSubtitles": true,
"subtitleLanguages": ["en"]
}

Output

One dataset row per video.

FieldMeaning
statussuccess, skipped or failed
errorPlain reason for skipped or failed, for example video_too_long, file_too_large, live_stream, invalid_url
downloadUrlDirect link to the saved file
fileKey, fileName, fileExtension, fileSizeBytes, contentTypeSaved file details
title, description, channel, channelUrl, channelFollowerCountVideo and channel
durationSeconds, viewCount, likeCount, commentCount, uploadDateCounts and date
categories, tags, language, thumbnail, isLiveMore details
width, height, fps, resolution, videoCodec, audioCodec, maxAvailableHeightPicture and sound of the saved file, and the best quality offered
subtitleFilesList of { language, key, downloadUrl }
metadataKey, metadataUrlFull detail JSON file
routeConnection used: direct, datacenter or residential
{
"videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"videoId": "dQw4w9WgXcQ",
"title": "Example video",
"channel": "Example Channel",
"durationSeconds": 213,
"maxAvailableHeight": 1080,
"resolution": "720p",
"fileExtension": "mp4",
"fileSizeBytes": 12345678,
"downloadUrl": "https://api.apify.com/v2/key-value-stores/STORE_ID/records/video-dqw4w9wgxcq-example-video.mp4",
"subtitleFiles": [],
"route": "direct",
"status": "success",
"error": null
}

The run also writes OUTPUT and RUN_SUMMARY to the key-value store with counts (saved, skipped, failed, charged), the connection routes used, and an agentSummary sentence.

Use with AI agents (MCP)

Actor: khadinakbar/youtube-video-downloader. Use it when the user already has specific YouTube links and wants a saved video, an audio file, or just details. Start with downloadMode: "metadataOnly" to check length and available quality cheaply, then run again in video or audio mode. Read the dataset first: status, error and downloadUrl tell you what happened for each link. Read agentSummary in OUTPUT for a one-line result.

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('khadinakbar/youtube-video-downloader').call({
videoUrls: [{ url: 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' }],
downloadMode: 'audio', audioFormat: 'mp3',
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items[0].status, items[0].downloadUrl);

Good to know

  • Public videos work without any sign-in. Age-restricted or members-only videos need your own cookiesTxt.
  • Live streams and premieres are skipped. Very long or very large videos are skipped by your caps, before you are charged.
  • Large 4K files can be several hundred MB. Raise maxFileSizeMb (up to 1000) and maxDurationMinutes when you need them.
  • A run only counts as successful when at least one file or detail row was produced.

FAQ

Which links work? watch, youtu.be, Shorts, embed, and playlist links (first videos only, set by maxPlaylistVideos).

Where are my files? In the run's key-value store. Use downloadUrl from each row.

Am I charged for failed videos? No. Only success rows are charged.

Can I get subtitles without the video? Yes: use metadataOnly with includeSubtitles. You pay the metadata price; the subtitles are free.

Can I download channels or search results? No. Give links. To list a channel's videos first, use YouTube Channel Videos Scraper.

Responsible use

Use this Actor for videos you own, videos you have permission to copy, or videos you are otherwise legally allowed to download. Review the applicable YouTube terms, copyright rules and privacy requirements before running it.