PHPackages                             matthiggins/bluezone - 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. matthiggins/bluezone

ActiveLibrary[API Development](/categories/api)

matthiggins/bluezone
====================

A modern PHP SDK for interacting with the PUBG API and PUBG match telemetry files.

v0.9.4(2y ago)6841MITPHPPHP &gt;=8.1

Since Mar 13Pushed 2y ago1 watchersCompare

[ Source](https://github.com/matthiggins/bluezone)[ Packagist](https://packagist.org/packages/matthiggins/bluezone)[ Docs](https://github.com/matthiggins/bluezone)[ Fund](https://pubglookup.com/donate)[ Fund](https://www.paypal.com/donate/?hosted_button_id=TLN8P3ZLGF4NE)[ RSS](/packages/matthiggins-bluezone/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (11)Versions (41)Used By (0)

[![bluezone-banner](https://private-user-images.githubusercontent.com/422780/274032091-e309788b-b3bd-47fb-9df3-edaa2d3f6a52.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzU1NDMxNjYsIm5iZiI6MTc3NTU0Mjg2NiwicGF0aCI6Ii80MjI3ODAvMjc0MDMyMDkxLWUzMDk3ODhiLWIzYmQtNDdmYi05ZGYzLWVkYWEyZDNmNmE1Mi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwNDA3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDQwN1QwNjIxMDZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT01Mzg4M2IxZWM4ZjFjMjk1MTE2ODEwOTE0MWJkNjdhYWRlYTEwYjAwMjI1OGM3MzFhOGFkNTgzNzQ4ZmFjOTBkJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.QG_6JMUI_gc6eLjj-LxkpVMcU3HeffoyMl53n2Ulr2k)](https://private-user-images.githubusercontent.com/422780/274032091-e309788b-b3bd-47fb-9df3-edaa2d3f6a52.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzU1NDMxNjYsIm5iZiI6MTc3NTU0Mjg2NiwicGF0aCI6Ii80MjI3ODAvMjc0MDMyMDkxLWUzMDk3ODhiLWIzYmQtNDdmYi05ZGYzLWVkYWEyZDNmNmE1Mi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwNDA3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDQwN1QwNjIxMDZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT01Mzg4M2IxZWM4ZjFjMjk1MTE2ODEwOTE0MWJkNjdhYWRlYTEwYjAwMjI1OGM3MzFhOGFkNTgzNzQ4ZmFjOTBkJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.QG_6JMUI_gc6eLjj-LxkpVMcU3HeffoyMl53n2Ulr2k)

BLUEZONE : A PHP SDK for the PUBG API
=====================================

[](#bluezone--a-php-sdk-for-the-pubg-api)

[![Version](https://camo.githubusercontent.com/5fcd4ab5e3253277def1917b349b9a5c11b23a777dcf7ec57d91990050304d00/687474703a2f2f706f7365722e707567782e6f72672f6d61747468696767696e732f626c75657a6f6e652f76657273696f6e)](https://packagist.org/packages/matthiggins/bluezone)[![PHP Version Require](https://camo.githubusercontent.com/b35d2472993d75cd89d973a25540e3aedb23f208f3a89e41b5a2d14bf82e4760/687474703a2f2f706f7365722e707567782e6f72672f6d61747468696767696e732f626c75657a6f6e652f726571756972652f706870)](https://packagist.org/packages/matthiggins/bluezone)[![License](https://camo.githubusercontent.com/a432954518dab073d9b6e5dcd73d0f22af7ea43e3c85edb249e07c513eeacfe8/687474703a2f2f706f7365722e707567782e6f72672f6d61747468696767696e732f626c75657a6f6e652f6c6963656e7365)](https://packagist.org/packages/matthiggins/bluezone)

BLUEZONE is an SDK for PHP that makes using the [PUBG API](https://developer.pubg.com/) dead simple. It provides a set of simple and intuitive methods that allow you to interact with the PUBG API without having to worry about low-level details such as authentication and request handling. With BLUEZONE, you can easily retrieve data for players, matches, seasons, weapon mastery, and survival mastery. It also includes a set of data transfer objects (DTOs) that help you work with the data returned by the API in a structured and organized way.

In addition to accessing data from the API, BLUEZONE also allows you to access match telemetry files and parse them for player data. This makes it easy to analyze gameplay data and gain insights into player behavior. Whether you're building a tool to help players improve their skills or conducting research on player behavior, BLUEZONE provides a powerful and flexible way to work with PUBG data.

---

**Relevant Links**

- [PUBG API](https://developer.pubg.com/)
- [Saloon](https://docs.saloon.dev/)
- [Laravel Collections](https://laravel.com/docs/10.x/collections)

---

Table of Contents
-----------------

[](#table-of-contents)

- [BLUEZONE : A PHP SDK for the PUBG API](#bluezone--a-php-sdk-for-the-pubg-api)
    - [Table of Contents](#table-of-contents)
    - [Installation](#installation)
    - [Usage](#usage)
    - [Making requests](#making-requests)
    - [Available methods](#available-methods)
        - [Seasons list](#seasons-list)
        - [Player search, player profiles, and stats](#player-search-player-profiles-and-stats)
        - [Matches](#matches)
    - [Accessing Match Telemetry Data](#accessing-match-telemetry-data)
        - [Working with telemetry events](#working-with-telemetry-events)
        - [Game events and match events from telemetry](#game-events-and-match-events-from-telemetry)
        - [Filter events from the telemetry data](#filter-events-from-the-telemetry-data)

---

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

[](#installation)

To install, require the package `matthiggins/bluezone` via composer.

```
composer require matthiggins/bluezone

```

Usage
-----

[](#usage)

Instantiate a new Bluezone instance using your PUBG API key. You can get your own API key by going to the [PUBG Developer Portal](https://developer.pubg.com/).

Bluezone uses [Saloon](https://docs.saloon.dev/) to create a Connector, Requests, and DTOs for the PUBG API. You can use all of the features of Saloon in the requests and responses.

```
use Bluezone\Bluezone;

$bluezone = new Bluezone($apiKey);
```

Making requests
---------------

[](#making-requests)

Requests will return a PUBG DTO instance or a collection of instances.

```
// Search for a player
$player = $bluezone->player()->search($shard, $playerName);

// Find a player by account ID
$player = $bluezone->player()->find($shard, $accountId);
```

If the request results in an error an exception will be thrown.

```
use Saloon\Exceptions\SaloonException;

try {
    $seasons = $bluezone->season()->all('fail');
}catch(SaloonException $e) {
    $status = $e->getStatus();
}
```

By default, Saloon provides classes for specific errors related to the request.

[Saloon - Handling Failures](https://docs.saloon.dev/the-basics/handling-failures)

```
SaloonException
├── FatalRequestException (Connection Errors)
└── RequestException (Request Errors)
    ├── ServerException (5xx)
    │   ├── InternalServerErrorException (500)
    │   ├── ServiceUnavailableException (503)
    │   └── GatewayTimeoutException (504)
    └── ClientException (4xx)
        ├── UnauthorizedException (401)
        ├── ForbiddenException (403)
        ├── NotFoundException (404)
        ├── MethodNotAllowedException (405)
        ├── RequestTimeOutException (408)
        ├── UnprocessableEntityException (422)
        └── TooManyRequestsException (429)

```

Available methods
-----------------

[](#available-methods)

Bluezone has easy methods for accessing the \[PUBG API endpoints\](

### Seasons list

[](#seasons-list)

```
// Get all PUBG seasons
$seasons = $bluezone->season()->all($shard);
```

### Player search, player profiles, and stats

[](#player-search-player-profiles-and-stats)

You can search for a player by their in-game name and shard or you can retrieve a player using their Account ID.

```
// Find a specific player using the account id
$player = $bluezone->player()->find($shard, $accountId);

// Search for a player by name
// NOTE : player search requires the name to be entered exactly as it is displayed in-game
$player = $bluezone->player()->search($shard, $playerName);

// Search for up to 10 players
$results = $bluezone->player()->searchMany($shard, [$playerName01, $playerName02]);

// Season stats for a single player
$seasonStats = $bluezone->player()->seasonStats($shard, $season, $accountId);

// Season stats for up to 10 players
$seasonStats = $bluezone->player()->seasonStatsMany($shard, $season, $gameMode, [$accountId,$accountId]);

// Ranked season stats for a single player
$rankedSeasonStats = $bluezone->player()->rankedSeasonStats($shard, $season, $accountId);

// Lifetime season stats for a single player
$lifetimeStats = $bluezone->player()->lifetimeStats($shard, $accountId);

// Lifetime stats for up to 10 players
$lifetimeStats = $bluezone->player()->lifetimeStatsMany($shard, $gameMode, [$accountId,$accountId]);

// Get weapon mastery for a single player
$weaponMastery = $bluezone->player()->weaponMastery($shard, $accountId);

// Get survival mastery for a single player
$survivalMastery = $bluezone->player()->survivalMastery($shard, $accountId);
```

### Matches

[](#matches)

```
// Get a match
$match = $bluezone->match()->find($shard, $matchId);
```

---

Accessing Match Telemetry Data
------------------------------

[](#accessing-match-telemetry-data)

The PUBG API provides access to very detailed match data in a Match Telemetry file. This file contains information about game details, player movement, player action, zone information, and more. Telemetry files are large JSON files that can be parsed and analyzed for deeper analysis.

To get a telemetry file you must first request details of a PUBG match.

```
// Get a single match DTO instance
$match = $bluezone->match()->find($shard, $matchId);

// Get the telemetry DTO instance
$telemetry = $match->getTelemetry();

// Get the raw telemetry events in a Collection
$rawEvents = $telemetry->raw();

// Alternatively you can map all telemetry
// events to their DTO instances
$events = $telemetry->events();
```

### Working with telemetry events

[](#working-with-telemetry-events)

The telemetry file is essentially a huge list of events that happen during a match. These are events for individual players as well as game events like care packages, circle movement, etc. You can easily filter these events with helper methods that make pulling player and game data easier.

```
// Get all telemetry events for a specific player
$telemetry->player($accountId)->all();

// Get all attack events for a specific player
$telemetry->player($accountId)->attackEvents();

// Get all heal events for a specific player
$telemetry->player($accountId)->healEvents();

// Get all item attachment events for a specific player
$telemetry->player($accountId)->itemAttachEvents();

// Get all item detachment events for a specific player
$telemetry->player($accountId)->itemDetachEvents();

// Get all item drop events for a specific player
$telemetry->player($accountId)->itemDropEvents();

// Get all item equip events for a specific player
$telemetry->player($accountId)->itemEquipEvents();

// Get all item pickup events for a specific player
$telemetry->player($accountId)->itemPickupEvents();

// Get all item unequip events for a specific player
$telemetry->player($accountId)->itemUnequipEvents();

// Get all item use events for a specific player
$telemetry->player($accountId)->itemUseEvents();

// Get all kill events for a specific player
$telemetry->player($accountId)->killEvents();

// Get all object destroy events for a specific player
$telemetry->player($accountId)->objectDestroyEvents();

// Get all object interaction events for a specific player
$telemetry->player($accountId)->objectInteractionEvents();

// Get all parachute landing events for a specific player
$telemetry->player($accountId)->parachuteLandingEvents();

// Get all position events for a specific player
$telemetry->player($accountId)->positionEvents();

// Get all take damage events for a specific player
$telemetry->player($accountId)->takeDamageEvents();

// Get all throwable use events for a specific player
$telemetry->player($accountId)->useThrowableEvents();

// Get all swim events for a specific player
$telemetry->player($accountId)->swimEvents();

// Get all swim start events for a specific player
$telemetry->player($accountId)->swimStartEvents();

// Get all swim end events for a specific player
$telemetry->player($accountId)->swimEndEvents();

// Get all vault events for a specific player
$telemetry->player($accountId)->vaultEvents();

// Get all vehicle events for a specific player
$telemetry->player($accountId)->vehicleEvents();

// Get all weapon fire count events for a specific player
$telemetry->player($accountId)->weaponFireCountEvents();

// Get all wheel destroy events for a specific player
$telemetry->player($accountId)->wheelDestroyEvents();
```

### Game events and match events from telemetry

[](#game-events-and-match-events-from-telemetry)

In addition to player events you can also easily access game events and match details.

```
// Get all care package events from the telemetry
$telemetry->match()->carePackageEvents();

// Get the definition of the match
$telemetry->match()->definition();

// Get the end state of the match
$telemetry->match()->end();

// Get all phase change events for the match
$telemetry->match()->phaseChanges();

// Get the start state of the match
$telemetry->match()->start();

// Get all state events from the match
$telemetry->match()->stateEvents();
```

### Filter events from the telemetry data

[](#filter-events-from-the-telemetry-data)

You can easily filter out events from the data using [Laravel Collection](https://laravel.com/docs/10.x/collections) methods.

For example:

```
use Bluezone\Telemetry\Events\PlayerAttack;

$playerAttackEvents = $telemetry->events()->filter(function ($event) use ($accountId) {
    return ($event instanceof PlayerAttack) && $event->attacker->accountId == $accountId;
});
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 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

Every ~15 days

Recently: every ~9 days

Total

22

Last Release

843d ago

PHP version history (2 changes)v0.1.0-alphaPHP ^8.2

v0.3.0PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/1df12450f6edbdea9fee016ee34981e22af14822b0d2ddbb08a6b4de72f8db8a?d=identicon)[creativestasis](/maintainers/creativestasis)

---

Top Contributors

[![matthiggins](https://avatars.githubusercontent.com/u/422780?v=4)](https://github.com/matthiggins "matthiggins (42 commits)")

---

Tags

apiphppubgpubg-apisdkphpmatthigginsphp-pubg-api

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/matthiggins-bluezone/health.svg)

```
[![Health](https://phpackages.com/badges/matthiggins-bluezone/health.svg)](https://phpackages.com/packages/matthiggins-bluezone)
```

###  Alternatives

[kunalvarma05/dropbox-php-sdk

Dropbox PHP API V2 SDK (Unofficial)

3633.0M18](/packages/kunalvarma05-dropbox-php-sdk)[sandorian/moneybird-api-php

Moneybird API client for PHP

127.3k](/packages/sandorian-moneybird-api-php)[marceloeatworld/falai-php

Professional PHP client for the fal.ai serverless AI platform

105.5k](/packages/marceloeatworld-falai-php)[benbjurstrom/cloudflare-images-php

A PHP client for the Cloudflare Images API

1414.6k1](/packages/benbjurstrom-cloudflare-images-php)

PHPackages © 2026

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