Overview

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

Usage

index.ts
import { Hianime } from "hianime";

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

  const result = await hianime.getMostPopular();

  console.log(JSON.stringify(result, null, 2));
}

main();

Response

response
{
  "page": 1,
  "totalPage": 50,
  "hasNextPage": true,
  "results": [
    {
      "id": "/solo-leveling-season-2-arise-from-the-shadow-19413",
      "image": "https://cdn.noitatnemucod.net/thumbnail/300x400/100/65f92e6e315a931ef872da4b312442b8.jpg",
      "title": "Solo Leveling Season 2: Arise from the Shadow",
      "type": "TV",
      "language": {
        "sub": "13",
        "dub": "13"
      },
      "dataId": "19413"
    },
    {
      "id": "/jujutsu-kaisen-2nd-season-18413",
      "image": "https://cdn.noitatnemucod.net/thumbnail/300x400/100/b51f863b05f30576cf9d85fa9b911bb5.png",
      "title": "Jujutsu Kaisen 2nd Season",
      "type": "TV",
      "language": {
        "sub": "23",
        "dub": "23"
      },
      "dataId": "18413"
    }
  ]
}

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.
    Use page together with hasNextPage and totalPage to implement pagination in your app.

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.