MyAnimeList user operations
This page lists public MyAnimeList user operations by response domain.
User
mal.user.me
MyAnimeListUserApi.me gets the currently authenticated MyAnimeList user through MalUserOperation.me. It is the public facade for GET /users/@me and requires a MAL access token from MalCredentials.accessToken via buildMyAnimeListApi; use MalRequestOptions.fields to select the response shape.
Signature
me(options?: MalRequestOptions): Promise<MalUser>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 |
|---|---|---|
id | number | The MyAnimeList numeric user identifier. |
name | string | The user's MyAnimeList name. |
location | string | Optional profile location. |
joined_at | string | Optional account creation timestamp. |
picture | string | The user's profile picture URL, when requested via the `fields` query parameter. |
gender | string | The user's gender, when requested via the `fields` query parameter. |
birthday | string | The user's birthday in ISO 8601 format, when requested via the `fields` query parameter. |
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 user = await api.user.me({ fields: ["id", "name"] });mal.user.get
MyAnimeListUserApi.get gets a MyAnimeList user profile through MalUserOperation.get. It is the public facade for GET /users/{user_name}. MyAnimeList documents only @me for this endpoint. Other usernames are passed through, but MyAnimeList currently answers them with 404. Every request requires an access token. Use MalRequestOptions.fields to select the response shape.
Signature
get(params: MalUserGetParams, options?: MalRequestOptions): Promise<MalUser>Auth: Requires an access token: MyAnimeList documents only `@me` for this endpoint; other usernames are passed through but currently answered with `404`.
| Name | Type | Required | Description |
|---|---|---|---|
params | MalUserGetParams | yes | The profile read inputs; a MalUserGetParams carrying the username. |
username | string | no | The MyAnimeList username; MyAnimeList documents only `@me` for this endpoint. |
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 user identifier. |
name | string | The user's MyAnimeList name. |
location | string | Optional profile location. |
joined_at | string | Optional account creation timestamp. |
picture | string | The user's profile picture URL, when requested via the `fields` query parameter. |
gender | string | The user's gender, when requested via the `fields` query parameter. |
birthday | string | The user's birthday in ISO 8601 format, when requested via the `fields` query parameter. |
AniLinkAuthError:when no access token is configuredAniLinkValidationError:when `username` 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 user = await api.user.get(
{ username: "@me" },
{ fields: ["id", "name", "location"] }
);
console.log(user.name);mal.user.animeList
MyAnimeListUserApi.animeList gets a user's anime list through MalUserOperation.animeList. It is the public facade for GET /users/{user_name}/animelist; username accepts a user name or @me. A public list needs only MalCredentials.clientId (or an access token), since MAL rejects unauthenticated requests. @me and private lists need an access token (a client ID alone cannot resolve @me). The @me check is case-insensitive and ignores surrounding whitespace. Use MalUserAnimeListParams to filter by status, sort, and page with limit/offset.
Signature
animeList(params: MalUserAnimeListParams, options?: MalRequestOptions): Promise<MalUserAnimeListResponse>Auth: Not required for public user lists; `@me` and private lists require an access token, because a client ID alone cannot resolve `@me`.
| Name | Type | Required | Description |
|---|---|---|---|
params | MalUserAnimeListParams | yes | The anime-list read inputs; a MalUserAnimeListParams carrying the username plus the optional status, sort, and paging filters. |
username | string | no | The MyAnimeList username, or `@me` for the authenticated user. |
status | MalAnimeListStatusValue | no | The watch status to filter by; one of MalAnimeListStatusValue. Omit to return all. |
sort | MalAnimeListSort | no | The sort order; one of MalAnimeListSort. |
limit | number | no | The number of entries per page; defaults to 100, capped at 1000 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 | MalUserAnimeListEntry[] | The anime list entries on this page. |
paging | MalPaging | The paging node with the next/previous page URLs, when the list continues. |
AniLinkAuthError:when `username` is `@me` and no access token is configuredAniLinkValidationError:when `username` 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 list = await api.user.animeList(
{ username: "@me", status: "watching" },
{ fields: ["id", "title", "list_status"] }
);
console.log(list.data[0]?.node.title);mal.user.mangaList
MyAnimeListUserApi.mangaList gets a user's manga list through MalUserOperation.mangaList. It is the public facade for GET /users/{user_name}/mangalist; username accepts a user name or @me. A public list needs only MalCredentials.clientId (or an access token), since MAL rejects unauthenticated requests. @me and private lists need an access token (a client ID alone cannot resolve @me). The @me check is case-insensitive and ignores surrounding whitespace. Use MalUserMangaListParams to filter by status, sort, and page with limit/offset.
Signature
mangaList(params: MalUserMangaListParams, options?: MalRequestOptions): Promise<MalUserMangaListResponse>Auth: Not required for public user lists; `@me` and private lists require an access token, because a client ID alone cannot resolve `@me`.
| Name | Type | Required | Description |
|---|---|---|---|
params | MalUserMangaListParams | yes | The manga-list read inputs; a MalUserMangaListParams carrying the username plus the optional status, sort, and paging filters. |
username | string | no | The MyAnimeList username, or `@me` for the authenticated user. |
status | MalMangaListStatusValue | no | The reading status to filter by; one of MalMangaListStatusValue. Omit to return all. |
sort | MalMangaListSort | no | The sort order; one of MalMangaListSort. |
limit | number | no | The number of entries per page; defaults to 100, capped at 1000 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 | MalUserMangaListEntry[] | The manga list entries on this page. |
paging | MalPaging | The paging node with the next/previous page URLs, when the list continues. |
AniLinkAuthError:when `username` is `@me` and no access token is configuredAniLinkValidationError:when `username` 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 list = await api.user.mangaList(
{ username: "@me", status: "reading" },
{ fields: ["id", "title", "list_status"] }
);
console.log(list.data[0]?.node.title);Related guides
- MAL operations explains user-list requests and responses.
- MAL pagination covers paging through user lists.