Skip to main content
The Library API provides endpoints for managing Jellyfin libraries, including scanning, refreshing, deleting items, and retrieving library information.

Start Library Scan

Initiate a full library scan to refresh all media.

Endpoint

string
required
POST
string
required
/Library/Refresh

Authorization

Requires elevation policy (administrator access).

Response Codes

  • 204 - No Content: Library scan started successfully

Delete Items

Delete one or more items from the library and filesystem.

Delete Single Item

Single Item
DELETE /Items/{itemId}

Delete Multiple Items

Multiple Items
DELETE /Items

Path Parameters

string (GUID)
required
The item ID to delete (single item endpoint).

Query Parameters

string[]
required
Comma-delimited item IDs to delete (multiple items endpoint).

Response Codes

  • 204 - No Content: Item(s) deleted successfully
  • 401 - Unauthorized: User does not have permission to delete
  • 404 - Not Found: Item not found

Get Item Counts

Retrieve item counts for various media types.
cURL

Endpoint

GET /Items/Counts

Query Parameters

string (GUID)
Get counts from a specific user’s library.
boolean
Get counts of favorite items only.

Response

integer
Number of movies in the library.
integer
Number of TV series.
integer
Number of episodes.
integer
Number of music albums.
integer
Number of audio tracks.
integer
Number of music videos.
integer
Number of box sets.
integer
Number of books.

Response Codes

  • 200 - Success: Item counts returned

Get Media Folders

Retrieve all user media folders (libraries).
cURL

Endpoint

GET /Library/MediaFolders

Query Parameters

boolean
Filter by folders that are marked hidden.

Response

array
Array of media folder objects.
integer
Total number of media folders.

Authorization

Requires elevation policy (administrator access).

Response Codes

  • 200 - Success: Media folders returned

Get Physical Paths

Get a list of physical paths from virtual folders.
cURL

Endpoint

GET /Library/PhysicalPaths

Response

Array of physical path strings.

Authorization

Requires elevation policy (administrator access).

Response Codes

  • 200 - Success: Physical paths returned

Get Item Ancestors

Retrieve all parent items of a specific item.
cURL

Endpoint

GET /Items/{itemId}/Ancestors

Path Parameters

string (GUID)
required
The item ID.

Query Parameters

string (GUID)
Filter by user ID and attach user data.

Response

Array of BaseItemDto objects representing the parent items, from immediate parent to root.

Response Codes

  • 200 - Success: Item ancestors returned
  • 404 - Not Found: Item not found

Get Similar Items

Find items similar to a specific item.
cURL

Endpoint

GET /Items/{itemId}/Similar Also available at:
  • /Movies/{itemId}/Similar
  • /Shows/{itemId}/Similar
  • /Albums/{itemId}/Similar
  • /Artists/{itemId}/Similar

Path Parameters

string (GUID)
required
The item ID.

Query Parameters

string (GUID)
Filter by user ID and attach user data.
integer
Maximum number of similar items to return.
string[]
Comma-delimited additional fields to return.
string[]
Comma-delimited artist IDs to exclude.

Response

array
Array of similar items.
integer
Total number of similar items found.

Response Codes

  • 200 - Success: Similar items returned

Download Item

Download the original media file for an item.
cURL

Endpoint

GET /Items/{itemId}/Download

Path Parameters

string (GUID)
required
The item ID.

Authorization

Requires download policy permission.

Response

The media file stream with appropriate content type and filename.

Response Codes

  • 200 - Success: Media file stream returned
  • 404 - Not Found: Item not found
  • 400 - Bad Request: Item does not support downloading

Get Theme Media

Retrieve theme songs and videos for an item.

Get Theme Songs

Theme Songs
GET /Items/{itemId}/ThemeSongs

Get Theme Videos

Theme Videos
GET /Items/{itemId}/ThemeVideos

Get All Theme Media

All Theme Media
GET /Items/{itemId}/ThemeMedia

Path Parameters

string (GUID)
required
The item ID.

Query Parameters

string (GUID)
Filter by user ID and attach user data.
boolean
default:"false"
Whether to search parent items for theme media.

Response

array
Array of theme media items.
integer
Total number of theme items.
string (GUID)
ID of the item that owns the theme media.

Response Codes

  • 200 - Success: Theme media returned
  • 404 - Not Found: Item not found

Virtual Folders

Manage virtual folders (libraries).

Get Virtual Folders

Get
GET /Library/VirtualFolders

Add Virtual Folder

Add
POST /Library/VirtualFolders

Remove Virtual Folder

Remove
DELETE /Library/VirtualFolders

Authorization

Requires first-time setup or elevation policy.

Response Codes

  • 200 - Success: Virtual folders returned (GET)
  • 204 - No Content: Operation completed successfully (POST/DELETE)
  • 404 - Not Found: Virtual folder not found (DELETE)