{"id":28220,"library":"spotify2csv","title":"spotify2csv","description":"A Python library to convert Spotify URLs (tracks, playlists, albums) into CSV files containing track info like name, artist, and album. Current version: 0.4.2. Release cadence: infrequent.","status":"active","version":"0.4.2","language":"python","source_language":"en","source_url":"https://github.com/arthurwhite/spotify2csv","tags":["spotify","csv","playlist","metadata"],"install":[{"cmd":"pip install spotify2csv","lang":"bash","label":"Install via pip"}],"dependencies":[{"reason":"Used for interacting with Spotify Web API","package":"spotipy","optional":false}],"imports":[{"note":"Importing the module directly gives you a module object, not the class.","wrong":"import spotify2csv","symbol":"Spotify2CSV","correct":"from spotify2csv import Spotify2CSV"}],"quickstart":{"code":"from spotify2csv import Spotify2CSV\nimport os\n\nclient_id = os.environ.get('SPOTIFY_CLIENT_ID')\nclient_secret = os.environ.get('SPOTIFY_CLIENT_SECRET')\n\ns2c = Spotify2CSV(client_id, client_secret)\n# Convert a Spotify playlist URL to CSV\ns2c.playlist_to_csv('https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M', 'playlist.csv')","lang":"python","description":"Initialize with Spotify API credentials, then call one of the conversion methods: track_to_csv, playlist_to_csv, album_to_csv."},"warnings":[{"fix":"Create an app at https://developer.spotify.com/dashboard and set environment variables SPOTIFY_CLIENT_ID and SPOTIFY_CLIENT_SECRET.","message":"Requires a Spotify Developer account and valid client_id/client_secret. Without these, all methods will raise an error.","severity":"breaking","affected_versions":"all"},{"fix":"Ensure the output directory exists and the file is not opened elsewhere.","message":"CSV file path must be writable; if the file exists, it will be overwritten without warning.","severity":"gotcha","affected_versions":"all"},{"fix":"Use the URL format as shown in the Spotify share menu.","message":"The library does not support track IDs; you must provide full URLs (e.g., https://open.spotify.com/track/...).","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Check that SPOTIFY_CLIENT_ID and SPOTIFY_CLIENT_SECRET are set correctly and the app is registered.","cause":"Invalid or missing Spotify API credentials.","error":"spotipy.exceptions.SpotifyException: http status: 401, code: -1 - code: 401, ..."},{"fix":"Use 'from spotify2csv import Spotify2CSV'.","cause":"Incorrect import pattern (import spotify2csv instead of from spotify2csv import Spotify2CSV).","error":"AttributeError: module 'spotify2csv' has no attribute 'Spotify2CSV'"},{"fix":"Pass client_id and client_secret: Spotify2CSV('your_id', 'your_secret').","cause":"Instantiated Spotify2CSV() without arguments.","error":"TypeError: __init__() missing 2 required positional arguments: 'client_id' and 'client_secret'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}