MyAnimeList Module
This module is neither affiliated with nor endorsed by MyAnimeList.
All data returned by this module is provided by MyAnimeList.
Version 1.0.5
Installation
Install myanimelist-module with npm
npm install myanimelist-module
Enter fullscreen mode Exit fullscreen mode
Usage/Examples
const { MyAnimeList } = require('myanimelist-module')
const mal = new MyAnimeList({
client_id: `YOUR_MAL_CLIENT_ID` // Get it here: https://myanimelist.net/apiconfig
})
async function test() {
const response = await mal.getAnimeInfo({
name: "Anime name"
})
if(response.error) {
console.error(response.error)
} else {
console.log(response.datas)
}
}
test()
Enter fullscreen mode Exit fullscreen mode
All functions
new MyAnimeList()
Parameter Type Descriptionclient_id
string
Required. Your MAL Client ID
getAnimeInfo()
Parameter Type Descriptionname
string
Required.
fields
[array]
Optional. More information in the “Available fields” section.
limit
number
Optional. Number of items in the response. (Maximum of 100)
offset
number
Optional. Default : 0
nsfw
boolean
Optional. Default: false
getAnimeInfoByURL()
Parameter Type Descriptionapi_url
string
Required. You must use any valid MyAnimeList API link. It also works with older responses via response.datas.paging.next and response.datas.paging.previous.
getSpecificAnimeInfo()
Parameter Type Descriptionname
string
Required.
fields
[array]
Optional. More information in the “Available fields” section.
nsfw
boolean
Optional. Default: false
getAnimeInfoByID()
Parameter Type Descriptionid
string
Required.
fields
[array]
Optional. More information in the “Available fields” section.
nsfw
boolean
Optional. Default: false
getAnimeRanking()
Parameter Type Descriptiontype
string
Optional. More information in the “Available ranking types” section.
fields
[array]
Optional. More information in the “Available fields” section.
limit
number
Optional. Number of items in the response. (Maximum of 500)
offset
number
Optional. Default : 0
nsfw
boolean
Optional. Default: false
getSeasonalAnime()
Parameter Type Descriptionyear
string
Optional. Default: current year
season
string
Optional. Default: current season (winter/spring/summer/fall)
fields
[array]
Optional. More information in the “Available fields” section.
limit
number
Optional. Number of items in the response. (Maximum of 100)
offset
number
Optional. Default : 0
nsfw
boolean
Optional. Default: false
getMangaInfo()
Parameter Type Descriptionname
string
Required.
fields
[array]
Optional. More information in the “Available fields” section.
limit
number
Optional. Number of items in the response. (Maximum of 100)
offset
number
Optional. Default : 0
nsfw
boolean
Optional. Default: false
getMangaInfoByURL()
Parameter Type Descriptionapi_url
string
Required. You must use any valid MyAnimeList API link. It also works with older responses via response.datas.paging.next and response.datas.paging.previous.
getSpecificMangaInfo()
Parameter Type Descriptionname
string
Required.
fields
[array]
Optional. More information in the “Available fields” section.
nsfw
boolean
Optional. Default: false
getMangaInfoByID()
Parameter Type Descriptionid
string
Required.
fields
[array]
Optional. More information in the “Available fields” section.
nsfw
boolean
Optional. Default: false
getMangaRanking()
Parameter Type Descriptiontype
string
Optional. More information in the “Available ranking types” section.
fields
[array]
Optional. More information in the “Available fields” section.
limit
number
Optional. Number of items in the response. (Maximum of 500)
offset
number
Optional. Default : 0
nsfw
boolean
Optional. Default: false
Available fields
Global
alternative_titles: object or null
start_date: string or null
end_date: string or null
synopsis: string or null
mean: number or null
rank: integer or null
popularity: integer or null
num_list_users: integer
num_scoring_users: integer
nsfw: string or null
Genres: Array of objects
created_at : string
updated_at: string
Anime only
media_type: string
- unknown
- tv
- ova
- movie
- special
- ona
- music
status: string
- finished_airing
- currently_airing
- not_yet_aired
num_episodes: integer
start_season: object or null
broadcast: object of null
source: string or null
- other
- original
- manga
- 4_koma_manga
- web_manga
- digital_manga
- novel
- light_novel
- visual_novel
- game
- card_game
- book
- picture_book
- radio
- music
average_episode_duration: integer or null
rating: string or null
studios: Array of objects
Manga only
media_type: string
- unknown
- manga
- novel
- one_shot
- doujinshi
- manhwa
- manhua
- oel
status: string
- finished
- currently_publishing
- not_yet_published
num_volumes: integer
num_chapters: integer
authors: Array of objects
Available ranking types
Global
all
bypopularity
favorite
Anime only
airing
upcoming
tv
ova
movie
special
Manga only
manga
novels
oneshots
doujin
manhwa
manhua