Trakt API
Track and get data about movies and TV shows watched by a community.
What it does
Trakt tracks what people watch. Its API covers movie and show metadata, trending and popular lists, search, and — with OAuth — a user’s watch history, watchlist, collection, ratings and ‘scrobble’ (real-time now-watching) data.
Base URL
Authentication
Create an API app to get a client ID. Every request needs trakt-api-key: YOUR_CLIENT_ID and trakt-api-version: 2 headers. Public data needs only those; user data adds an OAuth 2.0 Authorization: Bearer token.
Code examples
curl -s "https://api.trakt.tv/movies/trending?limit=5" \ -H "trakt-api-key: $TRAKT_CLIENT_ID" \ -H "trakt-api-version: 2"
import requests
H = {"trakt-api-key": CLIENT_ID, "trakt-api-version": "2"}
r = requests.get("https://api.trakt.tv/search/show",
params={"query": "severance"}, headers=H, timeout=10)
top = r.json()[0]["show"]
print(top["title"], top["year"], top["ids"]["slug"])Rate limits & quotas
Around 1,000 GET calls per 5 minutes and a lower POST limit, per client. Responses carry X-Pagination-Page / X-Pagination-Page-Count headers; use page and limit params. Over the limit returns HTTP 429 with Retry-After.
Key response fields
| ids.trakt / ids.slug / ids.imdb / ids.tmdb | Cross-reference IDs for every item |
| title / year | Basic metadata |
| watchers (trending) | How many users are watching right now |
| progress (playback) | Resume position for the authed user |
| extended=full | Query param to include overview, runtime, genres, rating |
Common errors
| 401 | Missing/expired OAuth token on a user endpoint. |
| 403 | Missing trakt-api-key or trakt-api-version header. |
| 420 | Trakt-specific: account limit exceeded (e.g. list size). |
| 429 | Rate limited — wait Retry-After seconds. |
When to use it (and alternatives)
The pick when your feature is about watch state — history, watchlists, progress, ‘up next’. For catalogue metadata and images it is thinner than TMDB; the shared ids.tmdb lets you use both together.
FAQ
Do I need OAuth just to read trending movies?
No — public endpoints (trending, popular, search, summaries) need only the trakt-api-key and trakt-api-version headers. OAuth is for a specific user’s data.
How do I get more than the bare title?
Append ?extended=full to include overview, runtime, genres, certification, rating and more.
Can I combine Trakt with TMDB?
Yes — every Trakt item includes ids.tmdb. Use Trakt for watch data and TMDB for posters, backdrops and trailers.
New to APIs?
Short guides for working with this API — and any other.