PHPackages                             mail2bapi/youtube-downloader - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. mail2bapi/youtube-downloader

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

mail2bapi/youtube-downloader
============================

PHP library for downloading YouTube videos

0.1.1(5y ago)073MITPHPPHP ^7.2

Since Oct 8Pushed 5y ago2 watchersCompare

[ Source](https://github.com/mail2bapi/YouTubeDownloader)[ Packagist](https://packagist.org/packages/mail2bapi/youtube-downloader)[ Docs](https://github.com/mail2bapi/YouTubeDownloader/tree/main)[ RSS](/packages/mail2bapi-youtube-downloader/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

YouTubeDownloader
=================

[](#youtubedownloader)

A PHP library for downloading videos from YouTube without API key.

Requirements
------------

[](#requirements)

- PHP 7.2 or higher

Installation
------------

[](#installation)

Run in console below command to download package to your project:

```
composer mail2bapi/youtube-downloader

```

Usage
-----

[](#usage)

```
use Mail2bapi\YouTubeDownloader\YoutubeDownloader;

// Yourtube URL
$yourtubeVideoUrl = '';

// New YoutubeDownloader instance
$yt = new YoutubeDownloader();

// Enabling logging
$yt->setLogging(true);

// Setting location for saving videos and thumbnails. By default is saves in directory 'videos/'
$yt->setDownloadFolder('');

// Collect Video ID from URL
$videoId = $yt->getVideoId($yourtubeVideoUrl);

// Get Video details of a Yourtube video
$videos = $yt->getVideoDetail($yourtubeVideoUrl);

// $videos array have following keys
// 'video_id', 'channel_id', 'duration', 'title', 'description', 'keywords', 'average_rating', 'allow_ratings', 'view_count', 'author', 'video', 'embed_video', 'adaptive_formats', 'formats', 'thumbnails'

// Get array of all video qualities
$videoQualities = $yt->getVideoQualities();

// Download all Thumbnail images
$yt->downloadThumbnails($videos);

// Download all videos as per video qualities available for the video
$yt->downloadVideo();

// Download single videos as per video qualities available for the video
$yt->downloadAVideo($videos['formats']['360p']['link'], $videos['video_id'], $videoQualities[0]);
```

Enjoyed using the library. Please help to improve it by report issues and suggesting improvements. Thank you!

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2042d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5ef7ff9543318e69f75384620af8fb54c47b1e724d8bb8e001d28078cfc039cb?d=identicon)[mail2bapi](/maintainers/mail2bapi)

---

Top Contributors

[![mail2bapi](https://avatars.githubusercontent.com/u/16784969?v=4)](https://github.com/mail2bapi "mail2bapi (12 commits)")

---

Tags

youtubeyoutube downloadermail2bapi

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mail2bapi-youtube-downloader/health.svg)

```
[![Health](https://phpackages.com/badges/mail2bapi-youtube-downloader/health.svg)](https://phpackages.com/packages/mail2bapi-youtube-downloader)
```

###  Alternatives

[hashids/hashids

Generate short, unique, non-sequential ids (like YouTube and Bitly) from numbers

5.5k48.6M278](/packages/hashids-hashids)[athlon1600/youtube-downloader

PHP powered alternative for youtube-dl

922160.2k9](/packages/athlon1600-youtube-downloader)[norkunas/youtube-dl-php

youtube-dl / yt-dlp wrapper for php

512323.2k15](/packages/norkunas-youtube-dl-php)[aalaap/faker-youtube

Faker provider for generating fake YouTube video URLs

2288.6k](/packages/aalaap-faker-youtube)[light/hashids

Hashids for Yii2

1120.2k](/packages/light-hashids)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
