r/foss
•
u/Major-Ad-4196
•
5d ago
•
2
I spent almost 3 years reverse-engineering Spotify's web player. I open-sourced the result so you can build Spotify apps without an API key.
Spotify has an official API, but building on it means dealing with developer apps, credentials, and increasingly restrictive access.
I wanted something simpler. So when I was 15, I started reverse-engineering the endpoints Spotify's own web player uses.
Almost three years later, it's called SpotAPI, and I've released the async rewrite under GPL-3.0.
The GIF is one of the things I built with it: a terminal interface that controls an actual Spotify player, even on a free account.
But the interesting part is the library underneath:
- No API key, developer account, or login for public Spotify catalogue data.
- Fully async, typed Python API for building your own music applications.
- Authenticated player controls, playlist management, and saved music.
- Interactive terminal and desktop interfaces, including synchronized, clickable lyrics.
It's not a cracked Spotify client. It doesn't bypass DRM, stream audio, or replace Spotify's servers. The playback features control an existing player through your own account.
The entire implementation is open source, including the reverse-engineered integrations.
Source (GPL-3.0): https://github.com/Aran404/SpotAPI
I'd be especially interested in what other developers could build with the API, or what you'd improve about its design.
142
u/trmdi 5d ago •
I bet they will block your 3 years of work in a few days.
19
u/FarPriority1955 4d ago
This is the kind of work I want to see more on reddit. Hats off.
41
u/yuki_doki 5d ago
Amazing work, dude.
You hand-coded it instead of AI slop, it's actually impressive. I'll try it soon.
9
u/InkscapePanda 5d ago
I think we need a spotify like this for open source music.
5
u/Altruistic_Celery180 5d ago
Waiting for the apks... Thanks!
8
u/JohnTilamook 5d ago
Awesome work man
3
u/0J-P0 5d ago
Is it possible to reorginise the query?👀
3
u/Elven_Allerrs 5d ago
Clickable lyrics in a terminal is exactly what I want from a music player.
3
u/Substantial_Lemon329 5d ago
Thank you for your service
3
u/antoniojac 4d ago
Bless up man! 👊🏽
3
u/ManFromInternet2 3d ago
Please find somewhere to release this on that is not GitHub, it's gonna get a dmca soon
7
u/PeridotPower 3d ago
Not trying to say that this isnt cool, but the gui has all signs of ai usage in it. Not sure why everyone says its handcoded if its probably not entirely. Its not bad to use ai, but tell if someone asks. The small * live at the top right is the 1*1 of ai. I believe you that you started without ai, but I dont think the finished product doesn't include it.
2
u/Oscar-Xiatian 4d ago
Can it still be used today? I really need it, as I hate ytmusic.
2
u/Unlikely-Store-3256 4d ago
Would be sick to be able to effectively use the Spotify client as my front end for my own navidrome server.
2
u/Vespera 3d ago
This is really cool. Did you also find a way to scrape audio-features? That was tricky for me
2
u/SluttyFurryPaws 3d ago •
3 years? More like 3 days of claude working.
1
u/Single-Blackberry866 5d ago
I'm sure the account will be banned for the ToS violation or something
1
u/mhenrique_jpg 3d ago
Ansioso pra ver os apps pra Android baseados na sua API 🤏🏾
1
u/lt_bgg 2d ago
I want something like this just for lyrics, its so lame we can't query musixmatch directly
1
u/ze_pequeno 2d ago
1
u/bob-i-stan 2d ago
sorry if I am not following but how is this different from ncspot?
1
u/StayFoccus 5d ago
Insane man, respect 🫡
2
u/dontPaniik 12h ago
Some of yalls blood pressure goes up at the slightest evidence of AI usage
1
u/SaucerMechanic99 16h ago
NIce done :D I implemented it in my panel, XD works pretty great. It has some limitations due to Spotify's specifications, but it suits me. I'll have a HA panel with a soundbar in the kitchen and the music will be flowing :D Still a work in progress... but thanks for this package!!!
1
u/Tonoplas 12h ago
Hey there, so I’m currently working on creating an audio player that replaces my local Spotify app, it can as much be a local music files player than it can be a recoded Spotify. The whole point of it is that it’s lightweight (150-200MB of RAM compare to Spotifys 650-700MB), and really customizable. It’s a little side project that I started more like a showoff of what the REA skill is capable of with an LLM, and it got far, but right now for connecting Spotify, I need to create a dev app, and provide the API key, but if I understood well, if I can base the app off of what you did, I can remove that restriction of having to create an api key ?
If it interests you, you can check out the work : https://github.com/Tonoplas909/sonora-app
0
u/Exciting_Active4857 3d ago
i = claude
0
u/[deleted] 3d ago
Why are most of your comments here written by AI?
-2
u/Logical_Parsley_9470 5d ago
Dayum bro.. you're HIM/HER
-7
u/Admirable_Zombie5245 5d ago
Damn, using 3 years of your life to do something and watching AI being able to do it in less than a day must suck
0
u/Individual_Treat1727 1d ago
W SLOP proud that i could tell a claude ui when i see one
-2
u/sarnosantosa 5d ago
it is just remote-control player, no way to play itself
-2
u/harishsrinivas 4d ago
Hey hi I have developed hivefy a yr ago Spotify like music player anyone interested try soo
GitHub : GitHub.com/Harish-Srinivas-07/hivefy
-22
u/Sweaty_Rich7217 5d ago
Why would I want to look at Spotify when there’s Apple Music 😭✌️✌️, cool project though
0
u/[deleted] 2d ago
[deleted] — view deleted comment