Plex Library API

Library endpoints which are outside of the Media Provider API. Typically this is manipulation of the library (adding/removing sections, modifying preferences, etc).

Business capability
Media Asset Management BC-3710

Operations 84

GET /library/all Get all items in library #
DELETE /library/caches Delete library caches #
PUT /library/clean/bundles Clean bundles #
POST /library/file Ingest a transient item #
GET /library/matches Get library matches #
GET /library/media/{mediaId}/chapterImages/{chapter} Get a chapter image #
PUT /library/metadata/{ids} Edit a metadata item #
DELETE /library/metadata/{ids} Delete a metadata item #
PUT /library/metadata/{ids}/addetect Ad-detect an item #
GET /library/metadata/{ids}/allLeaves Get the leaves of an item #
PUT /library/metadata/{ids}/analyze Analyze an item #
PUT /library/metadata/{ids}/chapterThumbs Generate thumbs of chapters for an item #
PUT /library/metadata/{ids}/credits Credit detect a metadata item #
GET /library/metadata/{ids}/extras Get an item's extras #
POST /library/metadata/{ids}/extras Add to an item's extras #
GET /library/metadata/{ids}/file Get a file from a metadata or media bundle #
PUT /library/metadata/{ids}/index Start BIF generation of an item #
PUT /library/metadata/{ids}/intro Intro detect an item #
POST /library/metadata/{ids}/marker Create a marker #
DELETE /library/metadata/{ids}/marker/{marker} Delete a marker #
PUT /library/metadata/{ids}/marker/{marker} Edit a marker #
PUT /library/metadata/{ids}/match Match a metadata item #
PUT /library/metadata/{ids}/matches Get metadata matches for an item #
DELETE /library/metadata/{ids}/media/{mediaItem} Delete a media item #
PUT /library/metadata/{ids}/merge Merge a metadata item #
GET /library/metadata/{ids}/nearest Get nearest tracks to metadata item #
PUT /library/metadata/{ids}/prefs Set metadata preferences #
PUT /library/metadata/{ids}/refresh Refresh a metadata item #
GET /library/metadata/{ids}/related Get related items #
GET /library/metadata/{ids}/similar Get similar items #
PUT /library/metadata/{ids}/split Split a metadata item #
GET /library/metadata/{ids}/subtitles Add subtitles #
GET /library/metadata/{ids}/tree Get metadata items as a tree #
PUT /library/metadata/{ids}/unmatch Unmatch a metadata item #
GET /library/metadata/{ids}/users/top Get metadata top users #
PUT /library/metadata/{ids}/voiceActivity Detect voice activity #
POST /library/metadata/{ids}/{element} Set an item's artwork, theme, etc #
PUT /library/metadata/{ids}/{element} Set an item's artwork, theme, etc #
DELETE /library/metadata/{ids}/{element} Delete an item's artwork, theme, etc #
GET /library/metadata/{ids}/{element}/{timestamp} Get an item's artwork, theme, etc #
GET /library/metadata/augmentations/{augmentationId} Get augmentation status #
PUT /library/optimize Optimize the Database #
PUT /library/parts/{partId} Set stream selection #
GET /library/parts/{partId}/indexes/{index} Get BIF index for a part #
GET /library/parts/{partId}/indexes/{index}/{offset} Get an image from part BIF #
GET /library/parts/{partId}/{changestamp}/{filename} Get a media part #
GET /library/people/{personId} Get person details #
GET /library/people/{personId}/media Get media for a person #
GET /library/randomArtwork Get random artwork #
GET /library/sections/all Get library sections (main Media Provider Only) #
POST /library/sections/all Add a library section #
DELETE /library/sections/all/refresh Stop refresh #
GET /library/sections/prefs Get section prefs #
POST /library/sections/refresh Refresh all sections #
GET /library/sections/{sectionId} Get a library section by id #
DELETE /library/sections/{sectionId} Delete a library section #
PUT /library/sections/{sectionId} Edit a library section #
PUT /library/sections/{sectionId}/all Set the fields of the filtered items #
PUT /library/sections/{sectionId}/analyze Analyze a section #
GET /library/sections/{sectionId}/autocomplete Get autocompletions for search #
GET /library/sections/{sectionId}/collections Get collections in a section #
DELETE /library/sections/{sectionId}/collection/{collectionId} Delete a collection #
GET /library/sections/{sectionId}/common Get common fields for items #
GET /library/sections/{sectionId}/composite/{updatedAt} Get a section composite image #
PUT /library/sections/{sectionId}/emptyTrash Empty section trash #
GET /library/sections/{sectionId}/audioLayout Get audio layouts in a section #
GET /library/sections/{sectionId}/videoCodec Get video codecs in a section #
GET /library/sections/{sectionId}/audioCodec Get audio codecs in a section #
GET /library/sections/{sectionId}/subtitleCodec Get subtitle codecs in a section #
GET /library/sections/{sectionId}/filters Get section filters #
GET /library/sections/{sectionId}/firstCharacters Get list of first characters #
DELETE /library/sections/{sectionId}/indexes Delete section indexes #
DELETE /library/sections/{sectionId}/intros Delete section intro markers #
GET /library/sections/{sectionId}/prefs Get section prefs #
PUT /library/sections/{sectionId}/prefs Set section prefs #
POST /library/sections/{sectionId}/refresh Refresh section #
DELETE /library/sections/{sectionId}/refresh Cancel section refresh #
GET /library/sections/{sectionId}/sorts Get a section sorts #
GET /library/streams/{streamId}.{ext} Get a stream #
PUT /library/streams/{streamId}.{ext} Set a stream offset #
DELETE /library/streams/{streamId}.{ext} Delete a stream #
GET /library/streams/{streamId}/loudness Get loudness about a stream #
GET /library/streams/{streamId}/levels Get loudness about a stream in json #
GET /library/tags Get all library tags of a type #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/plex-library-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

plex-library-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Plex Media Server Library API
  version: '1.2.2

    '
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  description: '# API Info

    ## Content Types

    The API supports responses in both XML and JSON, and clients can request one or the other using the standard `Accept` HTTP header.'
servers:
- url: https://{IP-description}.{identifier}.plex.direct:{port}
  variables:
    IP-description:
      default: 1-2-3-4
      description: A `-` separated string of the IPv4 or IPv6 address components
    identifier:
      default: 0123456789abcdef0123456789abcdef
      description: The unique identifier of this particular PMS
    port:
      default: '32400'
security:
- user_token:
  - shared user
  - admin
tags:


# --- truncated at 32 KB (248 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/plex/refs/heads/main/openapi/plex-library-api-openapi.yml