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

e621

v2.2.6

Published

A module for interfacing with e621.

Readme

E621

The most comprehensive wrapper for e621 you'll ever find.

We support almost anything normal users can do, with plans to bring everything else in, and more later in development.

See the Features List for all of the things this module supports, and what is planned.

This module is not officially supported or endorsed by any of the e621 staff. Do not go to them if something does not work.

This module is structured with submodules corresponding to separate areas of the site. All of these modules are on the primary class, which can be constructed like so:

import E621 from "e621"; // or const E621 = require("e621");

// no options are required, see below for the options
const e621 = new E621();

// the options are all an object in the first parameter, e.g.
const e621 = new E621({
	authUser: "",
	authKey:  ""
});

// all of the available modules stem from this main class,
// e.g. use e621.posts.METHOD(), e621.users.METHOD()

Options

Most of these options shouldn't be used unless you know what you're doing (you probably only need authUser and authKey, and you can set userAgent) | Option | Type | Default | Description | |:---:|:---:|:---:|:---:| | authUser | String | None | User for authentication | | authKey | String | None | Token for authentication | | userAgent | String | See Code | UserAgent for requests |

Instance Options

These are set via the setInstance function. | Option | Type | Default | Description | |:---:|:---:|:---:|:---:| | reconstructStaticURL | See Code | See Code | Override default url reconstruction | | imageReconstructionType | "e621" | "yiffy" | "local" | null | See Code | See Code | | ssl | Boolean | [^1] | See Code | | port | Number | [^1] | See Code | | host | String | [^1] | See Code |

[^1]: This is very dependent on where this function is used. If used on a subclass, like Yiffy or Dev the defaults will be set to something else, but otherwise they are: true, 443, e621.net

Using YiffyAPI or E621 Dev?

We've got built in classes for both. E621 dev assumes you're using e621ng@ce871e4 or later, as they changed where the dev site is accessed in this commit. you can use the built in sub-classes E621.YiffyAPI E621.Dev to access these, and for anything else: there's E621.Custom

import E621 from "e621"; // or import { YiffyAPI, Dev, Custom } from "e621";

// first and only parameter is Options
const yapi = new E621.Yiffy();
const dev = new E621.Dev();
// first parameter is Options, second is InstanceOptions
const custom = new E621.Custom({}, {
	host: "example.com",
	port: 443,
	ssl: true
});