By community I don’t mean the instance. Should have been clearer that by community I mean „subreddits“.
One subreddit could be popular on instance X and another one on instance Y. So what I want are the most popular communities of all the federated instances.
Had kind of same problem check out the answers: https://discuss.tchncs.de/post/452951