Menu

How to Use Spotify with Python Without an API Key
📰

How to Use Spotify with Python Without an API Key

DEV Community: github·Aran Services·1 day ago
#B5dujCnr
#devtogithub#technology#devto#dev#spotify
Long article (431 words) — no AI summary yet.
Reading 0:00
15s threshold

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 .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.