One season of a show: episodes and ratings
One season: title, overview, first aired, network, rating and rating distribution, and every episode with full details. Unknown seasons answer 404.
Every response includes credits_used: the credits this call cost.
Part of the Trakt API: 36 endpoints with prices, use cases and example responses.
Parameters
| name | type | description |
|---|---|---|
idrequired | string | Show: Trakt slug (breaking-bad), Trakt number, IMDb id (tt0903747) or a trakt.tv show link. Example: breaking-bad |
seasonrequired | integer | Season number (0 is specials). Example: 5 |
Every endpoint also takes fresh, raw, fields (see lean responses and caching).
Example
curl "https://api.api.sh/trakt/v1/season?id=breaking-bad&season=5" \
-H "x-api-key: $APISH_KEY" import os, requests
res = requests.get(
"https://api.api.sh/trakt/v1/season",
params={"id": "breaking-bad", "season": "5"},
headers={"x-api-key": os.environ["APISH_KEY"]},
timeout=120,
)
res.raise_for_status()
data = res.json() const url = new URL("https://api.api.sh/trakt/v1/season");
url.searchParams.set("id", "breaking-bad");
url.searchParams.set("season", "5");
const res = await fetch(url, { headers: { "x-api-key": process.env.APISH_KEY } });
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const data = await res.json(); Response
A JSON object with the fields described above, plus raw (the source's own data), cached, fetched_at and credits_used. Errors return {"success": false, "error": "…"} with the HTTP status (see errors). A lookup that ran but found nothing (404) costs the price above; refused calls and errors on our side are free (what's charged).
Example response (real call, trimmed: lists cut to 2 items, long text shortened, raw left out)
{"id": "breaking-bad","season": 5,"title": "Season 5","overview": "Walt is faced with the prospect of moving on in a world without his enemy. As the pressure of a criminal life starts to build, Skyler strugg…","first_aired": "2012-07-16T01:00:00.000Z","network": null,"rating": 9.620826721191406,"votes": 3634,"ratings": {"trakt": {"rating": 9.62083,"votes": 3634,"distribution": {"1": 5,"2": 1,"3": 3,"4": 4,"5": 10,"6": 25,"7": 48,"8": 188,"9": 610,"10": 2740}},"tmdb": {"rating": null,"votes": null,"link": "https://www.themoviedb.org/tv/1396/season/5"},"imdb": {"rating": null,"votes": null,"link": "https://www.imdb.com/title/tt0903747/episodes?season=5"},"metascore": {"rating": null,"link": "https://www.imdb.com/title/tt0903747/episodes?season=5/criticreviews"},"rotten_tomatoes": {"rating": null,"state": null,"user_rating": null,"user_state": null,"link": null}},"count": 16,"episodes": [{"season": 5,"number": 1,"number_abs": 47,"title": "Live Free or Die","trakt_id": 73528,"imdb_id": "tt2081647","tmdb_id": 62147,"tvdb_id": 4307741,"overview": "As Walt deals with the aftermath of the Casa Tranquila explosion, Hank works to wrap up his investigation of Gus' empire.","first_aired": "2012-07-16T01:00:00.000Z","runtime_minutes": 43,"episode_type": "season_premiere","rating": 8.283846855163574,"votes": 3382,"comment_count": 16,"images": {"screenshot": ["https://media.trakt.tv/images/episodes/000/073/528/screenshots/medium/5ad4413edf.jpg.webp"]}},{"season": 5,"number": 2,"number_abs": 48,"title": "Madrigal","trakt_id": 73529,"imdb_id": "tt2301457","tmdb_id": 62148,"tvdb_id": 4339517,"overview": "Walt and Jesse pursue an unlikely business partner. The DEA filters through various leads in hopes of finding something.","first_aired": "2012-07-23T01:00:00.000Z","runtime_minutes": 48,"episode_type": "standard","rating": 8.026803970336914,"votes": 3209,"comment_count": 7,"images": {"screenshot": ["https://media.trakt.tv/images/episodes/000/073/529/screenshots/medium/3b18416d43.jpg.webp"]}},"… 14 more"],"cached": false,"credits_used": 1}