Get All Music

A library, such as movies or TV shows, can contain many items. This API command will return all music for a specific library that is available on the Plex server.


GET http://[IP address]:32400/library/sections/[Music Library ID]/all?X-Plex-Token=[PlexToken]


IP addressThe IP address of the Plex Media server.
PlexTokenThe temporary authentication Plex token.
Music Library IDThe key associated with a music library. This key can be found by calling the Libraries API command and looking for a music library.

Return Status

HTTP CodeDescription
200Success - The request was successful.
401Unauthorized - The Plex token provided was not valid.


XML string value that lists the all the music artists in the library. An example of the XML returned from the request is shown below:

<?xml version="1.0" encoding="UTF-8"?>
<MediaContainer size="99" allowSync="1" art="/:/resources/artist-fanart.jpg" identifier="com.plexapp.plugins.library" librarySectionID="9" librarySectionTitle="Music" librarySectionUUID="c68ad90f-dd6d-4ef7-82c9-a7a9b3e1193c" mediaTagPrefix="/system/bundle/media/flags/" mediaTagVersion="1641342384" nocache="1" thumb="/:/resources/artist.png" title1="Music" title2="All Artists" viewGroup="artist" viewMode="65592">
    <Directory ratingKey="56654" key="/library/metadata/56654/children" guid="plex://artist/5d07bbfd403c6402904a6593" type="artist" title="ABBA" summary="The most commercially successful pop group of the 1970s, ABBA put Sweden on the map as a music mecca and influenced the sound of pop for decades to come. With their flamboyant fashion sense and two-couple membership, ..." art="/library/metadata/56654/art/1641034561" addedAt="1430697022" updatedAt="1641034561">
        <Genre tag="Pop/Rock" />
        <Country tag="Sweden" />


The XML returned provides a list of the all music artists in a library that are available on the Plex server. The root is the MediaContainer element. This element contains a few attributes that provide overall information about the music artist on the server.

MediaContainer Attributes for Music Artists
sizeThe number of music artists in the library.
allowSync1 - allow syncing content from this library.
0 - don't allow syncing content from this library.
artBackground artwork used to represent the library.
identifierThe type of item.
librarySectionIDThe unique key associated with the library.
librarySectionTitleThe title of the library.
librarySectionUUIDUnique GUID identifier for the library.
mediaTagPrefixPrefix for the media tag.
mediaTagVersionMedia tag version.
Note: This could be a date and time value.
nocache1 - cache the library.
0 - do not cache the library.
thumbThe thumbnail for the library.
title1The title of the library item.
Note: This appears to be internally created, and can't be changed by the server owner.
title2A description title for the library.
viewGroupThe group type used to view the library.
viewModeUnknown integer value.

Within the MediaContainer there are one or more Directory child elements. Each Directory element represents one music artist available on the Plex server, which also represents a single artist folder on the server..

Directory Attributes
ratingKeyA key associated with the music artist.
keyThe relative URL of the music information for the artist.
guidThe unique identifier for the music artist.
typeThe type of item represented by this Directory element.
titleThe name of the music artist.
summaryA summary of the history of the artist.
lastViewedAtThe date and time the artist was last viewed.
thumbThe thumbnail for the music artist.
artThe background artwork used to represent the artist.
addedAtThe date and time the music artist was added to the library.
updatedAtThe date and time the music artist was updated in the library.

Also within the Directory element there are multiple additional child elements that provide more details about the music artist. These child elements include Genre and Country.

Within each of these child elements is a single tag attribute that provides the information for the element.


Example 1

Get the list of all music artists from the library associated with ID 8 on the Plex Media Server located at the IP address of