This is an independent, community-developed library and is not affiliated with or endorsed by Spotify.
Key features
The SDK is designed with developer experience and reliability in mind:Type-safe
Full type hints with Pydantic models for all API responses. Get autocomplete and type checking in your IDE.
Sync and async
Dedicated
SpotifyClient and AsyncSpotifyClient classes. Use the programming model that fits your application.Automatic retries
Exponential backoff with jitter for rate limits and transient errors. Built-in resilience without extra code.
Context managers
Clean resource management with
with and async with support. No manual cleanup required.Quick example
Here’s a minimal example showing how easy it is to get started:What you can do
The SDK provides access to all major Spotify API endpoints:- Albums - Get album details, tracks, and metadata
- Artists - Retrieve artist information, top tracks, and related artists
- Tracks - Access track details, audio features, and analysis
- Playlists - Create, modify, and retrieve playlist data
- Search - Search across albums, artists, tracks, playlists, and more
- User Library - Manage saved albums, tracks, and shows
- Shows & Episodes - Access podcast content
- Audiobooks & Chapters - Retrieve audiobook information
Next steps
Installation
Install the SDK using pip or uv and verify your setup
Quickstart
Build your first integration with a complete walkthrough