> ## 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.

# Episodes

> Get the episode list for a specific anime

## Overview

Fetches a list of the **episodes** for a specific anime. This function takes a `dataId` as a parameter. It is required to pass `dataId` to fetch the episodes of an anime.

## Usage

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

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

  // Takes a dataId as a parameter,
  // in the example it is "112" which is the dataId of the anime "Attack on Titan"
  const result = await hianime.getEpisodes("112");
  console.log(JSON.stringify(result, null, 2));
}

main();
```

<Note>
  The `dataId` can be found on each `Result` object from the `getMostPopular()`,
  `getTopAiring()`, `getSpecialList()`, `getDubbedAnime()`, `getSubbedAnime()`,
  `getTVShows()`, `getONAList()`, `getMovies()`, `getOVAList()` methods.
</Note>

## Response

```json response icon="file-code" theme={null}
[
  {
    "id": "3303",
    "number": "1",
    "title": "To You Two Thousand Years Later",
    "href": "/watch/attack-on-titan-112?ep=3303"
  },
  {
    "id": "3304",
    "number": "2",
    "title": "That Day",
    "href": "/watch/attack-on-titan-112?ep=3304"
  },
  {
    "id": "3305",
    "number": "3",
    "title": "Shining Dimly in the Midst of Despair",
    "href": "/watch/attack-on-titan-112?ep=3305"
  },
  {
    "id": "3306",
    "number": "4",
    "title": "Night of the Disbanding",
    "href": "/watch/attack-on-titan-112?ep=3306"
  }
  // more episodes...
]
```

## Parameters

### dataId

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