forked from FuzzyGrim/Yamtrack
-
Notifications
You must be signed in to change notification settings - Fork 0
API
URD0TH edited this page Jul 15, 2026
·
7 revisions
Yamtrack provides a REST API for programmatic access to media tracking. The API uses JWT authentication and returns JSON responses.
https://your-yamtrack-instance.com/api/
POST /api/token/
Request body:
{
"username": "username",
"password": "yourpassword"
}Response:
{
"access": "eyJhbGciOiJIUzI1NiIs...",
"refresh": "eyJhbGciOiJIUzI1NiIs..."
}POST /api/token/refresh/
Request body:
{
"refresh": "eyJhbGciOiJIUzI1NiIs..."
}GET /api/auth/me/
Headers: Authorization: Bearer <access_token>
GET /api/media/<media_type>/
media_type can be: movie, tv, anime, manga, game, book, comic, boardgame, season.
| Parameter | Type | Values / Default |
|---|---|---|
status |
string (enum) |
All (default), Completed, In progress, Planning, Paused, Dropped. Invalid values fall back to All. |
sort |
string (enum) |
score, title, progress, start_date, end_date. Any Item/model field is also accepted (no strict validation). No default (queryset default order). |
search |
string | Case-insensitive substring match on item__title. |
page |
int | Default 1. |
per_page |
int | Default 32. |
Example:
GET /api/media/movie/?status=Completed&sort=score&search=spider&page=1&per_page=32
POST /api/media/<media_type>/create/
Request body:
{
"media_id": "12345",
"source": "tmdb"
}POST /api/media/manual/create/
{
"media_type": "movie",
"title": "My Movie",
"status": "Completed",
"progress": 1
}GET /api/details/<source>/<media_type>/<media_id>/
GET /api/details/<source>/tv/<media_id>/season/<season_number>/
PATCH /api/media/<media_type>/<instance_id>/
{
"score": 8,
"status": "Completed"
}DELETE /api/media/<media_type>/<instance_id>/delete/
POST /api/sync/<source>/<media_type>/<media_id>/
POST /api/media/<media_type>/<instance_id>/progress/
Request body (increase or decrease):
{
"operation": "increase"
}{
"operation": "decrease"
}GET /api/home/
Returns in-progress and planning sections for the authenticated user.
| Parameter | Type | Values / Default |
|---|---|---|
sort |
string (enum) |
upcoming (default), recent, completion, episodes_left, title. |
Example:
GET /api/home/?sort=recent
POST /api/episodes/
{
"media_id": "999",
"source": "tmdb",
"season_number": 1,
"episode_number": 1
}GET /api/search/?q=<query>&media_type=<media_type>
| Parameter | Type | Values / Default |
|---|---|---|
q |
string | Required. Search query. |
media_type |
string (enum) |
Required. tv, movie, anime, manga, game, book, comic, boardgame. |
source |
string | Optional. Defaults to the default source for the media type. |
page |
int | Default 1. |
Example:
GET /api/search/?q=spider&media_type=movie&source=tmdb&page=1
GET /api/history/<source>/<media_type>/<media_id>/
Returns change history for a media item.
| Parameter | Type | Values / Default |
|---|---|---|
season_number |
int | Optional. |
episode_number |
int | Optional. |
Example:
GET /api/history/tmdb/movie/12345/?season_number=1&episode_number=3
GET /api/statistics/
Returns aggregated statistics for the authenticated user.
| Parameter | Type | Values / Default |
|---|---|---|
start-date |
string (date YYYY-MM-DD or all) |
Default: one year ago. |
end-date |
string (date YYYY-MM-DD or all) |
Default: today. Use all/all to include everything. |
Example:
GET /api/statistics/?start-date=2024-01-01&end-date=2024-12-31
| Source | Media Types |
|---|---|
tmdb |
movie, tv |
mal |
anime, manga |
igdb |
game |
openlibrary |
book |
custom |
all |
PlanningIn progressCompletedDroppedPaused