Spotify is pretty successful and yet, Apple went in direct competition with them, using APIs that only Apple gets to use in their Music app (like integration with Siri).
https://www.macrumors.com/how-to/set-preferred-music-streami...
Also Spotify has access to all of the APIs it needs. It just refuses to use them.