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

# Top Airing

> Get the top airing anime list

## Overview

Fetches a paginated list of the **top airing anime** as ranked on HiAnime. Use this when you need a broad, trending list to display on home pages, dashboards, or discovery screens.

## Usage

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

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

  const result = await hianime.getTopAiring();
  console.log(JSON.stringify(result, null, 2));
}

main();
```

## Response

```json response icon="file-code" theme={null}
{
  "page": 1,
  "totalPage": 30,
  "hasNextPage": true,
  "results": [
    {
      "id": "/my-happy-marriage-18892",
      "image": "https://cdn.noitatnemucod.net/thumbnail/300x400/100/ce5562e78f5267a9d515f7ac2d692aeb.jpg",
      "title": "My Happy Marriage",
      "type": "OVA",
      "language": {
        "sub": "1",
        "dub": "1"
      },
      "dataId": "18892"
    },
    {
      "id": "/keio-flying-squadron-18790",
      "image": "https://cdn.noitatnemucod.net/thumbnail/300x400/100/a7cd95e9c95afe4100d4faac02736531.jpg",
      "title": "Keio Flying Squadron",
      "type": "OVA",
      "language": {
        "sub": "1",
        "dub": null
      },
      "dataId": "18790"
    }
  ]
}
```

### Response fields

* **page**: number — current page index returned by the API.
* **totalPage**: number — total number of pages available.
* **hasNextPage**: boolean — indicates whether another page is available.
* **results**: array of items containing:
  * **id**: string — anime identifier or path.
  * **image**: string — poster/thumbnail URL.
  * **title**: string — anime title.
  * **type**: string — e.g., "TV", "Movie" (values depend on site data).
  * **language.sub / language.dub**: string — episode availability counts as reported by the site.
  * **dataId**: string — site-specific numeric identifier.

## Parameters

* **page**: number — page to fetch. Defaults to 1. Must be a positive integer.
  <Note>
    Use `page` together with `hasNextPage` and `totalPage` to implement
    pagination in your app.
  </Note>

## Notes & limitations

* Ordering and availability are determined by HiAnime and may change over time.
* Pagination limits (max pages) can vary; always check `hasNextPage`.
* This is an unofficial scraper-based method; site changes can break behavior without notice. Use responsibly and respect the website’s Terms of Service.
