RetroAchievements API Demo (PHP)
Click here to download an example PHP API client class.Please note, this is a beta offering and only supports read-only access to data that can already be found on the site.No personal/user data can be accessed using this API beyond what is already publicly accessible for every user (username, avatar, motto and activity).
Initialize Connection to RetroAchievements:require_once("RA_API.php");
$RAConn = new RetroAchievements("TestUser", "Your API Key");
$data = $RAConn->GetTopTenUsers();
$data = $RAConn->GetConsoleIDs();
$data = $RAConn->GetGameList( 4 );
$data = $RAConn->GetGameInfo( 504 );
$data = $RAConn->GetGameInfoExtended( 504 );
$data = $RAConn->GetGameInfoAndUserProgress( 'Scott', 3 );
$data = $RAConn->GetUserRankAndScore( 'Scott' );
$data = $RAConn->GetUserRecentlyPlayedGames( 'Scott' );
$data = $RAConn->GetUserProgress( 'Scott', '2, 3, 75' );
$data = $RAConn->GetUserSummary( 'Scott', 3 );
$data = $RAConn->GetAchievementsEarnedOnDay( 'Scott', '2014-01-04' );
$data = $RAConn->GetAchievementsEarnedBetween( 'Scott', '2013-12-31 20:00:00', '2014-01-01 04:00:00' );
$data = $RAConn->GetUserCompletedGames( 'Scott' );