MyAnimeList anime operations
This page lists public MyAnimeList anime operations by response domain.
Anime
mal.anime.get
MyAnimeListAnimeApi.get gets one anime by its MyAnimeList ID through MalAnimeOperation.get. It is the public facade for the GET /anime/{id} endpoint; use MalRequestOptions.fields to select the response shape and MalRequestOptions transport settings to override per call.
Signature
get(params: MalAnimeGetParams, options?: MalRequestOptions): Promise<MalAnime>Auth: Not required for public anime data; pass an access token for list-related fields.
| Name | Type | Required | Description |
|---|---|---|---|
params | MalAnimeGetParams | yes | The anime lookup inputs; a MalAnimeGetParams carrying the MyAnimeList anime ID. |
id | number | no | The MyAnimeList anime ID. |
options | MalRequestOptions | no | Optional field selection and transport settings; a MalRequestOptions merged over the instance defaults. |
fields | string | readonly string[] | no | A comma-separated field selector, or the same selector as an array. |
timeout | number | no | Milliseconds before a request is aborted. `0` disables the Axios timeout. Defaults to DEFAULT_REQUEST_TIMEOUT; timeout errors carry the effective duration as `AniLinkNetworkError.timeoutMs`. |
signal | AbortSignal | no | Signal used to cancel in-flight requests. |
| Field | Type | Description |
|---|---|---|
id | number | The MyAnimeList numeric identifier. |
title | string | The canonical MyAnimeList title. |
main_picture | MalPicture | Optional image variants requested through the `fields` query parameter. |
synopsis | string | The synopsis, when requested via the `fields` query parameter. |
status | string | The publication/airing status, when requested (one of MAL's status values such as `finished_airing`). |
mean | number | The average score out of 10, when requested via the `fields` query parameter. |
num_episodes | number | The total number of episodes, when requested via the `fields` query parameter. |
media_type | string | The media type, when requested (for example `tv`, `movie`, or `ova`). |
start_date | string | The first air/start date in ISO 8601 format, when requested via the `fields` query parameter. |
broadcast | MalBroadcast | The broadcast schedule, when requested via the `fields` query parameter. |
average_episode_duration | number | The average episode duration in seconds, when requested via the `fields` query parameter. |
AniLinkRestError:for a non-success MyAnimeList responseAniLinkNetworkError:for timeout, cancellation, or other transport failures
Example
const api = new AniLink({ mal: { accessToken: "mal-token" } }).mal;
const anime = await api.anime.get({ id: 21 }, { fields: ["id", "title", "main_picture"] });mal.anime.search
MyAnimeListAnimeApi.search searches MyAnimeList anime by keyword through MalAnimeOperation.search. It is the public facade for GET /anime; use MalRequestOptions.fields to select the response shape and MalRequestOptions transport settings to override per call.
Signature
search(params: MalAnimeSearchParams, options?: MalRequestOptions): Promise<MalAnimeSearchResponse>Auth: Not required: a public read.
| Name | Type | Required | Description |
|---|---|---|---|
params | MalAnimeSearchParams | yes | The search inputs; a MalAnimeSearchParams carrying the keyword plus the optional paging filters. |
q | string | no | The search keyword. |
limit | number | no | The number of entries per page; defaults to 100, capped at 100 by MyAnimeList. |
offset | number | no | The offset of the first entry; defaults to 0. |
options | MalRequestOptions | no | Optional field selection and transport settings; a MalRequestOptions merged over the instance defaults. |
fields | string | readonly string[] | no | A comma-separated field selector, or the same selector as an array. |
timeout | number | no | Milliseconds before a request is aborted. `0` disables the Axios timeout. Defaults to DEFAULT_REQUEST_TIMEOUT; timeout errors carry the effective duration as `AniLinkNetworkError.timeoutMs`. |
signal | AbortSignal | no | Signal used to cancel in-flight requests. |
| Field | Type | Description |
|---|---|---|
data | MalAnimeSearchEntry[] | The search-result entries on this page. |
paging | MalPaging | The paging node with the next-page URL, when the list continues. |
AniLinkValidationError:when `q` is empty or only whitespaceAniLinkRestError:for a non-success MyAnimeList responseAniLinkNetworkError:for timeout, cancellation, or other transport failures
Example
const api = new AniLink({ mal: { accessToken: "mal-token" } }).mal;
const results = await api.anime.search(
{ q: "one piece" },
{ fields: ["id", "title", "main_picture"] }
);
console.log(results.data[0]?.node.title);mal.anime.seasonal
MyAnimeListAnimeApi.seasonal gets the anime of one broadcast season through MalAnimeOperation.seasonal. It is the public facade for GET /anime/season/{year}/{season}; use MalRequestOptions.fields to select the response shape and MalRequestOptions transport settings to override per call.
Signature
seasonal(params: MalSeasonalParams, options?: MalRequestOptions): Promise<MalSeasonalAnimeResponse>Auth: Not required: a public read.
| Name | Type | Required | Description |
|---|---|---|---|
params | MalSeasonalParams | yes | The seasonal read inputs; a MalSeasonalParams carrying the year and broadcast window. |
year | number | no | The season's year. |
season | MalSeason | no | The season's broadcast window; one of MalSeason. |
options | MalRequestOptions | no | Optional field selection and transport settings; a MalRequestOptions merged over the instance defaults. |
fields | string | readonly string[] | no | A comma-separated field selector, or the same selector as an array. |
timeout | number | no | Milliseconds before a request is aborted. `0` disables the Axios timeout. Defaults to DEFAULT_REQUEST_TIMEOUT; timeout errors carry the effective duration as `AniLinkNetworkError.timeoutMs`. |
signal | AbortSignal | no | Signal used to cancel in-flight requests. |
| Field | Type | Description |
|---|---|---|
data | MalSeasonalAnime[] | The seasonal anime entries on this page. |
paging | MalPaging | The paging node with the next-page URL, when the list continues. |
AniLinkRestError:for a non-success MyAnimeList responseAniLinkNetworkError:for timeout, cancellation, or other transport failures
Example
const api = new AniLink({ mal: { accessToken: "mal-token" } }).mal;
const season = await api.anime.seasonal(
{ year: 2024, season: "winter" },
{ fields: ["id", "title", "main_picture"] }
);
console.log(season.data[0]?.node.title);mal.anime.ranking
MyAnimeListAnimeApi.ranking gets one of MyAnimeList's anime ranking lists through MalAnimeOperation.ranking. It is the public facade for GET /anime/ranking; use MalRequestOptions.fields to select the response shape and MalRequestOptions transport settings to override per call.
Signature
ranking(params: MalRankingParams, options?: MalRequestOptions): Promise<MalAnimeRankingResponse>Auth: Not required: a public read.
| Name | Type | Required | Description |
|---|---|---|---|
params | MalRankingParams | yes | The ranking read inputs; a MalRankingParams carrying the ranking list to fetch. |
rankingType | MalRankingType | no | The ranking list to fetch; one of MalRankingType. |
options | MalRequestOptions | no | Optional field selection and transport settings; a MalRequestOptions merged over the instance defaults. |
fields | string | readonly string[] | no | A comma-separated field selector, or the same selector as an array. |
timeout | number | no | Milliseconds before a request is aborted. `0` disables the Axios timeout. Defaults to DEFAULT_REQUEST_TIMEOUT; timeout errors carry the effective duration as `AniLinkNetworkError.timeoutMs`. |
signal | AbortSignal | no | Signal used to cancel in-flight requests. |
| Field | Type | Description |
|---|---|---|
data | MalRankingEntry[] | The ranking entries on this page. |
paging | MalPaging | The paging node with the next-page URL, when the list continues. |
AniLinkRestError:for a non-success MyAnimeList responseAniLinkNetworkError:for timeout, cancellation, or other transport failures
Example
const api = new AniLink({ mal: { accessToken: "mal-token" } }).mal;
const top = await api.anime.ranking(
{ rankingType: "airing" },
{ fields: ["id", "title", "mean"] }
);
console.log(top.data[0]?.node.title, top.data[0]?.ranking.rank);mal.anime.suggestions
MyAnimeListAnimeApi.suggestions gets MyAnimeList's anime suggestions for the authenticated user through MalAnimeOperation.suggestions. It is the public facade for GET /anime/suggestions and requires a MAL access token from MalCredentials.accessToken via buildMyAnimeListApi; use MalRequestOptions.fields to select the response shape.
Signature
suggestions(options?: MalRequestOptions): Promise<MalAnimeSuggestionsResponse>Auth: Required: MAL OAuth2 access token (`mal.accessToken` credential slot).
| Name | Type | Required | Description |
|---|---|---|---|
options | MalRequestOptions | no | Optional field selection and transport settings; a MalRequestOptions merged over the instance defaults. |
fields | string | readonly string[] | no | A comma-separated field selector, or the same selector as an array. |
timeout | number | no | Milliseconds before a request is aborted. `0` disables the Axios timeout. Defaults to DEFAULT_REQUEST_TIMEOUT; timeout errors carry the effective duration as `AniLinkNetworkError.timeoutMs`. |
signal | AbortSignal | no | Signal used to cancel in-flight requests. |
| Field | Type | Description |
|---|---|---|
data | MalSuggestion[] | The suggested anime entries on this page. |
paging | MalPaging | The paging node with the next-page URL, when the list continues. |
AniLinkAuthError:when no MAL access token is configuredAniLinkRestError:for a non-success MyAnimeList responseAniLinkNetworkError:for timeout, cancellation, or other transport failures
Example
const api = new AniLink({ mal: { accessToken: "mal-token" } }).mal;
const suggestions = await api.anime.suggestions({
fields: ["id", "title", "main_picture"],
});
console.log(suggestions.data[0]?.node.title);mal.anime.updateMyListStatus
MyAnimeListAnimeApi.updateMyListStatus updates the authenticated user's anime list status through MalAnimeOperation.updateMyListStatus. It is the public facade for PATCH /anime/{id}/my_list_status and requires a MAL access token from MalCredentials.accessToken via buildMyAnimeListApi; send only the MalAnimeListStatusUpdate fields you want to change, form-encoded as MAL requires.
Signature
updateMyListStatus(params: MalAnimeListStatusUpdateParams, options?: MalRequestOptions): Promise<MalAnimeListStatus>Auth: Required: MAL OAuth2 access token (`mal.accessToken` credential slot).
| Name | Type | Required | Description |
|---|---|---|---|
params | MalAnimeListStatusUpdateParams | yes | The list-status write inputs; a MalAnimeListStatusUpdateParams carrying the anime ID plus only the fields to change. |
id | number | no | The MyAnimeList anime ID. |
status | MalAnimeListStatusValue | no | The watch status to set; one of MalAnimeListStatusValue. |
num_watched_episodes | number | no | The number of episodes the user has watched. |
score | number | no | The user's score out of 10. |
comments | string | no | Free-form notes the user attached to the entry. |
is_rewatching | boolean | no | Whether the user is currently rewatching the anime. |
num_times_rewatched | number | no | The number of times the user has rewatched the anime. |
rewatch_value | number | no | The rewatch value rating (0-5). |
priority | number | no | The priority rating (0-2). |
tags | readonly string[] | no | User-defined tags attached to the entry; sent as a comma-separated string. |
options | MalRequestOptions | no | Optional field selection and transport settings; a MalRequestOptions merged over the instance defaults. |
fields | string | readonly string[] | no | A comma-separated field selector, or the same selector as an array. |
timeout | number | no | Milliseconds before a request is aborted. `0` disables the Axios timeout. Defaults to DEFAULT_REQUEST_TIMEOUT; timeout errors carry the effective duration as `AniLinkNetworkError.timeoutMs`. |
signal | AbortSignal | no | Signal used to cancel in-flight requests. |
| Field | Type | Description |
|---|---|---|
status | MalAnimeListStatusValue | The current watch status; one of MalAnimeListStatusValue. |
num_episodes_watched | number | The number of episodes the user has watched; MAL reports this as `num_episodes_watched`. |
score | number | The user's score out of 10. |
start_date | string | The date the user started watching, in ISO 8601 form; may be a partial date (`YYYY-MM` or `YYYY`). |
finish_date | string | The date the user finished watching, in ISO 8601 form; may be a partial date (`YYYY-MM` or `YYYY`). |
comments | string | Free-form notes the user attached to the entry. |
is_rewatching | boolean | Whether the user is currently rewatching the anime. |
num_times_rewatched | number | The number of times the user has rewatched the anime. |
rewatch_value | number | The rewatch value rating (0-5). |
priority | number | The priority rating (0-2). |
tags | string[] | User-defined tags attached to the entry, as an array of strings. |
updated_at | string | The server-managed timestamp of the last update, in ISO 8601 form. |
AniLinkAuthError:when no MAL access token is configuredAniLinkValidationError:when params carries no known list-status field to changeAniLinkRestError:for a non-success MyAnimeList responseAniLinkNetworkError:for timeout, cancellation, or other transport failures
Example
const api = new AniLink({ mal: { accessToken: "mal-token" } }).mal;
const status = await api.anime.updateMyListStatus({
id: 21,
status: "watching",
num_watched_episodes: 10,
score: 9,
});mal.anime.deleteFromList
MyAnimeListAnimeApi.deleteFromList removes an anime from the authenticated user's list through MalAnimeOperation.deleteFromList. It is the public facade for DELETE /anime/{id}/my_list_status and requires a MAL access token from MalCredentials.accessToken via buildMyAnimeListApi.
Signature
deleteFromList(params: MalAnimeDeleteParams, options?: MalRequestOptions): Promise<void>Auth: Required: MAL OAuth2 access token (`mal.accessToken` credential slot).
| Name | Type | Required | Description |
|---|---|---|---|
params | MalAnimeDeleteParams | yes | The delete inputs; a MalAnimeDeleteParams carrying the MyAnimeList anime ID. |
id | number | no | The MyAnimeList anime ID. |
options | MalRequestOptions | no | Optional transport settings; a MalRequestOptions merged over the instance defaults. |
timeout | number | no | Milliseconds before a request is aborted. `0` disables the Axios timeout. Defaults to DEFAULT_REQUEST_TIMEOUT; timeout errors carry the effective duration as `AniLinkNetworkError.timeoutMs`. |
signal | AbortSignal | no | Signal used to cancel in-flight requests. |
See the TypeDoc page for the full void shape.
AniLinkAuthError:when no MAL access token is configuredAniLinkRestError:for a non-success MyAnimeList responseAniLinkNetworkError:for timeout, cancellation, or other transport failures
Example
const api = new AniLink({ mal: { accessToken: "mal-token" } }).mal;
await api.anime.deleteFromList({ id: 21 });Related guides
- MAL operations explains operation parameters and responses.
- MAL pagination covers paging through anime results.