Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/chrisbenincasa/tunarr/llms.txt

Use this file to discover all available pages before exploring further.

Tunarr’s REST API gives you programmatic access to every feature the web UI exposes—managing channels, syncing media sources, reading TV-guide data, triggering background tasks, and more. All endpoints live under the /api prefix and speak JSON, making them easy to call from shell scripts, home-automation platforms, or any HTTP client.

Base URL

All API requests are relative to your Tunarr server’s address. By default Tunarr listens on port 8000:
http://your-tunarr-host:8000/api
For example, to list all channels:
curl http://localhost:8000/api/channels

Authentication

Tunarr does not require authentication by default. No API keys, tokens, or login headers are needed when the server is running in its standard local configuration. Simply send requests directly to the server.
If you expose Tunarr behind a reverse proxy that adds its own authentication layer (e.g., Authelia, Authentik, Basic Auth via nginx), the proxy’s credentials apply to all routes including the API—but Tunarr itself does not enforce them.

Content Types

  • Request bodies must be sent with Content-Type: application/json.
  • Response bodies are JSON unless the endpoint explicitly returns another format (e.g., text/plain for M3U playlists, application/xml for the XMLTV feed, video/MP2T for MPEG-TS streams).

Pagination

Several list endpoints support offset-based pagination via query string parameters:
ParameterTypeDefaultDescription
offsetinteger0Number of records to skip
limitintegervariesMaximum number of records to return
Paginated responses use a consistent envelope shape:
{
  "total": 142,
  "size": 25,
  "result": [ ... ]
}
FieldTypeDescription
totalintegerTotal number of records in the data set
sizeintegerNumber of records in this response
resultarrayThe page of records

Common Error Shapes

Tunarr returns standard HTTP status codes. Error bodies, when present, follow this shape:
{ "error": "Human-readable description of the problem" }
StatusMeaning
200Success
201Resource created
202Request accepted (async background task enqueued)
204Success with no body
400Bad request — invalid parameters or body
404Resource not found
500Internal server error

Interactive API Reference

An interactive Scalar API reference is available at:
http://localhost:8000/api-docs
Open that URL in your browser to explore every endpoint, inspect request/response schemas, and send live test requests directly from the UI.

Resource Groups

Channels

Create and manage virtual TV channels, get M3U playlists, and start video streams.

Media Sources

Connect Plex, Jellyfin, and Emby servers; manage libraries and scan progress.

Programming

Read and update channel lineups; apply time-slot and random-slot schedules.

Guide

Fetch EPG data for all channels or a single channel; download the XMLTV feed.

Library

Manage filler lists and custom shows used across channels.

System

Run background tasks, configure FFmpeg, and check server health.

Build docs developers (and LLMs) love