openapi: 3.0.3
info:
title: Trakt API
description: |
The Trakt API is a RESTful API for integrating TV show and movie tracking
features into applications. It exposes Trakt's media database, user
watch history, lists, watchlists, ratings, comments, scrobbling, and
recommendations. Authentication is OAuth 2.0 (Authorization Code and
Device flows).
This OpenAPI is a representative sampling of the full Trakt API v2
surface, covering authentication, movies, shows, episodes, seasons,
people, search, users, sync, scrobble, checkin, lists, calendars,
recommendations, comments, notes, and reference data. The canonical
contract is the ts-rest router published at github.com/trakt/trakt-api.
version: '2.0'
contact:
name: Trakt API Support
url: https://forums.trakt.tv
license:
name: MIT
url: https://opensource.org/licenses/MIT
servers:
- url: https://api.trakt.tv
description: Production
- url: https://api-staging.trakt.tv
description: Staging
tags:
- name: OAuth
description: Authorization Code and Device OAuth flows.
- name: Movies
description: Movie metadata, trending, watched, anticipated, popular, ratings, related, people.
- name: Shows
description: Show metadata, trending, watched, anticipated, popular, progress, seasons, episodes.
- name: Seasons
description: Season-level metadata and episodes.
- name: Episodes
description: Episode metadata, ratings, comments, watching.
- name: People
description: Person metadata, filmography, lists.
- name: Search
description: Text and ID lookup across movies, shows, episodes, people, lists.
- name: Users
description: Profiles, settings, follows, friends, social activity, comments, watching.
- name: Sync
description: History, watchlist, ratings, favorites, collection, playback progress.
- name: Scrobble
description: Start, pause, and stop scrobbles for movies and episodes.
- name: Checkin
description: Lightweight social "now watching" check-ins.
- name: Lists
description: Trending, popular, and personal lists.
- name: Calendars
description: Upcoming and recently aired schedules for shows, episodes, and movies.
- name: Recommendations
description: Personalized recommendations for movies and shows.
- name: Comments
description: Comment threads, replies, likes, reactions.
- name: Notes
description: Personal notes attached to media items.
- name: Certifications
description: Movie and show certification reference data.
- name: Countries
description: Country reference data.
- name: Languages
description: Language reference data.
- name: Genres
description: Genre reference data.
- name: Networks
description: Television network reference data.
- name: Studios
description: Studio reference data.
security:
- bearerAuth: []
paths:
/oauth/device/code:
post:
tags: [OAuth]
operationId: generateDeviceCode
summary: Generate New Device Codes
description: Generate new codes to start the device authentication process. The device_code and interval are used to poll for the access_token. The user_code and verification_url should be presented to the user.
security: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/DeviceCodeRequest'
responses:
'200':
description: Device code issued.
content:
application/json:
schema:
$ref: '#/components/schemas/DeviceCodeResponse'
/oauth/device/token:
post:
tags: [OAuth]
operationId: pollDeviceToken
summary: Poll For The Access Token
description: Poll using the device_code at the returned interval until the user authorizes the app. Returns access_token on success. Status codes 400/404/409/410/418/429 indicate pending, expired, denied, or polling-too-fast states.
security: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/DeviceTokenRequest'
responses:
'200':
description: Token issued.
content:
application/json:
schema:
$ref: '#/components/schemas/TokenResponse'
'400':
description: Pending — keep polling.
/oauth/token:
post:
tags: [OAuth]
operationId: exchangeToken
summary: Exchange A Token
description: Exchange an OAuth authorization code or refresh token for an access token.
security: []
requestBody:
required: true
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/TokenRequest'
- $ref: '#/components/schemas/TokenRefreshRequest'
responses:
'200':
description: Token issued.
content:
application/json:
schema:
$ref: '#/components/schemas/TokenResponse'
'400':
description: Invalid request.
/oauth/revoke:
post:
tags: [OAuth]
operationId: revokeToken
summary: Revoke An Access Token
description: Revoke an access_token when the user signs out of the app.
security: []
responses:
'200':
description: Token revoked.
/movies/trending:
get:
tags: [Movies]
operationId: getTrendingMovies
summary: Get Trending Movies
description: Returns the most watched movies over the last 24 hours. Movies with the most watchers are returned first.
parameters:
- $ref: '#/components/parameters/Page'
- $ref: '#/components/parameters/Limit'
- $ref: '#/components/parameters/Extended'
responses:
'200':
description: Trending movies.
content:
application/json:
schema:
type: array
items: { $ref: '#/components/schemas/MovieTrending' }
/movies/popular:
get:
tags: [Movies]
operationId: getPopularMovies
summary: Get Popular Movies
description: Returns the most popular movies, calculated using rating percentage and number of ratings.
parameters:
- $ref: '#/components/parameters/Page'
- $ref: '#/components/parameters/Limit'
- $ref: '#/components/parameters/Extended'
responses:
'200':
description: Popular movies.
content:
application/json:
schema:
type: array
items: { $ref: '#/components/schemas/Movie' }
/movies/watched/{period}:
get:
tags: [Movies]
operationId: getMostWatchedMovies
summary: Get The Most Watched Movies
description: Returns the most watched (unique users) movies in the specified time period, defaulting to weekly.
parameters:
- $ref: '#/components/parameters/Period'
- $ref: '#/components/parameters/Page'
- $ref: '#/components/parameters/Limit'
- $ref: '#/components/parameters/Extended'
responses:
'200':
description: Most watched movies.
content:
application/json:
schema:
type: array
items: { $ref: '#/components/schemas/MovieWatched' }
/movies/anticipated:
get:
tags: [Movies]
operationId: getAnticipatedMovies
summary: Get The Most Anticipated Movies
description: Returns the most anticipated movies based on the number of lists a movie appears on.
parameters:
- $ref: '#/components/parameters/Page'
- $ref: '#/components/parameters/Limit'
- $ref: '#/components/parameters/Extended'
responses:
'200':
description: Anticipated movies.
content:
application/json:
schema:
type: array
items: { $ref: '#/components/schemas/MovieAnticipated' }
/movies/boxoffice:
get:
tags: [Movies]
operationId: getBoxOfficeMovies
summary: Get The Weekend Box Office
description: Returns the top 10 grossing movies in the U.S. box office last weekend.
responses:
'200':
description: Box office movies.
content:
application/json:
schema:
type: array
items: { $ref: '#/components/schemas/MovieBoxOffice' }
/movies/{id}:
get:
tags: [Movies]
operationId: getMovie
summary: Get A Movie
description: Returns a single movie's details.
parameters:
- $ref: '#/components/parameters/MovieId'
- $ref: '#/components/parameters/Extended'
responses:
'200':
description: Movie details.
content:
application/json:
schema: { $ref: '#/components/schemas/Movie' }
/movies/{id}/ratings:
get:
tags: [Movies]
operationId: getMovieRatings
summary: Get Movie Ratings
description: Returns rating (between 0 and 10) and distribution for a movie.
parameters:
- $ref: '#/components/parameters/MovieId'
responses:
'200':
description: Movie ratings.
content:
application/json:
schema: { $ref: '#/components/schemas/Ratings' }
/movies/{id}/stats:
get:
tags: [Movies]
operationId: getMovieStats
summary: Get Movie Stats
description: Returns lots of movie stats including watchers, plays, collectors, comments, lists, votes, and recommended counts.
parameters:
- $ref: '#/components/parameters/MovieId'
responses:
'200':
description: Movie stats.
content:
application/json:
schema: { $ref: '#/components/schemas/MovieStats' }
/movies/{id}/related:
get:
tags: [Movies]
operationId: getRelatedMovies
summary: Get Related Movies
description: Returns related and similar movies.
parameters:
- $ref: '#/components/parameters/MovieId'
- $ref: '#/components/parameters/Page'
- $ref: '#/components/parameters/Limit'
responses:
'200':
description: Related movies.
content:
application/json:
schema:
type: array
items: { $ref: '#/components/schemas/Movie' }
/movies/{id}/people:
get:
tags: [Movies]
operationId: getMoviePeople
summary: Get All People For A Movie
description: Returns all cast and crew for a movie, broken up by department.
parameters:
- $ref: '#/components/parameters/MovieId'
responses:
'200':
description: People associated with the movie.
content:
application/json:
schema: { $ref: '#/components/schemas/People' }
/movies/{id}/watching:
get:
tags: [Movies]
operationId: getMovieWatching
summary: Get Users Watching Right Now
description: Returns all users watching this movie right now.
parameters:
- $ref: '#/components/parameters/MovieId'
responses:
'200':
description: Users watching right now.
content:
application/json:
schema:
type: array
items: { $ref: '#/components/schemas/UserProfile' }
/shows/trending:
get:
tags: [Shows]
operationId: getTrendingShows
summary: Get Trending Shows
description: Returns the most watched shows over the last 24 hours.
parameters:
- $ref: '#/components/parameters/Page'
- $ref: '#/components/parameters/Limit'
- $ref: '#/components/parameters/Extended'
responses:
'200':
description: Trending shows.
content:
application/json:
schema:
type: array
items: { $ref: '#/components/schemas/ShowTrending' }
/shows/popular:
get:
tags: [Shows]
operationId: getPopularShows
summary: Get Popular Shows
description: Returns the most popular shows.
parameters:
- $ref: '#/components/parameters/Page'
- $ref: '#/components/parameters/Limit'
- $ref: '#/components/parameters/Extended'
responses:
'200':
description: Popular shows.
content:
application/json:
schema:
type: array
items: { $ref: '#/components/schemas/Show' }
/shows/watched/{period}:
get:
tags: [Shows]
operationId: getMostWatchedShows
summary: Get The Most Watched Shows
description: Returns the most watched shows in the specified time period.
parameters:
- $ref: '#/components/parameters/Period'
- $ref: '#/components/parameters/Page'
- $ref: '#/components/parameters/Limit'
responses:
'200':
description: Most watched shows.
content:
application/json:
schema:
type: array
items: { $ref: '#/components/schemas/ShowWatched' }
/shows/anticipated:
get:
tags: [Shows]
operationId: getAnticipatedShows
summary: Get The Most Anticipated Shows
description: Returns the most anticipated shows based on the number of lists a show appears on.
parameters:
- $ref: '#/components/parameters/Page'
- $ref: '#/components/parameters/Limit'
responses:
'200':
description: Anticipated shows.
content:
application/json:
schema:
type: array
items: { $ref: '#/components/schemas/Show' }
/shows/{id}:
get:
tags: [Shows]
operationId: getShow
summary: Get A Single Show
description: Returns a single show's details.
parameters:
- $ref: '#/components/parameters/ShowId'
- $ref: '#/components/parameters/Extended'
responses:
'200':
description: Show details.
content:
application/json:
schema: { $ref: '#/components/schemas/Show' }
/shows/{id}/seasons:
get:
tags: [Shows]
operationId: getShowSeasons
summary: Get All Seasons For A Show
description: Returns all seasons for a show including the number of episodes in each season.
parameters:
- $ref: '#/components/parameters/ShowId'
responses:
'200':
description: Show seasons.
content:
application/json:
schema:
type: array
items: { $ref: '#/components/schemas/Season' }
/shows/{id}/seasons/{season}:
get:
tags: [Seasons]
operationId: getSeasonEpisodes
summary: Get All Episodes For A Single Season
description: Returns all episodes for a specific season of a show.
parameters:
- $ref: '#/components/parameters/ShowId'
- $ref: '#/components/parameters/Season'
responses:
'200':
description: Season episodes.
content:
application/json:
schema:
type: array
items: { $ref: '#/components/schemas/Episode' }
/shows/{id}/seasons/{season}/episodes/{episode}:
get:
tags: [Episodes]
operationId: getEpisode
summary: Get A Single Episode For A Show
description: Returns a single episode's details.
parameters:
- $ref: '#/components/parameters/ShowId'
- $ref: '#/components/parameters/Season'
- $ref: '#/components/parameters/EpisodeNumber'
responses:
'200':
description: Episode details.
content:
application/json:
schema: { $ref: '#/components/schemas/Episode' }
/shows/{id}/progress/watched:
get:
tags: [Shows]
operationId: getShowWatchedProgress
summary: Get Show Watched Progress
description: Returns watched progress for a show including details on all aired seasons and episodes.
parameters:
- $ref: '#/components/parameters/ShowId'
responses:
'200':
description: Watched progress.
content:
application/json:
schema: { $ref: '#/components/schemas/ShowProgress' }
/shows/{id}/people:
get:
tags: [Shows]
operationId: getShowPeople
summary: Get All People For A Show
description: Returns all cast and crew for a show.
parameters:
- $ref: '#/components/parameters/ShowId'
responses:
'200':
description: Show people.
content:
application/json:
schema: { $ref: '#/components/schemas/People' }
/people/{id}:
get:
tags: [People]
operationId: getPerson
summary: Get A Single Person
description: Returns a single person's details.
parameters:
- name: id
in: path
required: true
schema: { type: string }
- $ref: '#/components/parameters/Extended'
responses:
'200':
description: Person details.
content:
application/json:
schema: { $ref: '#/components/schemas/Person' }
/people/{id}/movies:
get:
tags: [People]
operationId: getPersonMovies
summary: Get Movies For A Person
description: Returns all movies where this person is in the cast or crew.
parameters:
- name: id
in: path
required: true
schema: { type: string }
responses:
'200':
description: Person filmography for movies.
/people/{id}/shows:
get:
tags: [People]
operationId: getPersonShows
summary: Get Shows For A Person
description: Returns all shows where this person is in the cast or crew.
parameters:
- name: id
in: path
required: true
schema: { type: string }
responses:
'200':
description: Person filmography for shows.
/search/{type}:
get:
tags: [Search]
operationId: searchText
summary: Get Text Query Results
description: Search all text fields that a media object contains. Accepts movie, show, episode, person, list (one or more, comma separated).
parameters:
- name: type
in: path
required: true
schema:
type: string
enum: [movie, show, episode, person, list]
- name: query
in: query
required: true
schema: { type: string }
- $ref: '#/components/parameters/Page'
- $ref: '#/components/parameters/Limit'
responses:
'200':
description: Search results.
content:
application/json:
schema:
type: array
items: { $ref: '#/components/schemas/SearchResult' }
/search/{id_type}/{id}:
get:
tags: [Search]
operationId: searchById
summary: Get ID Lookup Results
description: Lookup items by their Trakt, IMDB, TMDB, or TVDB ID.
parameters:
- name: id_type
in: path
required: true
schema:
type: string
enum: [trakt, imdb, tmdb, tvdb]
- name: id
in: path
required: true
schema: { type: string }
responses:
'200':
description: Lookup results.
content:
application/json:
schema:
type: array
items: { $ref: '#/components/schemas/SearchResult' }
/users/settings:
get:
tags: [Users]
operationId: getUserSettings
summary: Retrieve Settings
description: Get the user's settings (account, profile, sharing, limits, permissions, browsing).
responses:
'200':
description: User settings.
content:
application/json:
schema: { $ref: '#/components/schemas/UserSettings' }
/users/{id}:
get:
tags: [Users]
operationId: getUserProfile
summary: Get User Profile
description: Get a user's profile information.
parameters:
- $ref: '#/components/parameters/UserSlug'
- $ref: '#/components/parameters/Extended'
responses:
'200':
description: User profile.
content:
application/json:
schema: { $ref: '#/components/schemas/UserProfile' }
/users/{id}/stats:
get:
tags: [Users]
operationId: getUserStats
summary: Get Stats
description: Returns stats about the movies, shows, and episodes a user has watched, collected, and rated.
parameters:
- $ref: '#/components/parameters/UserSlug'
responses:
'200':
description: User stats.
content:
application/json:
schema: { $ref: '#/components/schemas/UserStats' }
/users/{id}/watching:
get:
tags: [Users]
operationId: getUserWatching
summary: Get Watching
description: Returns a movie or episode if the user is currently watching something.
parameters:
- $ref: '#/components/parameters/UserSlug'
responses:
'200':
description: User watching.
'204':
description: User is not watching anything.
/users/{id}/followers:
get:
tags: [Users]
operationId: getUserFollowers
summary: Get Followers
parameters:
- $ref: '#/components/parameters/UserSlug'
responses:
'200':
description: Followers list.
/users/{id}/following:
get:
tags: [Users]
operationId: getUserFollowing
summary: Get Following
parameters:
- $ref: '#/components/parameters/UserSlug'
responses:
'200':
description: Following list.
/users/{id}/friends:
get:
tags: [Users]
operationId: getUserFriends
summary: Get Friends
parameters:
- $ref: '#/components/parameters/UserSlug'
responses:
'200':
description: Friends list.
/users/{id}/follow:
post:
tags: [Users]
operationId: followUser
summary: Follow This User
parameters:
- $ref: '#/components/parameters/UserSlug'
responses:
'201':
description: Follow created.
delete:
tags: [Users]
operationId: unfollowUser
summary: Unfollow This User
parameters:
- $ref: '#/components/parameters/UserSlug'
responses:
'204':
description: Unfollowed.
/sync/last_activities:
get:
tags: [Sync]
operationId: getLastActivities
summary: Get Last Activity
description: Returns timestamps for the last activity of each Sync resource, so apps can determine what to refresh.
responses:
'200':
description: Last activities.
content:
application/json:
schema: { $ref: '#/components/schemas/LastActivities' }
/sync/playback:
get:
tags: [Sync]
operationId: getPlaybackProgress
summary: Get Playback Progress
description: Returns paused and unfinished playback progress for the authenticated user.
responses:
'200':
description: Playback progress.
/sync/playback/{id}:
delete:
tags: [Sync]
operationId: removePlaybackItem
summary: Remove A Playback Item
description: Remove a playback item from a user's playback progress list.
parameters:
- name: id
in: path
required: true
schema: { type: integer }
responses:
'204':
description: Removed.
/sync/collection/movies:
get:
tags: [Sync]
operationId: getCollectionMovies
summary: Get Movie Collection
description: Returns movies in the authenticated user collection.
responses:
'200':
description: Movie collection.
/sync/collection/shows:
get:
tags: [Sync]
operationId: getCollectionShows
summary: Get Show Collection
description: Returns shows in the authenticated user collection, including collected seasons and episodes.
responses:
'200':
description: Show collection.
/sync/collection:
post:
tags: [Sync]
operationId: addToCollection
summary: Add Items To Collection
description: Add items to a user's collection. Accepts movies, shows, seasons, episodes.
requestBody:
required: true
content:
application/json:
schema: { $ref: '#/components/schemas/BulkMediaRequest' }
responses:
'201':
description: Added.
/sync/collection/remove:
post:
tags: [Sync]
operationId: removeFromCollection
summary: Remove Items From Collection
requestBody:
required: true
content:
application/json:
schema: { $ref: '#/components/schemas/BulkMediaRequest' }
responses:
'200':
description: Removed.
/sync/watched/movies:
get:
tags: [Sync]
operationId: getWatchedMovies
summary: Get Watched Movies
description: Returns all movies a user has watched, sorted by most plays.
responses:
'200':
description: Watched movies.
/sync/watched/shows:
get:
tags: [Sync]
operationId: getWatchedShows
summary: Get Watched Shows
description: Returns all shows a user has watched, sorted by most plays.
responses:
'200':
description: Watched shows.
/sync/history:
get:
tags: [Sync]
operationId: getWatchedHistory
summary: Get Watched History
description: Returns movies and episodes that a user has watched, sorted by most recent.
parameters:
- name: type
in: query
schema:
type: string
enum: [movies, shows, seasons, episodes]
- $ref: '#/components/parameters/Page'
- $ref: '#/components/parameters/Limit'
responses:
'200':
description: History entries.
post:
tags: [Sync]
operationId: addToHistory
summary: Add Items To Watched History
description: Add items to a user's watch history.
requestBody:
required: true
content:
application/json:
schema: { $ref: '#/components/schemas/BulkMediaRequest' }
responses:
'200':
description: History add result.
/sync/history/remove:
post:
tags: [Sync]
operationId: removeFromHistory
summary: Remove Items From History
requestBody:
required: true
content:
application/json:
schema: { $ref: '#/components/schemas/BulkMediaRequest' }
responses:
'200':
description: Removed.
/sync/ratings:
post:
tags: [Sync]
operationId: addRatings
summary: Add New Ratings
description: Rate one or more items.
requestBody:
required: true
content:
application/json:
schema: { $ref: '#/components/schemas/BulkMediaRequest' }
responses:
'201':
description: Ratings added.
/sync/ratings/remove:
post:
tags: [Sync]
operationId: removeRatings
summary: Remove Ratings
requestBody:
required: true
content:
application/json:
schema: { $ref: '#/components/schemas/BulkMediaRequest' }
responses:
'200':
description: Ratings removed.
/sync/watchlist:
get:
tags: [Sync]
operationId: getWatchlist
summary: Get Watchlist
description: Returns all items in a user's watchlist.
responses:
'200':
description: Watchlist items.
post:
tags: [Sync]
operationId: addToWatchlist
summary: Add Items To Watchlist
requestBody:
required: true
content:
application/json:
schema: { $ref: '#/components/schemas/BulkMediaRequest' }
responses:
'201':
description: Watchlist add result.
/sync/watchlist/remove:
post:
tags: [Sync]
operationId: removeFromWatchlist
summary: Remove Items From Watchlist
requestBody:
required: true
content:
application/json:
schema: { $ref: '#/components/schemas/BulkMediaRequest' }
responses:
'200':
description: Removed.
/sync/favorites:
get:
tags: [Sync]
operationId: getFavorites
summary: Get Favorites
responses:
'200':
description: Favorites items.
post:
tags: [Sync]
operationId: addToFavorites
summary: Add Items To Favorites
requestBody:
required: true
content:
application/json:
schema: { $ref: '#/components/schemas/BulkMediaRequest' }
responses:
'201':
description: Favorites add result.
/sync/favorites/remove:
post:
tags: [Sync]
operationId: removeFromFavorites
summary: Remove Items From Favorites
requestBody:
required: true
content:
application/json:
schema: { $ref: '#/components/schemas/BulkMediaRequest' }
responses:
'200':
description: Removed.
/scrobble/start:
post:
tags: [Scrobble]
operationId: scrobbleStart
summary: Start Watching In A Media Center
description: Use when the video initially starts playing or is unpaused.
requestBody:
required: true
content:
application/json:
schema: { $ref: '#/components/schemas/ScrobbleRequest' }
responses:
'201':
description: Scrobble started.
content:
application/json:
schema: { $ref: '#/components/schemas/ScrobbleResponse' }
/scrobble/pause:
post:
tags: [Scrobble]
operationId: scrobblePause
summary: Pause Watching In A Media Center
requestBody:
required: true
content:
application/json:
schema: { $ref: '#/components/schemas/ScrobbleRequest' }
responses:
'201':
description: Scrobble paused.
content:
application/json:
schema: { $ref: '#/components/schemas/ScrobbleResponse' }
/scrobble/stop:
post:
tags: [Scrobble]
operationId: scrobbleStop
summary: Stop Or Finish Watching In A Media Center
description: If progress is above 80% the item is marked scrobble; if 1–79% it is treated as pause.
requestBody:
required: true
content:
application/json:
schema: { $ref: '#/components/schemas/ScrobbleRequest' }
responses:
'201':
description: Scrobble stopped.
content:
application/json:
schema: { $ref: '#/components/schemas/ScrobbleResponse' }
/checkin:
post:
tags: [Checkin]
operationId: createCheckin
summary: Check Into An Item
description: Check into a movie or episode. Sets the watching status; auto-expires after the runtime elapses.
requestBody:
required: true
content:
application/json:
schema: { $ref: '#/components/schemas/CheckinRequest' }
responses:
'201':
description: Checkin created.
'409':
description: Already checked in (conflict).
delete:
tags: [Checkin]
operationId: deleteCheckin
summary: Delete Any Active Checkins
responses:
'204':
description: Active checkin cancelled.
/calendars/all/shows/{start_date}/{days}:
get:
tags: [Calendars]
operationId: getAllShowsCalendar
summary: Get Shows
description: Returns all shows airing during the time period specified.
parameters:
- name: start_date
in: path
required: true
schema: { type: string, format: date }
- name: days
in: path
required: true
schema: { type: integer }
responses:
'200':
description: Calendar entries.
/calendars/all/movies/{start_date}/{days}:
get:
tags: [Calendars]
operationId:
# --- truncated at 32 KB (53 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/trakt/refs/heads/main/openapi/trakt-openapi.yml