Mastodon builds on the ActivityPub protocol with its own API, but the last time I looked into it, the documentation of the API was poor, so it was difficult to develop for.
I haven't looked at the BlueSky docs so I can't compare, but it sticks in my craw a bit seeing the words "friendly for third-party devs" being used in the same sentence with Mastodon