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!
- Unleash the Power of MyAnimeList: Fetch anime, manga, characters, and more with ease!
- No More Rate-Limit Headaches: Built-in queue system to keep things smooth.
- Cache It Like a Pro: Cache responses to save time and bandwidth.
- Fully Typed: Enjoy TypeScript's sweet autocompletion and safety.
- Customizable: Use the official Jikan API or your self-hosted version.
- ✅ Fetch data effortlessly from the Jikan API.
- ✅ Queue system to handle rate limits like a champ.
- ✅ Interfaced responses for clean and easy data handling.
- 🔄 Cache system to store responses for reuse (implemented but need testing).
- ✅ Support for self-hosted Jikan API setups.
💡 Coming Soon:
- Full Jikan API v4 support, NodeJS support (or alternative repo), automatic retries, and more!
Feature | Status | Will be in first stable release? | ||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Stable release | 🔄 In Progress | Obviously 🥲 | ||||||||||||||||||||||||||||||||||
Full documentation | 🔄 In Progress | ✅ | ||||||||||||||||||||||||||||||||||
Queue system to prevent rate limiting | ✅ Complete | ✅ | ||||||||||||||||||||||||||||||||||
Interfaced responses for easy access to data | ✅ Complete | ✅ | ||||||||||||||||||||||||||||||||||
Cache system to store responses for a certain amount of time | 🟡 Need testing | ✅ | ||||||||||||||||||||||||||||||||||
Support for self-hosted Jikan API | ✅ Complete | ✅ | ||||||||||||||||||||||||||||||||||
Support for authenticated requests | ❌ Not Started | ❌ | ||||||||||||||||||||||||||||||||||
Support for request retries (not part of stable) | ❌ Not Started | ❌ | ||||||||||||||||||||||||||||||||||
Full support for Jikan API v4
|
🔄 In Progress | ✅ |
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";
Have 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);
}
const client = new JikanClient({
host: "https://my-jikan-api.com",
baseUri: "/v4",
});
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.
Jikan API is an unofficial MyAnimeList API that scrapes MAL data. It provides information on anime, manga, characters, schedules, and more!
Why Jikan over MAL’s official API?
- More features (e.g., character & staff info).
- No weird rate limit mysteries.
- Community-driven goodness.
Deno is secure, fast, and modern — the perfect playground for this library! Plus, it’s a refreshing break from Node.js. 🦕
I’m just getting started! Stay tuned for more features and a polished first release. Want to contribute or share ideas? Open an issue or fork the repo — I’d love to learn from you! 😊
This project is licensed under the MIT License. Use it, share it, and don’t forget to give a ⭐ if you like it!
✨ Let’s build something awesome together! ✨