PHPackages                             badmushroom/mojangapiclient - 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. badmushroom/mojangapiclient

ActiveLibrary[API Development](/categories/api)

badmushroom/mojangapiclient
===========================

A simple PHP client for the Mojang Public API

v0.1.0(1y ago)13MITPHPPHP &gt;=8.0

Since Dec 16Pushed 1y ago1 watchersCompare

[ Source](https://github.com/bad-mushroom/MojangApiClient)[ Packagist](https://packagist.org/packages/badmushroom/mojangapiclient)[ RSS](/packages/badmushroom-mojangapiclient/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Mojang API Client
=================

[](#mojang-api-client)

A simple PHP/Laravel client for the Mojang Public API. Currently supports player profile lookups either by their name or UUID (Mojang ID).

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

[](#installation)

```
composer require badmushroom/mojangapiclient

```

Example Usage
-------------

[](#example-usage)

```
use BadMushroom\MojangApiClient\Facades\Mojang;

// Lookup player by name
$profile = Mojang::profile()->name('notch');

// Or lookup player by their ID
$profile = Mojang::profile()->id('069a79f4-44e9-4726-a5be-fca90e38aaf5');

```

The response will be `BadMushroom\MojangApiClient\Shapes\Profile` object but can easily be converted to an Array or JSON.

```
$profile->toArray();
$profile->toJson();

```

You're also welcome to use the shape along with its getters:

```
$profile->getId();      // Returns the player's Mojang ID
$profile->getName();    // Returns the player's name
$profile->getSkin();    // Returns a URL to the player's skin
$profile->getCape();    // Returns a URL to the player's cape, if used

```

If you just want to play around and checkout the data, there's an Artisan command for this very thing:

```
php artisan app:test-mojang notch
// or
php artisan app:test-mojang 069a79f4-44e9-4726-a5be-fca90e38aaf5

```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance40

Moderate activity, may be stable

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity33

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

512d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f1a3173fa999f6045bcd8de4920098e50fbcf72e976175c9254cce938d9f0253?d=identicon)[bad-mushroom](/maintainers/bad-mushroom)

---

Top Contributors

[![bad-mushroom](https://avatars.githubusercontent.com/u/381203?v=4)](https://github.com/bad-mushroom "bad-mushroom (2 commits)")

---

Tags

minecraftmojang-apiapi clientminecraftMojang

### Embed Badge

![Health badge](/badges/badmushroom-mojangapiclient/health.svg)

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

###  Alternatives

[smsapi/php-client

SMSAPI API PHP Client

652.1M17](/packages/smsapi-php-client)[crowdin/crowdin-api-client

PHP client library for Crowdin API v2

611.5M5](/packages/crowdin-crowdin-api-client)[smsapi.pl/php-client

SMSAPI API PHP Client

6581.4k1](/packages/smsapipl-php-client)[inspirum/balikobot

PHP library for Balikobot API

20379.7k4](/packages/inspirum-balikobot)[phplicengine/bitly

Bitly API v4

22277.3k](/packages/phplicengine-bitly)[navarr/minecraft-profile

Minecraft Profile API

241.5k](/packages/navarr-minecraft-profile)

PHPackages © 2026

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