[GH-ISSUE #587] How do i get the owner of a playlist #350

Closed
opened 2026-02-27 23:22:08 +03:00 by kerem · 3 comments
Owner

Originally created by @BananaDrum on GitHub (Oct 15, 2020).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/587

for example on this playlist: https://open.spotify.com/playlist/6p21dRudS9FmcyGvKWPq2R

who can i extract the owner (machinebrother)

thanks :)

Originally created by @BananaDrum on GitHub (Oct 15, 2020). Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/587 for example on this playlist: https://open.spotify.com/playlist/6p21dRudS9FmcyGvKWPq2R who can i extract the owner (machinebrother) thanks :)
kerem closed this issue 2026-02-27 23:22:08 +03:00
Author
Owner

@Peter-Schorn commented on GitHub (Oct 15, 2020):

The Spotify.playlist(self, playlist_id, fields=None, market=None, additional_types=("track",)): method contains an owner property in the top-level of the JSON response.

<!-- gh-comment-id:709582466 --> @Peter-Schorn commented on GitHub (Oct 15, 2020): The `Spotify.playlist(self, playlist_id, fields=None, market=None, additional_types=("track",)):` method contains an `owner` property in the top-level of the JSON response.
Author
Owner

@Peter-Schorn commented on GitHub (Oct 15, 2020):

sp = spotipy.Spotify(
    auth_manager=spotipy.SpotifyOAuth(
        client_id, client_secret, redirect_uri,
	scope=scope, cache_path=cachePath
    )
)

playlist = sp.playlist("6p21dRudS9FmcyGvKWPq2R")

print(playlist["owner"])

Output:

{'display_name': 'machinebrother', 'external_urls': {'spotify': 'https://open.spotify.com/user/machinebrother'}, 'href': 'https://api.spotify.com/v1/users/machinebrother', 'id': 'machinebrother', 'type': 'user', 'uri': 'spotify:user:machinebrother'}
<!-- gh-comment-id:709594259 --> @Peter-Schorn commented on GitHub (Oct 15, 2020): ```python sp = spotipy.Spotify( auth_manager=spotipy.SpotifyOAuth( client_id, client_secret, redirect_uri, scope=scope, cache_path=cachePath ) ) playlist = sp.playlist("6p21dRudS9FmcyGvKWPq2R") print(playlist["owner"]) ``` Output: ``` {'display_name': 'machinebrother', 'external_urls': {'spotify': 'https://open.spotify.com/user/machinebrother'}, 'href': 'https://api.spotify.com/v1/users/machinebrother', 'id': 'machinebrother', 'type': 'user', 'uri': 'spotify:user:machinebrother'} ```
Author
Owner

@BananaDrum commented on GitHub (Oct 16, 2020):

perfect answer. thanks alot

<!-- gh-comment-id:709933450 --> @BananaDrum commented on GitHub (Oct 16, 2020): perfect answer. thanks alot
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotipy#350
No description provided.