I had this realization while at the gym: Spotify's ads are just too much without a premium subscription. So, I thought why not create a free music streaming site? I've been exploring different APIs, and here's what I've found so far:
- Jamendo has a solid collection of indie music but lacks mainstream tracks.
- The YouTube API does provide access to popular songs, but features like background playback have significant restrictions due to Apple and YouTube policies, not to mention the limited API quota (about 100 searches per day).
- Spotify and Apple Music APIs require a user subscription for full playback, so that's out of the question.
This leads me to my main challenges:
1. What's the best way to stream full mainstream pop, hip-hop, or top-chart songs legally and for free?
2. How can I enable background audio playback on the web without running into legal issues or browser blocks?
Has anyone figured this out? What APIs or methods are you using?
3 Answers
Have you thought about using music from video games? There's this game called osu! that lets users upload their own music files. It's supposed to be the uploader's responsibility for rights, but hey, it's worth exploring! You’d still need YouTube for those complete tracks, though.
Honestly, it seems nearly impossible to stream mainstream music legally and for free. If there were legal ways to access that music, you probably wouldn't need to create your own platform right now. You’ll likely have to deal with licensing fees to legally offer mainstream content.
That's such a bummer! I really wish there were better options out there without the hefty price tag.
Well, you could always look into self-hosting an Invidious instance as a workaround for the YouTube API. If you control the server, you may have more flexibility than using a static host. It could streamline the process of background playback without getting tangled up in API limits!
That's an interesting approach! I wonder if it’ll significantly affect the performance, though.

I like that idea! It could open up a lot of unique music options!