Is there a way to programmatically determinate the level

Is there a way to programmatically determinate the level of the pro site. API for pro site.

Thanks