API Reference
Complete REST and WebSocket endpoint documentation for Plexarr V2.1.
Torrents
List Torrents
GET /api/torrents?status=all
Add Magnet
POST /api/torrent/add
Content-Type: application/x-www-form-urlencoded
magnet=magnet:?xt=...&category=downloads&media_type=tv&count=1
Pause / Resume / Delete
POST /api/torrent/pause
POST /api/torrent/resume
POST /api/torrent/delete
hash=TORRENT_HASH&delete_files=false
Speed Stats
GET /api/qb/speed
Categories
GET /api/qb/categories
Search
Torrent Search
GET /api/search?q=Shingeki+no+Kyojin&provider=nyaa.si&type=anime&limit=50&enrich=true
Metadata Search
GET /api/metadata/search?q=Breaking+Bad&type=tv
Enrich Torrent
GET /api/metadata/enrich?title=Movie.Name.2024.1080p&type=movie
Cover Art
GET /api/metadata/cover?title=Movie+Name&type=movie
Seasons
GET /api/metadata/seasons?source=tmdb&id=1234&media_type=tv
Episodes
GET /api/metadata/episodes?source=tmdb&id=1234&season=1&media_type=tv
Anime Search
Dedicated Anime Endpoint
GET /api/search/anime?q=Attack+on+Titan&category=Anime&limit=50&enrich=true
This endpoint only queries Nyaa.si and AnimeTosho, returning results sorted by seeders. Supports Jikan metadata enrichment for cover art and descriptions.
Files
Browse
GET /api/files?root=downloads&subpath=folder/subfolder
Download
GET /api/download?root=downloads&subpath=file.mkv
Upload
POST /api/upload
Content-Type: multipart/form-data
file: [binary]
destination: downloads | tv | movies | anime | music
sort: true | false
media_type: auto | tv | movie | anime | music
WiFi Auto-Categorize Upload
Upload Files (Auto-Detect)
POST /api/upload/wifi
Content-Type: multipart/form-data
file: [binary]
file: [binary] # multiple files supported
Upload files from any device on the same WiFi network. The server auto-detects media type, strips release tags, renames to Plex format, and moves the file to the correct library path. No destination parameter required.
Response for each file:
{
"success": true,
"uploaded_count": 2,
"error_count": 0,
"files": [
{ "file": "movie.mkv", "path": "/media/plex/Movies/...", "type": "movies", "size": 2147483648 },
{ "file": "show.s01e02.mkv", "path": "/media/plex/TV Shows/...", "type": "tv", "size": 1073741824 }
],
"errors": []
}
Upload Status
GET /api/upload/wifi/status
Returns max upload size, allowed extensions, and staging directory info.
URL Download
Download Single URL
POST /api/download/url
Content-Type: application/x-www-form-urlencoded
url=https://rapidgator.net/file/...&category=downloads
Queue Multiple URLs
POST /api/download/queue
Content-Type: application/json
{ "urls": ["url1", "url2"], "category": "downloads" }
Batch Torrent Queue
Add Batch
POST /api/batch/add
Content-Type: application/json
{
"items": [
{ "type": "magnet", "source": "magnet:?xt=...", "title": "Show S01E01", "category": "tv" },
{ "type": "magnet", "source": "magnet:?xt=...", "title": "Show S01E02", "category": "tv" }
]
}
List Batch
GET /api/batch/list?status=queued
Clear / Remove
POST /api/batch/clear
POST /api/batch/remove
{ "id": "batch_12345" }
Remote
Screen Stream
POST /api/screen/start -> starts SocketIO broadcast
POST /api/screen/stop -> stops capture
Mouse / Keyboard
POST /api/remote/mouse
x=1234&y=567&action=move|click|right_click|double_click
POST /api/remote/keyboard
text=hello+world
VPN
Status
GET /api/vpn/status
Connect / Disconnect
POST /api/vpn/connect
POST /api/vpn/disconnect
location=US-NY # optional
Login
POST /api/vpn/login
Locations
GET /api/vpn/locations
FFmpeg
Process File
POST /api/ffmpeg/process
Content-Type: application/x-www-form-urlencoded
path=/media/plex/Movies/movie.mkv&replace=true
Auto-Process
POST /api/ffmpeg/auto
Content-Type: application/x-www-form-urlencoded
path=/media/plex/Downloads/movie.mkv
Status
GET /api/ffmpeg/status
Naming Detection
GET /api/naming/detect?filename=Movie.Name.1080p.MediaHub-eng.mkv
Metrics
GET /prometheus/metrics
Exposed metrics:
plexarr_torrent_added_total(provider, category)plexarr_torrent_completed_total(category)plexarr_download_speed_bytesplexarr_upload_speed_bytesplexarr_active_torrentsplexarr_uploaded_files_total(destination)plexarr_search_requests_total(provider, query_type)plexarr_api_request_duration_seconds(endpoint, histogram)
Usenet
SABnzbd Queue
GET /api/sabnzbd/queue
SABnzbd History
GET /api/sabnzbd/history
Add NZB
POST /api/sabnzbd/add
Content-Type: application/json
{ "url": "https://nzbgeek.info/...", "category": "tv", "filename": "optional.nzb" }
Pause / Resume
POST /api/sabnzbd/pause
POST /api/sabnzbd/resume
Delete Job
POST /api/sabnzbd/delete
Content-Type: application/json
{ "id": "SABnzbd_nzo_12345" }
Speed Limit
GET /api/sabnzbd/speed
NZBGeek Search
GET /api/nzbgeek/search?q=Movie+Name&category=movies&limit=50
Auto Sort
POST /api/sort
path=/media/plex/Downloads/movie.mkv&media_type=movie
POST /api/sort/batch
directory=/media/plex/Downloads/unsorted
Watch Folder / Auto-Categorize
Categorize Single File
POST /api/categorize
Content-Type: application/x-www-form-urlencoded
path=/media/plex/Downloads/movie.mkv
Categorize Batch Directory
POST /api/categorize/batch
Content-Type: application/json
{ "directory": "/media/plex/Downloads/dropbox" }
Start Watch Folder
POST /api/watch/start
Content-Type: application/json
{ "watch_dir": "/media/plex/Downloads/dropbox", "interval": 5, "name": "main" }
Stop Watch Folder
POST /api/watch/stop
Content-Type: application/json
{ "name": "main" }
Watch Status
GET /api/watch/status?name=main
List Watchers
GET /api/watch/list
CORS Proxy
GET /proxy?url=https://...
GET /proxy?url=https://...&cf_bypass=1
Forwards any HTTP request through the server. Add ?cf_bypass=1 to use the Cloudflare solver for a single request.