Coder Social home page Coder Social logo

irfankhan66 / hianime-mapper Goto Github PK

View Code? Open in Web Editor NEW
9.0 1.0 15.0 22 KB

An API built using Node.js and Hono.js which takes anilist Id and maps with hianime and also provides video URL

Home Page: https://hianime-mapper.vercel.app

TypeScript 100.00%
anime-api anime-api-free anime-scraper aniwatch aniwatch-to aniwatch-to-api hianime

hianime-mapper's Introduction

Hianime-mapper

This API is used to fetch episodes and streaming url from https://hianime.to by using anilist Ids. It is built on Node.js using the web framework Hono.js to serve the API.

Run Locally

Clone the project

  git clone https://github.com/IrfanKhan66/hianime-mapper.git

Go to the project directory

  cd hianime-mapper

Install dependencies

  npm i

Start the server

  npm run dev

Documentation

Get routes info & status of API

request url

https://hianime-mapper.vercel.app/

response

{
  "about": "This API maps anilist anime to https://hianime.to and also returns the M3U8 links !",
  "status": 200,
  "routes": [
    "/anime/info/:anilistId",
    "/anime/servers/:episodeId",
    "/anime/sources?serverId={server_id}&episodeId={episode_id}"
  ]
}

Get info of anime from anilist with hianime episode mappings

request url

https://hianime-mapper.vercel.app/anime/info/:anilistId

example : https://hianime-mapper.vercel.app/anime/info/20

response

{
  data: {
    id: number;
    idMal: number;
    title: {
      romaji: string;
      english: string;
      native: string;
      userPreferred: string;
    };
    coverImage: {
      extraLarge: string;
      large: string;
      medium: string;
      color: string;
    };
    format: string;
    description: string;
    genres: string[];
    season: string;
    episodes: number;
    nextAiringEpisode: {
      id: number;
      timeUntilAiring: number;
      airingAt: number;
      episode: number;
    };
    status: string;
    duration: number;
    seasonYear: number;
    bannerImage: string;
    favourites: number;
    popularity: number;
    averageScore: number;
    trailer: {
      id: number;
      site: string;
      thumbnail: string;
    };
    startDate: {
      year: number;
      month: number;
      day: number;
    };
    countryOfOrigin: string;
    recommendations: {
      title: {
        romaji: string;
        english: string;
        native: string;
        userPreferred: string;
      };
      format: string;
      coverImage: {
        extraLarge: string;
        large: string;
        medium: string;
        color: string;
      };
    }[];
    relations: {
      id: number;
      title: {
        romaji: string;
        english: string;
        native: string;
        userPreferred: string;
      };
      coverImage: {
        extraLarge: string;
        large: string;
        medium: string;
        color: string;
      };
    }[];
    characters: {
      role: string;
      name: {
        first: string;
        middle: string;
        last: string;
        full: string;
        native: string;
        userPreferred: string;
      };
      image: {
        large: string;
        medium: string;
      };
      voiceActors: {
        name: {
          first: string;
          middle: string;
          last: string;
          full: string;
          native: string;
          userPreferred: string;
        };
        image: {
          large: string;
          medium: string;
        };
      }[];
    }[];
    episodesList: {
      id: string;
      episodeId: number;
      title: string;
      number: number;
    }[];
  };
}

Get servers

request url

https://hianime-mapper.vercel.app/anime/servers/:episodeId

example : https://hianime-mapper.vercel.app/anime/servers/12352

response

{
    data: {
        sub: {
            serverId: string;
            serverName: string;
        }[],
        dub: {
            serverId: string;
            serverName: string;
        }[]
    }
}

Get sources

request url

https://hianime-mapper.vercel.app/anime/sources?serverId={server_id}&episodeId={episode_id}

example : https://hianime-mapper.vercel.app/anime/sources?serverId=662001&episodeId=12352

response

 {
     data:{
    intro: {
      start: number;
      end: number;
    };
    outro: {
      start: number;
      end: number;
    };
    sources: {
      url: string;
      type: string;
      isM3U8: boolean;
    }[];
    tracks: {
      file: string;
      kind: string;
      label?: string;
      default?: boolean;
    }[];
    server: number;
  }
 }

Acknowledgements

hianime-mapper's People

Contributors

irfankhan66 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

hianime-mapper's Issues

[Ask] How to get anime list id?

i new for this sry sir
How to get anime list id?
like in https://hianime.to/banished-from-the-heroes-party-17372
i find in develop tool
i see anilist_id = 103294
but you say it manga Id and not the Anime Id

<script id="syncData" type="application/json"> { "page":"anime", "name":"Banished From the Heroes' Party", "anime_id":"17372", "mal_id":"44037", "anilist_id":"103294", "series_url":"https://hianime.to/banished-from-the-heroes-party-17372", "selector_position":"#mal-sync" } </script>

you do have another way to find can you tell me how sir?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.