mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-04-26 16:15:51 +03:00
[GH-ISSUE #1175] Error 404 when calling playlist_items for Spotify's official "Top 50" playlist IDs #692
Labels
No labels
api-bug
bug
dependencies
documentation
duplicate
enhancement
external-ide
headless-mode
implicit-grant-flow
invalid
missing-endpoint
pr-welcome
private-api
pull-request
question
spotipy3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/spotipy#692
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @AdriaPadilla on GitHub (Nov 30, 2024).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/1175
Hello!
I'm encountering an issue when using the
playlist_items()function from Spotipy to retrieve tracks from Spotify's official "Top 50" playlists. I tested the code with multiple playlist IDs, all corresponding to Spotify's public official playlists, and encountered the same problem consistently.For example, the API returns 404 for all this playlist ids:
The code
API returns:
However, it works perfectly when using a public playlist ID created by users. For example, the code works flawlessly with this Queen playlist:
2sWWEDq1DuOnAJJWVHMRfC.This indicates that the issue is not with my code but with the API itself.
I have searched for information in Spotify's API documentation and announcements but found no mention of any restrictions related to this. Has anyone else encountered the same issue? Perhaps it might be necessary to escalate this to Spotify to understand what is happening. Any insights or information would be greatly appreciated.
Spotipy Version: 2.24.0
Python Version: 3.12.3
Operating System: Ubuntu 24.04.1 LTS x86_64
@mjanonis commented on GitHub (Nov 30, 2024):
https://github.com/spotipy-dev/spotipy/issues/1172
All Spotify-owned playlists are inaccessible using their API now https://developer.spotify.com/blog/2024-11-27-changes-to-the-web-api
@AdriaPadilla commented on GitHub (Dec 1, 2024):
You're absolutely right, I didn't pay full attention to Spotify post. It's very clear:
(...)
Effective today, new Web API use cases will no longer be able to access or use the following endpoints and functionality in their third-party applications.
(...)
Even so, a rather absurd decision by Spotify.
@akraus53 commented on GitHub (Dec 1, 2024):
Thats so sad... I was copying a Spotify Artist Radio from one of the Artists from here into one of my playlists every day for the last year. Seems I have to find another way
@dieser-niko commented on GitHub (Dec 2, 2024):
I'm going to add this to the FAQ, this is going to throw off a lot of people.
@AdriaPadilla commented on GitHub (Dec 2, 2024):
I've been using the Top 50 playlists from European countries to understand the evolution of musical industry. Everything with an academic purpose, as I work at a university and we are deeply focused on cultural aspects. These playlists were a reflection of the evolution of the music market, but also of the cultural changes in the population.. From my point of view, it makes absolutely no sense to block access to these playlists via API... I wonder if the cost of the requests justifies the shutdown. Anyway, I think it's a pretty petty decision. I get that they don’t want to give access to audio_features, which is hidden info in the user interface and could be used to feed AI models... but how do these official playlists cause any harm?
@dieser-niko commented on GitHub (Dec 2, 2024):
@AdriaPadilla Reply to this post on Spotify's forum if you haven't done so already: https://community.spotify.com/t5/Spotify-for-Developers/Changes-to-Web-API/td-p/6540414
I'm not sure if this will change anything, but your comment would fit right in.
@AdriaPadilla commented on GitHub (Dec 2, 2024):
Done!
I’ve read some responses to the post on Spotify’s official page, and the change is catastrophic for many developers. I’ve also seen numerous students with their final projects ruined, as well as academics (myself included) who used the API to access specific data. This decision is unacceptable.
@akraus53 commented on GitHub (Dec 4, 2024):
I think in the age of information, every analysis done by someone (Spotify) is of interest to someone else (us) and therefore the creator doesn't want the user to have a benefit. If I were a competitor of Spotify, I'd also analyze the Top50 tracks or some other smart playlist, where Spotify spent time and engineering hours to create the algorithms.
It's really sad they felt the need to make these changes, on the other hand I can understand they don't want to offer their intellectual property (f&$king playlists) for free.
@Syzygianinfern0 commented on GitHub (Dec 10, 2024):
Does anyone have a workaround for getting public playlist tracks?
@dieser-niko commented on GitHub (Dec 10, 2024):
Honestly I can't believe this, but my project spotipy-anon is not yet affected by this change. It might get patched in the future though.
Here's a quick code snippet to try it out yourself:
@Syzygianinfern0 commented on GitHub (Dec 10, 2024):
Just did! Can confirm that it works :D
@Syzygianinfern0 commented on GitHub (Dec 10, 2024):
My current workaround is to use two different Spotipy auths like this
I use
spto read/write on my playlists andsp_anonto read public playlists!@dieser-niko commented on GitHub (Dec 10, 2024):
This is just a speculation and I'm not sure if this applies to all Spotify owned playlists, but if you decode the playlist id to ascii, then it stars off with the word "format". In the Base62 format that Spotify uses (0-9, a-z, A-Z) it starts like this: "37i9dQZF1EI". Maybe you could filter them like that.
@ParalysedBeaver commented on GitHub (Dec 11, 2024):
I had a simple script that copied the contents of 2 Spotify owned Throwback Thursday playlists, as they constantly change and there were some weeks where I wanted a permeant copy. This change to the Spotify API broke it. Thank you, @dieser-niko, spotipy-anon got it working again.
@AdriaPadilla commented on GitHub (Dec 11, 2024):
OMG! It works perfectly. You’re a genius! I love it! Thank you so much!
I’ve tested it extensively using the
sp.playlist_items(playlist_id)andsp.artist(artist_id)methods, with atime.sleep(1)between requests. Not a single API request was rejected.Let’s not go too deep into this, so we don’t give Spotify ideas on how to close these doors.
From here, there are a few possibilities we should consider:
Maybe we should suggest officially incorporating SpotifyAnon into Spotipy and adding specific methods for making anonymous requests to Spotify-owned objects.
In any case, once again, thank you so much!
@dieser-niko commented on GitHub (Dec 11, 2024):
The thing is, spotipy-anon uses an unofficial and undocumented endpoint, so it doesn't really fit in. I actually requested this before I became a member and was denied for the same reason, which I do agree with: https://github.com/spotipy-dev/spotipy/issues/878#issuecomment-1299996552
@Syzygianinfern0 commented on GitHub (Dec 11, 2024):
Not sure if that is right (a counter-example: Today's Top Hits)
@dieser-niko commented on GitHub (Dec 11, 2024):
Yeah, but when decoding the ID, it still starts with "format". You can use https://www.dcode.fr/base62-encoding to decode the ID if you want to try it out. Make sure to select 0-9a-zA-Z
@Syzygianinfern0 commented on GitHub (Dec 12, 2024):
Oh I understand now!
@deraguir commented on GitHub (Dec 26, 2024):
Spotipy-anon reads some of my personal "top tracks" playlists but not all of them
@dieser-niko commented on GitHub (Dec 26, 2024):
You might want to open an issue in the spotipy-anon repository rather than discuss it here, but it sounds like there's nothing I can do about it.
@Syzygianinfern0 commented on GitHub (Feb 11, 2025):
@dieser-niko Looks like spotipy-anon fails as of today 😭
@dieser-niko commented on GitHub (Feb 11, 2025):
@Syzygianinfern0 what doesn't work for you? I still can fetch Spotify's playlists.
@Syzygianinfern0 commented on GitHub (Mar 23, 2025):
@dieser-niko the last time it was a false alarm, I think it was not working for a little while when I made the comment.
Although now, it has not been working for a few days. I tried the Quickstart example from your repo and its failing with the same error as from my script.