trakt-tvInteract with the Trakt API to manage your watchlist, collection, ratings, and discover content
Install via ClawdBot CLI:
clawdbot install d-meagher/trakt-tvInteract with Trakt.tv to manage your watchlist, track viewing history, maintain your collection, rate content, and discover new movies and shows.
Before using this skill, you need to set up Trakt API credentials:
~/.openclaw/openclaw.json:{
"skills": {
"entries": {
"trakt": {
"enabled": true,
"env": {
"TRAKT_CLIENT_ID": "your_client_id",
"TRAKT_CLIENT_SECRET": "your_client_secret",
"TRAKT_ACCESS_TOKEN": "your_access_token",
"TRAKT_REFRESH_TOKEN": "your_refresh_token"
}
}
}
}
}
Add to watchlist:
curl -X POST https://api.trakt.tv/sync/watchlist \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TRAKT_ACCESS_TOKEN" \
-H "trakt-api-version: 2" \
-H "trakt-api-key: $TRAKT_CLIENT_ID" \
-d '{"movies":[{"title":"Inception","year":2010}]}'
Get watchlist:
curl https://api.trakt.tv/sync/watchlist/movies \
-H "Authorization: Bearer $TRAKT_ACCESS_TOKEN" \
-H "trakt-api-version: 2" \
-H "trakt-api-key: $TRAKT_CLIENT_ID"
Remove from watchlist:
curl -X POST https://api.trakt.tv/sync/watchlist/remove \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TRAKT_ACCESS_TOKEN" \
-H "trakt-api-version: 2" \
-H "trakt-api-key: $TRAKT_CLIENT_ID" \
-d '{"movies":[{"ids":{"trakt":12601}}]}'
Search movies:
curl "https://api.trakt.tv/search/movie?query=inception" \
-H "trakt-api-version: 2" \
-H "trakt-api-key: $TRAKT_CLIENT_ID"
Search shows:
curl "https://api.trakt.tv/search/show?query=breaking+bad" \
-H "trakt-api-version: 2" \
-H "trakt-api-key: $TRAKT_CLIENT_ID"
Get watch history:
curl https://api.trakt.tv/sync/history \
-H "Authorization: Bearer $TRAKT_ACCESS_TOKEN" \
-H "trakt-api-version: 2" \
-H "trakt-api-key: $TRAKT_CLIENT_ID"
Add to history (mark as watched):
curl -X POST https://api.trakt.tv/sync/history \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TRAKT_ACCESS_TOKEN" \
-H "trakt-api-version: 2" \
-H "trakt-api-key: $TRAKT_CLIENT_ID" \
-d '{"movies":[{"title":"The Matrix","year":1999,"watched_at":"2024-01-15T20:00:00.000Z"}]}'
Get collection:
curl https://api.trakt.tv/sync/collection/movies \
-H "Authorization: Bearer $TRAKT_ACCESS_TOKEN" \
-H "trakt-api-version: 2" \
-H "trakt-api-key: $TRAKT_CLIENT_ID"
Add to collection:
curl -X POST https://api.trakt.tv/sync/collection \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TRAKT_ACCESS_TOKEN" \
-H "trakt-api-version: 2" \
-H "trakt-api-key: $TRAKT_CLIENT_ID" \
-d '{"movies":[{"title":"Blade Runner 2049","year":2017,"collected_at":"2024-01-15T20:00:00.000Z","media_type":"bluray","resolution":"uhd_4k"}]}'
Get ratings:
curl https://api.trakt.tv/sync/ratings/movies \
-H "Authorization: Bearer $TRAKT_ACCESS_TOKEN" \
-H "trakt-api-version: 2" \
-H "trakt-api-key: $TRAKT_CLIENT_ID"
Add rating:
curl -X POST https://api.trakt.tv/sync/ratings \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TRAKT_ACCESS_TOKEN" \
-H "trakt-api-version: 2" \
-H "trakt-api-key: $TRAKT_CLIENT_ID" \
-d '{"movies":[{"title":"The Shawshank Redemption","year":1994,"rating":10}]}'
Get recommendations:
curl https://api.trakt.tv/recommendations/movies?limit=10 \
-H "Authorization: Bearer $TRAKT_ACCESS_TOKEN" \
-H "trakt-api-version: 2" \
-H "trakt-api-key: $TRAKT_CLIENT_ID"
Get trending:
curl https://api.trakt.tv/movies/trending \
-H "trakt-api-version: 2" \
-H "trakt-api-key: $TRAKT_CLIENT_ID"
Get popular:
curl https://api.trakt.tv/movies/popular \
-H "trakt-api-version: 2" \
-H "trakt-api-key: $TRAKT_CLIENT_ID"
{
"title": "Inception",
"year": 2010,
"ids": {
"trakt": 16662,
"slug": "inception-2010",
"imdb": "tt1375666",
"tmdb": 27205
}
}
{
"title": "Breaking Bad",
"year": 2008,
"ids": {
"trakt": 1,
"slug": "breaking-bad",
"tvdb": 81189,
"imdb": "tt0903747",
"tmdb": 1396
}
}
{
"season": 1,
"number": 1,
"title": "Pilot",
"ids": {
"trakt": 73482,
"tvdb": 349232,
"imdb": "tt0959621",
"tmdb": 62085
}
}
When the user asks to interact with Trakt:
trakt-api-version: 2trakt-api-key: $TRAKT_CLIENT_IDAuthorization: Bearer $TRAKT_ACCESS_TOKEN (for authenticated endpoints)Content-Type: application/json (for POST/PUT/DELETE)/sync/watchlist (POST to add, /sync/watchlist/remove to remove)/sync/history (GET for viewing, POST for adding)/sync/collection (GET for viewing, POST for adding)/sync/ratings (GET for viewing, POST for adding)/search/{type}?query={q} (no auth required)/{type}/trending (no auth required)/{type}/popular (no auth required)/recommendations/{type} (requires auth)To get an access token, use this helper script:
#!/bin/bash
# Save as get_trakt_token.sh
CLIENT_ID="your_client_id"
CLIENT_SECRET="your_client_secret"
REDIRECT_URI="urn:ietf:wg:oauth:2.0:oob"
echo "1. Open this URL in your browser:"
echo "https://trakt.tv/oauth/authorize?response_type=code&client_id=$CLIENT_ID&redirect_uri=$REDIRECT_URI"
echo ""
echo "2. Authorize the app and copy the code"
echo -n "3. Paste the code here: "
read CODE
echo ""
echo "Exchanging code for token..."
RESPONSE=$(curl -s -X POST https://api.trakt.tv/oauth/token \
-H "Content-Type: application/json" \
-d "{
\"code\": \"$CODE\",
\"client_id\": \"$CLIENT_ID\",
\"client_secret\": \"$CLIENT_SECRET\",
\"redirect_uri\": \"$REDIRECT_URI\",
\"grant_type\": \"authorization_code\"
}")
echo ""
echo "Response:"
echo "$RESPONSE" | jq .
echo ""
echo "Add these to your OpenClaw config:"
echo "TRAKT_ACCESS_TOKEN=$(echo $RESPONSE | jq -r .access_token)"
echo "TRAKT_REFRESH_TOKEN=$(echo $RESPONSE | jq -r .refresh_token)"
Make it executable: chmod +x get_trakt_token.sh
User: "Add Dune to my Trakt watchlist"
Assistant: I'll add Dune to your Trakt watchlist.
curl -X POST https://api.trakt.tv/sync/watchlist \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TRAKT_ACCESS_TOKEN" \
-H "trakt-api-version: 2" \
-H "trakt-api-key: $TRAKT_CLIENT_ID" \
-d '{"movies":[{"title":"Dune","year":2021}]}'
User: "What movies are trending on Trakt?"
Assistant: Let me check the trending movies on Trakt.
curl "https://api.trakt.tv/movies/trending?limit=10" \
-H "trakt-api-version: 2" \
-H "trakt-api-key: $TRAKT_CLIENT_ID"
User: "Rate Breaking Bad 10/10 on Trakt"
Assistant: I'll rate Breaking Bad 10/10 on Trakt.
curl -X POST https://api.trakt.tv/sync/ratings \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TRAKT_ACCESS_TOKEN" \
-H "trakt-api-version: 2" \
-H "trakt-api-key: $TRAKT_CLIENT_ID" \
-d '{"shows":[{"title":"Breaking Bad","year":2008,"rating":10}]}'
?extended=full parameterGenerated Mar 1, 2026
Movie and TV show enthusiasts can use this skill to automatically track their viewing history, maintain a watchlist, and rate content they've watched. It helps users organize their media consumption and discover new recommendations based on their preferences, integrating with their existing Trakt.tv account.
Streaming services or media companies can leverage this skill to fetch trending and popular movies or shows from Trakt.tv to inform content acquisition or promotional strategies. It allows for real-time data gathering on audience interests without requiring user authentication for public endpoints.
Friend groups or online communities can use this skill to manage shared watchlists, add items collectively, and track what everyone has watched. It facilitates collaborative media planning and discussion by syncing data through authenticated API calls to Trakt.tv.
Physical media collectors can utilize this skill to catalog their movie or show collections, including details like media type and resolution. It helps maintain an organized digital inventory that syncs with Trakt.tv, making it easy to track and share their collection.
Researchers or analysts studying media consumption patterns can use this skill to programmatically retrieve user watch history and ratings data. This enables data-driven insights into viewing habits and preferences, supporting academic or market research projects.
Offer a premium service where users pay a monthly fee to have their Trakt.tv data automatically synced and analyzed, providing personalized recommendations and viewing statistics. Revenue is generated through subscription tiers with advanced features like cross-platform integration.
License this skill to media companies or streaming platforms that want to integrate Trakt.tv data into their own apps for enhanced user engagement. Revenue comes from one-time licensing fees or usage-based pricing for API calls and data access.
Develop a mobile or web app that uses this skill to offer basic Trakt.tv functionalities for free, with premium features like advanced analytics, ad-free experience, or exclusive content discovery tools available via in-app purchases. Revenue is driven by upgrades and microtransactions.
π¬ Integration Tip
Ensure all required environment variables are correctly set in the configuration file, and use curl commands with proper headers as specified to avoid authentication errors.
Terminal Spotify playback/search via spogo (preferred) or spotify_player.
Search GIF providers with CLI/TUI, download results, and extract stills/sheets.
Download videos from YouTube, Bilibili, Twitter, and thousands of other sites using yt-dlp. Use when the user provides a video URL and wants to download it, extract audio (MP3), download subtitles, or select video quality. Triggers on phrases like "δΈθ½½θ§ι’", "download video", "yt-dlp", "YouTube", "Bη«", "ζι³", "ζει³ι’", "extract audio".
Search and add movies to Radarr. Supports collections, search-on-add option.
Control Spotify playback on macOS. Play/pause, skip tracks, control volume, play artists/albums/playlists. Use when a user asks to play music, control Spotify, change songs, or adjust Spotify volume.
Search and add TV shows to Sonarr. Supports monitor options, search-on-add.