Add spec for stats API
Fix stats/language API method