TMDB episode API: seasons and episodes
The TMDB episode API reads a whole season, with every episode, in one request to GET /3/tv/{series_id}/season/{season_number}. One episode sits a level deeper. amodb keeps the TMDB v3 paths and JSON, so only the base URL changes. Season 0 holds specials, replies are cached for 6 hours, and each call costs 1 request.
The TMDB episode API has two read calls. GET / returns one season with all its episodes in a single request, and GET / returns one episode. amodb serves both at https:/ with the TMDB v3 paths and JSON. A show with 10 seasons needs 10 season calls, and each call costs 1 request of your plan's 20, 40 or 120 per minute.
The series record that lists the seasons is covered in the TMDB TV API reference, the product view is the TV episode API, and every other path is listed in the API reference.
How do I get all episodes of a season?
GET / is the TMDB season call. It returns one season and its full episodes array in a single reply. Season numbers start at 1, and 0 is reserved for specials. Take the series id and the season numbers from the TV series record.
The example reads season 1 of Breaking Bad. The code prints one line per episode.
curl -sSf "https://api.amodb.dev/3/tv/1396/season/1?language=en-US" \
-H "Authorization: Bearer $AMODB_KEY"const url = 'https://api.amodb.dev/3/tv/1396/season/1?language=en-US';
const res = await fetch(url, { headers: { Authorization: `Bearer ${process.env.AMODB_KEY}` } });
if (!res.ok) throw new Error(`amodb returned ${res.status}`);
const season = await res.json();
for (const ep of season.episodes) {
console.log(String(ep.episode_number).padStart(2, '0'), ep.name, ep.air_date, `${ep.runtime ?? '?'} min`);
}import os
import requests
r = requests.get(
"https://api.amodb.dev/3/tv/1396/season/1",
params={"language": "en-US"},
headers={"Authorization": f"Bearer {os.environ['AMODB_KEY']}"},
timeout=10,
)
r.raise_for_status()
season = r.json()
for ep in season["episodes"]:
print(f"{ep['episode_number']:02d}", ep["name"], ep["air_date"], ep["runtime"] or "?")<?php
$url = 'https://api.amodb.dev/3/tv/1396/season/1?language=en-US';
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 10,
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('AMODB_KEY')],
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($status !== 200) {
throw new RuntimeException("amodb returned $status");
}
$season = json_decode($body, true);
foreach ($season['episodes'] as $ep) {
printf("%02d %s %s\n", $ep['episode_number'], $ep['name'], $ep['air_date']);
}package main
import (
"encoding/json"
"fmt"
"net/http"
"os"
"time"
)
type Season struct {
Name string `json:"name"`
Episodes []struct {
EpisodeNumber int `json:"episode_number"`
Name string `json:"name"`
AirDate string `json:"air_date"`
Runtime int `json:"runtime"`
} `json:"episodes"`
}
func main() {
req, _ := http.NewRequest("GET", "https://api.amodb.dev/3/tv/1396/season/1?language=en-US", nil)
req.Header.Set("Authorization", "Bearer "+os.Getenv("AMODB_KEY"))
client := &http.Client{Timeout: 10 * time.Second}
res, err := client.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
if res.StatusCode != http.StatusOK {
panic(res.Status)
}
var s Season
if err := json.NewDecoder(res.Body).Decode(&s); err != nil {
panic(err)
}
for _, e := range s.Episodes {
fmt.Printf("%02d %s %s %d min\n", e.EpisodeNumber, e.Name, e.AirDate, e.Runtime)
}
}Parameters
series_idpathrequiredNumeric TV id, for example1396.season_numberpathrequiredInteger season number.0returns specials.api_keyqueryone of twoYour key. Use this or theAuthorization: Bearerheader.languagequeryTMDB tag such asen-USorfr-FR. 14 base languages are served. Defaulten-US.append_to_responsequerySeason level values:credits,external_ids,images,videos. Other names are ignored.
Response fields
| Field | Type | Notes |
|---|---|---|
id, season_number | integer | Season id and its number inside the show. |
name, overview | string | Localized text, empty when no translation exists. |
air_date | string or null | Date of the first episode, YYYY-MM-DD. |
poster_path | string or null | Append to https:/. |
vote_average | number | Aggregate user score for the season. |
episodes | array | Every episode, with the fields listed in the next section. |
Example response
GET /. The season has 7 episodes, so episodes is cut to one entry, and the crew and guest_stars arrays of that entry are left out:
{
"air_date": "2008-01-20",
"episodes": [
{
"air_date": "2008-01-20",
"episode_number": 1,
"episode_type": "standard",
"id": 62085,
"name": "Pilot",
"overview": "When an unassuming high school chemistry teacher discovers he has a rare form of lung cancer, he decides to...",
"production_code": "",
"runtime": 59,
"season_number": 1,
"show_id": 1396,
"still_path": "/ydlY3iPfeOAvu8gVqrxPoMvzNCn.jpg",
"vote_average": 0,
"vote_count": 0
}
],
"name": "Season 1",
"overview": "High school chemistry teacher Walter White's life is suddenly transformed by a dire medical diagnosis. Stre...",
"id": 3572,
"poster_path": "/91EIXdWxmp2mHNRsSuDW3WyDJLj.jpg",
"season_number": 1,
"vote_average": 0
}Every episode in the season reply also carries crew and guest_stars arrays, with the entry shape described on credits. runtime can be null for an unaired episode.
How do I get one episode?
GET / is the TMDB episode call. It returns one episode. The season reply already holds every episode with crew and guest_stars, so use this endpoint to refresh one record without reloading the season. It accepts language and append_to_response with credits, external_ids, images, translations and videos. A request such as / costs one request.
| Field | Type | Notes |
|---|---|---|
id | integer | Episode id. |
show_id | integer | Series id. Present in the season reply and on the series pointers, not in the single episode reply. |
season_number, episode_number | integer | Position inside the show. Use them to build the request path. |
name, overview | string | Localized text. |
air_date | string or null | Date only, no time or time zone. Null when unscheduled. |
episode_type | string | standard for regular episodes. To spot a finale, compare episode_number with the episode_count of that season in the series record. |
runtime | integer or null | Minutes. |
production_code | string | Studio code, often empty. |
still_path | string or null | Episode still. Use w300 or original from https:/. |
vote_average, vote_count | number, integer | Aggregate user score. |
crew, guest_stars | array | Credits for this episode, see credits. |
What is a TMDB episode id?
An episode has two kinds of identifier, and they do different jobs. The numeric id names the episode record. The path numbers address it. amodb has no path that looks an episode up by id alone, so build the path from the series id, the season number and the episode number.
| Value | Example | Use it for |
|---|---|---|
id | 62085 (pilot of series 1396) | Your own database key for the episode. |
show_id | 1396 | The series id. Present in the season reply and on next_episode_to_air, not in the single episode reply. |
season_number | 1 | The second number in the path. 0 is specials. |
episode_number | 1 | The third number in the path. |
imdb_id, tvdb_id on .../external_ids | null | Nothing yet. The episode external_ids path answers with these fields set to null. |
To go from an episode to its show, read show_id from the season reply. To go from a show to an episode, count with number_of_seasons on the series record and episode_count of each season entry.
How do I get the next or last episode of a show?
The series endpoint returns next_episode_to_air and last_episode_to_air. Each one is an episode summary with the fields above, plus show_id and minus crew and guest_stars. The next one is null for ended shows and for returning shows without a confirmed date. The sample reads South Park, a returning show.
const headers = { Authorization: `Bearer ${process.env.AMODB_KEY}` };
const res = await fetch('https://api.amodb.dev/3/tv/2190', { headers });
if (!res.ok) throw new Error(`amodb returned ${res.status}`);
const next = (await res.json()).next_episode_to_air;
console.log(next ? `Next: S${next.season_number}E${next.episode_number} on ${next.air_date}` : 'No upcoming episode');For a countdown, compare air_date with the viewer's local date. The value carries no time of day, so show a date and not a clock time.
What are TMDB episode groups?
Some shows come in more than one order: aired order, DVD order, absolute order or a story arc order. GET / lists the orders the catalog holds for a show. It is a TV only path. You can also get the same list in the series call with append_, which saves a request.
| Field | Type | Notes |
|---|---|---|
id | integer | The series id (top level). |
results | array | One object per episode group. An empty array when the show has none. |
results[].id | string | Group id. A string, not a number. |
results[].name, results[].description | string | Name and short description of the order. |
results[].type | integer | TMDB's numeric group type. |
results[].episode_, results[].group_count | integer | Episodes in the order, and the number of groups (seasons or arcs) they sit in. |
results[].network | object or null | id, name, logo_path and origin_country of the network, or null. |
amodb lists the groups but does not offer the call that returns the episodes of one group. For the standard order use the season endpoint above. If your product needs DVD or absolute order, keep that mapping in your own data and key it on the episode id.
What other paths do seasons and episodes have?
Season and episode paths have their own sub-resources. Several of them return empty data today.
| Method and path | Returns |
|---|---|
GET / | id, cast and crew for the season |
GET / | id and an empty posters array |
GET / | id and an empty results array |
GET / | id plus tvdb_id, wikidata_id and other ids, all null |
GET / | id and an empty translations array |
GET .../ | id, an empty cast, crew and guest_stars |
GET .../ | id and a stills array with the episode still |
GET .../ | id and an empty results array |
GET .../ | id plus imdb_id, tvdb_id and other ids, all null |
GET .../ | id and a translations array with name and overview per language |
Season and episode credits are covered on credits, and stills on images. amodb does not offer the TMDB changes paths or an endpoint for the episodes of one episode group.
How many requests does a whole show take?
Every call is 1 request, so the cost of a show is the number of seasons plus the series call. Cached replies still count toward the rate, so the edge cache saves time on a repeat run but not requests.
| Job | Calls | Requests |
|---|---|---|
| One season | 1 season call | 1 |
| Show with 5 seasons | 1 series call, 5 season calls | 6 |
| Show with 10 seasons | 1 series call, 10 season calls | 11 |
| Show with 10 seasons and specials | 1 series call, 11 season calls (0 to 10) | 12 |
| One episode refreshed | 1 episode call | 1 |
At 11 requests per show, the Lite plan (20 per minute) syncs 1 show a minute, Pro (40) syncs 3, and Pro+ (120) syncs 10. To stay under the limit, space the calls out and read Retry-After on a 429. A 6 hour client cache matches the edge cache, see rate limits. A runnable client is in TMDB API in Python.
Does the amodb episode API match TMDB?
For reads, yes. The table lists what is the same and what is not.
| Item | On amodb |
|---|---|
| Base URL | https:/ instead of https:/ |
| Season and episode paths | Same paths and JSON fields as TMDB v3 |
| Key | 32 lowercase hex characters, sent as api_key or Authorization: Bearer, see TMDB API key |
| Rate | 20, 40 or 120 requests per minute per account, sliding 60 second window, no daily cap |
| Episode groups | List only. No call for the episodes of one group |
changes feeds | Not offered |
| Rating an episode | Not offered, answers HTTP 405 |
Does the episode API cost more for a paid app?
TMDB's API is free only until the app earns money. TMDB staff said on the TMDB forum (2026-10-15) that an app counts as commercial once it earns revenue from ads, in-app purchases, donations or subscriptions, and quoted a commercial plan at $149 a month for companies under $1M revenue (2026-03-31). TMDB's terms also ask for its logo and a not-endorsed notice. amodb starts at $5.19 a month (3.5% of $149), charges nothing extra for commercial use on any plan and asks for no amodb logo or credit line. Third party credits still apply: credit JustWatch for where to watch data, and show the attribution credit wherever a text or image carries one. Compare the terms in amodb vs TMDB and the plans on amodb pricing.
Errors
| HTTP | status_code | When |
|---|---|---|
| 401 | 7 | The key is missing or wrong. |
| 402 | 36 | The plan period has ended. |
| 404 | 34 | The series, season or episode does not exist, for example season 0 on a show without specials, or the path is not offered. |
| 405 | 37 | You called a write method. |
| 429 | 25 | Over your requests per minute. Wait for the Retry-After seconds. |
See errors for the full body format and rate limits for the windows.
Practical notes
- Seasons and episodes are cached for 6 hours. Re-read the current season once or twice a day while a show airs.
- A 10 season show needs 10 season calls. On the 20 requests per minute plan that uses half of one minute's allowance. A repeat run within 6 hours is answered from the edge cache, but cached replies still count toward the rate.
- An unaired episode can have a null
air_date, a nullruntimeand an emptyoverview. Render a placeholder instead of failing. - Stills are wide frames, not posters. Ask for
w300on lists andoriginalonly when you need a full size view.