# API sezonów i odcinków seriali

> Jeden sezon ze wszystkimi odcinkami odczytasz pod GET /3/tv/{series_id}/season/{season_number}, a pojedynczy odcinek poziom głębiej. JSON odpowiada TMDB v3 z air_date, episode_number, runtime i still_path. Każdy odcinek niesie crew i guest_stars, sezon 0 zawiera odcinki specjalne, a append_to_response dodaje credits, images i videos.

## Endpoint

`GET /3/tv/{series_id}/season/{season_number}`

```bash
curl "https://api.amodb.dev/3/tv/1396/season/1?language=en-US" \
  -H "Authorization: Bearer $AMODB_KEY"
```

Odpowiedź:

```json
{
  "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 team up with a former student and create a top of the line crystal meth in a used RV, to provide for his family once he is gone.",
      "production_code": "",
      "runtime": 59,
      "season_number": 1,
      "show_id": 1396,
      "still_path": "/ydlY3iPfeOAvu8gVqrxPoMvzNCn.jpg",
      "vote_average": 0,
      "vote_count": 0,
      "crew": [
        {
          "department": "Camera",
          "job": "Director of Photography",
          "credit_id": "52b7029219c29533d00dd2c1",
          "adult": false,
          "gender": 2,
          "id": 2483,
          "known_for_department": "Camera",
          "name": "约翰·托尔",
          "original_name": "约翰·托尔",
          "popularity": 1.1957,
          "profile_path": "/cfL9A6tC7L5Ps5fq1o3WpVKGMb1.jpg"
        },
        {
          "department": "Directing",
          "job": "Director",
          "credit_id": "52542275760ee313280006e8",
          "adult": false,
          "gender": 2,
          "id": 66633,
          "known_for_department": "Writing",
          "name": "文斯·吉利根",
          "original_name": "文斯·吉利根",
          "popularity": 2.7786,
          "profile_path": "/wJIxATESjzsjSgvRhVavOmdamXc.jpg"
        },
        {
          "department": "Writing",
          "job": "Writer",
          "credit_id": "52542275760ee313280006ce",
          "adult": false,
          "gender": 2,
          "id": 66633,
          "known_for_department": "Writing",
          "name": "文斯·吉利根",
          "original_name": "文斯·吉利根",
          "popularity": 2.7786,
          "profile_path": "/wJIxATESjzsjSgvRhVavOmdamXc.jpg"
        }
      ],
      "guest_stars": [
        {
          "character": "Steven Gomez",
          "credit_id": "5271b489760ee35b3e0881a7",
          "order": 8,
          "adult": false,
          "gender": 2,
          "id": 61535,
          "known_for_department": "Acting",
          "name": "史蒂文·迈克尔·奎扎达",
          "original_name": "史蒂文·迈克尔·奎扎达",
          "popularity": 1.7511,
          "profile_path": "/pVYrDkwI6GWvCNL2kJhpDJfBFyd.jpg"
        },
        {
          "character": "Jock",
          "credit_id": "52542275760ee313280006b4",
          "order": 500,
          "adult": false,
          "gender": 2,
          "id": 1216132,
          "known_for_department": "Acting",
          "name": "Aaron Hill",
          "original_name": "Aaron Hill",
          "popularity": 1.6521,
          "profile_path": "/rNp31SeoVqSQU6OZWxZUhGwAgyq.jpg"
        },
        {
          "character": "Dr. Belknap",
          "credit_id": "52725cb1760ee3044d0b9984",
          "order": 502,
          "adult": false,
          "gender": 2,
          "id": 161591,
          "known_for_department": "Acting",
          "name": "Gregory Chase",
          "original_name": "Gregory Chase",
          "popularity": 0.5435,
          "profile_path": "/gNdodev00CROpXuAh5EFmkWTVOo.jpg"
        }
      ]
    },
    {
      "air_date": "2008-01-27",
      "episode_number": 2,
      "episode_type": "standard",
      "id": 62086,
      "name": "Cat's in the Bag...",
      "overview": "Walt and Jesse attempt to tie up loose ends. The desperate situation gets more complicated with the flip of a coin. Walt's wife, Skyler, becomes suspicious of Walt's strange behavior.",
      "production_code": "",
      "runtime": 49,
      "season_number": 1,
      "show_id": 1396,
      "still_path": "/AbMoecO0ZZio0LcgeLxlzdyGs6X.jpg",
      "vote_average": 0,
      "vote_count": 0,
      "crew": [
        {
          "department": "Camera",
          "job": "Director of Photography",
          "credit_id": "52b7049c19c2953b63015013",
          "adult": false,
          "gender": 2,
          "id": 17948,
          "known_for_department": "Camera",
          "name": "Reynaldo Villalobos",
          "original_name": "Reynaldo Villalobos",
          "popularity": 0.904,
          "profile_path": "/4YlfhHDRZWhbRgeqT2Bwl1u5p9j.jpg"
        },
        {
          "department": "Writing",
          "job": "Writer",
          "credit_id": "52542275760ee313280006ce",
          "adult": false,
          "gender": 2,
          "id": 66633,
          "known_for_department": "Writing",
          "name": "文斯·吉利根",
          "original_name": "文斯·吉利根",
          "popularity": 2.7786,
          "profile_path": "/wJIxATESjzsjSgvRhVavOmdamXc.jpg"
        },
        {
          "department": "Directing",
          "job": "Director",
          "credit_id": "52542275760ee31328000725",
          "adult": false,
          "gender": 2,
          "id": 111338,
          "known_for_department": "Directing",
          "name": "亚当·伯恩斯坦",
          "original_name": "亚当·伯恩斯坦",
          "popularity": 1.0511,
          "profile_path": "/mnob89jXPcPfW85PPw7tTPCKSig.jpg"
        }
      ],
      "guest_stars": [
        {
          "character": "Krazy-8",
          "credit_id": "52725845760ee3046b09426e",
          "order": 504,
          "adult": false,
          "gender": 2,
          "id": 1046460,
          "known_for_department": "Acting",
          "name": "Max Arciniega",
          "original_name": "Max Arciniega",
          "popularity": 1.4399,
          "profile_path": "/eqKAJKPpt41KpsLIkkBnAY4HMAL.jpg"
        },
        {
          "character": "Ob-Gyn",
          "credit_id": "63012c9c5f4b73008267ba53",
          "order": 682,
          "adult": false,
          "gender": 0,
          "id": 1448105,
          "known_for_department": "Acting",
          "name": "Shane Marinson",
          "original_name": "Shane Marinson",
          "popularity": 0,
          "profile_path": null
        },
        {
          "character": "Ben",
          "credit_id": "63012d2111c066007cbc37b1",
          "order": 683,
          "adult": false,
          "gender": 0,
          "id": 3670897,
          "known_for_department": "Acting",
          "name": "Jason Byrd",
          "original_name": "Jason Byrd",
          "popularity": 0,
          "profile_path": null
        }
      ]
    },
    {
      "air_date": "2008-02-10",
      "episode_number": 3,
      "episode_type": "standard",
      "id": 62087,
      "name": "...And the Bag's in the River",
      "overview": "Walter fights with Jesse over his drug use, causing him to leave Walter alone with their captive, Krazy-8. Meanwhile, Hank has a scared straight moment with Walter Jr. after his aunt discovers he has been smoking pot. Also, Skylar is upset...",
      "production_code": "",
      "runtime": 49,
      "season_number": 1,
      "show_id": 1396,
      "still_path": "/2kBeBlxGqBOdWlKwzAxiwkfU5on.jpg",
      "vote_average": 0,
      "vote_count": 0,
      "crew": [
        {
          "department": "Camera",
          "job": "Director of Photography",
          "credit_id": "52b7049c19c2953b63015013",
          "adult": false,
          "gender": 2,
          "id": 17948,
          "known_for_department": "Camera",
          "name": "Reynaldo Villalobos",
          "original_name": "Reynaldo Villalobos",
          "popularity": 0.904,
          "profile_path": "/4YlfhHDRZWhbRgeqT2Bwl1u5p9j.jpg"
        },
        {
          "department": "Writing",
          "job": "Writer",
          "credit_id": "52542275760ee313280006ce",
          "adult": false,
          "gender": 2,
          "id": 66633,
          "known_for_department": "Writing",
          "name": "文斯·吉利根",
          "original_name": "文斯·吉利根",
          "popularity": 2.7786,
          "profile_path": "/wJIxATESjzsjSgvRhVavOmdamXc.jpg"
        },
        {
          "department": "Directing",
          "job": "Director",
          "credit_id": "52542275760ee31328000725",
          "adult": false,
          "gender": 2,
          "id": 111338,
          "known_for_department": "Directing",
          "name": "亚当·伯恩斯坦",
          "original_name": "亚当·伯恩斯坦",
          "popularity": 1.0511,
          "profile_path": "/mnob89jXPcPfW85PPw7tTPCKSig.jpg"
        }
      ],
      "guest_stars": [
        {
          "character": "Steven Gomez",
          "credit_id": "5271b489760ee35b3e0881a7",
          "order": 8,
          "adult": false,
          "gender": 2,
          "id": 61535,
          "known_for_department": "Acting",
          "name": "史蒂文·迈克尔·奎扎达",
          "original_name": "史蒂文·迈克尔·奎扎达",
          "popularity": 1.7511,
          "profile_path": "/pVYrDkwI6GWvCNL2kJhpDJfBFyd.jpg"
        },
        {
          "character": "Krazy-8",
          "credit_id": "52725845760ee3046b09426e",
          "order": 504,
          "adult": false,
          "gender": 2,
          "id": 1046460,
          "known_for_department": "Acting",
          "name": "Max Arciniega",
          "original_name": "Max Arciniega",
          "popularity": 1.4399,
          "profile_path": "/eqKAJKPpt41KpsLIkkBnAY4HMAL.jpg"
        },
        {
          "character": "Carmen Molina",
          "credit_id": "52542273760ee31328000676",
          "order": 643,
          "adult": false,
          "gender": 1,
          "id": 115688,
          "known_for_department": "Acting",
          "name": "卡门·塞兰诺",
          "original_name": "卡门·塞兰诺",
          "popularity": 1.1342,
          "profile_path": "/nzJEe2UqvvMIBJZP1aeFEj4EunN.jpg"
        }
      ]
    }
  ],
  "name": "Season 1",
  "overview": "High school chemistry teacher Walter White's life is suddenly transformed by a dire medical diagnosis. Street-savvy former student Jesse Pinkman \"teaches\" Walter a new trade.",
  "id": 3572,
  "poster_path": "/91EIXdWxmp2mHNRsSuDW3WyDJLj.jpg",
  "season_number": 1,
  "vote_average": 0
}
```

## Pobieranie sezonu

`GET /3/tv/{series_id}/season/{season_number}` zwraca jeden sezon i jego pełną tablicę `episodes` w jednej odpowiedzi. Numery sezonów zaczynają się od `1`, a `0` jest zarezerwowane dla odcinków specjalnych. ID serialu i numery sezonów weź z rekordu [seriale](https://amodb.dev/pl/tv-series/).

Przykład odczytuje sezon 1 serialu Breaking Bad. Kod wypisuje jeden wiersz na odcinek.

```bash
curl -sSf "https://api.amodb.dev/3/tv/1396/season/1?language=en-US" \
  -H "Authorization: Bearer $AMODB_KEY"
```

```js
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`);
}
```

```python
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
<?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']);
}
```

```go
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)
	}
}
```

### Parametry

| Parametr             | Gdzie | Wymagany      | Opis                                                                                                  |
| -------------------- | ----- | ------------- | ----------------------------------------------------------------------------------------------------- |
| `series_id`          | path  | tak           | Numeryczne ID serialu, na przykład `1396`.                                                            |
| `season_number`      | path  | tak           | Całkowity numer sezonu. `0` zwraca odcinki specjalne.                                                 |
| `api_key`            | query | jeden z dwóch | Twój klucz. Użyj go albo nagłówka `Authorization: Bearer`.                                            |
| `language`           | query | nie           | Tag TMDB, na przykład `en-US` lub `fr-FR`. Obsługiwanych jest 14 języków bazowych. Domyślnie `en-US`. |
| `append_to_response` | query | nie           | Wartości na poziomie sezonu: `credits`, `external_ids`, `images`, `videos`. Inne nazwy są ignorowane. |

### Pola odpowiedzi

| Pole                  | Typ             | Uwagi                                                     |
| --------------------- | --------------- | --------------------------------------------------------- |
| `id`, `season_number` | integer         | ID sezonu i jego numer w serialu.                         |
| `name`, `overview`    | string          | Tekst zlokalizowany, pusty, gdy tłumaczenie nie istnieje. |
| `air_date`            | string lub null | Data pierwszego odcinka, `YYYY-MM-DD`.                    |
| `poster_path`         | string lub null | Dołącz do `https://img.amodb.dev/t/p/{size}`.             |
| `vote_average`        | number          | Zbiorcza ocena użytkowników dla sezonu.                   |
| `episodes`            | array           | Każdy odcinek, z polami wymienionymi w następnej sekcji.  |

### Przykładowa odpowiedź

`GET /3/tv/1396/season/1?language=en-US`. Sezon ma 7 odcinków, więc `episodes` jest przycięte do jednej pozycji, a tablice `crew` i `guest_stars` tej pozycji pominięto:

```json
{
  "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
}
```

Każdy odcinek w odpowiedzi sezonu niesie też tablice `crew` i `guest_stars` o kształcie pozycji opisanym na stronie [obsada i ekipa](https://amodb.dev/pl/credits/). `runtime` może mieć wartość null dla jeszcze niewyemitowanego odcinka.

## Pobieranie odcinka

`GET /3/tv/{series_id}/season/{season_number}/episode/{episode_number}` zwraca jeden odcinek. Odpowiedź sezonu zawiera już każdy odcinek z `crew` i `guest_stars`, więc użyj tego endpointu, by odświeżyć jeden rekord bez ponownego ładowania sezonu. Przyjmuje `language` i `append_to_response` z `credits`, `external_ids`, `images`, `translations` i `videos`. Żądanie takie jak `/3/tv/1396/season/1/episode/1?append_to_response=credits` kosztuje jedno żądanie.

| Pole                              | Typ              | Uwagi                                                                                                                               |
| --------------------------------- | ---------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| `id`                              | integer          | ID odcinka.                                                                                                                         |
| `show_id`                         | integer          | ID serialu. Obecne w odpowiedzi sezonu i we wskaźnikach serialu, nie w odpowiedzi pojedynczego odcinka.                             |
| `season_number`, `episode_number` | integer          | Pozycja w serialu. Użyj ich do zbudowania ścieżki żądania.                                                                          |
| `name`, `overview`                | string           | Tekst zlokalizowany.                                                                                                                |
| `air_date`                        | string lub null  | Tylko data, bez godziny i strefy czasowej. Null, gdy niezaplanowany.                                                                |
| `episode_type`                    | string           | `standard` dla zwykłych odcinków. Aby rozpoznać finał, porównaj `episode_number` z `episode_count` tego sezonu w rekordzie serialu. |
| `runtime`                         | integer lub null | Minuty.                                                                                                                             |
| `production_code`                 | string           | Kod studia, często pusty.                                                                                                           |
| `still_path`                      | string lub null  | Kadr odcinka. Użyj `w300` lub `original` z `https://img.amodb.dev/t/p/{size}`.                                                      |
| `vote_average`, `vote_count`      | number, integer  | Zbiorcza ocena użytkowników.                                                                                                        |
| `crew`, `guest_stars`             | array            | Role w tym odcinku, zobacz [obsada i ekipa](https://amodb.dev/pl/credits/).                                                         |

## Następny i ostatni odcinek w rekordzie serialu

Endpoint serialu zwraca `next_episode_to_air` i `last_episode_to_air`. Każdy to podsumowanie odcinka z powyższymi polami, plus `show_id` i bez `crew` i `guest_stars`. Następny ma wartość null dla zakończonych seriali i dla seriali powracających bez potwierdzonej daty. Przykład odczytuje South Park, serial powracający.

```js
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');
```

Do odliczania porównaj `air_date` z lokalną datą widza. Wartość nie niesie pory dnia, więc pokaż datę, a nie godzinę na zegarze.

## Podzasoby sezonów i odcinków

Ścieżki sezonów i odcinków mają własne podzasoby. Kilka z nich zwraca dziś puste dane.

| Metoda i ścieżka                                          | Zwraca                                                            |
| --------------------------------------------------------- | ----------------------------------------------------------------- |
| `GET /tv/{series_id}/season/{season_number}/credits`      | `id`, `cast` i `crew` sezonu                                      |
| `GET /tv/{series_id}/season/{season_number}/images`       | `id` i pusta tablica `posters`                                    |
| `GET /tv/{series_id}/season/{season_number}/videos`       | `id` i pusta tablica `results`                                    |
| `GET /tv/{series_id}/season/{season_number}/external_ids` | `id` plus `tvdb_id`, `wikidata_id` i inne ID, wszystkie null      |
| `GET /tv/{series_id}/season/{season_number}/translations` | `id` i pusta tablica `translations`                               |
| `GET .../episode/{episode_number}/credits`                | `id`, pusta `cast`, `crew` i `guest_stars`                        |
| `GET .../episode/{episode_number}/images`                 | `id` i tablica `stills` z kadrem odcinka                          |
| `GET .../episode/{episode_number}/videos`                 | `id` i pusta tablica `results`                                    |
| `GET .../episode/{episode_number}/external_ids`           | `id` plus `imdb_id`, `tvdb_id` i inne ID, wszystkie null          |
| `GET .../episode/{episode_number}/translations`           | `id` i tablica `translations` z nazwą i opisem dla każdego języka |

Obsadę sezonów i odcinków omawia strona [obsada i ekipa](https://amodb.dev/pl/credits/), a kadry strona [obrazy](https://amodb.dev/pl/images-api/). amodb nie udostępnia ścieżek `changes` z TMDB ani endpointu dla odcinków jednej grupy odcinków.

## Błędy

| HTTP | status_code | Kiedy                                                                                                                                 |
| ---- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| 401  | 7           | Brakuje klucza lub jest błędny.                                                                                                       |
| 402  | 36          | Okres planu dobiegł końca.                                                                                                            |
| 404  | 34          | Serial, sezon lub odcinek nie istnieje, na przykład sezon `0` w serialu bez odcinków specjalnych, albo ścieżka nie jest udostępniana. |
| 405  | 37          | Wywołano metodę zapisu.                                                                                                               |
| 429  | 25          | Przekroczono limit żądań na minutę. Poczekaj tyle sekund, ile podaje `Retry-After`.                                                   |

Pełny format treści zobacz w [błędy](https://amodb.dev/pl/errors/), a okna w [limity żądań](https://amodb.dev/pl/rate-limits/).

## Praktyczne uwagi

- Sezony i odcinki są w cache przez 6 godzin. Bieżący sezon odczytuj ponownie raz lub dwa razy dziennie, gdy serial jest emitowany.
- Serial z 10 sezonami wymaga 10 wywołań sezonów. W planie z 20 żądaniami na minutę zużywa to połowę limitu jednej minuty, a powtórny przebieg w ciągu 6 godzin jest obsługiwany z cache na edge.
- Niewyemitowany odcinek może mieć `air_date` null, `runtime` null i pusty `overview`. Wyrenderuj tekst zastępczy zamiast kończyć się błędem.
- Kadry to szerokie klatki, a nie plakaty. Dla list żądaj `w300`, a `original` tylko wtedy, gdy potrzebujesz widoku w pełnym rozmiarze.

## Pytania i odpowiedzi

### Jak wypisać każdy odcinek serialu?

Odczytaj number_of_seasons z rekordu serialu, a potem wywołaj endpoint sezonu raz dla każdego numeru sezonu. Każda odpowiedź sezonu niesie pełną tablicę episodes, więc serial z pięcioma sezonami wymaga pięciu żądań.

### Co oznacza sezon numer 0?

Sezon 0 zawiera odcinki specjalne, takie jak materiały zza kulis i podsumowania. Istnieje tylko wtedy, gdy serial ma takie odcinki, a serial bez nich zwraca dla sezonu 0 błąd 404 z status_code 34.

### Dlaczego air_date jest null w niektórych odcinkach?

Odcinek jest zapowiedziany, ale nie ma jeszcze potwierdzonej daty. Traktuj null jako niezaplanowany, a następnego odcinka z datą szukaj w next_episode_to_air w rekordzie serialu.

### Czy mogę dostać kolejność odcinków według DVD lub absolutną?

Nie jako osobne zestawienie. GET /3/tv/{series_id}/episode_groups wymienia kolejności, które ma serial, ale amodb nie udostępnia endpointu zwracającego odcinki jednej grupy. Endpoint sezonu daje kolejność standardową.

## Powiązane strony

- [API szczegółów serialu](https://amodb.dev/pl/tv-series/): API szczegółów serialu z tymi samymi ścieżkami i JSON co TMDB v3. Serial po ID z sezonami, sieciami, klasyfikacją wiekową i dostawcami streamingu.
- [API obsady i ekipy](https://amodb.dev/pl/credits/): API obsady i ekipy z tymi samymi ścieżkami i JSON co TMDB v3. Pobierz obsadę i ekipę filmów, seriali, sezonów i odcinków z polami order, department i job.
- [API obrazów i host obrazów](https://amodb.dev/pl/images-api/): API obrazów filmów ze ścieżkami TMDB v3: wypisz plakaty, tła, loga i kadry każdego tytułu, a potem ładuj je z img.amodb.dev w 10 rozmiarach bez klucza.
- [API przewodnika po odcinkach](https://amodb.dev/pl/episode-guide-api/): API przewodnika po odcinkach z endpointami TMDB v3: nazwy, daty emisji, czas trwania, kadry i listy grup odcinków dowolnego serialu w 14 językach.
- [Limity żądań](https://amodb.dev/pl/rate-limits/): amodb limituje klucz liczbą żądań na minutę w przesuwanym oknie 60 sekund: 20, 40 lub 120 zależnie od planu. Czytaj nagłówki limitu i obsłuż 429 z Retry-After.
- [Szybki start](https://amodb.dev/pl/quickstart/): Pierwsze wywołanie amodb: zdobądź klucz, pobierz szczegóły filmu w curl, JavaScript, Python, PHP lub Go, potem załaduj plakat z img.amodb.dev. Poniżej 2 minut.

Zaktualizowano: 2026-10-18. Source: https://amodb.dev/pl/tv-seasons-episodes/
