PHPackages                             tambait/php-youtube-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. [API Development](/categories/api)
4. /
5. tambait/php-youtube-api

ActiveLibrary[API Development](/categories/api)

tambait/php-youtube-api
=======================

PHP wrapper for the Youtube Data API v3

v1.2.5(5y ago)0201MITPHPPHP &gt;=5.3CI failing

Since Jul 7Pushed 5y agoCompare

[ Source](https://github.com/tambait/php-youtube-api)[ Packagist](https://packagist.org/packages/tambait/php-youtube-api)[ RSS](/packages/tambait-php-youtube-api/feed)WikiDiscussions master Synced 1w ago

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

php-youtube-api
===============

[](#php-youtube-api)

[![Build Status](https://camo.githubusercontent.com/49a666772ba8d53835b255d9371aaa1150a889df75022721591344bb58d4bda2/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f6d6164636f64612f7068702d796f75747562652d6170692e706e67)](https://travis-ci.org/madcoda/php-youtube-api)

---

Note
----

[](#note)

This project was created (as detached fork) because original project [Madcoda PHP Youtube API](https://github.com/madcoda/php-youtube-api) seems to be abandoned and change in Youtube API (depreciation of invideoPromotion part) is breaking the code.

Version 1.2.5 fixes the issue.

---

Install
-------

[](#install)

Run the following command in your command line shell in your php project

```
$ composer require tambait/php-youtube-api:^1.2
```

Or you can manually edit composer.json and then run `composer update`

```
"require": {
    "tambait/php-youtube-api": "^1.2"
}

```

---

Below you can find parts of README.md file / description from the **original project**.

---

A basic PHP wrapper for the Youtube Data API v3 ( Non-OAuth ). Designed to let devs easily fetch public data (Video, Channel, Playlists info) from Youtube. No 3rd party dependancy. (except PHPUnit)

The reason of returning the decoded JSON response directly is that you only need to read the Google API doc to use this library, instead of learning my set of API again (Keep it simple).

Well...actually some parameters are missing in this library, because I don't need them at this point, if you desire a particular feature please file an issue here :)

Currently I will not consider adding OAuth endpoints. (those required "authorized request" will not be supported)

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

[](#requirements)

- PHP &gt;=5.3
- CURL extension in PHP

Getting started
---------------

[](#getting-started)

Please read the wiki on how to use this library with [PHP with composer](https://github.com/madcoda/php-youtube-api/wiki/started-with-php-composer), [Laravel 4](https://github.com/madcoda/php-youtube-api/wiki/started-with-laravel-4) and [Laravel 5](https://github.com/madcoda/php-youtube-api/wiki/started-with-laravel-5).

For the functions implemented in this library, please visit [API Reference](https://github.com/madcoda/php-youtube-api/wiki/api-reference)

### Example usage with pure PHP (with composer)

[](#example-usage-with-pure-php-with-composer)

```
require 'vendor/autoload.php';
$youtube = new Madcoda\Youtube\Youtube(array('key' => '* Your API key here *'));
$video = $youtube->getVideoInfo('rie-hPVJ7Sw');
```

### Example usage with Laravel 4/5

[](#example-usage-with-laravel-45)

```
$video = Youtube::getVideoInfo(Input::get('vid', 'dQw4w9WgXcQ');
```

Format of returned data
-----------------------

[](#format-of-returned-data)

The returnd json is decoded as PHP objects (not Array). Please read the ["Reference" section](https://developers.google.com/youtube/v3/docs/) of the Official API doc.

Youtube Data API v3
-------------------

[](#youtube-data-api-v3)

- [Youtube Data API v3 Doc](https://developers.google.com/youtube/v3/)
- [Obtain API key from Google API Console](http://code.google.com/apis/console)

License
-------

[](#license)

php-youtube-api is licensed under the [MIT License](http://opensource.org/licenses/MIT).

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 75% 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 ~286 days

Recently: every ~361 days

Total

9

Last Release

2041d ago

PHP version history (2 changes)v1.0PHP &gt;5.3

v1.2.2PHP &gt;=5.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/22012185?v=4)[Ivan](/maintainers/tambait)[@tambait](https://github.com/tambait)

---

Top Contributors

[![madcoda](https://avatars.githubusercontent.com/u/602185?v=4)](https://github.com/madcoda "madcoda (81 commits)")[![tambait](https://avatars.githubusercontent.com/u/22012185?v=4)](https://github.com/tambait "tambait (6 commits)")[![jbboehr](https://avatars.githubusercontent.com/u/225601?v=4)](https://github.com/jbboehr "jbboehr (3 commits)")[![mhor](https://avatars.githubusercontent.com/u/4103719?v=4)](https://github.com/mhor "mhor (3 commits)")[![konybakk](https://avatars.githubusercontent.com/u/2905760?v=4)](https://github.com/konybakk "konybakk (2 commits)")[![saruman](https://avatars.githubusercontent.com/u/813190?v=4)](https://github.com/saruman "saruman (2 commits)")[![jamesggordon](https://avatars.githubusercontent.com/u/650785?v=4)](https://github.com/jamesggordon "jamesggordon (2 commits)")[![WyriHaximus](https://avatars.githubusercontent.com/u/147145?v=4)](https://github.com/WyriHaximus "WyriHaximus (1 commits)")[![Hackwar](https://avatars.githubusercontent.com/u/313866?v=4)](https://github.com/Hackwar "Hackwar (1 commits)")[![z38](https://avatars.githubusercontent.com/u/3948085?v=4)](https://github.com/z38 "z38 (1 commits)")[![jk](https://avatars.githubusercontent.com/u/40043?v=4)](https://github.com/jk "jk (1 commits)")[![marvin255](https://avatars.githubusercontent.com/u/2802915?v=4)](https://github.com/marvin255 "marvin255 (1 commits)")[![peter279k](https://avatars.githubusercontent.com/u/9021747?v=4)](https://github.com/peter279k "peter279k (1 commits)")[![sidHitesh7](https://avatars.githubusercontent.com/u/3795597?v=4)](https://github.com/sidHitesh7 "sidHitesh7 (1 commits)")[![Stichoza](https://avatars.githubusercontent.com/u/1139050?v=4)](https://github.com/Stichoza "Stichoza (1 commits)")[![wlkns](https://avatars.githubusercontent.com/u/1921583?v=4)](https://github.com/wlkns "wlkns (1 commits)")

---

Tags

apivideoyoutubemadcoda

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/tambait-php-youtube-api/health.svg)

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

###  Alternatives

[madcoda/php-youtube-api

PHP wrapper for the Youtube Data API v3

4451.2M8](/packages/madcoda-php-youtube-api)[alaouy/youtube

Laravel PHP Facade/Wrapper for the Youtube Data API v3

8091.3M9](/packages/alaouy-youtube)[socialapis/youtubedownloader

A small project for fetching youtube vidoes with their private api.

241.4k](/packages/socialapis-youtubedownloader)

PHPackages © 2026

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