Spotipy is a lightweight Python library for the Spotify Web API. With Spotipy you get full access to all of the music data provided by the Spotify platform.
Questions tagged [spotipy]
474 questions
4
votes
2 answers
Spotipy (Spotify's Web API Python wrapper) examples failing
I cloned and installed Paul Lamere's Python wrapper for the Spotify Web API via python setup.py install but I can't seem to run some of the examples correctly.
Specifically, when I try to run user_playlists_contents.py or user_starred_playlist.py, a…

acannon828
- 528
- 7
- 22
3
votes
0 answers
How to get genres of songs using spotify API
I'm trying to create a dataset of all my saved tracks on spotify with its metadata. I've gotten all of the song features, the track name and track id. I want to add a column of the track's artist and one of the genre.
I tried adding it by the…

chiggywiggy
- 63
- 1
- 2
- 4
3
votes
1 answer
How do you change user in the Python Spotify API?
I'm starting to code a project based on the spotify API in Python, using the Spotipy module. This is my code
import spotipy
from spotipy.oauth2 import SpotifyOAuth
import requests as…

manutorrente
- 31
- 4
3
votes
1 answer
How to auth in spotipy without open web browser?
I tried the standard methods (which are described on the home page), but I need to log in without a web browser. How can I do this?

Антон Фикалис
- 31
- 2
3
votes
1 answer
Efficiently batching Spark dataframes to call an API
I am fairly new to Spark and I'm trying to call the Spotify API using Spotipy. I have a list of artist ids which can be used to fetch artist info. The Spotify API allows for batch calls up to 50 ids at once. I load the artist ids from a MySQL…

samiam
- 33
- 3
3
votes
1 answer
Is there a method to retrieve all tracks from a playlist using Spotipy?
I'm trying to extract all songs from one of my playlists in Spotify. Using the spotipy package in Python to help accomplish this. Below is the current code I have, which only gets 100 tracks. I tried poking around the internet for solutions but…

Abhipsit Srivastava
- 31
- 1
- 3
3
votes
1 answer
Getting currently playing song with Spotipy gives error: "'Spotify' object has no attribute 'currently_playing'"
I'm programming a script that returns your currently playing song from Spotify.
I read the documentation from Spotify API and everything is working well but I have some problems trying to implement some modules.
For example here…

strider
- 683
- 9
- 25
3
votes
2 answers
How do I programmatically feed data into a python 'input()' prompt?
I'm using a python wrapper for the Spotify API.
https://spotipy.readthedocs.io/en/latest/#installation
As part of the authorization process, the Spotify API has the user login to Spotify in their default web browser, then sends them to a predefined…

Gaun
- 43
- 6
3
votes
1 answer
Spotipy client_credential_manager no token provided
I'm trying to use the Spotify API with the spotipy.py python module. I saw a specific example in several places and everyone says it works. this is the code:
CLIENT_ID = '3de0e551d7ad4f53928abdef515150ed'
CLIENT_SECRET =…

DJ E.T
- 31
- 4
3
votes
2 answers
How to get spotipy playlist results in list format
I'm using spotipy to get a list of my playlists. I use
if token:
sp = spotipy.Spotify(auth=token)
playlists = sp.user_playlists(username)
for item in playlists['items']:
id= item['uri']
print id
This returns a list of playlist uri's that…

Bane89
- 45
- 5
3
votes
1 answer
Having trouble using cached tokens with Spotipy for Spotify?
I'm trying to use Spotipy to access a user's Spotify library but am running into a bit of trouble. For background, I'm using Flask, SQLAlchemy, and Flask-Login.
I looked off of this tutorial on github to get started, but this one doesn't quite work…

aevumcessi
- 61
- 8
3
votes
1 answer
Adding tracks to a playlist in Spotify using Spotipy
I'm using the Python bindings for the Spotify API to list an artists top tracks and add them to a playlist, but it fails every time, as if it excepts a different type of input.
New_Track_List is a string containing the output of the top tracks…

Emil Visti
- 55
- 1
- 6
3
votes
1 answer
Spotipy not verifying via Oauth?
I'm attempting to write a Python script to create a Spotify playlist via the Spotipy application. I've successfully created an application in Spotify's Dev center and input the necessary variables into Spotipy's example (see below). However, the…

MrJones1234
- 31
- 3
2
votes
0 answers
Getting track's URI's from Spotify API using Spotipy?
I am working in collecting a data set that crossreferences a track's audio features and the Billboard's chart data set available on Kaggle. I am trying to get each song's URI in order to then get its audio features, and I defined the following…

Mario A
- 55
- 3
2
votes
0 answers
Spotipy - Can't add tracks to playlist
I've been trying to create a simple tool that converts apple music playlists to Spotify playlists using web scraping and Spotipy.
I broke each part of this tool into various functions. My function to scrape the apple website and create a playlist…

Robinson T
- 101
- 2