PHPackages                             alchemyguy/youtube-laravel-api - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. alchemyguy/youtube-laravel-api

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

alchemyguy/youtube-laravel-api
==============================

Modern Laravel wrapper for the YouTube Data API v3 with OAuth, live streaming, channels, and video uploads.

v2.0.0(2mo ago)637.3k↓77.8%29[2 issues](https://github.com/alchemyguy/YoutubeLaravelApi/issues)[7 PRs](https://github.com/alchemyguy/YoutubeLaravelApi/pulls)MITPHPPHP ^8.3CI failing

Since Feb 19Pushed 1w ago1 watchersCompare

[ Source](https://github.com/alchemyguy/YoutubeLaravelApi)[ Packagist](https://packagist.org/packages/alchemyguy/youtube-laravel-api)[ Docs](https://github.com/alchemyguy/YoutubeLaravelApi)[ RSS](/packages/alchemyguy-youtube-laravel-api/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (3)Dependencies (15)Versions (28)Used By (0)

YoutubeLaravelApi
=================

[](#youtubelaravelapi)

[![Tests](https://github.com/alchemyguy/YoutubeLaravelApi/actions/workflows/tests.yml/badge.svg)](https://github.com/alchemyguy/YoutubeLaravelApi/actions/workflows/tests.yml)[![Static analysis](https://github.com/alchemyguy/YoutubeLaravelApi/actions/workflows/static-analysis.yml/badge.svg)](https://github.com/alchemyguy/YoutubeLaravelApi/actions/workflows/static-analysis.yml)[![Latest version](https://camo.githubusercontent.com/a27f0b31898ada5dd8ba9130fd59235c875a8110198f9709dc00bdc648c8c5a8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616c6368656d796775792f796f75747562652d6c61726176656c2d6170692e737667)](https://packagist.org/packages/alchemyguy/youtube-laravel-api)[![License](https://camo.githubusercontent.com/efe9eaab6db7d5e0597958fed5490c32ab8e286938339536ca161ffdf7cbe914/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f616c6368656d796775792f796f75747562652d6c61726176656c2d6170692e737667)](LICENSE)

Modern Laravel wrapper for the YouTube Data API v3 with OAuth, live broadcast control, channel management, and resumable video uploads.

**Documentation:**

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

[](#requirements)

- PHP 8.3 or higher
- Laravel 11.x or 12.x

Install
-------

[](#install)

```
composer require alchemyguy/youtube-laravel-api
php artisan vendor:publish --tag=youtube-config
```

Add credentials to your `.env`:

```
YOUTUBE_APP_NAME="My App"
YOUTUBE_CLIENT_ID="your-client-id.apps.googleusercontent.com"
YOUTUBE_CLIENT_SECRET="your-client-secret"
YOUTUBE_API_KEY="your-server-api-key"
YOUTUBE_REDIRECT_URL="https://yourapp.test/oauth/youtube/callback"
```

Quick example
-------------

[](#quick-example)

```
use Alchemyguy\YoutubeLaravelApi\Services\AuthenticateService;
use Alchemyguy\YoutubeLaravelApi\Services\LiveStream\LiveStreamService;
use Alchemyguy\YoutubeLaravelApi\DTOs\BroadcastData;

// 1. OAuth
$auth = app(AuthenticateService::class);
$url = $auth->getLoginUrl('creator@example.com', 'channel-id');
// ... redirect, handle callback ...
$result = $auth->authenticateWithCode($code);

// 2. Schedule a live broadcast
$live = app(LiveStreamService::class);
$broadcast = $live->broadcast($result['token'], new BroadcastData(
    title: 'My Stream',
    description: 'Live coding',
    scheduledStartTime: new DateTimeImmutable('+10 minutes'),
));
```

Documentation
-------------

[](#documentation)

The full guide, API reference, and examples live at **[alchemyguy.github.io/YoutubeLaravelApi](https://alchemyguy.github.io/YoutubeLaravelApi/)**.

- [Installation](https://alchemyguy.github.io/YoutubeLaravelApi/guide/installation)
- [Authentication](https://alchemyguy.github.io/YoutubeLaravelApi/guide/authentication)
- [Live streaming](https://alchemyguy.github.io/YoutubeLaravelApi/guide/live-streaming)
- [Channels](https://alchemyguy.github.io/YoutubeLaravelApi/guide/channels)
- [Videos](https://alchemyguy.github.io/YoutubeLaravelApi/guide/videos)
- [Error handling](https://alchemyguy.github.io/YoutubeLaravelApi/guide/error-handling)
- [Upgrading from 1.x](https://alchemyguy.github.io/YoutubeLaravelApi/upgrading/from-1.x)

Upgrading from 1.x
------------------

[](#upgrading-from-1x)

If you're on the previous version, see [UPGRADE.md](UPGRADE.md) — there are several breaking changes.

Contributing
------------

[](#contributing)

Contributions welcome — see [CONTRIBUTING.md](CONTRIBUTING.md). Please run `composer lint` and `composer test:unit` before opening a PR.

Security
--------

[](#security)

If you discover a security vulnerability, please email the maintainer directly rather than opening an issue.

License
-------

[](#license)

The MIT License (MIT). See [LICENSE](LICENSE) for details.

Credits
-------

[](#credits)

- Created by [Mukesh Chandra](https://github.com/alchemyguy)
- 2.0 modernization by the contributors

###  Health Score

63

—

FairBetter than 99% of packages

Maintenance93

Actively maintained with recent releases

Popularity37

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity88

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 99.1% 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

Every ~374 days

Recently: every ~744 days

Total

9

Last Release

63d ago

Major Versions

v0.0.3 → 1.0.02018-03-06

v1.0.3 → v2.0.02026-05-02

PHP version history (2 changes)v0.0.1PHP ~5.6|~7.0

v2.0.0PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/0ba2c32cd67ab832310f8f614e81a898db22369aaa79cbe3e500e48b1abf21a4?d=identicon)[alchemyguy](/maintainers/alchemyguy)

---

Top Contributors

[![alchemyguy](https://avatars.githubusercontent.com/u/23092928?v=4)](https://github.com/alchemyguy "alchemyguy (106 commits)")[![cucu](https://avatars.githubusercontent.com/u/11752?v=4)](https://github.com/cucu "cucu (1 commits)")

---

Tags

youtubeyoutube-api-v3youtube-channelyoutube-livestreamyoutube-searchyoutube-videolaravelyoutubeoauthgoogle apilive-streamingAlchemyGuyYoutube LiveStreamYoutube VideoYoutube Api

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/alchemyguy-youtube-laravel-api/health.svg)

```
[![Health](https://phpackages.com/badges/alchemyguy-youtube-laravel-api/health.svg)](https://phpackages.com/packages/alchemyguy-youtube-laravel-api)
```

###  Alternatives

[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.2k95.4M306](/packages/laravel-horizon)[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.6k29.9M147](/packages/laravel-cashier)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k15.1M132](/packages/laravel-pulse)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[php-open-source-saver/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

84611.1M64](/packages/php-open-source-saver-jwt-auth)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M200](/packages/laravel-ai)

PHPackages © 2026

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