PHPackages                             touchstorm/youtube-subscriber-parser - 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. touchstorm/youtube-subscriber-parser

ActiveLibrary

touchstorm/youtube-subscriber-parser
====================================

Parse YouTube subscriber counts into usable integers

1.0.5(6y ago)213[1 PRs](https://github.com/touchstorm/youtube-subscriber-parser/pulls)MITPHPPHP &gt;=7.2CI passing

Since Aug 1Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/touchstorm/youtube-subscriber-parser)[ Packagist](https://packagist.org/packages/touchstorm/youtube-subscriber-parser)[ RSS](/packages/touchstorm-youtube-subscriber-parser/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (8)Used By (0)

YouTube Subscriber Count Parser [![Build Status](https://camo.githubusercontent.com/69060193bbdb555f834c47b3c3d0aced1e61a478e7706507632f7cdb55a5968e/68747470733a2f2f7472617669732d63692e6f72672f746f75636873746f726d2f796f75747562652d737562736372696265722d7061727365722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/touchstorm/youtube-subscriber-parser)
===========================================================================================================================================================================================================================================================================================================================================================================

[](#youtube-subscriber-count-parser-)

### Parsing YouTube subscriber counts into usable integers.

[](#parsing-youtube-subscriber-counts-into-usable-integers)

In May of 2019 **[YouTube announced](https://support.google.com/youtube/thread/6543166)** an update that would affect subscriber counts on their YouTube Data API. This update would adjust the full integer formatting of subscriber counts **(673335)**, found in the API responses, to match the abbreviated display format **(673K)** found on YouTubes video &amp; channel pages.

This library will convert YouTube's formatted strings to integers for easy database storage, front end display, etc.

**YouTube Data API Request**

```
GET /v3/channels?part=statistics&forUsername=howdiniguru&key=...&fields=items(statistics(subscriberCount))

```

**Pre August 2019 response**

```
{
 "items": [
  {
   "statistics": {
    "subscriberCount": "673335"
   }
  }
 ]
}
```

**Post August 2019 response**

```
{
 "items": [
  {
   "statistics": {
    "subscriberCount": "673K"
   }
  }
 ]
}
```

Installation &amp; Usage
------------------------

[](#installation--usage)

```
composer require touchstorm/youtube-subscriber-parser

```

```
require_once __DIR__ . '/../vendor/autoload.php';

use Subscriber\Count;

$tens_abbr_count = '41';
$hundreds_abbr_count = '311';
$thousands_decimal_abbr_count = '1.5K';
$thousands_abbr_count = '883K';
$millions_abbr_count = '99M';
$hundred_millions_abbr_count = '943M';

echo Count::parse($tens_abbr_count); // 41
echo Count::parse($hundreds_abbr_count); // 311
echo Count::parse($thousands_decimal_abbr_count); // 1500
echo Count::parse($thousands_abbr_count); // 883000
echo Count::parse($millions_abbr_count); // 99000000
echo Count::parse($hundred_millions_abbr_count); // 943000000
```

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance54

Moderate activity, may be stable

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 94.4% 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 ~0 days

Total

6

Last Release

2472d ago

### Community

Maintainers

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

---

Top Contributors

[![seomikewaltman](https://avatars.githubusercontent.com/u/72883213?v=4)](https://github.com/seomikewaltman "seomikewaltman (17 commits)")[![touchstorm](https://avatars.githubusercontent.com/u/38663589?v=4)](https://github.com/touchstorm "touchstorm (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/touchstorm-youtube-subscriber-parser/health.svg)

```
[![Health](https://phpackages.com/badges/touchstorm-youtube-subscriber-parser/health.svg)](https://phpackages.com/packages/touchstorm-youtube-subscriber-parser)
```

PHPackages © 2026

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