Everyone federates with almost everyone else. I only know of the Lemmygrad instance that is blocked by some.
The join-lemmy site has links to instance lists. https://join-lemmy.org/instances – the “Awesome Lemmy Instances” shows if they allow “NSFW” content. The the-federation.info page has their software version in the list.
And here is a good guide on how it currently works to find and join communities (things will develop and get more easy): How To Join Lemmy: https://lemmy.blahaj.zone/post/61827.
Welcome!edit: ah yeah, and of course https://lemmy.directory as was mentioned by @Barbarian@sh.itjust.works, which tries to provide an aggregate of … well, all content on the network.
The federation list shouldn’t matter all that much if the server is set to blacklist and not allowlist. At that point it’s just a list of servers that at least 1 user has subscribed to. Nobody’s gonna beat lemmy.ml at that as they have the biggest population currently.
Except maybe Lemmy.directory, you can’t make an account there, that’s used just for an accurate “All” feed to show all communities on every server.
By default everyone federated with everyone. Some exceptions blacklist others, but still participate in the wider fediverse. Others whitelist specific others, effectively making their own island fediverse.
As for rules, you’d need to check each instance directly. That isn’t collated with an API query.