There is no API for stats. Stats need a major upgrade to be usable by external clients, but that's not our focus atm.