I started reverse-engineering Spotify's web player when I was 15. Almost three years later, that little experiment has become an open-source Python library called SpotAPI.
If you're building a music-related side project and just want to search Spotify's public catalogue, here's how to get started without registering a developer application.
Installation
You'll need Python 3.11 or newer.
python -m pip install spotapi
Enter fullscreen mode
Exit fullscreen mode
You can immediately search Spotify from your terminal:
python -m spotapi search "Daft Punk"
Enter fullscreen mode
Exit fullscreen mode
No developer account, client ID or client secret is required for this public search.
Searching Spotify with Python
import asyncio
from spotapi import Public
async def main ( ) -> None : results = await Public . search ( "Daft Punk" , limit = 5 )
for track in results . tracks : print ( track . name , track . uri )
asyncio .…