YouTube Downloader avatar
YouTube Downloader

Pricing

Pay per event

Go to Store
YouTube Downloader

YouTube Downloader

Developed by

YouTube Masters

YouTube Masters

Maintained by Community

Download YouTube videos in multiple formats (144p-8K) and extract audio (MP3, FLAC, WAV, etc). Features include custom quality settings, segment downloads with start/end times, and progress tracking. Supports videos up to 120 minutes with extended duration options.

5.0 (1)

Pricing

Pay per event

1

Total users

2

Monthly users

2

Runs succeeded

>99%

Last modified

3 days ago

This Apify Actor allows you to download YouTube videos and audio in various formats and qualities.

Features

  • Download videos in multiple resolutions (144p to 8K)
  • Extract audio in various formats (MP3, M4A, FLAC, WAV, etc.)
  • Download specific segments of videos using start/end times
  • Extended duration support for long videos (Premium feature)
  • Batch processing capabilities

Input Parameters

Required Parameters

  • targetUrl (string): The YouTube video URL you want to download
  • format (string): The desired output format (see format options below)

Optional Parameters

  • add_info (boolean): Include additional metadata like title and thumbnail in the response
  • audio_quality (integer): Audio bitrate in kbps (e.g., 128, 192, 320). Default: 128
  • no_merge (boolean): If enabled, audio and video streams won't be merged (you'll get a zip file with separate files)
  • start_time (integer): Start time in seconds for partial downloads
  • end_time (integer): End time in seconds for partial downloads

Format Options

Audio Formats

  • mp3 - MP3 format (up to 120 minutes)
  • m4a - M4A format (up to 120 minutes)
  • webm_audio - WebM Audio (up to 120 minutes)
  • aac - AAC format (up to 120 minutes)
  • flac - FLAC lossless (up to 120 minutes)
  • opus - Opus format (up to 120 minutes)
  • ogg - OGG Vorbis (up to 120 minutes)
  • wav - WAV format (up to 120 minutes)
  • mp2 - MP2 format (up to 120 minutes)

Video Formats

  • 144 - 144p video (up to 120 minutes)
  • 240 - 240p video (up to 120 minutes)
  • 360 - 360p video (up to 120 minutes)
  • 480 - 480p video (up to 120 minutes)
  • 720 - 720p HD video (up to 120 minutes)
  • 1080 - 1080p Full HD video (up to 90 minutes)
  • 1440 - 1440p video (up to 60 minutes)
  • 4k - 4K video (up to 15 minutes)
  • 8k - 8K video (up to 15 minutes)

Duration Limits

Each format has a base duration limit. If you require higher limits please reach out to us.

  • Most formats: 120 minutes
  • 1080p: 90 minutes
  • 1440p: 60 minutes
  • 4K/8K: 15 minutes

Output

The actor returns a JSON object containing:

  • responseData: The download response, including:
    • success: Boolean indicating if the download was successful
    • id: Unique identifier for the download
    • content: Base64 encoded HTML content
    • info: Object with video metadata (when add_info is enabled)
      • image: Thumbnail URL
      • title: Video title

Progress Tracking

The download response includes an id field that can be used to track the download progress. You can check the status of your download using the progress endpoint:

Progress API URL: https://p.oceansaver.in/ajax/progress?id=YOUR_JOB_ID

Progress Response Fields

  • success: Indicates if the operation was successful (1 for success, 0 for failure)
  • progress: Download progress as a number from 0 to 1000 (where 1000 = 100% complete)
  • download_url: The direct URL to download the file (available when download is complete)
  • text: Current status of the download in text format (e.g., "Processing", "Finished")
  • message: Additional information or messages about the download

Example Progress Response

{
"success": 1,
"progress": 1000,
"download_url": "https://shane45.oceansaver.in/pacific/?riPnIjzRoXKtgjjksZmlvBQ",
"text": "Finished",
"message": "Download completed successfully"
}

Using the Progress API

  1. After initiating a download, extract the id from the response
  2. Use the ID to poll the progress endpoint
  3. When progress reaches 1000, the download is complete
  4. Use the download_url to retrieve your file

Example Usage

Basic Video Download

{
"targetUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"format": "720"
}

Audio Extraction with High Quality

{
"targetUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"format": "mp3",
"audio_quality": 320,
"add_info": true
}

Download Video Segment

{
"targetUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"format": "720",
"start_time": 60,
"end_time": 180
}

Important Notes

  • When using start_time and end_time for segment downloads, progress tracking is limited due to technical constraints
  • The no_merge option is useful when you need separate audio and video streams

Error Handling

The actor will throw an error if:

  • Required parameters (targetUrl, format) are missing

All errors are logged and saved to the dataset for debugging purposes.