Requests for playlists have always included the full track objects contained within. This representation may be convenient for playlists with ten or twenty tracks but can cause problems for playlists that contain hundreds or thousands of tracks. Requesting such large playlists could result in requests that take a long time to respond and that eventually timeout.
Today, we introduce two new representations for the /playlists
resource:
compact
and id
.
If you add representation=compact
to a playlist request, the request will
return only the playlist itself, without any of the tracks it contains. This
representation may be useful if you’re purely interested in data about the
playlist itself and not the tracks contained within.
Alternatively, if you set the representation=id
parameter, it will return the
playlist along with IDs of the tracks contained within, without all the
associated track meta data (artist, artwork, duration, etc.) If necessary, you
can then individually fetch additional information about each track by filling
those IDs into the /tracks
resource. This allows for greater parallelization
and can help make your application more responsive when working with large
playlists.
By default, requests for playlists will continue to include all the contained tracks. There is no need to update your application but we encourage you to take advantage of these new, more efficient representations of playlists.