Skip to content

API Reference

Domekologe edited this page Jun 19, 2026 · 8 revisions

API Reference

🌐 English · Deutsch

There are two API layers:

  1. External REST API (/api/v1/...) — for scripts, dashboards (e.g. Homepage/Homarr) and third-party systems. Authenticated via API key, no login needed.
  2. Internal API (/api/...) — used by the WebUI, session-based (login required, partly admin). It is not a stable contract, but the most important endpoints are documented below anyway.

External API v1

Authentication

Send the API key in the X-Api-Key header. The key is generated automatically on first start and can be viewed (and regenerated) under Settings → API.

curl -H "X-Api-Key: <key>" http://localhost:8080/api/v1/status

Missing/wrong key → 401 Unauthorized.

Endpoints

Method Path Description
GET /api/v1/status Overall status: version, pause state, queue counters by status, currently running download incl. live progress (episode_progress: percent, phase, speed, bandwidth; overall_progress_percent)
GET /api/v1/queue All queue entries; filter: `?status=queued
GET /api/v1/queue/<id> Single queue entry (404 if unknown)
GET /api/v1/library Full library (all paths, titles, seasons, episodes, sizes)
GET /api/v1/library/series Series only
GET /api/v1/library/movies Movies only
GET /api/v1/stats Overall download statistics

Example: status

{
  "version": "2.5.3",
  "paused": false,
  "queue": {"total": 12, "queued": 2, "running": 1, "completed": 8, "failed": 1, "cancelled": 0},
  "currently_running": {
    "id": 42, "title": "", "current_episode": 3, "total_episodes": 12,
    "episode_progress": {"percent": 57, "phase": "download", "speed": "2.1x", "bandwidth": "8.4 MB/s", "active": true},
    "overall_progress_percent": 29
  }
}

Internal API (selection)

All internal endpoints require a logged-in session; POST/PUT/DELETE require Content-Type: application/json. Entries marked (admin) additionally require the admin role.

Search & browse

Method Path Description
POST /api/search `{keyword, site: "aniworld"
GET /api/series / /api/seasons / /api/episodes Series/season/episode data for a URL
GET /api/providers Available hosts/languages of an episode
GET /api/new-animes, /api/popular-animes, /api/new-series, /api/popular-series, /api/new-movies, /api/random Browse lists

Queue

Method Path Description
POST /api/download Create a download job
GET /api/queue Queue incl. progress
POST /api/queue/pause / /api/queue/resume Global pause
POST /api/queue/<id>/cancel / restart / skip-episode / retry-episode / move Actions
DELETE /api/queue/<id> / /api/queue/completed Delete an entry / all finished entries

AutoSync

Method Path Description
GET/POST /api/autosync List / create jobs (create: admin); body incl. language, provider, custom_path_id, episode_filter (JSON), movie_custom_path_id
POST /api/autosync/site-search Resolve a title to candidate series on AniWorld/s.to (used by the Library "Add to Auto-Sync"); body {title}, returns results[] with site, site_label, title, url, score
PUT/DELETE /api/autosync/<id> Update (incl. episode_filter, movie_custom_path_id) / delete (admin)
POST /api/autosync/<id>/sync, /api/autosync/sync-all Sync immediately
GET/POST /api/autosync/export, /api/autosync/import, /api/autosync/batch Backup / restore / bulk add

Calendar & download history

Method Path Description
GET /api/calendar Aggregated calendar events for the user (AutoSync + optional Seerr/Library overlays). Returns events[], a watcher status block (active, is_scanning, last_sync) and meta (seerr_active, seerr_count). Requires the calendar to be enabled + a TMDB key.
GET /api/history Download history; query: ?search=, ?status=all|completed|failed|cancelled|skipped, ?source=all|manual|autosync|seerr, ?range=all|1d|7d|30d, ?limit= (max 200), ?offset=. Users see their own entries, admins all. Returns entries[] + total.
GET /api/history/<id> Single history entry (403 if not yours and not admin)
GET /api/history/export Export the filtered view; ?format=csv|json plus the same filters as /api/history
POST /api/history/<id>/retry Re-queue a failed/cancelled episode
DELETE /api/history/<id> Delete a single entry
POST /api/history/delete Delete multiple entries (body {ids: [...]})
POST /api/history/clear Clear the history; body may include status/source/range/search to delete only the filtered subset (otherwise all; own entries, admins all)

Settings (admin)

Method Path Description
GET/PUT /api/settings General settings
GET/PUT /api/settings/sso, /api/settings/cineinfo, /api/settings/mediaplayer, /api/settings/mediascan, /api/settings/seerr, /api/settings/dns Sub-areas
GET/POST /api/settings/api-key, /api/settings/api-key/regenerate External API key
GET/POST /api/encoding/settings, /api/encoding/detect-hw Encoding
GET/POST /api/upscale/settings, … Upscaling (reading settings is allowed for everyone)

Library & player

Method Path Description
GET /api/library / /api/library/status / /api/library/watcher Inventory & scan status
POST /api/library/refresh (admin), /api/library/delete (admin), /api/library/rename (admin), /api/library/move (admin), /api/library/media_info Management
POST /api/stream/start / /api/stream/stop Start/stop an HLS session
GET /api/stream/<token>/index.m3u8, /api/stream/<token>/segNNN.ts, /api/stream/<token>/status HLS delivery
POST/GET /api/progress/save, /api/progress/get, /api/progress/bulk Watch progress

Miscellaneous

Method Path Description
GET /api/captcha/<queue_id>/screenshot / status; POST /api/captcha/<queue_id>/click Interactive captcha solving
GET/POST /api/notif/settings, /api/notif/user-settings, /api/notif/admin-settings, /api/notif/test Notifications
GET /api/seerr/requests; POST …/approve, …/decline, …/hide Seerr requests
GET/POST /api/update-check Update check
GET/POST/DELETE /api/favourites Favourites
GET /api/stats, /api/stats/queue, /api/stats/sync, /api/stats/general Statistics

Clone this wiki locally