Spotify

Get Spotify playlist

Get a Spotify playlist and its tracks by id or playlist URL.

GET/v1/spotify/playlist
1credit
x-api-keystringheader

API key (`sfk_...`)

Parameters
3
playlistIdstringquery

Spotify playlist id, such as `37i9dQZF1DX4UtSsGT1Sbe`. Pass this or `url`.

min 1 chars · max 128 chars

urlstringquery

Public Spotify playlist URL, such as `https://open.spotify.com/playlist/37i9dQZF1DX4UtSsGT1Sbe`. Pass this or `playlistId`.

min 1 chars · max 4096 chars

cursorstringquery

Pass `page.nextCursor` from the previous response to get the next page.

min 1 chars · max 9 chars

Response fields
43

Endpoint-specific response payload.

datalookupStatus
string

Whether the playlist was found.

one of: found, not_found

Playlist details when available.

dataplaylistplatform
string

Platform for this playlist.

one of: spotify

dataplaylistplaylistId
string

Stable Spotify playlist identifier.

min 1 chars

dataplaylisttitle
string

Playlist title.

min 1 chars

dataplaylistdescription
stringnullable

Playlist description as plain text when available.

dataplaylistcoverArtUrl
stringnullable

Best available playlist cover image URL when available.

dataplaylistplaylistUrl
string

Canonical public Spotify playlist URL.

min 1 chars

dataplaylistfollowers
integernullable

Number of users who saved the playlist when available.

≥ 0

dataplaylistitemCount
integernullable

Total number of items (tracks and episodes) on the playlist when available, as Spotify reports it. It counts items Spotify withholds as restricted content, which `items` leaves out, so it can exceed the number of items returned across all pages.

≥ 0

Playlist owner when available.

dataplaylistowneruserId
string

Spotify user id of the owner.

min 1 chars

dataplaylistownerdisplayName
stringnullable

Owner display name when available.

dataplaylistownerprofileUrl
string

Public Spotify profile URL of the owner.

min 1 chars

Tracks and episodes on this page in playlist order, up to 50.

dataitems[]type
string

Kind of item: a music track or a podcast episode.

one of: track, episode

dataitems[]id
string

Spotify track id, or episode id for an episode.

min 1 chars

dataitems[]title
string

Track or episode title.

min 1 chars

dataitems[]url
string

Canonical public Spotify track or episode URL.

min 1 chars

dataitems[]durationMs
integernullable

Duration in milliseconds when available.

≥ 0

dataitems[]explicit
boolean

Whether the item is marked explicit.

dataitems[]playable
booleannullable

Whether the item is playable on Spotify when available.

dataitems[]playCount
integernullable

Reported play count of a track when available; null for episodes.

≥ 0

Album a track belongs to when available; null for episodes.

dataitems[]albumalbumId
string

Spotify album id. Pass it to the Spotify album endpoint for the full tracklist.

min 1 chars

dataitems[]albumtitle
string

Album title.

min 1 chars

dataitems[]albumcoverArtUrl
stringnullable

Best available square cover image URL when available.

Artists credited on a track (empty for episodes).

dataitems[]artists[]artistId
string

Spotify artist id.

min 1 chars

dataitems[]artists[]displayName
string

Artist display name.

min 1 chars

Podcast an episode belongs to when available; null for tracks.

dataitems[]podcastpodcastId
string

Spotify podcast id.

min 1 chars

dataitems[]podcasttitle
string

Podcast title.

min 1 chars

Pagination state for the current page.

datapagehasMore
boolean

Whether another page is available.

datapagenextCursor
stringnullable

Cursor to pass in the next request when more pages exist; null on the last page.

Metadata describing the request and billing outcome.

metarequestId
string

Unique request identifier for tracing this API call.

min 1 chars

metacreditsCharged
integer

Credits charged for this request.

≥ 0

metaversion
string

Public API version that served the response.

one of: v1

metastale
booleanoptional

Present, and `true`, only when the source couldn't be reached and this is the last good answer for the same request instead, up to 24 hours old. Absent on every live answer.

one of: true

metafetchedAt
stringoptional

When a stale answer (`stale: true`) was originally fetched (ISO 8601, UTC). Absent on every live answer.

Code example

curl "https://api.socialfetch.dev/v1/spotify/playlist?playlistId=37i9dQZF1DX4UtSsGT1Sbe" \
  -H "x-api-key: YOUR_API_KEY"

Responses

Spotify playlist with a page of its tracks and episodes.