Trakt API

Video / API Key Intermediate HTTPS CORS
Varies by plan (check documentation)

Overview

Trakt API provides rich movie and TV show data including ratings, watchlists, trending titles, and user watch history. It is ideal for building watch-tracking apps or browsing trending content. An API key (Client ID) is required and can be obtained by creating a free app on trakt.tv.

💡

Beginner Tip

Start with the /movies/trending or /shows/trending endpoint to get popular content without needing user authentication. For user-specific features like watchlists, you will need OAuth 2.0 in addition to your Client ID.

Available Data

movie title and year
director and cast
plot summary
IMDb rating
poster image URL
genre and runtime

Example Response

JSON Response
{
  "Title": "Inception",
  "Year": "2010",
  "Rated": "PG-13",
  "Runtime": "148 min",
  "Genre": "Action, Adventure, Sci-Fi",
  "Director": "Christopher Nolan",
  "Actors": "Leonardo DiCaprio, Joseph Gordon-Levitt",
  "Plot": "A thief who steals corporate secrets through dream-sharing technology...",
  "imdbRating": "8.8",
  "Poster": "https://example.com/inception.jpg"
}

Field Reference

watchers Number of Trakt users currently watching or who recently watched the item.
movie.title Title of the movie.
movie.year Release year of the movie.
movie.ids.trakt Trakt unique numeric ID for the movie.
movie.ids.imdb IMDb ID string (e.g., tt0111161) for cross-referencing with other APIs.

Implementation Example

const url = "https://trakt.docs.apiary.io/";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "X-API-Key": "YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

401 Unauthorized The trakt-api-key header is missing or the Client ID is invalid.
Register an app at trakt.tv/oauth/applications and use the Client ID as the trakt-api-key header value.
422 Unprocessable Entity The trakt-api-version header is missing from the request.
Always include trakt-api-version: 2 in every request to the Trakt API.
Empty watchlist or history Calling user-specific endpoints without a valid OAuth access token.
Complete the OAuth 2.0 flow to get an access token, then include it as Authorization: Bearer YOUR_TOKEN.

Matrix Score Breakdown

🌐 Reachability 0/30
⚡ Speed 10/20
🔒 Security 15/15
🛠 Developer XP 17/20
✓ Reliability 0/15

Partially tested on Apr 5, 2026

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS YES
Category Video
Difficulty Intermediate
Verified: 2026-04-04

Similar APIs

View All →