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

nekosia.js

v0.2.10

Published

A simple wrapper for the Nekosia API that provides easy access to random anime images. Enrich your projects with a touch of anime magic and feline charm, meow~! Discover why switching to Nekosia is the purrfect choice! ๐Ÿ’—

Readme

Nekosia.js is a Node.js module that provides easy access to the Nekosia API, a rich source of anime-themed images. The API offers a wide range of categories, allowing you to quickly and flexibly search for images based on your preferences and needs. You have full control over the images you retrieve, which sets our API apart from others.

But that's not all! The API also supports sessions (based on user ID or IP address), helping to prevent repeated images.

๐Ÿ” Key Features of the API

  • Wide range of categories: Nekosia API offers virtually every kind of anime graphic, not just neko images.
  • High image quality: All images are carefully selected and checked for both quality and appropriateness.
  • Sessions: The API supports sessions (based on ID or IP address), helping to avoid duplicate images.
  • Dominant colors: The API returns a palette of dominant colors for each image.
  • Image compression: JSON responses include a link to a compressed image with a significantly reduced file size compared to the original. This ensures faster load times on client devices without sacrificing quality.
  • Security: Nekosia API guarantees that all content is free from NSFW material, making it one of the most trusted sources for anime-themed images.

...and thatโ€™s not all!

๐Ÿ“˜ Best Anime Booru

Nekosia also offers its own Booru, allowing you to browse images returned by the API.
Users can edit image information, such as tags, which are crucial for us.

๐Ÿ“„ Documentation

Check out the official documentation to learn more.

๐Ÿ“ฆ Installation

To install the Nekosia.js module, use the following command:

npm install nekosia.js

๐Ÿ”ค Tag list

You can find the main image categories here. The full list of tags is available on the Booru site.

๐Ÿค” How to Use?

Simple Example

const { NekosiaAPI } = require('nekosia.js');

(async () => {
	const response1 = await NekosiaAPI.fetchCategoryImages('catgirl');
	console.log(response1);
	
	// `tags` is required and must be a non-empty array
	const response2 = await NekosiaAPI.fetchImages({ session: 'ip', count: 1, tags: ['cute', 'blue-hair'], blacklist: ['yellow-hair'] });
	console.log(response2);
	
	// https://nekosia.cat/documentation?page=api-endpoints#example-response
})();

IP-based Sessions

In this example, we used an IP-based session. What does this mean? Thanks to this solution, a user with a specific IP address will not encounter duplicate images when selecting them randomly. When using session: 'ip', do not pass id.

const { NekosiaAPI } = require('nekosia.js');

(async () => {
	const response = await NekosiaAPI.fetchCategoryImages('catgirl', {
		session: 'ip',
		count: 1,
		additionalTags: [],
		blacklistedTags: []
	});

	console.log(response);
})();

ID-based Sessions

You can also use id, but this requires providing a user identifier (e.g., from Discord). Pass this information in id as a string. id can be used only when session is set to 'id'.

const { NekosiaAPI } = require('nekosia.js');

(async () => {
	const response = await NekosiaAPI.fetchCategoryImages('catgirl', {
		session: 'id',
		id: '561621386765971781',
		count: 1,
		additionalTags: [],
		blacklistedTags: []
	});

	console.log(response);
})();

See more

https://github.com/Nekosia-API/nekosia.js/tree/main/examples

Tags

const { NekosiaAPI } = require('nekosia.js');

(async () => {
	console.log(await NekosiaAPI.fetchTags()); // Simply returns all available tags, etc.
})();

Versions

const { NekosiaVersion } = require('nekosia.js');

(async () => {
	console.log(NekosiaVersion.module); // Returns the installed module version
	console.log(await NekosiaVersion.api()); // Returns the current API version used by the module
})();

โญ ยป Thanks

If you find the API or this module useful, consider giving a star to the repository.
If you have any questions or issues, create a new Issue or join the Discord server.

๐Ÿ“‘ ยป MIT License

Copyright ยฉ 2024-2026 Nekosia