Get All Photos

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


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


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

Return Status

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


XML string value that lists the information for the folder of all the photos in a library. An example of the XML returned from the request is shown below:

<?xml version="1.0" encoding="UTF-8"?>
<MediaContainer size="25" allowSync="1" art="/:/resources/photo-fanart.jpg" identifier="com.plexapp.plugins.library" librarySectionID="1" librarySectionTitle="Photos" librarySectionUUID="fc948ea9-3fad-45e2-99ef-b461b2d746d2" mediaTagPrefix="/system/bundle/media/flags/" mediaTagVersion="1641342384" nocache="1" sortAsc="1" thumb="/:/resources/photo.png" title1="Photos" title2="All Photos" viewGroup="photo" viewMode="458810">
<Directory ratingKey="3663" key="/library/metadata/3663/children" guid="local://3663" type="photo" title="2002" summary="" index="1" composite="/library/metadata/3663/composite/1611751196" thumb="/library/metadata/3663/thumb/1611751196" art="/library/metadata/3663/art/1611751196" addedAt="1430260593" updatedAt="1611751196"></Directory>


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 photo folders 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.
sortAsc1 - the library is sorted in ascending order.
0 - the library is sorted in descending order.
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 photo folder that has been associated with the Plex server.

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


Example 1

Get the list of all photo folders from the library associated with ID 1 on the Plex Media Server located at the IP address of