> ## Documentation Index
> Fetch the complete documentation index at: https://hianime.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Servers

> Get the server list for a specific episode

## Overview

Fetches a list of the **servers** for a specific episode. This function takes an `episodeId` as a parameter. It is required to pass `episodeId` to fetch the servers of an episode.

## Usage

```ts index.ts icon="js" lines theme={null}
import { Hianime } from "hianime";

async function main() {
  const hianime = new Hianime();

  // Takes an episodeId as a parameter,
  // in the example it is "3303" which is the episodeId of the anime "Attack on Titan" Episode 1
  const result = await hianime.getEpisodeServers("3303");
  console.log(JSON.stringify(result, null, 2));
}

main();
```

<Note>
  The `episodeId` can be found on each `Episode` object from the
  `getEpisodes()`. method.
</Note>

## Response

```json response icon="file-code" theme={null}
{
  "sub": [
    {
      "type": "sub",
      "id": "579601",
      "serverId": "4",
      "name": "HD-1"
    },
    {
      "type": "sub",
      "id": "1180455",
      "serverId": "6",
      "name": "HD-3"
    },
    {
      "type": "sub",
      "id": "413285",
      "serverId": "1",
      "name": "HD-2"
    }
  ],
  "dub": [
    {
      "type": "dub",
      "id": "586962",
      "serverId": "4",
      "name": "HD-1"
    },
    {
      "type": "dub",
      "id": "1180405",
      "serverId": "6",
      "name": "HD-3"
    },
    {
      "type": "dub",
      "id": "7481",
      "serverId": "1",
      "name": "HD-2"
    }
  ]
}
```

## Parameters

### episodeId

* Type: `string`
* Required: `true`
* Description: The unique identifier of the episode
