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 🙏

© 2026 – Pkg Stats / Ryan Hefner

epanda

v2.1.1

Published

Grab everything from e-hentai.org(exhentai).

Readme

ehentai-js

Grab everything from e-hentai.org(exhentai).

Features

  • [x] gallery metadata
  • [x] hentaihome status
    • [x] Static ranges
    • [x] Quality, hathrate, hitrate...
  • [x] exchange status
    • [x] gallery point exchange
    • [x] hath exchange
  • [x] search support
    • [x] search keyword
    • [x] search image
    • [x] advance options
  • [x] user-related
    • [x] rate gallery
    • [x] favorite gallery

Installation

$ npm install ehentai-js

Configuration

Configuration file should be placed as os.homedir()/.ehentai.json(~/.ehentai.json)

[
  path.join(os.homedir(), ".ehentai.json"),
  path.join(process.cwd(), ".ehentai.json")
];

Format:

{
  "cookie": "ipb_member_id=*****; ipb_pass_hash=*************; igneous=**; sk=**",
  "apiuid": 123456,
  "apikey": "*************"
}

Cookie is required for visiting exhentai site or getting user-related information;

Apiuid and apikey are required for user-related operations such as rating.

Using environment variables is also supported.

EH_COOKIE=
EH_APIUID=
EH_APIKEY=

gallery

const h = require("ehentai-js");

// two ways to provide target url
h.gallery
  .get({ url: "https://e-hentai.org/g/1456937/9345049afa/" })
  .then(console.log);
// or
h.gallery
  .get({ gid: 1456937, token: "9345049afa", exhentai: true })
  .then(console.log);
{
  title: '[Shinozuka Yuuji] Hajimete no Hitozuma | 初品嘗的美艷人妻 [Chinese]',
  title_original: '[篠塚裕志] 初めてのヒトヅマ [中国翻訳]',
  category: 'Manga',
  tags: {
    language: [ 'chinese', 'translated' ],
    artist: [ 'shinozuka yuuji' ],
    male: [
      'dilf',
      'cheating',
      'schoolboy uniform',
      'condom',
      'muscle',
      'big penis',
      'glasses'
    ],
    female: [
      'big breasts',  'stockings',
      'netorare',     'teacher',
      'hairy',        'gyaru',
      'blackmail',    'dark skin',
      'paizuri',      'x-ray',
      'ponytail',     'mother',
      'milf',         'cheating',
      'nakadashi',    'pantyhose',
      'collar',       'impregnation',
      'huge breasts', 'lactation'
    ],
    misc: [ 'tankoubon', 'incest', 'inseki' ]
  },
  language: 'Chinese',
  translated: true,
  favorite_category: undefined,
  source: {
    site: 'exhentai',
    gid: 1456937,
    token: '9345049afa',
    parent_gallery: undefined,
    newer_versions: [],
    url: 'https://exhentai.org/g/1456937/9345049afa/'
  },
  favcount: 7623,
  rating: { average: 4.9, count: 468 },
  thumbnail: 'https://exhentai.org/t/33/81/3381628f4615c218cdd262bf45e6bea6e4f44f7d-6050794-4341-3000-jpg_250.jpg',
  uploader: 'dfsgg',
  filecount: 236,
  filesize: 717121126,
  posted: 2019-08-04T09:07:00.000Z,
  visible: 'Yes',
  comments: [
    {
      text: '速度好快 今晚社保!!!5555',
      date: 2019-08-04T09:25:00.000Z,
      score: 7
    },
    {
      text: '昨天才生肉,今天就出貨了,篠塚裕志的就是報社',
      date: 2019-08-04T09:46:00.000Z,
      score: 60
    },
    {
      text: '我還是等未來數位的出了再買吧',
      date: 2019-08-04T10:14:00.000Z,
      score: 144
    },
    { text: '🐍🐍🐍🐍🐍', date: 2019-08-04T10:14:00.000Z, score: 6 },
    // ...
  ],
  url: 'https://exhentai.org/g/1456937/9345049afa/',
  generated: 2020-01-10T02:19:47.430Z
}

search

Support 5 different display modes (this will effect the tags field in search results).

Support keyword search & image search.

const h = require("ehentai-js");
h.search.byKeyword('artist:"shinozuka yuuji$"').then(console.log);

h.search
  .byKeyword('artist:"shinozuka yuuji$"', {
    page: 1,
    expunged: true,
    exhentai: true,
    minPages: 100,
    minimumRating: 4,
    disableFilterForLanguage: true
  })
  .then(console.log);
[
  {
    url: 'https://exhentai.org/g/1458970/d7c3ad55be/',
    name: '[Shinozuka Yuuji] Hajimete no Hitozuma [Digital]',
    tags: [],
    page: 240
  },
  {
    url: 'https://exhentai.org/g/1458308/c4ceea2408/',
    name: '[Shinozuka Yuuji] Hajimete no Hitozuma',
    tags: [],
    page: 237
  },
  {
    url: 'https://exhentai.org/g/1456937/9345049afa/',
    name: '[Shinozuka Yuuji] Hajimete no Hitozuma | 初品嘗的美艷人妻 [Chinese]',
    tags: [ 'language:chinese' ],
    page: 236
  }
  //...
]
const h = require("ehentai-js");
const filepath = "Gaol_001.jpg";
h.search.byImage(filepath).then(console.log);
[
  {
    url: "https://exhentai.org/g/1456937/9345049afa/",
    name: "[Shinozuka Yuuji] Hajimete no Hitozuma | 初品嘗的美艷人妻 [Chinese]",
    tags: ["language:chinese"],
    page: 236
  }
];

exchange

const h = require("ehentai-js");

h.exchange.gpExchange().then(console.log);
h.exchange.hathExchange().then(console.log);

hentaihome

const h = require("ehentai-js");
h.hentaihome.clients().then(console.log);
[
  {
    cid: '*****',
    status: 'Online',
    created: 2019-12-19T00:00:00.000Z,
    lastSeen: 'Today, 02:22',
    served: 273739,
    ip: '***.***.***.***',
    port: '****',
    trust: 1000,
    quality: 9092,
    hitrate: 14.8,
    hathrate: 8.3,
    country: 'United States'
  }
]
const h = require("ehentai-js");
h.hentaihome.staticRanges("******").then(console.log);

user

Rate

const h = require("ehentai-js");
h.user
  .rate({ gid: 1477701, token: "1661b183ad", rating: 10 })
  .then(console.log);

Favorite

const h = require("ehentai-js");
h.user
  .addFavorite({
    gid: 1477701,
    token: "1661b183ad",
    favcat: 9,
    favnote: "test favorite"
  })
  .then(console.log);

h.user.deleteFavorite({ gid: 1477701, token: "1661b183ad" }).then(console.log);

agent

Getting library's request agent interface crawlx - npm

const h = require("ehentai-js");

console.log(h.x.agentOptions.headers);
h.x({ url: "https://exhentai.org/", parse: "title" }).then(
  ({ res, parsed }) => {
    console.log(res.status);
    console.log(parsed);
  }
);