npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

nhentai-modules

v1.0.10

Published

nHentai unofficial API

Downloads

13

Readme

Nhentai API

nHentai unofficial API

Install

npm install nhentai-modules

Example

const nh = require("nhentai-modules");

// Get homepage
(async () => {
  const a = await nh.Homepage();
  console.log(a);
})();

Results

  • List Object
{
  "status": 200,
  "data": {
    "popular": [
      {
        "id": "444687",
        "title": {
          "english": "",
          "pretty": "",
          "japanese": "[Satsuki Imonet] Sono Ko wa Takurandeiru | That Girl is Cooking Something (Comic G-Es 02) [English] [WataTL + head empty] [Digital]"
        },
        "lang": "text",
        "cover": "https://a.kontol.online/api/image/https%3A%2F%2Ft7.nhentai.net%2Fgalleries%2F2485007%2Fthumb.jpg"
      }
      More...
    ],
    "all": [
      {
        "title": {
          "english": "[Mimonel] P5 Joker no Stylish Night Matome (Persona 5)",
          "japanese": "[ミモネル] P5 ジョーカーのスタイリッシュナイトまとめ (ペルソナ5)",
          "pretty": "P5 Joker no Stylish Night Matome"
        },
        "lang": "japanese",
        "cover": {
          "t": "https://c.kontol.online/api/imageV2/t/2485349/thumb.jpg",
          "w": 350,
          "h": 212
        },
        "id": 444752,
        "num_pages": 5
      },
      More.....
    ]
  }
}

API List

nh.Gallery(ID)

  • ID must be a number

Get book API from book ID

return a Book Object

  • Example
....
(async () => {
  try {
    const g = await nh.Gallery(444752);
    if(g.status === 200) {
      console.log(g);
      
      const {title} = g.data;
      console.log(title.english);
    }
  } catch(e) {
    console.log(e)
  }
})();

nh.Related(ID)

  • ID must be number

Get realated book API from book ID

return a List Object

  • Example
....
const related = await nh.Related(444752);
....

nh.Homepage(page)

  • page is optional and must be a number

Get book list from NHentai Homepage

return a List Object

  • Example
....
let home = await nh.Homepage(); //default
console.log(home);

home = await nh.Homepage(2); // next page
console.log(home)
....

nh.Popular(total)

  • total must be a number, default is 10

Get Popular Book list

return a List Object

  • Example
....
let popular = await nh.Popular(); // default
console.log(popular);

popular = await nh.Popular(25); // custom total popular book list
console.log(popular);
....

nh.Search(keyword, tags, page, popular)

  • keyword must be a string You can search for multiple terms at the same time, and this will return only galleries that contain both terms. For example, anal tanlines finds all galleries that contain both anal and tanlines.

You can exclude terms by prefixing them with -, For example anal tanlines -yaoi.

You can search for galleries with a specific number of pages with pages:20 or with a page range: pages:>20 pages:<=30.

You can search for galleries uploaded within some timeframe with uploaded:20d. Valid units are h, d, w, m, y. You can use ranges as well: uploaded:>20d uploaded:<30d.

  • page must be a number, default 1
  • tags must be a object, object keys is: tags, Artist, Parody, Category, Group. You can exclude tags by prefixing them with -, For example -milf
  • popular must be a string, default is popular list available string parameter is: popular-today, recent, and popular-week

Get search list from keyword provided

return a List Object

  • Example
....
let search = await nh.Search('Kaa-san'); // Keyword Only

// With tags
search = await nh.Search('Kaa-san', {
  "tags":"milf",
  "Category":"doujinshi"
});

// With Multiple tags
search = await nh.Search('Kaa-san', {
  "tags":["milf", "mother"],
  "Category":"doujinshi"
});

// With page and popular
search = await nh.Search('Kaa-san', {
  "tags":"milf",
  "Category":"doujinshi"
}, 2, 'popular-week');

// add prefix `-` to Exclude tags
search = await nh.Search('Kaa-san', {
  "tags":["milf", "mother", "-netorare"],
  "Category":"doujinshi"
});
....

nh.SearchTags(keyword)

  • keyword must be a string

return a List Object

  • Example
....
const tags = await nh.SearchTags('mi');
console.log(tags);
....
  • Result
{
  "status": 200,
  "data": [
    {
      "_id": 55852,
      "title": "akigami satoru",
      "url": "/tag/akigami-satoru/",
      "type": "tags"
    },
    {
      "_id": 133547,
      "title": "amamiya kokoro",
      "url": "/tag/amamiya-kokoro/",
      "type": "tags"
    },
    {
      "_id": 138146,
      "title": "aosaki hifumi",
      "url": "/tag/aosaki-hifumi/",
      "type": "tags"
    },
    more...
  ]
}