Skip to content
AniLink

AniList query operations

The public AniList GraphQL query operations, grouped by response domain.

Users

anilist.query.user

UserQuery fetches a single user by id or userName. Returns a UserResponse.

Signature

TypeScript
user(variables: UserVariables, options?: RequestOptions): Promise<UserResponse>

Auth: Not required — public data. Pass a token for viewer-scoped fields.

NameTypeRequiredDescription
idnumbernoa number representing the id of the user.
namestringnoa string representing the name of the user.
isModeratorbooleannoa boolean indicating whether the user is a moderator.
searchstringnoa string representing the search term.
sortUserSort[]noan array of strings representing the sort order of the user.
asHtmlbooleannoa boolean indicating whether to return the result as HTML.
animeStatLimitnumbernoa number representing the limit for anime statistics.
mangaStatLimitnumbernoa number representing the limit for manga statistics.
animeStatSortUserStatisticSort[]noan array of strings representing the sort order of the anime statistics.
mangaStatSortUserStatisticSort[]noan array of strings representing the sort order of the manga statistics.
FieldTypeDescription
idnumberThe id of the user
namestringThe name of the user
aboutstringThe bio written by user (Markdown)
largestringThe avatar of user at its largest size
mediumstringThe avatar of user at medium size
bannerImagestringThe user's banner images
isFollowingbooleanIf the authenticated user if following this user
isFollowerbooleanIf this user if following the authenticated user
isBlockedbooleanIf the user is blocked by the authenticated user
bansstring[]List of active bans. Mod-only
titleLanguageUserTitleLanguageThe language the user wants to see media titles in
displayAdultContentbooleanWhether the user has enabled viewing of 18+ content
airingNotificationsbooleanWhether the user receives notifications when a show they are watching aires
profileColorstringProfile highlight color (blue, purple, pink, orange, red, green, gray)
typeNotificationTypeThe type of notification
enabledbooleanWhether this type of notification is enabled
timezonestringThe user's timezone offset (Auth user only)
activityMergeTimenumberMinutes between activity for them to be merged together. 0 is Never, Above 2 weeks (20160 mins) is Always.
staffNameLanguageUserStaffNameLanguageThe language the user wants to see staff and character names in
restrictMessagesToFollowingbooleanWhether the user only allow messages from users they follow
disabledbooleana boolean value representing the disabled.
typeNotificationTypea NotificationType value representing the type.
scoreFormatScoreFormatThe score format the user is using for media lists
rowOrderstringThe default order list rows should be displayed in
sectionOrderstring[]The order each list should be displayed in
splitCompletedSectionByFormatbooleanIf the completed sections of the list should be separated by format
customListsstring[]The names of the user's custom lists
advancedScoringstring[]The names of the user's advanced scoring sections
advancedScoringEnabledbooleanIf advanced scoring is enabled
sectionOrderstring[]The order each list should be displayed in
splitCompletedSectionByFormatbooleanIf the completed sections of the list should be separated by format
customListsstring[]The names of the user's custom lists
advancedScoringstring[]The names of the user's advanced scoring sections
advancedScoringEnabledbooleanIf advanced scoring is enabled
idnumberThe id of the media
romajistringThe romanization of the native language title
englishstringThe official english title
nativestringOfficial title in it's native language
userPreferredstringThe currently authenticated users preferred title language. Default romaji for non-authenticated
idnumberThe id of the media
romajistringThe romanization of the native language title
englishstringThe official english title
nativestringOfficial title in it's native language
userPreferredstringThe currently authenticated users preferred title language. Default romaji for non-authenticated
idnumberThe id of the media
romajistringThe romanization of the native language title
englishstringThe official english title
nativestringOfficial title in it's native language
userPreferredstringThe currently authenticated users preferred title language. Default romaji for non-authenticated
idnumberThe id of the media
romajistringThe romanization of the native language title
englishstringThe official english title
nativestringOfficial title in it's native language
userPreferredstringThe currently authenticated users preferred title language. Default romaji for non-authenticated
charactersunknown[]Favourite characters
staffunknown[]Favourite staff
studiosunknown[]Favourite studios
statisticsStatisticsThe users anime & manga list statistics
statsUserStatsThe user's statistics
unreadNotificationCountnumberThe number of unread notifications the user has
siteUrlstringThe url for the user page on the AniList website
donatorTiernumberThe donation tier of the user
donatorBadgestringCustom donation badge text
moderatorRolesstring[]The user's moderator roles if they are a site moderator
createdAtnumberWhen the user's account was created. (Does not exist for accounts created before 2020)
updatedAtnumberWhen the user's data was last updated
namestringA previous name of the user.
createdAtnumberWhen the user first changed from this name.
updatedAtnumberWhen the user most recently changed from this name.
  • AniLinkApiError — non-success AniList HTTP response
  • AniLinkGraphQLError — HTTP 200 response carrying GraphQL errors
  • AniLinkNetworkError — timeout, cancellation, or transport failure

Example

TypeScript
await aniLink.anilist.query.user({id: 542244, asHtml: true});

anilist.query.viewer

ViewerQuery fetches the currently authenticated user. Returns a UserResponse.

Signature

TypeScript
viewer(variables: UserVariables, options?: RequestOptions): Promise<UserResponse>

Auth: Not required — public data. Pass a token for viewer-scoped fields.

NameTypeRequiredDescription
idnumbernoa number representing the id of the user.
namestringnoa string representing the name of the user.
isModeratorbooleannoa boolean indicating whether the user is a moderator.
searchstringnoa string representing the search term.
sortUserSort[]noan array of strings representing the sort order of the user.
asHtmlbooleannoa boolean indicating whether to return the result as HTML.
animeStatLimitnumbernoa number representing the limit for anime statistics.
mangaStatLimitnumbernoa number representing the limit for manga statistics.
animeStatSortUserStatisticSort[]noan array of strings representing the sort order of the anime statistics.
mangaStatSortUserStatisticSort[]noan array of strings representing the sort order of the manga statistics.
FieldTypeDescription
idnumberThe id of the user
namestringThe name of the user
aboutstringThe bio written by user (Markdown)
largestringThe avatar of user at its largest size
mediumstringThe avatar of user at medium size
bannerImagestringThe user's banner images
isFollowingbooleanIf the authenticated user if following this user
isFollowerbooleanIf this user if following the authenticated user
isBlockedbooleanIf the user is blocked by the authenticated user
bansstring[]List of active bans. Mod-only
titleLanguageUserTitleLanguageThe language the user wants to see media titles in
displayAdultContentbooleanWhether the user has enabled viewing of 18+ content
airingNotificationsbooleanWhether the user receives notifications when a show they are watching aires
profileColorstringProfile highlight color (blue, purple, pink, orange, red, green, gray)
typeNotificationTypeThe type of notification
enabledbooleanWhether this type of notification is enabled
timezonestringThe user's timezone offset (Auth user only)
activityMergeTimenumberMinutes between activity for them to be merged together. 0 is Never, Above 2 weeks (20160 mins) is Always.
staffNameLanguageUserStaffNameLanguageThe language the user wants to see staff and character names in
restrictMessagesToFollowingbooleanWhether the user only allow messages from users they follow
disabledbooleana boolean value representing the disabled.
typeNotificationTypea NotificationType value representing the type.
scoreFormatScoreFormatThe score format the user is using for media lists
rowOrderstringThe default order list rows should be displayed in
sectionOrderstring[]The order each list should be displayed in
splitCompletedSectionByFormatbooleanIf the completed sections of the list should be separated by format
customListsstring[]The names of the user's custom lists
advancedScoringstring[]The names of the user's advanced scoring sections
advancedScoringEnabledbooleanIf advanced scoring is enabled
sectionOrderstring[]The order each list should be displayed in
splitCompletedSectionByFormatbooleanIf the completed sections of the list should be separated by format
customListsstring[]The names of the user's custom lists
advancedScoringstring[]The names of the user's advanced scoring sections
advancedScoringEnabledbooleanIf advanced scoring is enabled
idnumberThe id of the media
romajistringThe romanization of the native language title
englishstringThe official english title
nativestringOfficial title in it's native language
userPreferredstringThe currently authenticated users preferred title language. Default romaji for non-authenticated
idnumberThe id of the media
romajistringThe romanization of the native language title
englishstringThe official english title
nativestringOfficial title in it's native language
userPreferredstringThe currently authenticated users preferred title language. Default romaji for non-authenticated
idnumberThe id of the media
romajistringThe romanization of the native language title
englishstringThe official english title
nativestringOfficial title in it's native language
userPreferredstringThe currently authenticated users preferred title language. Default romaji for non-authenticated
idnumberThe id of the media
romajistringThe romanization of the native language title
englishstringThe official english title
nativestringOfficial title in it's native language
userPreferredstringThe currently authenticated users preferred title language. Default romaji for non-authenticated
charactersunknown[]Favourite characters
staffunknown[]Favourite staff
studiosunknown[]Favourite studios
statisticsStatisticsThe users anime & manga list statistics
statsUserStatsThe user's statistics
unreadNotificationCountnumberThe number of unread notifications the user has
siteUrlstringThe url for the user page on the AniList website
donatorTiernumberThe donation tier of the user
donatorBadgestringCustom donation badge text
moderatorRolesstring[]The user's moderator roles if they are a site moderator
createdAtnumberWhen the user's account was created. (Does not exist for accounts created before 2020)
updatedAtnumberWhen the user's data was last updated
namestringA previous name of the user.
createdAtnumberWhen the user first changed from this name.
updatedAtnumberWhen the user most recently changed from this name.
  • AniLinkApiError — non-success AniList HTTP response
  • AniLinkGraphQLError — HTTP 200 response carrying GraphQL errors
  • AniLinkNetworkError — timeout, cancellation, or transport failure

Example

TypeScript
await aniLink.anilist.query.viewer({asHtml: true});

anilist.query.following

FollowingQuery fetches a single user that the given userId follows. Returns a UserResponse.

Signature

TypeScript
following(variables: FollowingVariables, options?: RequestOptions): Promise<UserResponse>

Auth: Not required — public data. Pass a token for viewer-scoped fields.

NameTypeRequiredDescription
userIdnumberyesa number representing the id of the user.
sortUserSortnoa string representing the sort order.
asHtmlbooleannoa boolean representing whether the response text is returned as HTML.
animeStatLimitnumbernoa number representing the limit for anime statistics.
mangaStatLimitnumbernoa number representing the limit for manga statistics.
animeStatSortUserStatisticSort[]noan array of strings representing the sort order for anime statistics.
mangaStatSortUserStatisticSort[]noan array of strings representing the sort order for manga statistics.
FieldTypeDescription
idnumberThe id of the user
namestringThe name of the user
aboutstringThe bio written by user (Markdown)
largestringThe avatar of user at its largest size
mediumstringThe avatar of user at medium size
bannerImagestringThe user's banner images
isFollowingbooleanIf the authenticated user if following this user
isFollowerbooleanIf this user if following the authenticated user
isBlockedbooleanIf the user is blocked by the authenticated user
bansstring[]List of active bans. Mod-only
titleLanguageUserTitleLanguageThe language the user wants to see media titles in
displayAdultContentbooleanWhether the user has enabled viewing of 18+ content
airingNotificationsbooleanWhether the user receives notifications when a show they are watching aires
profileColorstringProfile highlight color (blue, purple, pink, orange, red, green, gray)
typeNotificationTypeThe type of notification
enabledbooleanWhether this type of notification is enabled
timezonestringThe user's timezone offset (Auth user only)
activityMergeTimenumberMinutes between activity for them to be merged together. 0 is Never, Above 2 weeks (20160 mins) is Always.
staffNameLanguageUserStaffNameLanguageThe language the user wants to see staff and character names in
restrictMessagesToFollowingbooleanWhether the user only allow messages from users they follow
disabledbooleana boolean value representing the disabled.
typeNotificationTypea NotificationType value representing the type.
scoreFormatScoreFormatThe score format the user is using for media lists
rowOrderstringThe default order list rows should be displayed in
sectionOrderstring[]The order each list should be displayed in
splitCompletedSectionByFormatbooleanIf the completed sections of the list should be separated by format
customListsstring[]The names of the user's custom lists
advancedScoringstring[]The names of the user's advanced scoring sections
advancedScoringEnabledbooleanIf advanced scoring is enabled
sectionOrderstring[]The order each list should be displayed in
splitCompletedSectionByFormatbooleanIf the completed sections of the list should be separated by format
customListsstring[]The names of the user's custom lists
advancedScoringstring[]The names of the user's advanced scoring sections
advancedScoringEnabledbooleanIf advanced scoring is enabled
idnumberThe id of the media
romajistringThe romanization of the native language title
englishstringThe official english title
nativestringOfficial title in it's native language
userPreferredstringThe currently authenticated users preferred title language. Default romaji for non-authenticated
idnumberThe id of the media
romajistringThe romanization of the native language title
englishstringThe official english title
nativestringOfficial title in it's native language
userPreferredstringThe currently authenticated users preferred title language. Default romaji for non-authenticated
idnumberThe id of the media
romajistringThe romanization of the native language title
englishstringThe official english title
nativestringOfficial title in it's native language
userPreferredstringThe currently authenticated users preferred title language. Default romaji for non-authenticated
idnumberThe id of the media
romajistringThe romanization of the native language title
englishstringThe official english title
nativestringOfficial title in it's native language
userPreferredstringThe currently authenticated users preferred title language. Default romaji for non-authenticated
charactersunknown[]Favourite characters
staffunknown[]Favourite staff
studiosunknown[]Favourite studios
statisticsStatisticsThe users anime & manga list statistics
statsUserStatsThe user's statistics
unreadNotificationCountnumberThe number of unread notifications the user has
siteUrlstringThe url for the user page on the AniList website
donatorTiernumberThe donation tier of the user
donatorBadgestringCustom donation badge text
moderatorRolesstring[]The user's moderator roles if they are a site moderator
createdAtnumberWhen the user's account was created. (Does not exist for accounts created before 2020)
updatedAtnumberWhen the user's data was last updated
namestringA previous name of the user.
createdAtnumberWhen the user first changed from this name.
updatedAtnumberWhen the user most recently changed from this name.
  • AniLinkApiError — non-success AniList HTTP response
  • AniLinkGraphQLError — HTTP 200 response carrying GraphQL errors
  • AniLinkNetworkError — timeout, cancellation, or transport failure

Example

TypeScript
await aniLink.anilist.query.following({userId: 542244});

anilist.query.follower

FollowerQuery fetches a single follower of the given userId. Returns a UserResponse.

Signature

TypeScript
follower(variables: FollowerVariables, options?: RequestOptions): Promise<UserResponse>

Auth: Not required — public data. Pass a token for viewer-scoped fields.

NameTypeRequiredDescription
userIdnumberyesa number representing the id of the user.
sortUserSortnoa string representing the sort order.
asHtmlbooleannoa boolean representing whether the response text is returned as HTML.
animeStatLimitnumbernoa number representing the limit for anime statistics.
mangaStatLimitnumbernoa number representing the limit for manga statistics.
animeStatSortUserStatisticSort[]noan array of strings representing the sort order for anime statistics.
mangaStatSortUserStatisticSort[]noan array of strings representing the sort order for manga statistics.
FieldTypeDescription
idnumberThe id of the user
namestringThe name of the user
aboutstringThe bio written by user (Markdown)
largestringThe avatar of user at its largest size
mediumstringThe avatar of user at medium size
bannerImagestringThe user's banner images
isFollowingbooleanIf the authenticated user if following this user
isFollowerbooleanIf this user if following the authenticated user
isBlockedbooleanIf the user is blocked by the authenticated user
bansstring[]List of active bans. Mod-only
titleLanguageUserTitleLanguageThe language the user wants to see media titles in
displayAdultContentbooleanWhether the user has enabled viewing of 18+ content
airingNotificationsbooleanWhether the user receives notifications when a show they are watching aires
profileColorstringProfile highlight color (blue, purple, pink, orange, red, green, gray)
typeNotificationTypeThe type of notification
enabledbooleanWhether this type of notification is enabled
timezonestringThe user's timezone offset (Auth user only)
activityMergeTimenumberMinutes between activity for them to be merged together. 0 is Never, Above 2 weeks (20160 mins) is Always.
staffNameLanguageUserStaffNameLanguageThe language the user wants to see staff and character names in
restrictMessagesToFollowingbooleanWhether the user only allow messages from users they follow
disabledbooleana boolean value representing the disabled.
typeNotificationTypea NotificationType value representing the type.
scoreFormatScoreFormatThe score format the user is using for media lists
rowOrderstringThe default order list rows should be displayed in
sectionOrderstring[]The order each list should be displayed in
splitCompletedSectionByFormatbooleanIf the completed sections of the list should be separated by format
customListsstring[]The names of the user's custom lists
advancedScoringstring[]The names of the user's advanced scoring sections
advancedScoringEnabledbooleanIf advanced scoring is enabled
sectionOrderstring[]The order each list should be displayed in
splitCompletedSectionByFormatbooleanIf the completed sections of the list should be separated by format
customListsstring[]The names of the user's custom lists
advancedScoringstring[]The names of the user's advanced scoring sections
advancedScoringEnabledbooleanIf advanced scoring is enabled
idnumberThe id of the media
romajistringThe romanization of the native language title
englishstringThe official english title
nativestringOfficial title in it's native language
userPreferredstringThe currently authenticated users preferred title language. Default romaji for non-authenticated
idnumberThe id of the media
romajistringThe romanization of the native language title
englishstringThe official english title
nativestringOfficial title in it's native language
userPreferredstringThe currently authenticated users preferred title language. Default romaji for non-authenticated
idnumberThe id of the media
romajistringThe romanization of the native language title
englishstringThe official english title
nativestringOfficial title in it's native language
userPreferredstringThe currently authenticated users preferred title language. Default romaji for non-authenticated
idnumberThe id of the media
romajistringThe romanization of the native language title
englishstringThe official english title
nativestringOfficial title in it's native language
userPreferredstringThe currently authenticated users preferred title language. Default romaji for non-authenticated
charactersunknown[]Favourite characters
staffunknown[]Favourite staff
studiosunknown[]Favourite studios
statisticsStatisticsThe users anime & manga list statistics
statsUserStatsThe user's statistics
unreadNotificationCountnumberThe number of unread notifications the user has
siteUrlstringThe url for the user page on the AniList website
donatorTiernumberThe donation tier of the user
donatorBadgestringCustom donation badge text
moderatorRolesstring[]The user's moderator roles if they are a site moderator
createdAtnumberWhen the user's account was created. (Does not exist for accounts created before 2020)
updatedAtnumberWhen the user's data was last updated
namestringA previous name of the user.
createdAtnumberWhen the user first changed from this name.
updatedAtnumberWhen the user most recently changed from this name.
  • AniLinkApiError — non-success AniList HTTP response
  • AniLinkGraphQLError — HTTP 200 response carrying GraphQL errors
  • AniLinkNetworkError — timeout, cancellation, or transport failure

Example

TypeScript
await aniLink.anilist.query.follower({userId: 542244});

Media

anilist.query.media

MediaQuery fetches the media data for a single anime or manga by id or idMal. Returns a MediaResponse.

Signature

TypeScript
media(variables: MediaVariables, options?: RequestOptions): Promise<MediaResponse>

Auth: Not required — public data. Pass a token for viewer-scoped fields.

NameTypeRequiredDescription
idnumbernoa number representing the id of the media.
idMalnumbernoa number representing the MyAnimeList id of the media.
startDateFuzzyDateInputnoa number representing the start date of the media.
endDateFuzzyDateInputnoa number representing the end date of the media.
seasonMediaSeasonnoa string representing the season of the media.
seasonYearnumbernoa number representing the year of the season of the media.
typeMediaTypenoa string representing the type of the media. It can be either 'ANIME' or 'MANGA'.
formatMediaFormatnoa string representing the format of the media.
statusMediaStatusnoa string representing the status of the media.
episodesnumbernoa number representing the number of episodes of the media.
durationnumbernoa number representing the duration of the media.
chaptersnumbernoa number representing the number of chapters of the media.
volumesnumbernoa number representing the number of volumes of the media.
isAdultbooleannoa boolean representing whether the media is for adults.
genrestringnoa string representing the genre of the media.
tagstringnoa string representing the tag of the media.
minimumTagRanknumbernoa number representing the minimum tag rank of the media.
tagCategorystringnoa string representing the category of the tag of the media.
onListbooleannoa boolean representing whether the media is on the list.
licensedBystringnoa string representing who licensed the media.
licensedByIdnumbernoa number representing the id of who licensed the media.
averageScorenumbernoa number representing the average score of the media.
popularitynumbernoa number representing the popularity of the media.
sourceMediaSourcenoa string representing the source of the media.
countryOfOriginstringnoa string representing the country of origin of the media.
isLicensedbooleannoa boolean representing whether the media is licensed.
searchstringnoa string representing the search query for the media.
id_notnumbernoa number representing the id of the media that should not be included.
id_innumber[]noan array of numbers representing the ids of the media that should be included.
id_not_innumber[]noan array of numbers representing the ids of the media that should not be included.
idMal_notnumbernoa number representing the MyAnimeList id of the media that should not be included.
idMal_innumber[]noan array of numbers representing the MyAnimeList ids of the media that should be included.
idMal_not_innumber[]noan array of numbers representing the MyAnimeList ids of the media that should not be included.
startDate_greaternumbernoa number representing the start date of the media that should be greater.
startDate_lessernumbernoa number representing the start date of the media that should be lesser.
startDate_likestringnoa string representing the start date of the media that should be like.
endDate_greaternumbernoa number representing the end date of the media that should be greater.
endDate_lessernumbernoa number representing the end date of the media that should be lesser.
endDate_likestringnoa string representing the end date of the media that should be like.
format_inMediaFormat[]noan array of strings representing the formats of the media that should be included.
format_notMediaFormatnoa string representing the format of the media that should not be included.
format_not_inMediaFormat[]noan array of strings representing the formats of the media that should not be included.
status_inMediaStatus[]noan array of strings representing the statuses of the media that should be included.
status_notMediaStatusnoa string representing the status of the media that should not be included.
status_not_inMediaStatus[]noan array of strings representing the statuses of the media that should not be included.
episodes_greaternumbernoa number representing the number of episodes of the media that should be greater.
episodes_lessernumbernoa number representing the number of episodes of the media that should be lesser.
duration_greaternumbernoa number representing the duration of the media that should be greater.
duration_lessernumbernoa number representing the duration of the media that should be lesser.
chapters_greaternumbernoa number representing the number of chapters of the media that should be greater.
chapters_lessernumbernoa number representing the number of chapters of the media that should be lesser.
volumes_greaternumbernoa number representing the number of volumes of the media that should be greater.
volumes_lessernumbernoa number representing the number of volumes of the media that should be lesser.
genre_instring[]noan array of strings representing the genres of the media that should be included.
genre_not_instring[]noan array of strings representing the genres of the media that should not be included.
tag_instring[]noan array of strings representing the tags of the media that should be included.
tag_not_instring[]noan array of strings representing the tags of the media that should not be included.
tagCategory_instring[]noan array of strings representing the categories of the tags of the media that should be included.
tagCategory_not_instring[]noan array of strings representing the categories of the tags of the media that should not be included.
licensedBy_instring[]noan array of strings representing who licensed the media that should be included.
licensedById_innumber[]noan array of numbers representing the ids of who licensed the media that should be included.
averageScore_notnumbernoa number representing the average score of the media that should not be included.
averageScore_greaternumbernoa number representing the average score of the media that should be greater.
averageScore_lessernumbernoa number representing the average score of the media that should be lesser.
popularity_notnumbernoa number representing the popularity of the media that should not be included.
popularity_greaternumbernoa number representing the popularity of the media that should be greater.
popularity_lessernumbernoa number representing the popularity of the media that should be lesser.
source_inMediaSource[]noan array of strings representing the sources of the media that should be included.
sortMediaSort[]noan array of strings representing the sorting of the media.
asHtmlbooleannoa boolean representing whether the media should be returned as HTML.
FieldTypeDescription
idnumberThe id of the media
idMalnumberThe mal id of the media
titleTitleThe official titles of the media in various languages
typeMediaTypeThe type of the media; anime or manga
formatMediaFormatThe format the media was released in
statusMediaStatusThe current releasing status of the media
descriptionstringShort description of the media's story and characters
startDateFuzzyDateThe first official release date of the media
endDateFuzzyDateThe last official release date of the media
seasonMediaSeasonThe season the media was initially released in
seasonYearnumberThe season year the media was initially released in
seasonIntnumberThe year & season the media was initially released in
episodesnumberThe amount of episodes the anime has when complete
durationnumberThe general length of each anime episode in minutes
chaptersnumberThe amount of chapters the manga has when complete
volumesnumberThe amount of volumes the manga has when complete
countryOfOriginstringWhere the media was created. (ISO 3166-1 alpha-2)
isLicensedbooleanIf the media is officially licensed or a self-published doujin release
sourceMediaSourceSource type the media was adapted from.
hashtagstringOfficial Twitter hashtags for the media
trailerTrailerMedia trailer or advertisement
updatedAtnumberWhen the media's data was last updated
coverImageCoverImageThe cover images of the media
bannerImagestringThe banner image of the media
genresstring[]The genres of the media
synonymsstring[]Alternative titles of the media
averageScorenumberA weighted average score of all the user's scores of the media
meanScorenumberMean score of all the user's scores of the media
popularitynumberThe number of users with the media on their list
isLockedbooleanLocked media may not be added to lists our favorited. This may be due to the entry pending for deletion or other reasons.
trendingnumberThe amount of related activity in the past hour
favouritesnumberThe amount of user's who have favourited the media
tagsTag[]List of tags that describes elements and themes of the media
idnumberThe id of the connection
relationTypestringThe type of relation to the parent model
isMainStudiobooleanIf the studio is the main animation studio of the media (For Studio->MediaConnection field only)
idnumberThe id of the character
firststringThe character's given name
laststringThe character's surname
fullstringThe character's first and last name
nativestringThe character's full name in their native language
largestringThe character's image of media at its largest size
mediumstringThe character's image of media at medium size
descriptionstringA general description of the character
genderstringThe character's gender. Usually Male, Female, or Non-binary but can be any string.
dateOfBirthFuzzyDateThe character's birth date
agestringThe character's age. Note this is a string, not an int, it may contain further text and additional ages.
bloodTypestringThe characters blood type
isFavouritebooleanIf the character is marked as favourite by the currently authenticated user
isFavouriteBlockedbooleanIf the character is blocked from being added to favourites
siteUrlstringThe url for the character page on the AniList website
favouritesnumberThe amount of user's who have favourited the character
modNotesstringNotes for site moderators
characterRolestringThe characters role in the media
characterNamestringMedia specific character name
roleNotesstringNotes regarding the VA's role for the character
dubGroupstringUsed for grouping roles where multiple dubs exist for the same language. Either dubbing company name or language variant.
staffRolestringThe role of the staff member in the production of the media
idnumberThe id of the media
romajistringThe romanization of the native language title
englishstringThe official english title
nativestringOfficial title in it's native language
userPreferredstringThe currently authenticated users preferred title language. Default romaji for non-authenticated
idnumberThe id of the connection
rolestringThe characters role in the media
namestringMedia specific character name
idnumberThe id of the staff member
firststringThe person's given name
laststringThe person's surname
fullstringThe person's first and last name
nativestringThe person's full name in their native language
largestringThe person's image of media at its largest size
mediumstringThe person's image of media at medium size
idnumberThe id of the media
romajistringThe romanization of the native language title
englishstringThe official english title
nativestringOfficial title in it's native language
userPreferredstringThe currently authenticated users preferred title language. Default romaji for non-authenticated
extraLargestringThe cover image url of the media at its largest size. If this size isn't available, large will be provided instead.
largestringThe cover image url of the media at a large size
mediumstringThe cover image url of the media at medium size
colorstringAverage #hex color of cover image
favouriteOrdernumberThe order the character should be displayed from the users favourites
idnumberThe id of the character
firststringThe character's given name
laststringThe character's surname
fullstringThe character's first and last name
nativestringThe character's full name in their native language
largestringThe character's image of media at its largest size
mediumstringThe character's image of media at medium size
idnumberThe id of the connection
rolestringThe role of the staff member in the production of the media
favouriteOrdernumberThe order the staff should be displayed from the users favourites
idnumberThe id of the staff member
firststringThe person's given name
laststringThe person's surname
fullstringThe person's first and last name
nativestringThe person's full name in their native language
largestringThe person's image of media at its largest size
mediumstringThe person's image of media at medium size
idnumberThe id of the connection
isMainbooleanIf the studio is the main animation studio of the anime
favouriteOrdernumberThe order the character should be displayed from the users favourites
idnumberThe id of the studio
namestringThe name of the studio
isAnimationStudiobooleanIf the studio is an animation studio or a different kind of company
siteUrlstringThe url for the studio page on the AniList website
isFavouritebooleanIf the media is marked as favourite by the current authenticated user
isAdultbooleanIf the media is intended only for 18+ adult audiences
nextAiringEpisodeNextAiringEpisodeThe media's next episode airing schedule
externalLinksExternalLink[]External links to another site related to the media
streamingEpisodesStreamingEpisode[]Data and links to legal streaming episodes on external sites
rankingsRanking[]The ranking of the media in a particular time span and format compared to other media
mediaListEntryMediaListEntryThe authenticated user's media list entry for the media
statsMediaStatsan instance of `MediaStats` representing the stats.
siteUrlstringThe url for the media page on the AniList website
autoCreateForumThreadbooleanIf the media should have forum thread automatically created for it on airing episode release
isRecommendationBlockedbooleanIf the media is blocked from being recommended to/from
modNotesstringNotes for site moderators
  • AniLinkApiError — non-success AniList HTTP response
  • AniLinkGraphQLError — HTTP 200 response carrying GraphQL errors
  • AniLinkNetworkError — timeout, cancellation, or transport failure

Example

TypeScript
await aniLink.anilist.query.media({id: 1, type: 'ANIME'});

anilist.query.mediaTrend

MediaTrendQuery fetches the trend entry for a single airing media. Returns a MediaTrendResponse.

Signature

TypeScript
mediaTrend(variables: MediaTrendVariables, options?: RequestOptions): Promise<MediaTrendResponse>

Auth: Not required — public data. Pass a token for viewer-scoped fields.

NameTypeRequiredDescription
mediaIdnumbernoa number representing the id of the media.
datenumbernoa number representing the date of the media trend.
trendingnumbernoa number representing the trending status of the media.
averageScorenumbernoa number representing the average score of the media.
popularitynumbernoa number representing the popularity of the media.
episodenumbernoa number representing the episode of the media.
releasingbooleannoa boolean indicating whether the media is releasing.
mediaId_notnumbernoa number representing the id of the media not included.
mediaId_innumber[]noan array of numbers representing the ids of the media included.
mediaId_not_innumber[]noan array of numbers representing the ids of the media not included.
date_greaternumbernoa number representing the date greater than the media trend.
date_lessernumbernoa number representing the date lesser than the media trend.
trending_greaternumbernoa number representing the trending status greater than the media.
trending_lessernumbernoa number representing the trending status lesser than the media.
trending_notnumbernoa number representing the trending status not included in the media.
averageScore_greaternumbernoa number representing the average score greater than the media.
averageScore_lessernumbernoa number representing the average score lesser than the media.
averageScore_notnumbernoa number representing the average score not included in the media.
popularity_greaternumbernoa number representing the popularity greater than the media.
popularity_lessernumbernoa number representing the popularity lesser than the media.
popularity_notnumbernoa number representing the popularity not included in the media.
episode_greaternumbernoa number representing the episode number greater than the media.
episode_lessernumbernoa number representing the episode number lesser than the media.
episode_notnumbernoa number representing the episode number not included in the media.
sortMediaTrendSort[]noan array of strings representing the sort order of the media.
asHtmlbooleannoa boolean indicating whether to return the result as HTML.
FieldTypeDescription
mediaIdnumberThe id of the tag
datenumberThe day the data was recorded (timestamp)
trendingnumberThe amount of media activity on the day
averageScorenumberA weighted average score of all the user's scores of the media
popularitynumberThe number of users with the media on their list
inProgressnumberThe number of users with watching/reading the media
releasingbooleanIf the media was being released at this time
episodenumberThe episode number of the anime released on this day
mediaMediaThe related media
  • AniLinkApiError — non-success AniList HTTP response
  • AniLinkGraphQLError — HTTP 200 response carrying GraphQL errors
  • AniLinkNetworkError — timeout, cancellation, or transport failure

Example

TypeScript
await aniLink.anilist.query.mediaTrend({mediaId: 1, type: 'ANIME'});

anilist.query.airingSchedule

AiringScheduleQuery fetches a single airing schedule entry by id or mediaId. Returns an AiringScheduleResponse.

Signature

TypeScript
airingSchedule(variables: AiringScheduleVariables, options?: RequestOptions): Promise<AiringScheduleResponse>

Auth: Not required — public data. Pass a token for viewer-scoped fields.

NameTypeRequiredDescription
idnumbernoa number representing the id of the airing schedule.
mediaIdnumbernoa number representing the id of the media.
episodenumbernoa number representing the episode number.
airingAtnumbernoa number representing the airing time.
notYetAiredbooleannoa boolean representing whether the episode has not yet aired.
id_notnumbernoa number representing the id of the airing schedule that should not be included.
id_innumber[]noan array of numbers representing the ids of the airing schedules that should be included.
id_not_innumber[]noan array of numbers representing the ids of the airing schedules that should not be included.
mediaId_notnumbernoa number representing the id of the media that should not be included.
mediaId_innumber[]noan array of numbers representing the ids of the media that should be included.
mediaId_not_innumber[]noan array of numbers representing the ids of the media that should not be included.
episode_notnumbernoa number representing the episode number that should not be included.
episode_innumber[]noan array of numbers representing the episode numbers that should be included.
episode_not_innumber[]noan array of numbers representing the episode numbers that should not be included.
episode_greaternumbernoa number representing the minimum episode number.
episode_lessernumbernoa number representing the maximum episode number.
airingAt_greaternumbernoa number representing the minimum airing time.
airingAt_lessernumbernoa number representing the maximum airing time.
sortAiringSort[]noan array of strings representing the sort order.
asHtmlbooleannoa boolean representing whether to return the result as HTML.
FieldTypeDescription
idnumberThe id of the airing schedule item
airingAtnumberThe time the episode airs at
timeUntilAiringnumberSeconds until episode starts airing
episodenumberThe airing episode number
mediaIdnumberThe associate media id of the airing episode
mediaMediaThe associate media of the airing episode
  • AniLinkApiError — non-success AniList HTTP response
  • AniLinkGraphQLError — HTTP 200 response carrying GraphQL errors
  • AniLinkNetworkError — timeout, cancellation, or transport failure

Example

TypeScript
await aniLink.anilist.query.airingSchedule({mediaId: 130590});

anilist.query.mediaList

MediaListQuery fetches a single media list entry by id, or by userName/userId plus mediaId. Returns a MediaListResponse.

Signature

TypeScript
mediaList(variables: MediaListVariables, options?: RequestOptions): Promise<MediaListResponse>

Auth: Not required — public data. Pass a token for viewer-scoped fields.

NameTypeRequiredDescription
idnumbernoa number representing the id of the media list.
userIdnumbernoa number representing the id of the user.
userNamestringnoa string representing the name of the user.
typeMediaTypenoa string representing the type of the media.
statusMediaListStatusnoa string representing the status of the media.
mediaIdnumbernoa number representing the id of the media.
isFollowingbooleannoa boolean indicating whether the user is following the media.
notesstringnoa string representing any notes about the media.
startedAtFuzzyDateInputnoa number representing the start date of the media.
completedAtFuzzyDateInputnoa number representing the completion date of the media.
compareWithAuthListbooleannoa boolean indicating whether to compare with the authenticated list.
userId_innumber[]noan array of numbers representing the ids of the users.
status_inMediaListStatus[]noan array of strings representing the statuses of the media.
status_not_inMediaListStatus[]noan array of strings representing the statuses not included in the media.
status_notMediaListStatusnoa string representing the status not included in the media.
mediaId_innumber[]noan array of numbers representing the ids of the media.
mediaId_not_innumber[]noan array of numbers representing the ids not included in the media.
notes_likestringnoa string representing the notes similar to the media.
startedAt_greaterFuzzyDateInputnoa number representing the start date greater than the media.
startedAt_lesserFuzzyDateInputnoa number representing the start date lesser than the media.
startedAt_likestringnoa string representing the start date similar to the media.
completedAt_greaterFuzzyDateInputnoa number representing the completion date greater than the media.
completedAt_lesserFuzzyDateInputnoa number representing the completion date lesser than the media.
completedAt_likestringnoa string representing the completion date similar to the media.
sortMediaListSort[]noan array of strings representing the sort order of the media.
scoreFormatScoreFormatnoa string representing the format of the score of the media.
asArraybooleannoa boolean indicating whether to return the result as an array.
asHtmlbooleannoa boolean indicating whether to return the result as HTML.
FieldTypeDescription
idnumberThe id of the list entry
userIdnumberThe id of the user owner of the list entry
mediaIdnumberThe id of the media
statusstringThe watching/reading status
scorenumberThe score of the entry
progressnumberThe amount of episodes/chapters consumed by the user
progressVolumesnumberThe amount of volumes read by the user
repeatnumberThe amount of times the user has rewatched/read the media
prioritynumberPriority of planning
privatebooleanIf the entry should only be visible to authenticated user
notesstringText notes
hiddenFromStatusListsbooleanIf the entry shown be hidden from non-custom lists
customListsstring[] | boolean[]Map of booleans for which custom lists the entry are in
advancedScoresunknownMap of advanced scores with name keys
startedAtFuzzyDateWhen the entry was started by the user
completedAtFuzzyDateWhen the entry was completed by the user
updatedAtnumberWhen the entry data was last updated
createdAtnumberWhen the entry data was created
mediaMediaan instance of `Media` representing the media.
  • AniLinkApiError — non-success AniList HTTP response
  • AniLinkGraphQLError — HTTP 200 response carrying GraphQL errors
  • AniLinkNetworkError — timeout, cancellation, or transport failure

Example

TypeScript
await aniLink.anilist.query.mediaList({userId: 542244});

anilist.query.mediaListCollection

MediaListCollectionQuery fetches a user's full list collection, chunked via chunk/perChunk. Returns a MediaListCollectionResponse; flatten it with AniListHelpers.flattenMediaListCollection.

Signature

TypeScript
mediaListCollection(variables: MediaListCollectionVariables, options?: RequestOptions): Promise<MediaListCollectionResponse>

Auth: Not required — public data. Pass a token for viewer-scoped fields.

NameTypeRequiredDescription
userIdnumbernoa number representing the id of the user.
userNamestringnoa string representing the name of the user.
typeMediaTypeyesa string representing the type of the media.
statusMediaListStatusnoa string representing the status of the media.
notesstringnoa string representing any notes about the media.
startedAtFuzzyDateInputnoa number representing the start date of the media.
completedAtFuzzyDateInputnoa number representing the completion date of the media.
forceSingleCompletedListbooleannoa boolean indicating whether to force a single completed list.
chunknumbernoa 1-based number selecting which chunk of the media list collection to fetch. Advance it while the response's `hasNextChunk` is `true` to walk the whole list.
perChunknumbernothe number of entries to return per chunk. Pair with `chunk` to page through a large list one chunk at a time.
status_inMediaListStatus[]noan array of strings representing the statuses of the media.
status_not_inMediaListStatus[]noan array of strings representing the statuses not included in the media.
status_notMediaListStatusnoa string representing the status not included in the media.
notes_likestringnoa string representing the notes similar to the media.
startedAt_greaterFuzzyDateInputnoa number representing the start date greater than the media.
startedAt_lesserFuzzyDateInputnoa number representing the start date lesser than the media.
startedAt_likestringnoa string representing the start date similar to the media.
completedAt_greaterFuzzyDateInputnoa number representing the completion date greater than the media.
completedAt_lesserFuzzyDateInputnoa number representing the completion date lesser than the media.
completedAt_likestringnoa string representing the completion date similar to the media.
sortMediaListSort[]noan array of strings representing the sort order of the media.
scoreFormatScoreFormatnoa string representing the format of the score of the media.
asArraybooleannoa boolean indicating whether to return the result as an array.
asHtmlbooleannoa boolean indicating whether to return the result as HTML.
FieldTypeDescription
idnumberThe id of the list entry
userIdnumberThe id of the user owner of the list entry
mediaIdnumberThe id of the media
statusstringThe watching/reading status
scorenumberThe score of the entry
progressnumberThe amount of episodes/chapters consumed by the user
progressVolumesnumberThe amount of volumes read by the user
repeatnumberThe amount of times the user has rewatched/read the media
prioritynumberPriority of planning
privatebooleanIf the entry should only be visible to authenticated user
notesstringText notes
hiddenFromStatusListsbooleanIf the entry shown be hidden from non-custom lists
customListsunknownMap of booleans for which custom lists the entry are in
advancedScoresunknownMap of advanced scores with name keys
startedAtFuzzyDateWhen the entry was started by the user
completedAtFuzzyDateWhen the entry was completed by the user
updatedAtnumberWhen the entry data was last updated
createdAtnumberWhen the entry data was created
mediaMediaan instance of `Media` representing the media.
namestringa string value representing the name.
isCustomListbooleana boolean value representing the is custom list.
isSplitCompletedListbooleana boolean value representing the is split completed list.
statusstringa string value representing the status.
hasNextChunkbooleanIf there is another chunk
  • AniLinkApiError — non-success AniList HTTP response
  • AniLinkGraphQLError — HTTP 200 response carrying GraphQL errors
  • AniLinkNetworkError — timeout, cancellation, or transport failure

Example

TypeScript
await aniLink.anilist.query.mediaListCollection({
  userId: 542244,
  type: 'ANIME',
  status: 'COMPLETED',
  chunk: 1,
  perChunk: 10000
});

Characters & Staff

anilist.query.character

CharacterQuery fetches a single character by id. Returns a CharacterResponse.

Signature

TypeScript
character(variables: CharacterVariables, options?: RequestOptions): Promise<CharacterResponse>

Auth: Not required — public data. Pass a token for viewer-scoped fields.

NameTypeRequiredDescription
idnumbernoa number representing the id of the character.
isBirthdaybooleannoa boolean representing whether it is the character's birthday.
searchstringnoa string representing the search term.
id_notnumbernoa number representing the id of the character that should not be included.
id_innumber[]noan array of numbers representing the ids of the characters that should be included.
id_not_innumber[]noan array of numbers representing the ids of the characters that should not be included.
sortCharacterSort[]noan array of strings representing the sort order.
asHtmlbooleannoa boolean representing whether to return the result as HTML.
mediaSortMediaSort[]noan array of strings representing the sort order for media.
mediaOnListbooleannoa boolean representing whether the media is on the list.
mediaPagenumbernoa number representing the page number for media.
mediaPerPagenumbernoa number representing the number of media items per page.
FieldTypeDescription
idnumberThe id of the character
nameNameThe names of the character
imageImageCharacter images
descriptionstringA general description of the character
genderstringThe character's gender. Usually Male, Female, or Non-binary but can be any string.
dateOfBirthFuzzyDateThe character's birth date
agestringThe character's age. Note this is a string, not an int, it may contain further text and additional ages.
bloodTypestringThe characters blood type
isFavouritebooleanIf the character is marked as favourite by the currently authenticated user
isFavouriteBlockedbooleanIf the character is blocked from being added to favourites
siteUrlstringThe url for the character page on the AniList website
idnumberThe id of the media
romajistringThe romanization of the native language title
englishstringThe official english title
nativestringOfficial title in it's native language
userPreferredstringThe currently authenticated users preferred title language. Default romaji for non-authenticated
favouritesnumberThe amount of user's who have favourited the character
modNotesstringNotes for site moderators
  • AniLinkApiError — non-success AniList HTTP response
  • AniLinkGraphQLError — HTTP 200 response carrying GraphQL errors
  • AniLinkNetworkError — timeout, cancellation, or transport failure

Example

TypeScript
await aniLink.anilist.query.character({
  id: 1,
  asHtml: true,
  mediaSort: ['POPULARITY_DESC'],
  mediaType: 'ANIME',
  mediaOnList: true,
  mediaPage: 1,
  mediaPerPage: 10
});

anilist.query.staff

StaffQuery fetches a single staff member by id. Returns a StaffResponse.

Signature

TypeScript
staff(variables: StaffVariables, options?: RequestOptions): Promise<StaffResponse>

Auth: Not required — public data. Pass a token for viewer-scoped fields.

NameTypeRequiredDescription
idnumbernoa number representing the id of the staff.
isBirthdaybooleannoa boolean indicating whether it's the staff's birthday.
searchstringnoa string representing the search term.
id_notnumbernoa number representing the id not to include in the search.
id_innumber[]noan array of numbers representing the ids to include in the search.
id_not_innumber[]noan array of numbers representing the ids not to include in the search.
sortStaffSort[]noan array of strings representing the sort order of the staff.
asHtmlbooleannoa boolean indicating whether to return the result as HTML.
staffMediaSortMediaSort[]noan array of strings representing the sort order of the staff media.
staffMediaTypeMediaTypenoa string representing the type of the staff media.
staffMediaOnListbooleannoa boolean indicating whether the staff media is on the list.
staffMediaPagenumbernoa number representing the page number of the staff media.
staffMediaPerPagenumbernoa number representing the number of staff media per page.
charactersSortCharacterSort[]noan array of strings representing the sort order of the characters.
charactersPagenumbernoa number representing the page number of the characters.
charactersPerPagenumbernoa number representing the number of characters per page.
characterMediaSortMediaSort[]noan array of strings representing the sort order of the character media.
characterMediaOnListbooleannoa boolean indicating whether the character media is on the list.
characterMediaPagenumbernoa number representing the page number of the character media.
characterMediaPerPagenumbernoa number representing the number of character media per page.
FieldTypeDescription
idnumberThe id of the staff member
nameNameThe names of the staff member
languageV2stringThe primary language of the staff member. Current values: Japanese, English, Korean, Italian, Spanish, Portuguese, French, German, Hebrew, Hungarian, Chinese, Arabic, Filipino, Catalan, Finnish, Turkish, Dutch, Swedish, Thai, Tagalog, Malaysian, Indonesian, Vietnamese, Nepali, Hindi, Urdu
imageImageThe staff images
descriptionstringA general description of the staff member
primaryOccupationsstring[]The person's primary occupations
genderstringThe staff's gender. Usually Male, Female, or Non-binary but can be any string.
dateOfBirthFuzzyDatean instance of `FuzzyDate` representing the date of birth.
dateOfDeathFuzzyDatean instance of `FuzzyDate` representing the date of death.
agenumberThe person's age in years
yearsActivenumber[][startYear, endYear] (If the 2nd value is not present staff is still active)
homeTownstringThe persons birthplace or hometown
bloodTypestringThe persons blood type
isFavouritebooleanIf the staff member is marked as favourite by the currently authenticated user
isFavouriteBlockedbooleanIf the staff member is blocked from being added to favourites
siteUrlstringThe url for the staff page on the AniList website
idnumberThe id of the media
romajistringThe romanization of the native language title
englishstringThe official english title
nativestringOfficial title in it's native language
userPreferredstringThe currently authenticated users preferred title language. Default romaji for non-authenticated
idnumberThe id of the character
firststringThe character's given name
laststringThe character's surname
fullstringThe character's first and last name
nativestringThe character's full name in their native language
idnumberThe id of the media
romajistringThe romanization of the native language title
englishstringThe official english title
nativestringOfficial title in it's native language
userPreferredstringThe currently authenticated users preferred title language. Default romaji for non-authenticated
idnumberThe id of the user
namestringThe name of the user
submissionStatusnumberStatus of the submission
submissionNotesstringInner details of submission status
favouritesnumberThe amount of user's who have favourited the staff member
modNotesstringNotes for site moderators
  • AniLinkApiError — non-success AniList HTTP response
  • AniLinkGraphQLError — HTTP 200 response carrying GraphQL errors
  • AniLinkNetworkError — timeout, cancellation, or transport failure

Example

TypeScript
await aniLink.anilist.query.staff({
  id: 132186,
  asHtml: true,
  staffMediaSort: ['POPULARITY_DESC'],
  staffMediaType: 'ANIME',
  staffMediaOnList: true,
  staffMediaPage: 1,
  staffMediaPerPage: 10,
  charactersSort: ['ID'],
  charactersPage: 1,
  charactersPerPage: 10,
  characterMediaSort: ['POPULARITY_DESC'],
  characterMediaOnList: true,
  characterMediaPage: 1,
  characterMediaPerPage: 10
});

Activity

anilist.query.notification

NotificationQuery fetches a single notification by id. Returns a NotificationResponse. Must be authenticated.

Signature

TypeScript
notification(variables: NotificationVariables, options?: RequestOptions): Promise<NotificationResponse>

Auth: Not required — public data. Pass a token for viewer-scoped fields.

NameTypeRequiredDescription
typeNotificationTypenoa string representing the type of the notification.
resetNotificationCountbooleannoa boolean indicating whether to reset the notification count.
type_inNotificationType[]noan array of strings representing the types of the notifications.
asHtmlbooleannoa boolean indicating whether to return the result as HTML.

See the TypeDoc page for the full NotificationResponse shape.

  • AniLinkApiError — non-success AniList HTTP response
  • AniLinkGraphQLError — HTTP 200 response carrying GraphQL errors
  • AniLinkNetworkError — timeout, cancellation, or transport failure

Example

TypeScript
await aniLink.anilist.query.notification({asHtml: true});

anilist.query.activity

ActivityQuery fetches a single activity by id. Returns an Activity (a union of text, message, and list activities).

Signature

TypeScript
activity(variables: ActivityVariables, options?: RequestOptions): Promise<Activity>

Auth: Not required — public data. Pass a token for viewer-scoped fields.

NameTypeRequiredDescription
idnumbernoa number representing the id of the activity.
userIdnumbernoa number representing the id of the user.
messengerIdnumbernoa number representing the id of the messenger.
mediaIdnumbernoa number representing the id of the media.
typeActivityTypenoa string representing the type of the activity.
isFollowingbooleannoa boolean representing whether the user is following.
hasRepliesbooleannoa boolean representing whether the activity has replies.
hasRepliesOrTypeTextbooleannoa boolean representing whether the activity has replies or type text.
createdAtnumbernoa number representing the creation time of the activity.
id_notnumbernoa number representing the id of the activity that should not be included.
id_innumber[]noan array of numbers representing the ids of the activities that should be included.
id_not_innumber[]noan array of numbers representing the ids of the activities that should not be included.
userId_notnumbernoa number representing the id of the user that should not be included.
userId_innumber[]noan array of numbers representing the ids of the users that should be included.
userId_not_innumber[]noan array of numbers representing the ids of the users that should not be included.
messengerId_notnumbernoa number representing the id of the messenger that should not be included.
messengerId_innumber[]noan array of numbers representing the ids of the messengers that should be included.
messengerId_not_innumber[]noan array of numbers representing the ids of the messengers that should not be included.
mediaId_notnumbernoa number representing the id of the media that should not be included.
mediaId_innumber[]noan array of numbers representing the ids of the media that should be included.
mediaId_not_innumber[]noan array of numbers representing the ids of the media that should not be included.
type_notActivityTypenoa string representing the type of the activity that should not be included.
type_inActivityType[]noan array of strings representing the types of the activities that should be included.
type_not_inActivityType[]noan array of strings representing the types of the activities that should not be included.
createdAt_greaternumbernoa number representing the minimum creation time of the activities.
sortActivitySort[]noan array of strings representing the sort order.
asHtmlbooleannoa boolean representing whether to return the result as HTML.

See the TypeDoc page for the full Activity shape.

  • AniLinkApiError — non-success AniList HTTP response
  • AniLinkGraphQLError — HTTP 200 response carrying GraphQL errors
  • AniLinkNetworkError — timeout, cancellation, or transport failure

Example

TypeScript
await aniLink.anilist.query.activity({id: 723235883, asHtml: true});

anilist.query.activityReply

ActivityReplyQuery fetches a single activity reply by id. Returns an ActivityReply.

Signature

TypeScript
activityReply(variables: ActivityReplyVariables, options?: RequestOptions): Promise<ActivityReply>

Auth: Not required — public data. Pass a token for viewer-scoped fields.

NameTypeRequiredDescription
idnumbernoa number representing the id of the activity reply.
activityIdnumbernoa number representing the id of the activity.
asHtmlbooleannoa boolean representing whether to return the result as HTML.
FieldTypeDescription
idnumberThe id of the reply
userIdnumberThe id of the replies creator
activityIdnumberThe id of the parent activity
textstringThe reply text
likeCountnumberThe amount of likes the reply has
isLikedbooleanIf the currently authenticated user liked the reply
createdAtnumberThe time the reply was created at
userBasicUserThe user who created reply
likesBasicUser[]The users who liked the reply
  • AniLinkApiError — non-success AniList HTTP response
  • AniLinkGraphQLError — HTTP 200 response carrying GraphQL errors
  • AniLinkNetworkError — timeout, cancellation, or transport failure

Example

TypeScript
await aniLink.anilist.query.activityReply({id: 12191046, asHtml: true});

Studios

anilist.query.studio

StudioQuery fetches a single studio by id. Returns a StudioResponse.

Signature

TypeScript
studio(variables: StudioVariables, options?: RequestOptions): Promise<StudioResponse>

Auth: Not required — public data. Pass a token for viewer-scoped fields.

NameTypeRequiredDescription
idnumbernoa number representing the id of the studio.
searchstringnoa string representing the search term.
id_notnumbernoa number representing the id not to include in the search.
id_innumber[]noan array of numbers representing the ids to include in the search.
id_not_innumber[]noan array of numbers representing the ids not to include in the search.
sortStudioSort[]noan array of strings representing the sort order of the studio.
asHtmlbooleannoa boolean indicating whether to return the result as HTML.
mediaSortMediaSort[]noan array of strings representing the sort order of the media.
mediaIsMainbooleannoa boolean indicating whether the media is main.
mediaOnListbooleannoa boolean indicating whether the media is on the list.
mediaPagenumbernoa number representing the page number of the media.
mediaPerPagenumbernoa number representing the number of media per page.
staffMediaSortMediaSort[]noan array of strings representing the sort order of the staff media.
staffMediaTypestringnoa string representing the type of the staff media.
staffMediaOnListbooleannoa boolean indicating whether the staff media is on the list.
staffMediaPagenumbernoa number representing the page number of the staff media.
staffMediaPerPagenumbernoa number representing the number of staff media per page.
charactersSortCharacterSort[]noan array of strings representing the sort order of the characters.
charactersPagenumbernoa number representing the page number of the characters.
charactersPerPagenumbernoa number representing the number of characters per page.
characterMediaSortMediaSort[]noan array of strings representing the sort order of the character media.
characterMediaOnListbooleannoa boolean indicating whether the character media is on the list.
characterMediaPagenumbernoa number representing the page number of the character media.
characterMediaPerPagenumbernoa number representing the number of character media per page.
FieldTypeDescription
idnumberThe id of the studio
namestringThe name of the studio
isAnimationStudiobooleanIf the studio is an animation studio or a different kind of company
idnumberThe id of the connection
relationTypestringThe type of relation to the parent model
isMainStudiobooleanIf the studio is the main animation studio of the media (For Studio->MediaConnection field only)
charactersCharacterResponse[]The characters in the media voiced by the parent actor
characterRolestringThe characters role in the media
characterNamestringMedia specific character name
roleNotesstringNotes regarding the VA's role for the character
dubGroupstringUsed for grouping roles where multiple dubs exist for the same language. Either dubbing company name or language variant.
voiceActorsStaffResponse[]The voice actors of the character
idnumberThe id of the staff member
firststringThe person's given name
laststringThe person's surname
fullstringThe person's first and last name
nativestringThe person's full name in their native language
largestringThe person's image of media at its largest size
mediumstringThe person's image of media at medium size
roleNotesstringNotes regarding the VA's role for the character
dubGroupstringUsed for grouping roles where multiple dubs exist for the same language. Either dubbing company name or language variant.
favouriteOrdernumberThe order the media should be displayed from the users favourites
nodeMediaan instance of `Media` representing the node.
nodesMedia[]a list of `Media` entries representing the nodes.
totalnumberThe total number of items. Note: This value is not guaranteed to be accurate, do not rely on this for logic
perPagenumberThe count on a page
currentPagenumberThe current page
lastPagenumberThe last page
hasNextPagebooleanIf there is another page
siteUrlstringThe url for the studio page on the AniList website
isFavouritebooleanIf the studio is marked as favourite by the currently authenticated user
favouritesnumberThe amount of user's who have favourited the studio
  • AniLinkApiError — non-success AniList HTTP response
  • AniLinkGraphQLError — HTTP 200 response carrying GraphQL errors
  • AniLinkNetworkError — timeout, cancellation, or transport failure

Example

TypeScript
await aniLink.anilist.query.studio({id: 561, asHtml: true});

Reviews

anilist.query.review

ReviewQuery fetches a single review by id. Returns a ReviewResponse.

Signature

TypeScript
review(variables: ReviewVariables, options?: RequestOptions): Promise<ReviewResponse>

Auth: Not required — public data. Pass a token for viewer-scoped fields.

NameTypeRequiredDescription
idnumbernoa number representing the id of the review.
mediaIdnumbernoa number representing the id of the media.
userIdnumbernoa number representing the id of the user.
mediaTypeMediaTypenoa string representing the type of the media.
sortReviewSort[]noan array of strings representing the sort order of the review.
asHtmlbooleannoa boolean indicating whether to return the result as HTML.
FieldTypeDescription
idnumberThe id of the review
mediaIdnumberThe id of the review's media
userIdnumberThe id of the review's creator
mediaTypestringFor which type of media the review is for
summarystringA short summary of the review
bodystringThe main review body text
ratingnumberThe total user rating of the review
ratingAmountnumberThe amount of user ratings of the review
scorenumberThe review score of the media
privatebooleanIf the review is not yet publicly published and is only viewable by creator
siteUrlstringThe url for the review page on the AniList website
createdAtnumberThe time of the thread creation
updatedAtnumberThe time of the thread last update
userBasicUserThe creator of the review
mediaMediaThe media the review is of
  • AniLinkApiError — non-success AniList HTTP response
  • AniLinkGraphQLError — HTTP 200 response carrying GraphQL errors
  • AniLinkNetworkError — timeout, cancellation, or transport failure

Example

TypeScript
await aniLink.anilist.query.review({id: 8008, asHtml: true});

anilist.query.recommendation

RecommendationQuery fetches a single recommendation by id or mediaId. Returns a RecommendationResponse.

Signature

TypeScript
recommendation(variables: RecommendationVariables, options?: RequestOptions): Promise<RecommendationResponse>

Auth: Not required — public data. Pass a token for viewer-scoped fields.

NameTypeRequiredDescription
idnumbernoa number representing the id of the recommendation.
mediaIdnumbernoa number representing the id of the media.
mediaRecommendationIdnumbernoa number representing the id of the media recommendation.
userIdnumbernoa number representing the id of the user.
ratingnumbernoa number representing the rating of the recommendation.
onListbooleannoa boolean indicating whether the recommendation is on the list.
rating_greaternumbernoa number representing the rating greater than the recommendation.
rating_lessernumbernoa number representing the rating lesser than the recommendation.
sortRecommendationSort[]noan array of strings representing the sort order of the recommendation.
asHtmlbooleannoa boolean indicating whether to return the result as HTML.
FieldTypeDescription
idnumberThe id of the recommendation
ratingnumberUsers rating of the recommendation
userRatingstringThe rating of the recommendation by currently authenticated user
mediaMediaThe media the recommendation is from
mediaRecommendationMediaThe recommended media
userBasicUserThe user that first created the recommendation
  • AniLinkApiError — non-success AniList HTTP response
  • AniLinkGraphQLError — HTTP 200 response carrying GraphQL errors
  • AniLinkNetworkError — timeout, cancellation, or transport failure

Example

TypeScript
await aniLink.anilist.query.recommendation({mediaId: 156822, asHtml: true});

Community

anilist.query.thread

ThreadQuery fetches a single forum thread by id. Returns a ThreadResponse.

Signature

TypeScript
thread(variables: ThreadVariables, options?: RequestOptions): Promise<ThreadResponse>

Auth: Not required — public data. Pass a token for viewer-scoped fields.

NameTypeRequiredDescription
idnumbernoa number representing the id of the thread.
userIdnumbernoa number representing the id of the user.
replyUserIdnumbernoa number representing the id of the user who replied.
subscribedbooleannoa boolean indicating whether the user is subscribed to the thread.
categoryIdnumbernoa number representing the id of the category.
mediaCategoryIdnumbernoa number representing the id of the media category.
searchstringnoa string representing the search term.
id_innumber[]noan array of numbers representing the ids to include in the search.
sortThreadSort[]noan array of strings representing the sort order of the thread.
asHtmlbooleannoa boolean indicating whether to return the result as HTML.
FieldTypeDescription
idnumberThe id of the thread
titlestringThe title of the thread
bodystringThe text body of the thread (Markdown)
userIdnumberThe id of the thread owner user
replyUserIdnumberThe id of the user who most recently commented on the thread
replyCommentIdnumberThe id of the most recent comment on the thread
replyCountnumberThe number of comments on the thread
viewCountnumberThe number of times users have viewed the thread
isLockedbooleanIf the thread is locked and can receive comments
isStickybooleanIf the thread is stickied and should be displayed at the top of the page
isSubscribedbooleanIf the currently authenticated user is subscribed to the thread
likeCountnumberThe amount of likes the thread has
isLikedbooleanIf the currently authenticated user liked the thread
repliedAtnumberThe time of the last reply
createdAtnumberThe time of the thread creation
updatedAtnumberThe time of the thread last update
userBasicUserThe owner of the thread
replyUserBasicUserThe user to last reply to the thread
likesBasicUser[]The users who liked the thread
siteUrlstringThe url for the thread page on the AniList website
idnumberThe id of the category
namestringThe name of the category
mediaCategoriesMedia[]The media categories of the thread
  • AniLinkApiError — non-success AniList HTTP response
  • AniLinkGraphQLError — HTTP 200 response carrying GraphQL errors
  • AniLinkNetworkError — timeout, cancellation, or transport failure

Example

TypeScript
await aniLink.anilist.query.thread({id: 71881, asHtml: true});

anilist.query.threadComment

ThreadCommentQuery fetches a single thread comment by id. Returns a ThreadCommentResponse.

Signature

TypeScript
threadComment(variables: ThreadCommentVariables, options?: RequestOptions): Promise<ThreadCommentResponse>

Auth: Not required — public data. Pass a token for viewer-scoped fields.

NameTypeRequiredDescription
idnumbernoa number representing the id of the thread comment.
threadIdnumbernoa number representing the id of the thread.
userIdnumbernoa number representing the id of the user.
sortThreadSort[]noan array of strings representing the sort order of the thread comment.
asHtmlbooleannoa boolean indicating whether to return the result as HTML.
FieldTypeDescription
idnumberThe id of the comment
userIdnumberThe user id of the comment's owner
threadIdnumberThe id of thread the comment belongs to
commentstringThe text content of the comment (Markdown)
likeCountnumberThe amount of likes the comment has
isLikedbooleanIf the currently authenticated user liked the comment
siteUrlstringThe url for the comment page on the AniList website
createdAtnumberThe time of the comments creation
updatedAtnumberThe time of the comments last update
threadThreadResponseThe thread the comment belongs to
userBasicUserThe user who created the comment
likesBasicUser[]The users who liked the comment
childCommentsunknownThe comment's child reply comments
isLockedbooleanIf the comment tree is locked and may not receive replies or edits
  • AniLinkApiError — non-success AniList HTTP response
  • AniLinkGraphQLError — HTTP 200 response carrying GraphQL errors
  • AniLinkNetworkError — timeout, cancellation, or transport failure

Example

TypeScript
await aniLink.anilist.query.threadComment({id: 2555166, asHtml: true});

Misc

anilist.query.markdown

MarkdownQuery parses AniList markdown into HTML. Returns the rendered HTML string.

Signature

TypeScript
markdown(variables: MarkdownVariables, options?: RequestOptions): Promise<string>

Auth: Not required — public data. Pass a token for viewer-scoped fields.

NameTypeRequiredDescription
markdownstringyesa string representing the Markdown text to be converted.

See the TypeDoc page for the full string shape.

  • AniLinkApiError — non-success AniList HTTP response
  • AniLinkGraphQLError — HTTP 200 response carrying GraphQL errors
  • AniLinkNetworkError — timeout, cancellation, or transport failure

Example

TypeScript
await aniLink.anilist.query.markdown({markdown: 'Hello, world!'});

AniLink — typed AniList & MyAnimeList client for TypeScript.