this is a v4 version of zuritor's jikanjs
npm install @mateoaranda/jikanjs --save
- Anime
- Character
- Clubs
- Genres
- Magazines
- Manga
- People
- Producers
- Random
- Recommendations
- Reviews
- Anime Schedule
- Users
- Top
const jikanjs = require('@mateoaranda/jikanjs');
It is possible to change the API Base URL
jikanjs.settings.setBaseURL('apiurl'); // sets the API Base URL
- All API functions are promised Based
- Information of all possible parameters are located at the documentation
jikanjs.loadAnime(id [, request [, parameters]])
jikanjs.loadCharacter(id [, request])
jikanjs.loadClub(id [, request [, page]])
jikanjs.loadGenres(type [, page [, limit [, filter]]])
jikanjs.loadMagazines([page])
jikanjs.loadManga(id [, request [, page]])
jikanjs.loadPerson(id [, request])
jikanjs.loadProducers([page])
jikanjs.loadRandom(type)
jikanjs.loadRecommendations(type [, page])
jikanjs.loadReviews(type [, page])
jikanjs.loadSchedule(day [, page [, limit]])
jikanjs.loadUser(username [, request [, page]])
jikanjs.loadAnimelist(username [, limit [, offset]])
jikanjs.loadMangalist(username [, limit [, offset]])
jikanjs.loadSeason(year, season [, page])
jikanjs.loadSeasonArchive()
jikanjs.loadCurrentSeason([page])
jikanjs.loadUpcomingSeason([page])
jikanjs.loadTop(type [, page [, subtype [, filter]]])
jikanjs.search(type, query [, limit [, parameters]])
jikanjs.raw(urlParts [, queryParameters [, mal]])
id
: Anime ID
request
: full, characters, staff, episodes, news, forum, videos, videosepisodes, pictures, statistics, moreinfo, recommendations, userupdates, reviews, relations, themes, external
parameters
: query parameters, check the docs for more info
await jikanjs.loadAnime(31240); // Anime Information
await jikanjs.loadAnime(31240, 'episodes'); // All Episodes
await jikanjs.loadAnime(31240, 'episodes', 15); // Episode 15
await jikanjs.loadAnime(31240, 'forum', { filter: 'episode' });
id
: Character ID
request
: full, anime, manga, voices, pictures
await jikanjs.loadCharacter(118737); // Character information
await jikanjs.loadCharacter(118737, 'pictures'); // Character pictures
id
: Club ID
request
: members, staff, relations
page
: Page number, available on members
request, default: 1
await jikanjs.loadClub(73113); // Club information
await jikanjs.loadClub(73113, 'members', 10); // 10th Page of this club members
type
: either anime
or manga
filter
: genres, explicit_genres, themes, demographics
await jikanjs.loadGenres('anime'); // All anime genres
await jikanjs.loadGenres('manga', 'explicit_genres'); // Manga explicit genres
page
: Page Number, default: 1
await jikanjs.loadMagazines(); // Magazines collection
id
: Manga ID
request
: full, characters, news, forum, pictures, statistics, moreinfo, recommendations, userupdates, reviews, relations, external
page
: Page Number, available on news
userupdates
reviews
requests
await jikanjs.loadManga(74697); // Manga information
await jikanjs.loadManga(74697, 'reviews', 1); // First page of reviews
id
: Person ID
request
: full, anime, voices, manga, pictures
await jikanjs.loadPerson(34785); // Person information
await jikanjs.loadPerson(34785, 'voices'); // All Person's Voice Acting Roles
page
: Page Number, default: 1
await jikanjs.loadProducers(); // Producers collection
type
: anime, manga, characters, people, users
await jikanjs.loadRandom('anime'); // Some random anime
type
: either anime
or manga
page
: Page Number, default: 1
await jikanjs.loadRecommendations('anime'); // First page of recent anime recommendations
type
: either anime
or manga
page
: Page Number, default: 1
preliminary
: Receive reviews tagged as preliminary? Default: false
spoiler
: Receive reviews tagged as a spoiler? Default: false
await jikanjs.loadReviews('manga'); // First page of recent manga reviews
day
: monday, tuesday, wednesday, thursday, friday, saturday, sunday, other, unknown
page
: Page Number, default: 1
limit
: Result limit number
kids
: Filter entries with the Kids Genre, Default: false
sfw
: Filter entries with the Hentai Genre, Default: false
unapproved
: Include entries which are unapproved, Default: false
await jikanjs.loadSchedule('monday'); // Monday's anime schedule
username
: User's username
request
: full, statistics, favorites, userupdates, about, history, friends, reviews, recommendations, clubs, external
page
: Page number, available on friends
reviews
recommendations
clubs
requests
await jikanjs.loadUser('pepito'); // Profile information
await jikanjs.loadUser('pepito', 'friends', 6); // 6th page of pepito's friends
username
: User's Username
limit
: Amount of elements to receive, Default: 1000
offset
: Offset, Default: 0
await jikanjs.loadAnimelist('pepito'); // pepito's animelist
username
: User's Username
limit
: Amount of elements to receive, Default: 1000
offset
: Offset, Default: 0
await jikanjs.loadMangalist('pepito'); /// pepito's mangalist
year
: Season Year (1970-Now)
season
: winter, spring, summer, fall
page
: Page Number, default: 1
await jikanjs.loadSeason(2021, 'fall'); // First page of Fall 2021 animes
await jikanjs.loadSeasonArchive(); // Seasons collection
page
: Page Number, default: 1
await jikanjs.loadCurrentSeason(); // First page of the current season's animes
page
: Page Number, default: 1
await jikanjs.loadUpcomingSeason(3); // Third page of next season's animes
type
: anime, manga, people, characters, reviews
page
: Page Number, default: 1 (25 items per page)
subtype
:
⠀⠀anime
: tv, movie, ova, special, ona, music, cm, pv, tv_special
⠀⠀manga
: manga, novel, lightnovel, oneshot, doujin, manhwa, manhua
filter
:
⠀⠀anime
: airing, upcoming, bypopularity, favorite
⠀⠀manga
: publishing, upcoming, bypopularity, favorite
await jikanjs.loadTop('anime'); // Top 25 animes
await jikanjs.loadTop('anime', 1, 'movie'); // First page of top anime movies
type
: anime, manga, people, characters, clubs
query
: search term
limit
: results limit number
parameters
: extra query parameters, see docs for more info on this
await jikanjs.search('characters', 'Emilia', 1); // Search for a character named "Emilia"
urlParts
: Array with api endpoint path, e.g. [anime, 1] to load the anime with the id of 1
queryParameters
: query parameters, needs to be a key value pair like { page: 1 }
mal
: Request to MAL API? Default: false
await jikanjs.raw(['anime', 1]); // Same as loadAnime(1);