Episodes

The episode model

Properties

  • Name
    id
    Type
    string
    Description

    Unique identifier for the episode.

  • Name
    title
    Type
    string
    Description

    Title of the episode.

  • Name
    episode
    Type
    string
    Description

    The episode number

  • Name
    seriesEpisodeNumber
    Type
    integer
    Description

    The overall episode number in the series.

  • Name
    airDate
    Type
    string
    Description

    Original air date.

  • Name
    season
    Type
    Season
    Description

    The season information.

  • Name
    mainCharacters
    Type
    Character
    Description

    If included, the main characters for the episode.

  • Name
    supportingCharacters
    Type
    Character
    Description

    If included, the supporting characters for the episode.

  • Name
    recurringCharacters
    Type
    Character
    Description

    If included, the recurring characters for the episode.


GET/api/episodes

List all episodes

Retrieves all episodes in the series and optionally includes characters.

Optional attributes

  • Name
    includeCharacters
    Type
    boolean
    Description

    Include characters in each episode.

  • Name
    limit
    Type
    integer
    Description

    Limit the number of episodes returned.

  • Name
    season
    Type
    string
    Description

    Limit episodes by season ID

Request

GET
/api/episodes
curl -G https://theofficeapi.dev/api/episodes \
  -d includeCharacters=true \
  -d season=1 \
  -d limit=10

Response

{
  "results": [
    {
      "id": 1,
      "title": "Pilot",
      "summary": "A documentary crew arrives at the Scranton, Pennsylvania, offices of Dunder Mifflin to observe the employees and learn about modern management. Regional manager Michael Scott  tries to paint a happy picture in the face of potential downsizing from corporate. The office also gets new employee Ryan Howard as a temporary worker, while salesman Jim Halpert pranks and antagonizes fellow salesman Dwight Schrute , much to the enjoyment of receptionist Pam Beesly .",
      "episode": "1",
      "seriesEpisodeNumber": 1,
      "airDate": "2005-03-24",
      "season": {
        "id": 1,
        "number": 1,
        "startDate": "2005-03-24",
        "endDate": "2005-04-26"
      },
      "mainCharacters": [
        {
          "id": 18,
          "name": "Dwight Schrute"
        }
        // ...
      ],
      "supportingCharacters": [],
      "recurringCharacters": [
        {
          "id": 3,
          "name": "Angela Martin"
        }
        // ...
      ]
    }
    // ...
  ],
  "meta": {
    "isFirstPage": true,
    "isLastPage": false,
    "currentPage": 1,
    "previousPage": null,
    "nextPage": 2,
    "pageCount": 19
  }
}