Giter Site home page Giter Site logo

hanime-api's Introduction

Logo

Hanime API

A hentai streaming API ๐Ÿ‘€
Explore the api ยป

stars stars Discord

For Local Development

Run the following command to clone the repository, and install the dependencies.

$ git clone https://github.com/Lishan778/hanime-api.git
$ cd hanime-api
$ npm install #or yarn install

start the server!

$ node src/app.js #or node .

Docker

Docker image is available at Docker Hub.

run the following command to pull and run the docker image.

$ docker pull shaandev/hanime
$ docker run -p 3000:3000 shaandev/hanime

This will start the server on port 3000. You can access the server at http://localhost:3000/, And can change the port by changing the -p option to -p <port>:3000.

You can add -d flag to run the server in detached mode.

Railway

Host your own API on Railway using the button below.

Deploy on Railway

Routes

Get Trending

Parameter Description
time day/week/month/3_month/6_month/year
page page limit may vary

Example request:

GET http://localhost:3000/trending/day/1

Output >>

{
  "results": [
    {
      "id": "123",
      "name": "Video 1",
      "slug": "video-1",
      "cover_url": "https://example.com/cover1.jpg",
      "views": 1000,
      "link": "/watch/video-1"
    },
    {
      "id": "456",
      "name": "Video 2",
      "slug": "video-2",
      "cover_url": "https://example.com/cover2.jpg",
      "views": 800,
      "link": "/watch/video-2"
    },
    {....}
  ],
  "next_page": "/trending/day/2"
}

Get browse Tags

Example request:

GET http://localhost:3000/tags

Output >>


{
  "results": [
    {
      "id": "123",
      "text": "Hd",
      "url": "/tags/hd/0"
    },
    {
      "id": "456",
      "text": "censord",
      "url": "/tags/censord/0"
    },
    {...}
  ]
}


Get tags

Parameter Description
category category of tags
page page limit may vary
GET http://localhost:3000/hentai-tags/har**/1

Output >>

{
  "results": [
    {
      "id": "123",
      "name": "Video 1",
      "slug": "video-1",
      "cover_url": "https://example.com/cover1.jpg",
      "views": 1000,
      "link": "/watch/video-1"
    },
    {
      "id": "456",
      "name": "Video 2",
      "slug": "video-2",
      "cover_url": "https://example.com/cover2.jpg",
      "views": 800,
      "link": "/watch/video-2"
    },
    {...}
  ],
  "next_page": "/hentai-tags/har**/2"
}

Get video

Parameter Description
id 6969
GET http://localhost:3000/watch/overflow
{
  "results": [
    {
      "id": "123",
      "name": "overflow",
      "description": "This is a sample video",
      "poster_url": "https://example.com/poster.jpg",
      "cover_url": "https://example.com/cover.jpg",
      "views": 1000,
      "streams": [
        {
          "width": 1920,
          "height": 1080,
          "size_mbs": 200,
          "url": "https://example.com/stream.m3u8"
        },
        {
          "width": 1280,
          "height": 720,
          "size_mbs": 120,
          "url": "https://example.com/stream.m3u8"
        }
      ],
      "tags": [
        {
          "name": "Tag 1",
          "link": "/hentai-tags/cream***/0"
        },
        {
          "name": "Tag 2",
          "link": "/hentai-tags/Mi**/0"
        }
      ],
      "episodes": [
        {
          "id": "456",
          "name": "Episode 1",
          "slug": "episode-1",
          "cover_url": "https://example.com/episode1.jpg",
          "views": 500,
          "link": "/watch/episode-1"
        },
        {
          "id": "789",
          "name": "Episode 2",
          "slug": "episode-2",
          "cover_url": "https://example.com/episode2.jpg",
          "views": 300,
          "link": "/watch/episode-2"
        }
      ]
    }
  ]
}

Support This Project

ko-fi

hanime-api's People

Contributors

railway-bot avatar

Watchers

G-Dark avatar

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.