PHPackages                             gboquizosanchez/retroachievements - 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. gboquizosanchez/retroachievements

ActiveLibrary[API Development](/categories/api)

gboquizosanchez/retroachievements
=================================

RetroAchievements.org API Container for Laravel

1.0.0(1y ago)06[2 issues](https://github.com/gboquizosanchez/retroachievements/issues)MITPHPPHP ^8.3

Since Nov 25Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/gboquizosanchez/retroachievements)[ Packagist](https://packagist.org/packages/gboquizosanchez/retroachievements)[ Docs](https://github.com/gboquizosanchez)[ RSS](/packages/gboquizosanchez-retroachievements/feed)WikiDiscussions main Synced 1w ago

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

[![RetroAchievements](https://camo.githubusercontent.com/eb2a9f2b41b2695bb116611213dd8c27e4626e1c2be992393f6920459c06d1c2/68747470733a2f2f6d656469612e726574726f616368696576656d656e74732e6f72672f557365725069632f4368656b652e706e67)](https://camo.githubusercontent.com/eb2a9f2b41b2695bb116611213dd8c27e4626e1c2be992393f6920459c06d1c2/68747470733a2f2f6d656469612e726574726f616368696576656d656e74732e6f72672f557365725069632f4368656b652e706e67)`gboquizosanchez/retroachievements`
===================================

[](#gboquizosanchezretroachievements)

**RetroAchievements.org API client for Laravel**

[![Latest Stable Version](https://camo.githubusercontent.com/92a811ce9fca21513a11e4e14d036c5f9e7e63d26df4d8a4f584f9c6190dfec0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f67626f7175697a6f73616e6368657a2f726574726f616368696576656d656e74732e737667)](https://packagist.org/packages/gboquizosanchez/retroachievements)[![Total Downloads](https://camo.githubusercontent.com/78fbca847a0717f83df2961baf1606f0c00e1373ef3ca7ee256e25b3d93fd756/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f67626f7175697a6f73616e6368657a2f726574726f616368696576656d656e74732e737667)](https://packagist.org/packages/gboquizosanchez/retroachievements)[![PHP](https://camo.githubusercontent.com/31a87e1f22b529af58a2615dde6bcd4902061209db5e98adc4b5dff3e99f5f02/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253545382e332d3737374242343f6c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://packagist.org/packages/gboquizosanchez/retroachievements)[![Laravel](https://camo.githubusercontent.com/cf3203afc4f003dc5656e6a684f11a5786224fdb31ec4c4848e807068c048bc2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d313125323025374325323031322d4646324432303f6c6f676f3d6c61726176656c266c6f676f436f6c6f723d7768697465)](https://packagist.org/packages/gboquizosanchez/retroachievements)[![License: MIT](https://camo.githubusercontent.com/6fd529fdc57adf8eb89582bee619d571fd9037b380418c50bb57e9c91598e03b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d3232433535452e737667)](LICENSE.md)

---

*Fetch achievements, user stats, and game data from RetroAchievements.org directly in your Laravel app.*

---

Overview
--------

[](#overview)

A Laravel package that wraps the full [RetroAchievements API](https://api-docs.retroachievements.org/getting-started.html), giving you access to game data, user profiles, achievement lists, and more — with optional DTO mapping via [spatie/laravel-data](https://github.com/spatie/laravel-data).

> **Note:** You need a [RetroAchievements account](https://retroachievements.org/createaccount.php) and a Web API key from your [control panel](https://retroachievements.org/controlpanel.php) to use this package.

---

📦 Installation
--------------

[](#-installation)

```
composer require gboquizosanchez/retroachievements
```

Add your credentials to `.env`:

```
RA_USERNAME=your_username
RA_WEB_API_KEY=your_api_key
```

Optionally, publish the configuration file:

```
php artisan vendor:publish --provider="RetroAchievements\RetroAchievementsServiceProvider"
```

---

🚀 Usage
-------

[](#-usage)

### Via facade

[](#via-facade)

The facade reads credentials directly from your `.env`:

```
use Retroachievements\RetroClient;

RetroClient::getGame(gameId: 1);
```

### Via the client directly

[](#via-the-client-directly)

Useful when working with multiple accounts or custom credentials:

```
use Retroachievements\Data\AuthData;
use RetroAchievements\Models\RetroAchievements;

$auth = new AuthData(
    username: 'your_username',
    webApiKey: 'your_api_key',
);

$client = new RetroAchievements($auth);
$client->getGame(gameId: 1);
```

You can also use the default credentials from config:

```
$auth = new AuthData(...config('retro-achievements.credentials'));
```

---

🗺️ Response mapping
-------------------

[](#️-response-mapping)

By default, the package maps responses to typed DTOs. You can switch to raw responses via `.env`:

```
# Default — typed DTOs via spatie/laravel-data
RA_DTO_MAPPING=true
RA_RAW_MAPPING=false

# Raw responses — disable DTO mapping first
RA_DTO_MAPPING=false
RA_RAW_MAPPING=true
```

> `RAW` mapping only works when `RA_DTO_MAPPING` is set to `false`.

---

📚 Available methods
-------------------

[](#-available-methods)

This package covers all endpoints from the [RetroAchievements API](https://api-docs.retroachievements.org/getting-started.html). See [`RetroClient`](src/RetroClient.php) for the full method list.

---

🧪 Testing
---------

[](#-testing)

```
composer test
```

---

Contributing
------------

[](#contributing)

Contributions are welcome!

- 🐛 **Report bugs** via [GitHub Issues](https://github.com/gboquizosanchez/retroachievements/issues/new)
- 💡 **Suggest features** or improvements
- 🔧 **Submit pull requests** with fixes or enhancements

---

Credits
-------

[](#credits)

- **Author**: [Germán Boquizo Sánchez](mailto:germanboquizosanchez@gmail.com)
- **Contributors**: [View all contributors](../../contributors)

---

📄 License
---------

[](#-license)

This package is open-source software licensed under the [MIT License](LICENSE.md).

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance58

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

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

Unknown

Total

1

Last Release

631d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/20032391?v=4)[Germán Boquizo Sánchez](/maintainers/gboquizosanchez)[@gboquizosanchez](https://github.com/gboquizosanchez)

---

Top Contributors

[![gboquizosanchez](https://avatars.githubusercontent.com/u/20032391?v=4)](https://github.com/gboquizosanchez "gboquizosanchez (1 commits)")

---

Tags

apiretroachievementsretroachievements-apiretroachievementsapi-retroachievements

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/gboquizosanchez-retroachievements/health.svg)

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

###  Alternatives

[moe-mizrak/laravel-openrouter

Laravel package for OpenRouter (A unified interface for LLMs)

157207.7k2](/packages/moe-mizrak-laravel-openrouter)

PHPackages © 2026

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