PHPackages                             fortnite-api/php-wrapper - 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. [Framework](/categories/framework)
4. /
5. fortnite-api/php-wrapper

AbandonedArchivedLibrary[Framework](/categories/framework)

fortnite-api/php-wrapper
========================

PHP wrapper for https://fortnite-api.com

v1.0.0(6y ago)9776MITPHPPHP &gt;=7.0

Since Nov 11Pushed 6y ago1 watchersCompare

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

READMEChangelog (6)Dependencies (1)Versions (7)Used By (0)

PHP wrapper for [Fortnite-API.com](https://fortnite-api.com)
============================================================

[](#php-wrapper-for-fortnite-apicom)

[![GitHub release (latest by date)](https://camo.githubusercontent.com/9f33d0f169339a1b76b633e9a136b4c4948bae20ff72fcb719ff0bb3c855c989/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f466f72746e6974652d4150492f7068702d777261707065723f6c6f676f3d676974687562)](https://github.com/Fortnite-API/php-wrapper/releases) [![Packagist](https://camo.githubusercontent.com/0fa80a60c68f27a05ae78e836600d4ce67566a6c17f321db5d3e28eac48ee0a7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f666f72746e6974652d6170692f7068702d77726170706572)](https://packagist.org/packages/fortnite-api/php-wrapper) [![GitHub issues](https://camo.githubusercontent.com/742698da42093924bede2572e6864eb74b0594cbba24eb87a79d952b7c1519e1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f466f72746e6974652d4150492f7068702d777261707065723f6c6f676f3d676974687562)](https://github.com/Fortnite-API/php-wrapper/issues) [![MIT License](https://camo.githubusercontent.com/dec5bf45ac60d81dc805b161e56ffaeb84e780de2aaf81bf68636cd5a739421c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f466f72746e6974652d4150492f7068702d77726170706572)](https://github.com/Fortnite-API/php-wrapper/blob/master/LICENSE)

[![PHP version](https://camo.githubusercontent.com/9ff49eeb7041550a807a095c0fe5f9200394033107cd832bd76327064ef8f8f3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f666f72746e6974652d6170692f7068702d777261707065723f6c6f676f3d706870)](https://www.php.net/) [![Guzzle HTTP](https://camo.githubusercontent.com/28d9167c83a218a308af16eeb6c5855ad88a8ae70c49a7d717f2f4befdb9ddd6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f72657175697265732d67757a7a6c656874747025324667757a7a6c652d626c7565)](https://github.com/guzzle/guzzle) [![Donate](https://camo.githubusercontent.com/13c2cc6eb7d146d20722019969b2d64b85a8302bb4343af27146efdbc5e76ead/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646f6e6174652d50617950616c2d626c75652e7376673f6c6f676f3d70617970616c)](https://fortnite-api.com/paypal) [![Discord](https://camo.githubusercontent.com/f457c59e0d5781399092d9886a8c11b018f42e05c95e3f35963276863990d4cd/68747470733a2f2f646973636f72646170702e636f6d2f6170692f6775696c64732f3632313435323131303535383532373530322f7769646765742e706e673f7374796c653d736869656c64)](https://fortnite-api.com/discord)

This library offers a complete wrapper around the endpoints of [fortnite-api.com](https://fortnite-api.com).

All classes and JSON objects are well documented and support autocompletion and type hints for each object and property.

We also have async requests for each endpoint!

Composer
--------

[](#composer)

```
composer require fortnite-api/php-wrapper

```

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

[](#documentation)

Here is a quick overview of the API so you can get started very quickly.

If you need an in-use example then please take a look at the [index.php](https://github.com/Fortnite-API/php-wrapper/blob/master/test/index.php) in my test folder where i use some of the endpoints.

- General usage

```
use FortniteApi\FortniteApi;

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

$api = new FortniteApi();
```

- FortniteApi class

```
$api = new FortniteApi();

// accesses the cosmetics endpoint (https://fortnite-api.com/cosmetics)
$api->cosmetics->...

// accesses the news endpoint (https://fortnite-api.com/news)
$api->news->...

// accesses the shop endpoint (https://fortnite-api.com/shop)
$api->shop->...

// accesses the creatorcode endpoint (https://fortnite-api.com/creatorcode)
$api->creatorCode->...
```

```
// returns the base uri of the api (https://fortnite-api.com)
FortniteApi::getBaseUri();

// returns an array of all supported languages
FortniteApi::getSupportedLanguages();
```

- FortniteApiError

```
$result = $api->cosmetics->getAll();

if ($result === null)
{
    $lastError = FortniteApiError::getLastError();

    // this just shows which members you can access
    $members = [
        $lastError->statusCode,
        $lastError->reasonPhrase,
        $lastError->body,
        $lastError->message
    ];
}
```

```
// Returns the error set by the last request or false if none is set.
FortniteApiError::getLastError();

// Determines whether an error occured within the last called function.
FortniteApiError::hasLastError();
```

- Async methods

Each method in an endpoint has an equivalent async method (i.e. getAsync) which returns an awaitable task. You can await the response at any point in your script.

```
// returns "instantly"
$task = $api->cosmetics->getAllAsync();
// retreives the result (the one you get from non-async versions)
$result = $task->await();
```

- Endpoints

Each method in one of the endpoints return `null` on failure. Autocompletion and type hints are provided on each object.

Objects are mapped with the exact same layout as on [fortnite-api.com/documentation](https://fortnite-api.com/documentation) but without their status and data properties which already get validated for you.

If you need more information about properties and methods then please take a look at the actual implementation.

[Endpoints](https://github.com/Fortnite-API/php-wrapper/tree/master/src/Components/Endpoints)

[JSON Objects](https://github.com/Fortnite-API/php-wrapper/tree/master/src/Components/Objects)

- The `query` parameter

Some methods require a `$query` parameter to work. You can find possible query parameters within the [official documentation](https://fortnite-api.com/documentation). An example for such an query `array` would be:

```
// key value pairs also support arrays as value if the api allows this
$query = [
    "rarity" => "uncommon",
    "hasIcon" => true
];
```

### Contribute

[](#contribute)

if you can provide any help, may it only be spell checking please contribute!

We are open for any contribution.

License
-------

[](#license)

- Fortnite-API (MIT) [License](https://github.com/Fortnite-API/php-wrapper/blob/master/LICENSE "MIT License")
- guzzlehttp/guzzle (MIT) [License](https://github.com/guzzle/guzzle/blob/master/LICENSE "MIT License")

API developed by [Fortnite-API.com](https://fortnite-api.com/about)

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity57

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 ~7 days

Total

6

Last Release

2343d ago

Major Versions

v0.3.0 → v1.0.02019-12-18

### Community

Maintainers

![](https://www.gravatar.com/avatar/836400c2b4f253bda21d31c1b919e6ace925907dadccee54b1248986ce0a9167?d=identicon)[michel-pi](/maintainers/michel-pi)

---

Top Contributors

[![michel-pi](https://avatars.githubusercontent.com/u/20134901?v=4)](https://github.com/michel-pi "michel-pi (19 commits)")

---

Tags

apiclientframeworkwrapperFortnitefortnite-apifortnite-api.commichel-pi

### Embed Badge

![Health badge](/badges/fortnite-api-php-wrapper/health.svg)

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

###  Alternatives

[php-curl-class/php-curl-class

PHP Curl Class makes it easy to send HTTP requests and integrate with web APIs.

3.3k9.5M353](/packages/php-curl-class-php-curl-class)[nutgram/nutgram

The Telegram bot library that doesn't drive you nuts

714214.9k8](/packages/nutgram-nutgram)[digitalstars/simplevk

Powerful PHP library/framework for VK API bots, supporting LongPoll &amp; Callback &amp; OAuth

883.9k3](/packages/digitalstars-simplevk)

PHPackages © 2026

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