skillfed

spotipy

A light weight Python library for the Spotify Web API

spotipy v2.26.0 476.3K downloads/30d#6,448 on PyPI5,467
Permissive license MIT Active released

What it is and what it does

Spotipy wraps the Spotify Web API in a lightweight Python library, letting you search for tracks and artists, retrieve metadata, manage playlists, and access user library data without building HTTP requests by hand. It handles OAuth2 authentication for both application-level and user-level access, and depends on requests and urllib3 for HTTP communication, with optional redis support for caching.

The library is designed for developers who want to build Python applications that interact with Spotify's music catalog and user accounts. It abstracts away API endpoint details and response parsing, so you can focus on your application logic rather than REST mechanics.

Use it for:

  • Build a music discovery app that searches Spotify's catalog and displays track details programmatically
  • Sync a user's saved tracks or playlists to a local database or external service
  • Create a recommendation engine that analyzes user listening history via the Spotify API
  • Automate playlist creation or management based on external data or user preferences
  • Integrate Spotify data into a web or desktop application without writing raw HTTP code

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Spotipy is a Python client library for the Spotify Web API that provides access to Spotify's music data, search, and user account features through a simple interface.

Yes. Spotipy is actively maintained, has no known vulnerabilities, installs with low friction, and is widely used. It's the standard choice for Python developers who need programmatic access to Spotify's API. Install it if you're building any application that needs to query or manipulate Spotify data.

Install

spotipy on PyPI

pip

pip install spotipy

uv

uv add spotipy

poetry

poetry add spotipy

Installing spotipy

Before you install

Low friction install with a pure-Python wheel distribution. The project is actively maintained with recent commits and a large community following (5467 stars), suggesting stable, well-tested code.

License in practice

MIT license is permissive—you can use, modify, and distribute this library freely in commercial or private projects with minimal restrictions.

Quickstart

pip install spotipy

import spotipy
from spotipy.oauth2 import SpotifyClientCredentials

sp = spotipy.Spotify(auth_manager=SpotifyClientCredentials(
    client_id="YOUR_CLIENT_ID",
    client_secret="YOUR_CLIENT_SECRET"
))
results = sp.search(q='weezer', limit=20)

Requires a Spotify Developer account with app credentials (client ID and secret) obtained from https://developer.spotify.com/dashboard

Verify before relying

  • Whether redis is required at runtime or only for optional caching features
  • Specific Spotify API endpoints and scopes supported beyond the general 'full access' claim
  • Rate limiting behavior and retry strategies when hitting Spotify API quotas

Package facts

License MIT (permissive)
Python support supports the current Python release (>3.8)
Install friction low — pure-Python wheel
Runtime dependencies 3 — redis, requests, urllib3
Maintenance actively maintained — 164 days since the last release
Last repo commit
First released
Downloads 476,276/month — #6,448 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: spotipy-2.26.0-py3-none-any.whl

Tags

spotify api python clientspotify web api wrapperaccess spotify music dataspotify search and playbackspotify user authenticationspotify track metadataspotify playlist management
music-apioauth2rest-client

More WWW/HTTP packages