RetroAchievements Logo

retroachievements-api

A Python library that lets you get achievement, user, and game data from RetroAchievements.

Documentation: Get Started


## Status This library is currently a work in progress, endpoint and test coverage can be found below: ℹ️  Endpoint coverage: 8 of 30 ℹ️  Test coverage: 0 of 30 ## Features ✅  Officially-supported, aligns 1:1 with the RAWeb API. ✅  Backwards-compatible, easy migration path to API v2. ✅  Supports Python 3.11+.
## Documentation Learn how to authenticate and start pulling data from RetroAchievements on our documentation website. - [Get started](https://api-docs.retroachievements.org/getting-started.html) - [Get a user's profile information](https://api-docs.retroachievements.org/v1/users/get-user-summary.html) - [Look up games a user has completed](https://api-docs.retroachievements.org/v1/users/get-user-completed-games.html) - [Get a game's metadata](https://api-docs.retroachievements.org/v1/games/get-game-extended.html) ## Installation Coming Soon ## How to begin making API calls To use any endpoint function in the API, you must first be authorized by RetroAchievements. Fortunately, this is a fairly straightforward process. 1. Visit [your control panel](https://retroachievements.org/controlpanel.php) on the RA website. 2. Find the "Keys" section on the page. Copy the web API key value. **Do not expose your API key anywhere publicly.** 3. You can now create your authorization object using your web API key. ```python from retroachievements import RAClient userName = '' webApiKey = '' auth = RAClient(userName, webApiKey) ``` 4. You now have all you need to use any function in the API. Each function takes this authorization object as its first argument. Here's an example: ```python from retroachievements import getGame // This returns basic metadata about the game on this page: // https://retroachievements.org/game/14402 game = auth.getGame(14402); ``` ## Contributing See [Contribution Guidelines](CONTRIBUTING.md) and [Code of Conduct](CODE_OF_CONDUCT.md). ## Security Vulnerabilities Please review [our security policy](../../security/policy). ## Credits - [All Contributors](../../contributors) ## License MIT License (MIT). See [License File](LICENSE.md).