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 1y 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 1mo ago

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

[![RetroAchievements Logo](https://camo.githubusercontent.com/eb2a9f2b41b2695bb116611213dd8c27e4626e1c2be992393f6920459c06d1c2/68747470733a2f2f6d656469612e726574726f616368696576656d656e74732e6f72672f557365725069632f4368656b652e706e67)](https://retroachievements.org)

RetroAchievements.org API Container for Laravel
===============================================

[](#retroachievementsorg-api-container-for-laravel)

---

Summary
-------

[](#summary)

A library that lets you get achievement, user, and game data from RetroAchievements.org directly in your Laravel application.

Starting 🚀
----------

[](#starting-)

### Prerequisites 📋

[](#prerequisites-)

- Composer.
- PHP version 8.3 or higher.

Running 🛠️
----------

[](#running-️)

Install the package via composer:

```
composer require gboquizosanchez/retroachievements
```

Establish the configuration in the `.env` file:

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

You can also publish the configuration file to customize the package:

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

**Note**: You need to have a RetroAchievements account to use the API. If you don't have one, you can create one [here](https://retroachievements.org/createaccount.php). And also, you need to have a web API key. You can get one in your [control panel](https://retroachievements.org/controlpanel.php).

Basic Usage 👷
-------------

[](#basic-usage-)

You can use two different methods:

### Using the facade

[](#using-the-facade)

This method provides directly from `.env` file the username and the web API key.

```
use Retroachievements\RetroClient;

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

### Using the RetroAchievements model directly

[](#using-the-retroachievements-model-directly)

You can provide a custom username and web API key if you want to use different credentials.

Or, you can use the default ones from the `.env` using `config('retro-achievements.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);
```

### Mapping the response 🗺️

[](#mapping-the-response-️)

There are two ways to map the response. By default, the package uses the DTO mapping.

```
RA_DTO_MAPPING=true
RA_RAW_MAPPING=false
```

**Note**: If you want to use the raw mapping, you need to set the `RA_DTO_MAPPING` to `false` and the `RA_RAW_MAPPING` to `true`. RAW only works with DTO mapping disabled.

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

[](#available-methods-)

This package provides all methods available in the [RetroAchievements API](https://api-docs.retroachievements.org/getting-started.html).

See the [RetroClient facade](src/RetroClient.php) for more information.

Working with ⚙️
---------------

[](#working-with-️)

### PHP dependencies 📦

[](#php-dependencies-)

- Spatie Laravel Data [![Latest Stable Version](https://camo.githubusercontent.com/d82da1cac4142a3081b7699d3cac7f2ca48b91cf09919ab01620d5afec1538cb/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f737461626c652d342e31312e312d626c7565)](https://packagist.org/packages/spatie/laravel-data)

#### Develop dependencies 🔧

[](#develop-dependencies-)

- Friendsofphp Php Cs Fixer [![Latest Stable Version](https://camo.githubusercontent.com/f4f11d1f5d079a4bd177c3b4109ea40aa009d1469fde42f915f3642c87ff3b8c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f737461626c652d76332e36342e302d626c7565)](https://packagist.org/packages/friendsofphp/php-cs-fixer)
- Larastan Larastan [![Latest Stable Version](https://camo.githubusercontent.com/3ff51e248a84a6a6ad4d90b4bcfd50bf5a45d85ed887efbfb56751f4fb3808f5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f737461626c652d76322e392e31312d626c7565)](https://packagist.org/packages/larastan/larastan)
- Orchestra Testbench [![Latest Stable Version](https://camo.githubusercontent.com/155922837cb2c5febf65d91f6bc60d86b94726e2bdcfde0aa520bca3acc5be3f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f737461626c652d76392e362e312d626c7565)](https://packagist.org/packages/orchestra/testbench)
- Pestphp Pest [![Latest Stable Version](https://camo.githubusercontent.com/c2d897fa3fd801dd4255f28d0b5dd287259547851ec20966331206488aed3ef7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f737461626c652d76332e352e312d626c7565)](https://packagist.org/packages/pestphp/pest)

Testing ✅
---------

[](#testing-)

```
composer test
```

Problems? 🚨
-----------

[](#problems-)

Let me know about yours by [opening an issue](https://github.com/gboquizosanchez/retroachievements/issues/new)!

Credits 🧑‍💻
-----------

[](#credits-‍)

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

License 📄
---------

[](#license-)

MIT License (MIT). See [License File](LICENSE.md).

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance44

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

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

532d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0e360fba0cbca71392811fad1046d47397298adf9a191090e62eeeeab864e21d?d=identicon)[gboquizosanchez](/maintainers/gboquizosanchez)

---

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)

153107.2k2](/packages/moe-mizrak-laravel-openrouter)[gtmassey/laravel-analytics

Create and run Google Analytics Data API queries in Laravel

3868.4k](/packages/gtmassey-laravel-analytics)[helgesverre/mistral

Laravel Client for the Mistral.ai API

5213.5k1](/packages/helgesverre-mistral)[wallacemartinss/filament-whatsapp-conector

Filament plugin for WhatsApp integration with Evolution API v2

641.4k10](/packages/wallacemartinss-filament-whatsapp-conector)[deniskorbakov/laravel-data-scribe

A Scribe Plugin to generate API doc from spatie/laravel-data

124.3k](/packages/deniskorbakov-laravel-data-scribe)

PHPackages © 2026

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