YouTube Video Downloader - Videos, Audio and Metadata
Pricing
from $9.00 / 1,000 media file saveds
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
Maintained by CommunityActor stats
0
Bookmarked
72
Total users
19
Monthly active users
9 days ago
Last modified
Categories
Features
Share
YouTube Video Downloader — save videos, audio and details with a download link
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 get | Details |
|---|---|
| Media file | MP4 or WebM up to 4K, or M4A / MP3 audio, saved to run storage with downloadUrl |
| Video details | Title, 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 status | Each row says success, skipped or failed with the reason. A run where nothing could be saved ends as failed, never green |
| Speed | Three 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
agentSummaryfor AI agents.
Pricing
Pay per event, plus Apify platform usage billed to your account. See the Pricing tab for the live source of truth.
| Event | When it is charged | Price (Free plan) | Price (Gold plan) |
|---|---|---|---|
| Actor start | Once per run | $0.00005 | $0.00005 |
| Media file saved | Per video or audio file saved | $0.012 | $0.009 |
| Metadata only | Per 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
| Field | Default | What it does |
|---|---|---|
videoUrls | one sample link | YouTube links: watch, youtu.be, Shorts, embed, or a playlist link |
downloadMode | video | video, audio or metadataOnly |
videoQuality | 720p | Highest picture height: 360p up to 2160p (4K) or best |
preferredContainer | mp4 | mp4, webm or any |
audioFormat | m4a | m4a, mp3 or best (original audio) |
maxDurationMinutes | 60 | Skip longer videos (1–720) |
maxFileSizeMb | 250 | Skip bigger files (1–1000) |
includeSubtitles / subtitleLanguages | off / en | Free SRT subtitles, up to 5 languages |
maxPlaylistVideos | 10 | Videos taken from each playlist link (1–50) |
maxConcurrency | 3 | Videos processed at the same time (1–5) |
includeMetadataJson | on | Also save the full detail file with a link |
cookiesTxt | empty | Your own cookies for videos that need your sign-in |
proxyOnlyWhenBlocked | on | Direct first, proxy only if blocked |
tryDatacenterProxy | on | One low-cost proxy try before the residential proxy |
proxyConfiguration | residential | Proxy used when direct is blocked |
maxProxyFileSizeMb | 150 | Lower 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.
| Field | Meaning |
|---|---|
status | success, skipped or failed |
error | Plain reason for skipped or failed, for example video_too_long, file_too_large, live_stream, invalid_url |
downloadUrl | Direct link to the saved file |
fileKey, fileName, fileExtension, fileSizeBytes, contentType | Saved file details |
title, description, channel, channelUrl, channelFollowerCount | Video and channel |
durationSeconds, viewCount, likeCount, commentCount, uploadDate | Counts and date |
categories, tags, language, thumbnail, isLive | More details |
width, height, fps, resolution, videoCodec, audioCodec, maxAvailableHeight | Picture and sound of the saved file, and the best quality offered |
subtitleFiles | List of { language, key, downloadUrl } |
metadataKey, metadataUrl | Full detail JSON file |
route | Connection 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) andmaxDurationMinuteswhen 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.
Related Actors
- YouTube to MP3 Downloader for audio-only jobs.
- Video Subtitle Extractor and YouTube AI Transcript Extractor for text.
- All-in-One Media Downloader for other sites.
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.