iNat’s taxonomy doesn’t really store relationships between sibling taxa, only parent-child relationships. but if you’re fine with that limitation and still want to do a pseudo-taxonomic sort, i would start with the data from the dynamic life list: https://api.inaturalist.org/v1/observations/taxonomy?user_id=amarbharathy.