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
user(variables: UserVariables, options?: RequestOptions): Promise<UserResponse>Auth: Not required — public data. Pass a token for viewer-scoped fields.
| Name | Type | Required | Description |
|---|---|---|---|
id | number | no | a number representing the id of the user. |
name | string | no | a string representing the name of the user. |
isModerator | boolean | no | a boolean indicating whether the user is a moderator. |
search | string | no | a string representing the search term. |
sort | UserSort[] | no | an array of strings representing the sort order of the user. |
asHtml | boolean | no | a boolean indicating whether to return the result as HTML. |
animeStatLimit | number | no | a number representing the limit for anime statistics. |
mangaStatLimit | number | no | a number representing the limit for manga statistics. |
animeStatSort | UserStatisticSort[] | no | an array of strings representing the sort order of the anime statistics. |
mangaStatSort | UserStatisticSort[] | no | an array of strings representing the sort order of the manga statistics. |
| Field | Type | Description |
|---|---|---|
id | number | The id of the user |
name | string | The name of the user |
about | string | The bio written by user (Markdown) |
large | string | The avatar of user at its largest size |
medium | string | The avatar of user at medium size |
bannerImage | string | The user's banner images |
isFollowing | boolean | If the authenticated user if following this user |
isFollower | boolean | If this user if following the authenticated user |
isBlocked | boolean | If the user is blocked by the authenticated user |
bans | string[] | List of active bans. Mod-only |
titleLanguage | UserTitleLanguage | The language the user wants to see media titles in |
displayAdultContent | boolean | Whether the user has enabled viewing of 18+ content |
airingNotifications | boolean | Whether the user receives notifications when a show they are watching aires |
profileColor | string | Profile highlight color (blue, purple, pink, orange, red, green, gray) |
type | NotificationType | The type of notification |
enabled | boolean | Whether this type of notification is enabled |
timezone | string | The user's timezone offset (Auth user only) |
activityMergeTime | number | Minutes between activity for them to be merged together. 0 is Never, Above 2 weeks (20160 mins) is Always. |
staffNameLanguage | UserStaffNameLanguage | The language the user wants to see staff and character names in |
restrictMessagesToFollowing | boolean | Whether the user only allow messages from users they follow |
disabled | boolean | a boolean value representing the disabled. |
type | NotificationType | a NotificationType value representing the type. |
scoreFormat | ScoreFormat | The score format the user is using for media lists |
rowOrder | string | The default order list rows should be displayed in |
sectionOrder | string[] | The order each list should be displayed in |
splitCompletedSectionByFormat | boolean | If the completed sections of the list should be separated by format |
customLists | string[] | The names of the user's custom lists |
advancedScoring | string[] | The names of the user's advanced scoring sections |
advancedScoringEnabled | boolean | If advanced scoring is enabled |
sectionOrder | string[] | The order each list should be displayed in |
splitCompletedSectionByFormat | boolean | If the completed sections of the list should be separated by format |
customLists | string[] | The names of the user's custom lists |
advancedScoring | string[] | The names of the user's advanced scoring sections |
advancedScoringEnabled | boolean | If advanced scoring is enabled |
id | number | The id of the media |
romaji | string | The romanization of the native language title |
english | string | The official english title |
native | string | Official title in it's native language |
userPreferred | string | The currently authenticated users preferred title language. Default romaji for non-authenticated |
id | number | The id of the media |
romaji | string | The romanization of the native language title |
english | string | The official english title |
native | string | Official title in it's native language |
userPreferred | string | The currently authenticated users preferred title language. Default romaji for non-authenticated |
id | number | The id of the media |
romaji | string | The romanization of the native language title |
english | string | The official english title |
native | string | Official title in it's native language |
userPreferred | string | The currently authenticated users preferred title language. Default romaji for non-authenticated |
id | number | The id of the media |
romaji | string | The romanization of the native language title |
english | string | The official english title |
native | string | Official title in it's native language |
userPreferred | string | The currently authenticated users preferred title language. Default romaji for non-authenticated |
characters | unknown[] | Favourite characters |
staff | unknown[] | Favourite staff |
studios | unknown[] | Favourite studios |
statistics | Statistics | The users anime & manga list statistics |
stats | UserStats | The user's statistics |
unreadNotificationCount | number | The number of unread notifications the user has |
siteUrl | string | The url for the user page on the AniList website |
donatorTier | number | The donation tier of the user |
donatorBadge | string | Custom donation badge text |
moderatorRoles | string[] | The user's moderator roles if they are a site moderator |
createdAt | number | When the user's account was created. (Does not exist for accounts created before 2020) |
updatedAt | number | When the user's data was last updated |
name | string | A previous name of the user. |
createdAt | number | When the user first changed from this name. |
updatedAt | number | When the user most recently changed from this name. |
AniLinkApiError— non-success AniList HTTP responseAniLinkGraphQLError— HTTP 200 response carrying GraphQL errorsAniLinkNetworkError— timeout, cancellation, or transport failure
Example
await aniLink.anilist.query.user({id: 542244, asHtml: true});anilist.query.viewer
ViewerQuery fetches the currently authenticated user. Returns a UserResponse.
Signature
viewer(variables: UserVariables, options?: RequestOptions): Promise<UserResponse>Auth: Not required — public data. Pass a token for viewer-scoped fields.
| Name | Type | Required | Description |
|---|---|---|---|
id | number | no | a number representing the id of the user. |
name | string | no | a string representing the name of the user. |
isModerator | boolean | no | a boolean indicating whether the user is a moderator. |
search | string | no | a string representing the search term. |
sort | UserSort[] | no | an array of strings representing the sort order of the user. |
asHtml | boolean | no | a boolean indicating whether to return the result as HTML. |
animeStatLimit | number | no | a number representing the limit for anime statistics. |
mangaStatLimit | number | no | a number representing the limit for manga statistics. |
animeStatSort | UserStatisticSort[] | no | an array of strings representing the sort order of the anime statistics. |
mangaStatSort | UserStatisticSort[] | no | an array of strings representing the sort order of the manga statistics. |
| Field | Type | Description |
|---|---|---|
id | number | The id of the user |
name | string | The name of the user |
about | string | The bio written by user (Markdown) |
large | string | The avatar of user at its largest size |
medium | string | The avatar of user at medium size |
bannerImage | string | The user's banner images |
isFollowing | boolean | If the authenticated user if following this user |
isFollower | boolean | If this user if following the authenticated user |
isBlocked | boolean | If the user is blocked by the authenticated user |
bans | string[] | List of active bans. Mod-only |
titleLanguage | UserTitleLanguage | The language the user wants to see media titles in |
displayAdultContent | boolean | Whether the user has enabled viewing of 18+ content |
airingNotifications | boolean | Whether the user receives notifications when a show they are watching aires |
profileColor | string | Profile highlight color (blue, purple, pink, orange, red, green, gray) |
type | NotificationType | The type of notification |
enabled | boolean | Whether this type of notification is enabled |
timezone | string | The user's timezone offset (Auth user only) |
activityMergeTime | number | Minutes between activity for them to be merged together. 0 is Never, Above 2 weeks (20160 mins) is Always. |
staffNameLanguage | UserStaffNameLanguage | The language the user wants to see staff and character names in |
restrictMessagesToFollowing | boolean | Whether the user only allow messages from users they follow |
disabled | boolean | a boolean value representing the disabled. |
type | NotificationType | a NotificationType value representing the type. |
scoreFormat | ScoreFormat | The score format the user is using for media lists |
rowOrder | string | The default order list rows should be displayed in |
sectionOrder | string[] | The order each list should be displayed in |
splitCompletedSectionByFormat | boolean | If the completed sections of the list should be separated by format |
customLists | string[] | The names of the user's custom lists |
advancedScoring | string[] | The names of the user's advanced scoring sections |
advancedScoringEnabled | boolean | If advanced scoring is enabled |
sectionOrder | string[] | The order each list should be displayed in |
splitCompletedSectionByFormat | boolean | If the completed sections of the list should be separated by format |
customLists | string[] | The names of the user's custom lists |
advancedScoring | string[] | The names of the user's advanced scoring sections |
advancedScoringEnabled | boolean | If advanced scoring is enabled |
id | number | The id of the media |
romaji | string | The romanization of the native language title |
english | string | The official english title |
native | string | Official title in it's native language |
userPreferred | string | The currently authenticated users preferred title language. Default romaji for non-authenticated |
id | number | The id of the media |
romaji | string | The romanization of the native language title |
english | string | The official english title |
native | string | Official title in it's native language |
userPreferred | string | The currently authenticated users preferred title language. Default romaji for non-authenticated |
id | number | The id of the media |
romaji | string | The romanization of the native language title |
english | string | The official english title |
native | string | Official title in it's native language |
userPreferred | string | The currently authenticated users preferred title language. Default romaji for non-authenticated |
id | number | The id of the media |
romaji | string | The romanization of the native language title |
english | string | The official english title |
native | string | Official title in it's native language |
userPreferred | string | The currently authenticated users preferred title language. Default romaji for non-authenticated |
characters | unknown[] | Favourite characters |
staff | unknown[] | Favourite staff |
studios | unknown[] | Favourite studios |
statistics | Statistics | The users anime & manga list statistics |
stats | UserStats | The user's statistics |
unreadNotificationCount | number | The number of unread notifications the user has |
siteUrl | string | The url for the user page on the AniList website |
donatorTier | number | The donation tier of the user |
donatorBadge | string | Custom donation badge text |
moderatorRoles | string[] | The user's moderator roles if they are a site moderator |
createdAt | number | When the user's account was created. (Does not exist for accounts created before 2020) |
updatedAt | number | When the user's data was last updated |
name | string | A previous name of the user. |
createdAt | number | When the user first changed from this name. |
updatedAt | number | When the user most recently changed from this name. |
AniLinkApiError— non-success AniList HTTP responseAniLinkGraphQLError— HTTP 200 response carrying GraphQL errorsAniLinkNetworkError— timeout, cancellation, or transport failure
Example
await aniLink.anilist.query.viewer({asHtml: true});anilist.query.following
FollowingQuery fetches a single user that the given userId follows. Returns a UserResponse.
Signature
following(variables: FollowingVariables, options?: RequestOptions): Promise<UserResponse>Auth: Not required — public data. Pass a token for viewer-scoped fields.
| Name | Type | Required | Description |
|---|---|---|---|
userId | number | yes | a number representing the id of the user. |
sort | UserSort | no | a string representing the sort order. |
asHtml | boolean | no | a boolean representing whether the response text is returned as HTML. |
animeStatLimit | number | no | a number representing the limit for anime statistics. |
mangaStatLimit | number | no | a number representing the limit for manga statistics. |
animeStatSort | UserStatisticSort[] | no | an array of strings representing the sort order for anime statistics. |
mangaStatSort | UserStatisticSort[] | no | an array of strings representing the sort order for manga statistics. |
| Field | Type | Description |
|---|---|---|
id | number | The id of the user |
name | string | The name of the user |
about | string | The bio written by user (Markdown) |
large | string | The avatar of user at its largest size |
medium | string | The avatar of user at medium size |
bannerImage | string | The user's banner images |
isFollowing | boolean | If the authenticated user if following this user |
isFollower | boolean | If this user if following the authenticated user |
isBlocked | boolean | If the user is blocked by the authenticated user |
bans | string[] | List of active bans. Mod-only |
titleLanguage | UserTitleLanguage | The language the user wants to see media titles in |
displayAdultContent | boolean | Whether the user has enabled viewing of 18+ content |
airingNotifications | boolean | Whether the user receives notifications when a show they are watching aires |
profileColor | string | Profile highlight color (blue, purple, pink, orange, red, green, gray) |
type | NotificationType | The type of notification |
enabled | boolean | Whether this type of notification is enabled |
timezone | string | The user's timezone offset (Auth user only) |
activityMergeTime | number | Minutes between activity for them to be merged together. 0 is Never, Above 2 weeks (20160 mins) is Always. |
staffNameLanguage | UserStaffNameLanguage | The language the user wants to see staff and character names in |
restrictMessagesToFollowing | boolean | Whether the user only allow messages from users they follow |
disabled | boolean | a boolean value representing the disabled. |
type | NotificationType | a NotificationType value representing the type. |
scoreFormat | ScoreFormat | The score format the user is using for media lists |
rowOrder | string | The default order list rows should be displayed in |
sectionOrder | string[] | The order each list should be displayed in |
splitCompletedSectionByFormat | boolean | If the completed sections of the list should be separated by format |
customLists | string[] | The names of the user's custom lists |
advancedScoring | string[] | The names of the user's advanced scoring sections |
advancedScoringEnabled | boolean | If advanced scoring is enabled |
sectionOrder | string[] | The order each list should be displayed in |
splitCompletedSectionByFormat | boolean | If the completed sections of the list should be separated by format |
customLists | string[] | The names of the user's custom lists |
advancedScoring | string[] | The names of the user's advanced scoring sections |
advancedScoringEnabled | boolean | If advanced scoring is enabled |
id | number | The id of the media |
romaji | string | The romanization of the native language title |
english | string | The official english title |
native | string | Official title in it's native language |
userPreferred | string | The currently authenticated users preferred title language. Default romaji for non-authenticated |
id | number | The id of the media |
romaji | string | The romanization of the native language title |
english | string | The official english title |
native | string | Official title in it's native language |
userPreferred | string | The currently authenticated users preferred title language. Default romaji for non-authenticated |
id | number | The id of the media |
romaji | string | The romanization of the native language title |
english | string | The official english title |
native | string | Official title in it's native language |
userPreferred | string | The currently authenticated users preferred title language. Default romaji for non-authenticated |
id | number | The id of the media |
romaji | string | The romanization of the native language title |
english | string | The official english title |
native | string | Official title in it's native language |
userPreferred | string | The currently authenticated users preferred title language. Default romaji for non-authenticated |
characters | unknown[] | Favourite characters |
staff | unknown[] | Favourite staff |
studios | unknown[] | Favourite studios |
statistics | Statistics | The users anime & manga list statistics |
stats | UserStats | The user's statistics |
unreadNotificationCount | number | The number of unread notifications the user has |
siteUrl | string | The url for the user page on the AniList website |
donatorTier | number | The donation tier of the user |
donatorBadge | string | Custom donation badge text |
moderatorRoles | string[] | The user's moderator roles if they are a site moderator |
createdAt | number | When the user's account was created. (Does not exist for accounts created before 2020) |
updatedAt | number | When the user's data was last updated |
name | string | A previous name of the user. |
createdAt | number | When the user first changed from this name. |
updatedAt | number | When the user most recently changed from this name. |
AniLinkApiError— non-success AniList HTTP responseAniLinkGraphQLError— HTTP 200 response carrying GraphQL errorsAniLinkNetworkError— timeout, cancellation, or transport failure
Example
await aniLink.anilist.query.following({userId: 542244});anilist.query.follower
FollowerQuery fetches a single follower of the given userId. Returns a UserResponse.
Signature
follower(variables: FollowerVariables, options?: RequestOptions): Promise<UserResponse>Auth: Not required — public data. Pass a token for viewer-scoped fields.
| Name | Type | Required | Description |
|---|---|---|---|
userId | number | yes | a number representing the id of the user. |
sort | UserSort | no | a string representing the sort order. |
asHtml | boolean | no | a boolean representing whether the response text is returned as HTML. |
animeStatLimit | number | no | a number representing the limit for anime statistics. |
mangaStatLimit | number | no | a number representing the limit for manga statistics. |
animeStatSort | UserStatisticSort[] | no | an array of strings representing the sort order for anime statistics. |
mangaStatSort | UserStatisticSort[] | no | an array of strings representing the sort order for manga statistics. |
| Field | Type | Description |
|---|---|---|
id | number | The id of the user |
name | string | The name of the user |
about | string | The bio written by user (Markdown) |
large | string | The avatar of user at its largest size |
medium | string | The avatar of user at medium size |
bannerImage | string | The user's banner images |
isFollowing | boolean | If the authenticated user if following this user |
isFollower | boolean | If this user if following the authenticated user |
isBlocked | boolean | If the user is blocked by the authenticated user |
bans | string[] | List of active bans. Mod-only |
titleLanguage | UserTitleLanguage | The language the user wants to see media titles in |
displayAdultContent | boolean | Whether the user has enabled viewing of 18+ content |
airingNotifications | boolean | Whether the user receives notifications when a show they are watching aires |
profileColor | string | Profile highlight color (blue, purple, pink, orange, red, green, gray) |
type | NotificationType | The type of notification |
enabled | boolean | Whether this type of notification is enabled |
timezone | string | The user's timezone offset (Auth user only) |
activityMergeTime | number | Minutes between activity for them to be merged together. 0 is Never, Above 2 weeks (20160 mins) is Always. |
staffNameLanguage | UserStaffNameLanguage | The language the user wants to see staff and character names in |
restrictMessagesToFollowing | boolean | Whether the user only allow messages from users they follow |
disabled | boolean | a boolean value representing the disabled. |
type | NotificationType | a NotificationType value representing the type. |
scoreFormat | ScoreFormat | The score format the user is using for media lists |
rowOrder | string | The default order list rows should be displayed in |
sectionOrder | string[] | The order each list should be displayed in |
splitCompletedSectionByFormat | boolean | If the completed sections of the list should be separated by format |
customLists | string[] | The names of the user's custom lists |
advancedScoring | string[] | The names of the user's advanced scoring sections |
advancedScoringEnabled | boolean | If advanced scoring is enabled |
sectionOrder | string[] | The order each list should be displayed in |
splitCompletedSectionByFormat | boolean | If the completed sections of the list should be separated by format |
customLists | string[] | The names of the user's custom lists |
advancedScoring | string[] | The names of the user's advanced scoring sections |
advancedScoringEnabled | boolean | If advanced scoring is enabled |
id | number | The id of the media |
romaji | string | The romanization of the native language title |
english | string | The official english title |
native | string | Official title in it's native language |
userPreferred | string | The currently authenticated users preferred title language. Default romaji for non-authenticated |
id | number | The id of the media |
romaji | string | The romanization of the native language title |
english | string | The official english title |
native | string | Official title in it's native language |
userPreferred | string | The currently authenticated users preferred title language. Default romaji for non-authenticated |
id | number | The id of the media |
romaji | string | The romanization of the native language title |
english | string | The official english title |
native | string | Official title in it's native language |
userPreferred | string | The currently authenticated users preferred title language. Default romaji for non-authenticated |
id | number | The id of the media |
romaji | string | The romanization of the native language title |
english | string | The official english title |
native | string | Official title in it's native language |
userPreferred | string | The currently authenticated users preferred title language. Default romaji for non-authenticated |
characters | unknown[] | Favourite characters |
staff | unknown[] | Favourite staff |
studios | unknown[] | Favourite studios |
statistics | Statistics | The users anime & manga list statistics |
stats | UserStats | The user's statistics |
unreadNotificationCount | number | The number of unread notifications the user has |
siteUrl | string | The url for the user page on the AniList website |
donatorTier | number | The donation tier of the user |
donatorBadge | string | Custom donation badge text |
moderatorRoles | string[] | The user's moderator roles if they are a site moderator |
createdAt | number | When the user's account was created. (Does not exist for accounts created before 2020) |
updatedAt | number | When the user's data was last updated |
name | string | A previous name of the user. |
createdAt | number | When the user first changed from this name. |
updatedAt | number | When the user most recently changed from this name. |
AniLinkApiError— non-success AniList HTTP responseAniLinkGraphQLError— HTTP 200 response carrying GraphQL errorsAniLinkNetworkError— timeout, cancellation, or transport failure
Example
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
media(variables: MediaVariables, options?: RequestOptions): Promise<MediaResponse>Auth: Not required — public data. Pass a token for viewer-scoped fields.
| Name | Type | Required | Description |
|---|---|---|---|
id | number | no | a number representing the id of the media. |
idMal | number | no | a number representing the MyAnimeList id of the media. |
startDate | FuzzyDateInput | no | a number representing the start date of the media. |
endDate | FuzzyDateInput | no | a number representing the end date of the media. |
season | MediaSeason | no | a string representing the season of the media. |
seasonYear | number | no | a number representing the year of the season of the media. |
type | MediaType | no | a string representing the type of the media. It can be either 'ANIME' or 'MANGA'. |
format | MediaFormat | no | a string representing the format of the media. |
status | MediaStatus | no | a string representing the status of the media. |
episodes | number | no | a number representing the number of episodes of the media. |
duration | number | no | a number representing the duration of the media. |
chapters | number | no | a number representing the number of chapters of the media. |
volumes | number | no | a number representing the number of volumes of the media. |
isAdult | boolean | no | a boolean representing whether the media is for adults. |
genre | string | no | a string representing the genre of the media. |
tag | string | no | a string representing the tag of the media. |
minimumTagRank | number | no | a number representing the minimum tag rank of the media. |
tagCategory | string | no | a string representing the category of the tag of the media. |
onList | boolean | no | a boolean representing whether the media is on the list. |
licensedBy | string | no | a string representing who licensed the media. |
licensedById | number | no | a number representing the id of who licensed the media. |
averageScore | number | no | a number representing the average score of the media. |
popularity | number | no | a number representing the popularity of the media. |
source | MediaSource | no | a string representing the source of the media. |
countryOfOrigin | string | no | a string representing the country of origin of the media. |
isLicensed | boolean | no | a boolean representing whether the media is licensed. |
search | string | no | a string representing the search query for the media. |
id_not | number | no | a number representing the id of the media that should not be included. |
id_in | number[] | no | an array of numbers representing the ids of the media that should be included. |
id_not_in | number[] | no | an array of numbers representing the ids of the media that should not be included. |
idMal_not | number | no | a number representing the MyAnimeList id of the media that should not be included. |
idMal_in | number[] | no | an array of numbers representing the MyAnimeList ids of the media that should be included. |
idMal_not_in | number[] | no | an array of numbers representing the MyAnimeList ids of the media that should not be included. |
startDate_greater | number | no | a number representing the start date of the media that should be greater. |
startDate_lesser | number | no | a number representing the start date of the media that should be lesser. |
startDate_like | string | no | a string representing the start date of the media that should be like. |
endDate_greater | number | no | a number representing the end date of the media that should be greater. |
endDate_lesser | number | no | a number representing the end date of the media that should be lesser. |
endDate_like | string | no | a string representing the end date of the media that should be like. |
format_in | MediaFormat[] | no | an array of strings representing the formats of the media that should be included. |
format_not | MediaFormat | no | a string representing the format of the media that should not be included. |
format_not_in | MediaFormat[] | no | an array of strings representing the formats of the media that should not be included. |
status_in | MediaStatus[] | no | an array of strings representing the statuses of the media that should be included. |
status_not | MediaStatus | no | a string representing the status of the media that should not be included. |
status_not_in | MediaStatus[] | no | an array of strings representing the statuses of the media that should not be included. |
episodes_greater | number | no | a number representing the number of episodes of the media that should be greater. |
episodes_lesser | number | no | a number representing the number of episodes of the media that should be lesser. |
duration_greater | number | no | a number representing the duration of the media that should be greater. |
duration_lesser | number | no | a number representing the duration of the media that should be lesser. |
chapters_greater | number | no | a number representing the number of chapters of the media that should be greater. |
chapters_lesser | number | no | a number representing the number of chapters of the media that should be lesser. |
volumes_greater | number | no | a number representing the number of volumes of the media that should be greater. |
volumes_lesser | number | no | a number representing the number of volumes of the media that should be lesser. |
genre_in | string[] | no | an array of strings representing the genres of the media that should be included. |
genre_not_in | string[] | no | an array of strings representing the genres of the media that should not be included. |
tag_in | string[] | no | an array of strings representing the tags of the media that should be included. |
tag_not_in | string[] | no | an array of strings representing the tags of the media that should not be included. |
tagCategory_in | string[] | no | an array of strings representing the categories of the tags of the media that should be included. |
tagCategory_not_in | string[] | no | an array of strings representing the categories of the tags of the media that should not be included. |
licensedBy_in | string[] | no | an array of strings representing who licensed the media that should be included. |
licensedById_in | number[] | no | an array of numbers representing the ids of who licensed the media that should be included. |
averageScore_not | number | no | a number representing the average score of the media that should not be included. |
averageScore_greater | number | no | a number representing the average score of the media that should be greater. |
averageScore_lesser | number | no | a number representing the average score of the media that should be lesser. |
popularity_not | number | no | a number representing the popularity of the media that should not be included. |
popularity_greater | number | no | a number representing the popularity of the media that should be greater. |
popularity_lesser | number | no | a number representing the popularity of the media that should be lesser. |
source_in | MediaSource[] | no | an array of strings representing the sources of the media that should be included. |
sort | MediaSort[] | no | an array of strings representing the sorting of the media. |
asHtml | boolean | no | a boolean representing whether the media should be returned as HTML. |
| Field | Type | Description |
|---|---|---|
id | number | The id of the media |
idMal | number | The mal id of the media |
title | Title | The official titles of the media in various languages |
type | MediaType | The type of the media; anime or manga |
format | MediaFormat | The format the media was released in |
status | MediaStatus | The current releasing status of the media |
description | string | Short description of the media's story and characters |
startDate | FuzzyDate | The first official release date of the media |
endDate | FuzzyDate | The last official release date of the media |
season | MediaSeason | The season the media was initially released in |
seasonYear | number | The season year the media was initially released in |
seasonInt | number | The year & season the media was initially released in |
episodes | number | The amount of episodes the anime has when complete |
duration | number | The general length of each anime episode in minutes |
chapters | number | The amount of chapters the manga has when complete |
volumes | number | The amount of volumes the manga has when complete |
countryOfOrigin | string | Where the media was created. (ISO 3166-1 alpha-2) |
isLicensed | boolean | If the media is officially licensed or a self-published doujin release |
source | MediaSource | Source type the media was adapted from. |
hashtag | string | Official Twitter hashtags for the media |
trailer | Trailer | Media trailer or advertisement |
updatedAt | number | When the media's data was last updated |
coverImage | CoverImage | The cover images of the media |
bannerImage | string | The banner image of the media |
genres | string[] | The genres of the media |
synonyms | string[] | Alternative titles of the media |
averageScore | number | A weighted average score of all the user's scores of the media |
meanScore | number | Mean score of all the user's scores of the media |
popularity | number | The number of users with the media on their list |
isLocked | boolean | Locked media may not be added to lists our favorited. This may be due to the entry pending for deletion or other reasons. |
trending | number | The amount of related activity in the past hour |
favourites | number | The amount of user's who have favourited the media |
tags | Tag[] | List of tags that describes elements and themes of the media |
id | number | The id of the connection |
relationType | string | The type of relation to the parent model |
isMainStudio | boolean | If the studio is the main animation studio of the media (For Studio->MediaConnection field only) |
id | number | The id of the character |
first | string | The character's given name |
last | string | The character's surname |
full | string | The character's first and last name |
native | string | The character's full name in their native language |
large | string | The character's image of media at its largest size |
medium | string | The character's image of media at medium size |
description | string | A general description of the character |
gender | string | The character's gender. Usually Male, Female, or Non-binary but can be any string. |
dateOfBirth | FuzzyDate | The character's birth date |
age | string | The character's age. Note this is a string, not an int, it may contain further text and additional ages. |
bloodType | string | The characters blood type |
isFavourite | boolean | If the character is marked as favourite by the currently authenticated user |
isFavouriteBlocked | boolean | If the character is blocked from being added to favourites |
siteUrl | string | The url for the character page on the AniList website |
favourites | number | The amount of user's who have favourited the character |
modNotes | string | Notes for site moderators |
characterRole | string | The characters role in the media |
characterName | string | Media specific character name |
roleNotes | string | Notes regarding the VA's role for the character |
dubGroup | string | Used for grouping roles where multiple dubs exist for the same language. Either dubbing company name or language variant. |
staffRole | string | The role of the staff member in the production of the media |
id | number | The id of the media |
romaji | string | The romanization of the native language title |
english | string | The official english title |
native | string | Official title in it's native language |
userPreferred | string | The currently authenticated users preferred title language. Default romaji for non-authenticated |
id | number | The id of the connection |
role | string | The characters role in the media |
name | string | Media specific character name |
id | number | The id of the staff member |
first | string | The person's given name |
last | string | The person's surname |
full | string | The person's first and last name |
native | string | The person's full name in their native language |
large | string | The person's image of media at its largest size |
medium | string | The person's image of media at medium size |
id | number | The id of the media |
romaji | string | The romanization of the native language title |
english | string | The official english title |
native | string | Official title in it's native language |
userPreferred | string | The currently authenticated users preferred title language. Default romaji for non-authenticated |
extraLarge | string | The cover image url of the media at its largest size. If this size isn't available, large will be provided instead. |
large | string | The cover image url of the media at a large size |
medium | string | The cover image url of the media at medium size |
color | string | Average #hex color of cover image |
favouriteOrder | number | The order the character should be displayed from the users favourites |
id | number | The id of the character |
first | string | The character's given name |
last | string | The character's surname |
full | string | The character's first and last name |
native | string | The character's full name in their native language |
large | string | The character's image of media at its largest size |
medium | string | The character's image of media at medium size |
id | number | The id of the connection |
role | string | The role of the staff member in the production of the media |
favouriteOrder | number | The order the staff should be displayed from the users favourites |
id | number | The id of the staff member |
first | string | The person's given name |
last | string | The person's surname |
full | string | The person's first and last name |
native | string | The person's full name in their native language |
large | string | The person's image of media at its largest size |
medium | string | The person's image of media at medium size |
id | number | The id of the connection |
isMain | boolean | If the studio is the main animation studio of the anime |
favouriteOrder | number | The order the character should be displayed from the users favourites |
id | number | The id of the studio |
name | string | The name of the studio |
isAnimationStudio | boolean | If the studio is an animation studio or a different kind of company |
siteUrl | string | The url for the studio page on the AniList website |
isFavourite | boolean | If the media is marked as favourite by the current authenticated user |
isAdult | boolean | If the media is intended only for 18+ adult audiences |
nextAiringEpisode | NextAiringEpisode | The media's next episode airing schedule |
externalLinks | ExternalLink[] | External links to another site related to the media |
streamingEpisodes | StreamingEpisode[] | Data and links to legal streaming episodes on external sites |
rankings | Ranking[] | The ranking of the media in a particular time span and format compared to other media |
mediaListEntry | MediaListEntry | The authenticated user's media list entry for the media |
stats | MediaStats | an instance of `MediaStats` representing the stats. |
siteUrl | string | The url for the media page on the AniList website |
autoCreateForumThread | boolean | If the media should have forum thread automatically created for it on airing episode release |
isRecommendationBlocked | boolean | If the media is blocked from being recommended to/from |
modNotes | string | Notes for site moderators |
AniLinkApiError— non-success AniList HTTP responseAniLinkGraphQLError— HTTP 200 response carrying GraphQL errorsAniLinkNetworkError— timeout, cancellation, or transport failure
Example
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
mediaTrend(variables: MediaTrendVariables, options?: RequestOptions): Promise<MediaTrendResponse>Auth: Not required — public data. Pass a token for viewer-scoped fields.
| Name | Type | Required | Description |
|---|---|---|---|
mediaId | number | no | a number representing the id of the media. |
date | number | no | a number representing the date of the media trend. |
trending | number | no | a number representing the trending status of the media. |
averageScore | number | no | a number representing the average score of the media. |
popularity | number | no | a number representing the popularity of the media. |
episode | number | no | a number representing the episode of the media. |
releasing | boolean | no | a boolean indicating whether the media is releasing. |
mediaId_not | number | no | a number representing the id of the media not included. |
mediaId_in | number[] | no | an array of numbers representing the ids of the media included. |
mediaId_not_in | number[] | no | an array of numbers representing the ids of the media not included. |
date_greater | number | no | a number representing the date greater than the media trend. |
date_lesser | number | no | a number representing the date lesser than the media trend. |
trending_greater | number | no | a number representing the trending status greater than the media. |
trending_lesser | number | no | a number representing the trending status lesser than the media. |
trending_not | number | no | a number representing the trending status not included in the media. |
averageScore_greater | number | no | a number representing the average score greater than the media. |
averageScore_lesser | number | no | a number representing the average score lesser than the media. |
averageScore_not | number | no | a number representing the average score not included in the media. |
popularity_greater | number | no | a number representing the popularity greater than the media. |
popularity_lesser | number | no | a number representing the popularity lesser than the media. |
popularity_not | number | no | a number representing the popularity not included in the media. |
episode_greater | number | no | a number representing the episode number greater than the media. |
episode_lesser | number | no | a number representing the episode number lesser than the media. |
episode_not | number | no | a number representing the episode number not included in the media. |
sort | MediaTrendSort[] | no | an array of strings representing the sort order of the media. |
asHtml | boolean | no | a boolean indicating whether to return the result as HTML. |
| Field | Type | Description |
|---|---|---|
mediaId | number | The id of the tag |
date | number | The day the data was recorded (timestamp) |
trending | number | The amount of media activity on the day |
averageScore | number | A weighted average score of all the user's scores of the media |
popularity | number | The number of users with the media on their list |
inProgress | number | The number of users with watching/reading the media |
releasing | boolean | If the media was being released at this time |
episode | number | The episode number of the anime released on this day |
media | Media | The related media |
AniLinkApiError— non-success AniList HTTP responseAniLinkGraphQLError— HTTP 200 response carrying GraphQL errorsAniLinkNetworkError— timeout, cancellation, or transport failure
Example
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
airingSchedule(variables: AiringScheduleVariables, options?: RequestOptions): Promise<AiringScheduleResponse>Auth: Not required — public data. Pass a token for viewer-scoped fields.
| Name | Type | Required | Description |
|---|---|---|---|
id | number | no | a number representing the id of the airing schedule. |
mediaId | number | no | a number representing the id of the media. |
episode | number | no | a number representing the episode number. |
airingAt | number | no | a number representing the airing time. |
notYetAired | boolean | no | a boolean representing whether the episode has not yet aired. |
id_not | number | no | a number representing the id of the airing schedule that should not be included. |
id_in | number[] | no | an array of numbers representing the ids of the airing schedules that should be included. |
id_not_in | number[] | no | an array of numbers representing the ids of the airing schedules that should not be included. |
mediaId_not | number | no | a number representing the id of the media that should not be included. |
mediaId_in | number[] | no | an array of numbers representing the ids of the media that should be included. |
mediaId_not_in | number[] | no | an array of numbers representing the ids of the media that should not be included. |
episode_not | number | no | a number representing the episode number that should not be included. |
episode_in | number[] | no | an array of numbers representing the episode numbers that should be included. |
episode_not_in | number[] | no | an array of numbers representing the episode numbers that should not be included. |
episode_greater | number | no | a number representing the minimum episode number. |
episode_lesser | number | no | a number representing the maximum episode number. |
airingAt_greater | number | no | a number representing the minimum airing time. |
airingAt_lesser | number | no | a number representing the maximum airing time. |
sort | AiringSort[] | no | an array of strings representing the sort order. |
asHtml | boolean | no | a boolean representing whether to return the result as HTML. |
| Field | Type | Description |
|---|---|---|
id | number | The id of the airing schedule item |
airingAt | number | The time the episode airs at |
timeUntilAiring | number | Seconds until episode starts airing |
episode | number | The airing episode number |
mediaId | number | The associate media id of the airing episode |
media | Media | The associate media of the airing episode |
AniLinkApiError— non-success AniList HTTP responseAniLinkGraphQLError— HTTP 200 response carrying GraphQL errorsAniLinkNetworkError— timeout, cancellation, or transport failure
Example
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
mediaList(variables: MediaListVariables, options?: RequestOptions): Promise<MediaListResponse>Auth: Not required — public data. Pass a token for viewer-scoped fields.
| Name | Type | Required | Description |
|---|---|---|---|
id | number | no | a number representing the id of the media list. |
userId | number | no | a number representing the id of the user. |
userName | string | no | a string representing the name of the user. |
type | MediaType | no | a string representing the type of the media. |
status | MediaListStatus | no | a string representing the status of the media. |
mediaId | number | no | a number representing the id of the media. |
isFollowing | boolean | no | a boolean indicating whether the user is following the media. |
notes | string | no | a string representing any notes about the media. |
startedAt | FuzzyDateInput | no | a number representing the start date of the media. |
completedAt | FuzzyDateInput | no | a number representing the completion date of the media. |
compareWithAuthList | boolean | no | a boolean indicating whether to compare with the authenticated list. |
userId_in | number[] | no | an array of numbers representing the ids of the users. |
status_in | MediaListStatus[] | no | an array of strings representing the statuses of the media. |
status_not_in | MediaListStatus[] | no | an array of strings representing the statuses not included in the media. |
status_not | MediaListStatus | no | a string representing the status not included in the media. |
mediaId_in | number[] | no | an array of numbers representing the ids of the media. |
mediaId_not_in | number[] | no | an array of numbers representing the ids not included in the media. |
notes_like | string | no | a string representing the notes similar to the media. |
startedAt_greater | FuzzyDateInput | no | a number representing the start date greater than the media. |
startedAt_lesser | FuzzyDateInput | no | a number representing the start date lesser than the media. |
startedAt_like | string | no | a string representing the start date similar to the media. |
completedAt_greater | FuzzyDateInput | no | a number representing the completion date greater than the media. |
completedAt_lesser | FuzzyDateInput | no | a number representing the completion date lesser than the media. |
completedAt_like | string | no | a string representing the completion date similar to the media. |
sort | MediaListSort[] | no | an array of strings representing the sort order of the media. |
scoreFormat | ScoreFormat | no | a string representing the format of the score of the media. |
asArray | boolean | no | a boolean indicating whether to return the result as an array. |
asHtml | boolean | no | a boolean indicating whether to return the result as HTML. |
| Field | Type | Description |
|---|---|---|
id | number | The id of the list entry |
userId | number | The id of the user owner of the list entry |
mediaId | number | The id of the media |
status | string | The watching/reading status |
score | number | The score of the entry |
progress | number | The amount of episodes/chapters consumed by the user |
progressVolumes | number | The amount of volumes read by the user |
repeat | number | The amount of times the user has rewatched/read the media |
priority | number | Priority of planning |
private | boolean | If the entry should only be visible to authenticated user |
notes | string | Text notes |
hiddenFromStatusLists | boolean | If the entry shown be hidden from non-custom lists |
customLists | string[] | boolean[] | Map of booleans for which custom lists the entry are in |
advancedScores | unknown | Map of advanced scores with name keys |
startedAt | FuzzyDate | When the entry was started by the user |
completedAt | FuzzyDate | When the entry was completed by the user |
updatedAt | number | When the entry data was last updated |
createdAt | number | When the entry data was created |
media | Media | an instance of `Media` representing the media. |
AniLinkApiError— non-success AniList HTTP responseAniLinkGraphQLError— HTTP 200 response carrying GraphQL errorsAniLinkNetworkError— timeout, cancellation, or transport failure
Example
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
mediaListCollection(variables: MediaListCollectionVariables, options?: RequestOptions): Promise<MediaListCollectionResponse>Auth: Not required — public data. Pass a token for viewer-scoped fields.
| Name | Type | Required | Description |
|---|---|---|---|
userId | number | no | a number representing the id of the user. |
userName | string | no | a string representing the name of the user. |
type | MediaType | yes | a string representing the type of the media. |
status | MediaListStatus | no | a string representing the status of the media. |
notes | string | no | a string representing any notes about the media. |
startedAt | FuzzyDateInput | no | a number representing the start date of the media. |
completedAt | FuzzyDateInput | no | a number representing the completion date of the media. |
forceSingleCompletedList | boolean | no | a boolean indicating whether to force a single completed list. |
chunk | number | no | a 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. |
perChunk | number | no | the number of entries to return per chunk. Pair with `chunk` to page through a large list one chunk at a time. |
status_in | MediaListStatus[] | no | an array of strings representing the statuses of the media. |
status_not_in | MediaListStatus[] | no | an array of strings representing the statuses not included in the media. |
status_not | MediaListStatus | no | a string representing the status not included in the media. |
notes_like | string | no | a string representing the notes similar to the media. |
startedAt_greater | FuzzyDateInput | no | a number representing the start date greater than the media. |
startedAt_lesser | FuzzyDateInput | no | a number representing the start date lesser than the media. |
startedAt_like | string | no | a string representing the start date similar to the media. |
completedAt_greater | FuzzyDateInput | no | a number representing the completion date greater than the media. |
completedAt_lesser | FuzzyDateInput | no | a number representing the completion date lesser than the media. |
completedAt_like | string | no | a string representing the completion date similar to the media. |
sort | MediaListSort[] | no | an array of strings representing the sort order of the media. |
scoreFormat | ScoreFormat | no | a string representing the format of the score of the media. |
asArray | boolean | no | a boolean indicating whether to return the result as an array. |
asHtml | boolean | no | a boolean indicating whether to return the result as HTML. |
| Field | Type | Description |
|---|---|---|
id | number | The id of the list entry |
userId | number | The id of the user owner of the list entry |
mediaId | number | The id of the media |
status | string | The watching/reading status |
score | number | The score of the entry |
progress | number | The amount of episodes/chapters consumed by the user |
progressVolumes | number | The amount of volumes read by the user |
repeat | number | The amount of times the user has rewatched/read the media |
priority | number | Priority of planning |
private | boolean | If the entry should only be visible to authenticated user |
notes | string | Text notes |
hiddenFromStatusLists | boolean | If the entry shown be hidden from non-custom lists |
customLists | unknown | Map of booleans for which custom lists the entry are in |
advancedScores | unknown | Map of advanced scores with name keys |
startedAt | FuzzyDate | When the entry was started by the user |
completedAt | FuzzyDate | When the entry was completed by the user |
updatedAt | number | When the entry data was last updated |
createdAt | number | When the entry data was created |
media | Media | an instance of `Media` representing the media. |
name | string | a string value representing the name. |
isCustomList | boolean | a boolean value representing the is custom list. |
isSplitCompletedList | boolean | a boolean value representing the is split completed list. |
status | string | a string value representing the status. |
hasNextChunk | boolean | If there is another chunk |
AniLinkApiError— non-success AniList HTTP responseAniLinkGraphQLError— HTTP 200 response carrying GraphQL errorsAniLinkNetworkError— timeout, cancellation, or transport failure
Example
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
character(variables: CharacterVariables, options?: RequestOptions): Promise<CharacterResponse>Auth: Not required — public data. Pass a token for viewer-scoped fields.
| Name | Type | Required | Description |
|---|---|---|---|
id | number | no | a number representing the id of the character. |
isBirthday | boolean | no | a boolean representing whether it is the character's birthday. |
search | string | no | a string representing the search term. |
id_not | number | no | a number representing the id of the character that should not be included. |
id_in | number[] | no | an array of numbers representing the ids of the characters that should be included. |
id_not_in | number[] | no | an array of numbers representing the ids of the characters that should not be included. |
sort | CharacterSort[] | no | an array of strings representing the sort order. |
asHtml | boolean | no | a boolean representing whether to return the result as HTML. |
mediaSort | MediaSort[] | no | an array of strings representing the sort order for media. |
mediaOnList | boolean | no | a boolean representing whether the media is on the list. |
mediaPage | number | no | a number representing the page number for media. |
mediaPerPage | number | no | a number representing the number of media items per page. |
| Field | Type | Description |
|---|---|---|
id | number | The id of the character |
name | Name | The names of the character |
image | Image | Character images |
description | string | A general description of the character |
gender | string | The character's gender. Usually Male, Female, or Non-binary but can be any string. |
dateOfBirth | FuzzyDate | The character's birth date |
age | string | The character's age. Note this is a string, not an int, it may contain further text and additional ages. |
bloodType | string | The characters blood type |
isFavourite | boolean | If the character is marked as favourite by the currently authenticated user |
isFavouriteBlocked | boolean | If the character is blocked from being added to favourites |
siteUrl | string | The url for the character page on the AniList website |
id | number | The id of the media |
romaji | string | The romanization of the native language title |
english | string | The official english title |
native | string | Official title in it's native language |
userPreferred | string | The currently authenticated users preferred title language. Default romaji for non-authenticated |
favourites | number | The amount of user's who have favourited the character |
modNotes | string | Notes for site moderators |
AniLinkApiError— non-success AniList HTTP responseAniLinkGraphQLError— HTTP 200 response carrying GraphQL errorsAniLinkNetworkError— timeout, cancellation, or transport failure
Example
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
staff(variables: StaffVariables, options?: RequestOptions): Promise<StaffResponse>Auth: Not required — public data. Pass a token for viewer-scoped fields.
| Name | Type | Required | Description |
|---|---|---|---|
id | number | no | a number representing the id of the staff. |
isBirthday | boolean | no | a boolean indicating whether it's the staff's birthday. |
search | string | no | a string representing the search term. |
id_not | number | no | a number representing the id not to include in the search. |
id_in | number[] | no | an array of numbers representing the ids to include in the search. |
id_not_in | number[] | no | an array of numbers representing the ids not to include in the search. |
sort | StaffSort[] | no | an array of strings representing the sort order of the staff. |
asHtml | boolean | no | a boolean indicating whether to return the result as HTML. |
staffMediaSort | MediaSort[] | no | an array of strings representing the sort order of the staff media. |
staffMediaType | MediaType | no | a string representing the type of the staff media. |
staffMediaOnList | boolean | no | a boolean indicating whether the staff media is on the list. |
staffMediaPage | number | no | a number representing the page number of the staff media. |
staffMediaPerPage | number | no | a number representing the number of staff media per page. |
charactersSort | CharacterSort[] | no | an array of strings representing the sort order of the characters. |
charactersPage | number | no | a number representing the page number of the characters. |
charactersPerPage | number | no | a number representing the number of characters per page. |
characterMediaSort | MediaSort[] | no | an array of strings representing the sort order of the character media. |
characterMediaOnList | boolean | no | a boolean indicating whether the character media is on the list. |
characterMediaPage | number | no | a number representing the page number of the character media. |
characterMediaPerPage | number | no | a number representing the number of character media per page. |
| Field | Type | Description |
|---|---|---|
id | number | The id of the staff member |
name | Name | The names of the staff member |
languageV2 | string | The 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 |
image | Image | The staff images |
description | string | A general description of the staff member |
primaryOccupations | string[] | The person's primary occupations |
gender | string | The staff's gender. Usually Male, Female, or Non-binary but can be any string. |
dateOfBirth | FuzzyDate | an instance of `FuzzyDate` representing the date of birth. |
dateOfDeath | FuzzyDate | an instance of `FuzzyDate` representing the date of death. |
age | number | The person's age in years |
yearsActive | number[] | [startYear, endYear] (If the 2nd value is not present staff is still active) |
homeTown | string | The persons birthplace or hometown |
bloodType | string | The persons blood type |
isFavourite | boolean | If the staff member is marked as favourite by the currently authenticated user |
isFavouriteBlocked | boolean | If the staff member is blocked from being added to favourites |
siteUrl | string | The url for the staff page on the AniList website |
id | number | The id of the media |
romaji | string | The romanization of the native language title |
english | string | The official english title |
native | string | Official title in it's native language |
userPreferred | string | The currently authenticated users preferred title language. Default romaji for non-authenticated |
id | number | The id of the character |
first | string | The character's given name |
last | string | The character's surname |
full | string | The character's first and last name |
native | string | The character's full name in their native language |
id | number | The id of the media |
romaji | string | The romanization of the native language title |
english | string | The official english title |
native | string | Official title in it's native language |
userPreferred | string | The currently authenticated users preferred title language. Default romaji for non-authenticated |
id | number | The id of the user |
name | string | The name of the user |
submissionStatus | number | Status of the submission |
submissionNotes | string | Inner details of submission status |
favourites | number | The amount of user's who have favourited the staff member |
modNotes | string | Notes for site moderators |
AniLinkApiError— non-success AniList HTTP responseAniLinkGraphQLError— HTTP 200 response carrying GraphQL errorsAniLinkNetworkError— timeout, cancellation, or transport failure
Example
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
notification(variables: NotificationVariables, options?: RequestOptions): Promise<NotificationResponse>Auth: Not required — public data. Pass a token for viewer-scoped fields.
| Name | Type | Required | Description |
|---|---|---|---|
type | NotificationType | no | a string representing the type of the notification. |
resetNotificationCount | boolean | no | a boolean indicating whether to reset the notification count. |
type_in | NotificationType[] | no | an array of strings representing the types of the notifications. |
asHtml | boolean | no | a boolean indicating whether to return the result as HTML. |
See the TypeDoc page for the full NotificationResponse shape.
AniLinkApiError— non-success AniList HTTP responseAniLinkGraphQLError— HTTP 200 response carrying GraphQL errorsAniLinkNetworkError— timeout, cancellation, or transport failure
Example
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
activity(variables: ActivityVariables, options?: RequestOptions): Promise<Activity>Auth: Not required — public data. Pass a token for viewer-scoped fields.
| Name | Type | Required | Description |
|---|---|---|---|
id | number | no | a number representing the id of the activity. |
userId | number | no | a number representing the id of the user. |
messengerId | number | no | a number representing the id of the messenger. |
mediaId | number | no | a number representing the id of the media. |
type | ActivityType | no | a string representing the type of the activity. |
isFollowing | boolean | no | a boolean representing whether the user is following. |
hasReplies | boolean | no | a boolean representing whether the activity has replies. |
hasRepliesOrTypeText | boolean | no | a boolean representing whether the activity has replies or type text. |
createdAt | number | no | a number representing the creation time of the activity. |
id_not | number | no | a number representing the id of the activity that should not be included. |
id_in | number[] | no | an array of numbers representing the ids of the activities that should be included. |
id_not_in | number[] | no | an array of numbers representing the ids of the activities that should not be included. |
userId_not | number | no | a number representing the id of the user that should not be included. |
userId_in | number[] | no | an array of numbers representing the ids of the users that should be included. |
userId_not_in | number[] | no | an array of numbers representing the ids of the users that should not be included. |
messengerId_not | number | no | a number representing the id of the messenger that should not be included. |
messengerId_in | number[] | no | an array of numbers representing the ids of the messengers that should be included. |
messengerId_not_in | number[] | no | an array of numbers representing the ids of the messengers that should not be included. |
mediaId_not | number | no | a number representing the id of the media that should not be included. |
mediaId_in | number[] | no | an array of numbers representing the ids of the media that should be included. |
mediaId_not_in | number[] | no | an array of numbers representing the ids of the media that should not be included. |
type_not | ActivityType | no | a string representing the type of the activity that should not be included. |
type_in | ActivityType[] | no | an array of strings representing the types of the activities that should be included. |
type_not_in | ActivityType[] | no | an array of strings representing the types of the activities that should not be included. |
createdAt_greater | number | no | a number representing the minimum creation time of the activities. |
sort | ActivitySort[] | no | an array of strings representing the sort order. |
asHtml | boolean | no | a boolean representing whether to return the result as HTML. |
See the TypeDoc page for the full Activity shape.
AniLinkApiError— non-success AniList HTTP responseAniLinkGraphQLError— HTTP 200 response carrying GraphQL errorsAniLinkNetworkError— timeout, cancellation, or transport failure
Example
await aniLink.anilist.query.activity({id: 723235883, asHtml: true});anilist.query.activityReply
ActivityReplyQuery fetches a single activity reply by id. Returns an ActivityReply.
Signature
activityReply(variables: ActivityReplyVariables, options?: RequestOptions): Promise<ActivityReply>Auth: Not required — public data. Pass a token for viewer-scoped fields.
| Name | Type | Required | Description |
|---|---|---|---|
id | number | no | a number representing the id of the activity reply. |
activityId | number | no | a number representing the id of the activity. |
asHtml | boolean | no | a boolean representing whether to return the result as HTML. |
| Field | Type | Description |
|---|---|---|
id | number | The id of the reply |
userId | number | The id of the replies creator |
activityId | number | The id of the parent activity |
text | string | The reply text |
likeCount | number | The amount of likes the reply has |
isLiked | boolean | If the currently authenticated user liked the reply |
createdAt | number | The time the reply was created at |
user | BasicUser | The user who created reply |
likes | BasicUser[] | The users who liked the reply |
AniLinkApiError— non-success AniList HTTP responseAniLinkGraphQLError— HTTP 200 response carrying GraphQL errorsAniLinkNetworkError— timeout, cancellation, or transport failure
Example
await aniLink.anilist.query.activityReply({id: 12191046, asHtml: true});Studios
anilist.query.studio
StudioQuery fetches a single studio by id. Returns a StudioResponse.
Signature
studio(variables: StudioVariables, options?: RequestOptions): Promise<StudioResponse>Auth: Not required — public data. Pass a token for viewer-scoped fields.
| Name | Type | Required | Description |
|---|---|---|---|
id | number | no | a number representing the id of the studio. |
search | string | no | a string representing the search term. |
id_not | number | no | a number representing the id not to include in the search. |
id_in | number[] | no | an array of numbers representing the ids to include in the search. |
id_not_in | number[] | no | an array of numbers representing the ids not to include in the search. |
sort | StudioSort[] | no | an array of strings representing the sort order of the studio. |
asHtml | boolean | no | a boolean indicating whether to return the result as HTML. |
mediaSort | MediaSort[] | no | an array of strings representing the sort order of the media. |
mediaIsMain | boolean | no | a boolean indicating whether the media is main. |
mediaOnList | boolean | no | a boolean indicating whether the media is on the list. |
mediaPage | number | no | a number representing the page number of the media. |
mediaPerPage | number | no | a number representing the number of media per page. |
staffMediaSort | MediaSort[] | no | an array of strings representing the sort order of the staff media. |
staffMediaType | string | no | a string representing the type of the staff media. |
staffMediaOnList | boolean | no | a boolean indicating whether the staff media is on the list. |
staffMediaPage | number | no | a number representing the page number of the staff media. |
staffMediaPerPage | number | no | a number representing the number of staff media per page. |
charactersSort | CharacterSort[] | no | an array of strings representing the sort order of the characters. |
charactersPage | number | no | a number representing the page number of the characters. |
charactersPerPage | number | no | a number representing the number of characters per page. |
characterMediaSort | MediaSort[] | no | an array of strings representing the sort order of the character media. |
characterMediaOnList | boolean | no | a boolean indicating whether the character media is on the list. |
characterMediaPage | number | no | a number representing the page number of the character media. |
characterMediaPerPage | number | no | a number representing the number of character media per page. |
| Field | Type | Description |
|---|---|---|
id | number | The id of the studio |
name | string | The name of the studio |
isAnimationStudio | boolean | If the studio is an animation studio or a different kind of company |
id | number | The id of the connection |
relationType | string | The type of relation to the parent model |
isMainStudio | boolean | If the studio is the main animation studio of the media (For Studio->MediaConnection field only) |
characters | CharacterResponse[] | The characters in the media voiced by the parent actor |
characterRole | string | The characters role in the media |
characterName | string | Media specific character name |
roleNotes | string | Notes regarding the VA's role for the character |
dubGroup | string | Used for grouping roles where multiple dubs exist for the same language. Either dubbing company name or language variant. |
voiceActors | StaffResponse[] | The voice actors of the character |
id | number | The id of the staff member |
first | string | The person's given name |
last | string | The person's surname |
full | string | The person's first and last name |
native | string | The person's full name in their native language |
large | string | The person's image of media at its largest size |
medium | string | The person's image of media at medium size |
roleNotes | string | Notes regarding the VA's role for the character |
dubGroup | string | Used for grouping roles where multiple dubs exist for the same language. Either dubbing company name or language variant. |
favouriteOrder | number | The order the media should be displayed from the users favourites |
node | Media | an instance of `Media` representing the node. |
nodes | Media[] | a list of `Media` entries representing the nodes. |
total | number | The total number of items. Note: This value is not guaranteed to be accurate, do not rely on this for logic |
perPage | number | The count on a page |
currentPage | number | The current page |
lastPage | number | The last page |
hasNextPage | boolean | If there is another page |
siteUrl | string | The url for the studio page on the AniList website |
isFavourite | boolean | If the studio is marked as favourite by the currently authenticated user |
favourites | number | The amount of user's who have favourited the studio |
AniLinkApiError— non-success AniList HTTP responseAniLinkGraphQLError— HTTP 200 response carrying GraphQL errorsAniLinkNetworkError— timeout, cancellation, or transport failure
Example
await aniLink.anilist.query.studio({id: 561, asHtml: true});Reviews
anilist.query.review
ReviewQuery fetches a single review by id. Returns a ReviewResponse.
Signature
review(variables: ReviewVariables, options?: RequestOptions): Promise<ReviewResponse>Auth: Not required — public data. Pass a token for viewer-scoped fields.
| Name | Type | Required | Description |
|---|---|---|---|
id | number | no | a number representing the id of the review. |
mediaId | number | no | a number representing the id of the media. |
userId | number | no | a number representing the id of the user. |
mediaType | MediaType | no | a string representing the type of the media. |
sort | ReviewSort[] | no | an array of strings representing the sort order of the review. |
asHtml | boolean | no | a boolean indicating whether to return the result as HTML. |
| Field | Type | Description |
|---|---|---|
id | number | The id of the review |
mediaId | number | The id of the review's media |
userId | number | The id of the review's creator |
mediaType | string | For which type of media the review is for |
summary | string | A short summary of the review |
body | string | The main review body text |
rating | number | The total user rating of the review |
ratingAmount | number | The amount of user ratings of the review |
score | number | The review score of the media |
private | boolean | If the review is not yet publicly published and is only viewable by creator |
siteUrl | string | The url for the review page on the AniList website |
createdAt | number | The time of the thread creation |
updatedAt | number | The time of the thread last update |
user | BasicUser | The creator of the review |
media | Media | The media the review is of |
AniLinkApiError— non-success AniList HTTP responseAniLinkGraphQLError— HTTP 200 response carrying GraphQL errorsAniLinkNetworkError— timeout, cancellation, or transport failure
Example
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
recommendation(variables: RecommendationVariables, options?: RequestOptions): Promise<RecommendationResponse>Auth: Not required — public data. Pass a token for viewer-scoped fields.
| Name | Type | Required | Description |
|---|---|---|---|
id | number | no | a number representing the id of the recommendation. |
mediaId | number | no | a number representing the id of the media. |
mediaRecommendationId | number | no | a number representing the id of the media recommendation. |
userId | number | no | a number representing the id of the user. |
rating | number | no | a number representing the rating of the recommendation. |
onList | boolean | no | a boolean indicating whether the recommendation is on the list. |
rating_greater | number | no | a number representing the rating greater than the recommendation. |
rating_lesser | number | no | a number representing the rating lesser than the recommendation. |
sort | RecommendationSort[] | no | an array of strings representing the sort order of the recommendation. |
asHtml | boolean | no | a boolean indicating whether to return the result as HTML. |
| Field | Type | Description |
|---|---|---|
id | number | The id of the recommendation |
rating | number | Users rating of the recommendation |
userRating | string | The rating of the recommendation by currently authenticated user |
media | Media | The media the recommendation is from |
mediaRecommendation | Media | The recommended media |
user | BasicUser | The user that first created the recommendation |
AniLinkApiError— non-success AniList HTTP responseAniLinkGraphQLError— HTTP 200 response carrying GraphQL errorsAniLinkNetworkError— timeout, cancellation, or transport failure
Example
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
thread(variables: ThreadVariables, options?: RequestOptions): Promise<ThreadResponse>Auth: Not required — public data. Pass a token for viewer-scoped fields.
| Name | Type | Required | Description |
|---|---|---|---|
id | number | no | a number representing the id of the thread. |
userId | number | no | a number representing the id of the user. |
replyUserId | number | no | a number representing the id of the user who replied. |
subscribed | boolean | no | a boolean indicating whether the user is subscribed to the thread. |
categoryId | number | no | a number representing the id of the category. |
mediaCategoryId | number | no | a number representing the id of the media category. |
search | string | no | a string representing the search term. |
id_in | number[] | no | an array of numbers representing the ids to include in the search. |
sort | ThreadSort[] | no | an array of strings representing the sort order of the thread. |
asHtml | boolean | no | a boolean indicating whether to return the result as HTML. |
| Field | Type | Description |
|---|---|---|
id | number | The id of the thread |
title | string | The title of the thread |
body | string | The text body of the thread (Markdown) |
userId | number | The id of the thread owner user |
replyUserId | number | The id of the user who most recently commented on the thread |
replyCommentId | number | The id of the most recent comment on the thread |
replyCount | number | The number of comments on the thread |
viewCount | number | The number of times users have viewed the thread |
isLocked | boolean | If the thread is locked and can receive comments |
isSticky | boolean | If the thread is stickied and should be displayed at the top of the page |
isSubscribed | boolean | If the currently authenticated user is subscribed to the thread |
likeCount | number | The amount of likes the thread has |
isLiked | boolean | If the currently authenticated user liked the thread |
repliedAt | number | The time of the last reply |
createdAt | number | The time of the thread creation |
updatedAt | number | The time of the thread last update |
user | BasicUser | The owner of the thread |
replyUser | BasicUser | The user to last reply to the thread |
likes | BasicUser[] | The users who liked the thread |
siteUrl | string | The url for the thread page on the AniList website |
id | number | The id of the category |
name | string | The name of the category |
mediaCategories | Media[] | The media categories of the thread |
AniLinkApiError— non-success AniList HTTP responseAniLinkGraphQLError— HTTP 200 response carrying GraphQL errorsAniLinkNetworkError— timeout, cancellation, or transport failure
Example
await aniLink.anilist.query.thread({id: 71881, asHtml: true});anilist.query.threadComment
ThreadCommentQuery fetches a single thread comment by id. Returns a ThreadCommentResponse.
Signature
threadComment(variables: ThreadCommentVariables, options?: RequestOptions): Promise<ThreadCommentResponse>Auth: Not required — public data. Pass a token for viewer-scoped fields.
| Name | Type | Required | Description |
|---|---|---|---|
id | number | no | a number representing the id of the thread comment. |
threadId | number | no | a number representing the id of the thread. |
userId | number | no | a number representing the id of the user. |
sort | ThreadSort[] | no | an array of strings representing the sort order of the thread comment. |
asHtml | boolean | no | a boolean indicating whether to return the result as HTML. |
| Field | Type | Description |
|---|---|---|
id | number | The id of the comment |
userId | number | The user id of the comment's owner |
threadId | number | The id of thread the comment belongs to |
comment | string | The text content of the comment (Markdown) |
likeCount | number | The amount of likes the comment has |
isLiked | boolean | If the currently authenticated user liked the comment |
siteUrl | string | The url for the comment page on the AniList website |
createdAt | number | The time of the comments creation |
updatedAt | number | The time of the comments last update |
thread | ThreadResponse | The thread the comment belongs to |
user | BasicUser | The user who created the comment |
likes | BasicUser[] | The users who liked the comment |
childComments | unknown | The comment's child reply comments |
isLocked | boolean | If the comment tree is locked and may not receive replies or edits |
AniLinkApiError— non-success AniList HTTP responseAniLinkGraphQLError— HTTP 200 response carrying GraphQL errorsAniLinkNetworkError— timeout, cancellation, or transport failure
Example
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
markdown(variables: MarkdownVariables, options?: RequestOptions): Promise<string>Auth: Not required — public data. Pass a token for viewer-scoped fields.
| Name | Type | Required | Description |
|---|---|---|---|
markdown | string | yes | a string representing the Markdown text to be converted. |
See the TypeDoc page for the full string shape.
AniLinkApiError— non-success AniList HTTP responseAniLinkGraphQLError— HTTP 200 response carrying GraphQL errorsAniLinkNetworkError— timeout, cancellation, or transport failure
Example
await aniLink.anilist.query.markdown({markdown: 'Hello, world!'});