GET
/
library
/
sections
/
{sectionKey}
/
actor
declare(strict_types=1);

require 'vendor/autoload.php';

use LukeHagar\Plex_API;
use LukeHagar\Plex_API\Models\Operations;

$sdk = Plex_API\PlexAPI::builder()
    ->setSecurity(
        '<YOUR_API_KEY_HERE>'
    )
    ->build();



$response = $sdk->library->getActorsLibrary(
    sectionKey: 9518,
    type: Operations\GetActorsLibraryQueryParamType::TvShow

);

if ($response->object !== null) {
    // handle response
}
{
  "MediaContainer": {
    "size": 50,
    "allowSync": false,
    "art": "/:/resources/show-fanart.jpg",
    "identifier": "com.plexapp.plugins.library",
    "mediaTagPrefix": "/system/bundle/media/flags/",
    "mediaTagVersion": 1734362201,
    "nocache": true,
    "thumb": "/:/resources/show.png",
    "title1": "TV Series",
    "title2": "By Starring Actor",
    "viewGroup": "secondary",
    "viewMode": "131131",
    "Directory": [
      {
        "fastKey": "/library/sections/2/all?actor=134671",
        "thumb": "https://metadata-static.plex.tv/e/people/e2a915b537ef720252b6d408bc1f91b3.jpg",
        "key": "134671",
        "title": "Aaron Paul"
      }
    ]
  }
}

Authorizations

X-Plex-Token
string
header
required

Plex Authentication Token

Headers

Accept
enum<string>
Available options:
application/json,
application/xml
Example:

"application/json"

Path Parameters

sectionKey
integer
required

The unique key of the Plex library. Note: This is unique in the context of the Plex server.

Example:

9518

Query Parameters

type
enum<integer>
required

The type of media to retrieve or filter by. 1 = movie 2 = show 3 = season 4 = episode E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries

Available options:
1,
2,
3,
4,
8,
9,
10
Example:

2

Response

200
application/json
Successful response containing media container data.
MediaContainer
object