Jikan.js banner

Jikan.js - Unofficial Jikan API Wrapper for Deno πŸš€

Development Status Test Status

Deno badge TypeScript badge

Jikan.js is a simple, efficient, and easy-to-use library for interacting with the Jikan API β€” a RESTful API that brings MyAnimeList data to your fingertips!

Built with ❀️ in TypeScript, Jikan.js is designed for Deno and comes with powerful features like rate-limiting, caching, and self-hosted API support. Whether you're building the next anime tracker or just want to fetch your favorite characters, Jikan.js has you covered!

⚠️ Heads up! This library is still a work in progress. The first release is coming soon, but you're welcome to follow along and share your feedback! πŸ™Œ


πŸš€ Getting Started

πŸ› οΈ Importing the Library

Note: This library isn’t on the Deno registry yet. Stay tuned for updates!

To try it out now:

import { JikanClient } from "https://raw.githubusercontent.com/RPDJF/Jikan.js/refs/heads/main/src/mod.ts";

🎯 Example Usage

Take a look at JikanClient facade methods

Here is an example of how you can use the library to fetch data from the Jikan API:

const client = new JikanClient();

client.getCharacter(1).then((character) => {
  console.log(character.name);
});

The library will fully support Jikan API v4, meaning you can make the same queries as you would on the official Jikan API:

client.getMangas({
	page: 5,
	limit: 5,
	order_by: "popularity",
	sort: "desc",
}).then((mangas) => {
	console.log(mangas);
});

Pro Tip: The client requests may throw errors, so it’s a good idea to wrap them in a try-catch block:

try {
  const character = await client.getCharacter(1);
  console.log(character.name);
} catch (error) {
  console.error(error);
}

🌐 Self-Hosted Jikan API

const client = new JikanClient({
  host: "https://my-jikan-api.com",
  baseUri: "/v4",
});

βš™οΈ DEBUG Mode

You can enable debug mode to see detailed logs: Linux/MacOS:

export DEBUG=true

Windows:

set DEBUG=true

Then simply run your program as usual.

✨ Let’s build something awesome together! ✨