Skip to main content
GET
/
api
/
series
/
{showId}
/
seasons
/
{seasonId}
/
chapters
List Episodes
curl --request GET \
  --url https://api.example.com/api/series/{showId}/seasons/{seasonId}/chapters
{
  "episodes": [
    {
      "_id": "<string>",
      "title": "<string>",
      "description": "<string>",
      "content": [
        {
          "value": {
            "_id": "<string>"
          }
        }
      ],
      "images": [
        {
          "_id": "<string>",
          "path": "<string>",
          "basePath": "<string>"
        }
      ]
    }
  ],
  "error": "<string>"
}

Overview

This endpoint returns a list of all episodes for a specific season within a series. Episodes are also referred to as “chapters” in the MediaStream API.

Path Parameters

showId
string
required
The unique identifier of the series
seasonId
string
required
The unique identifier of the season

Request Example

curl -X GET "https://your-domain.com/api/series/abc123/seasons/def456/chapters" \
  -H "Accept: application/json"

Response

episodes
array
Array of episode objects

Response Example

[
  {
    "_id": "64a7f2b1c8d4e12345abcdef",
    "title": "Episode 1: Pilot",
    "description": "The beginning of an epic journey",
    "content": [
      {
        "value": {
          "_id": "5f8a3d2b1c9d440000123456"
        }
      }
    ],
    "images": [
      {
        "_id": "img123",
        "path": "/images/episode1.jpg",
        "basePath": "/images/episodes/pilot"
      }
    ]
  },
  {
    "_id": "64a7f2b1c8d4e12345abcd00",
    "title": "Episode 2: The Adventure Begins",
    "description": "Our heroes embark on their quest",
    "content": [
      {
        "value": {
          "_id": "5f8a3d2b1c9d440000123457"
        }
      }
    ],
    "images": [
      {
        "_id": "img124",
        "path": "/images/episode2.jpg",
        "basePath": "/images/episodes/adventure"
      }
    ]
  }
]

Error Responses

error
string
Error message describing what went wrong

Common Errors

The specified series or season does not exist.
{
  "error": "Season not found"
}
Invalid or missing API authentication.
{
  "error": "Unauthorized access"
}
Server error while fetching episodes.
{
  "error": "Failed to retrieve episodes"
}

Notes

This endpoint proxies requests to the MediaStream API. Ensure your MEDIASTREAM_API_URL and MEDIASTREAM_API_KEY environment variables are properly configured.
Episodes are returned in the order they were created. Use the episode _id to fetch individual episode details.

Build docs developers (and LLMs) love