Skip to content
墨 AniLink

MyAnimeList manga operations ​

This page lists public MyAnimeList manga operations by response domain.

Manga

mal.manga.get

MyAnimeListMangaApi.get gets one manga by its MyAnimeList ID through MalMangaOperation.get. It is the public facade for the GET /manga/{id} endpoint; use MalRequestOptions.fields to select the response shape and MalRequestOptions transport settings to override per call.

Signature

TypeScript
get(params: MalMangaGetParams, options?: MalRequestOptions): Promise<MalManga>

Auth: Not required for public manga data; pass an access token for list-related fields.

NameTypeRequiredDescription
paramsMalMangaGetParamsyesThe manga lookup inputs; a MalMangaGetParams carrying the MyAnimeList manga ID.
  idnumbernoThe MyAnimeList manga ID.
optionsMalRequestOptionsnoOptional field selection and transport settings; a MalRequestOptions merged over the instance defaults.
  fieldsstring | readonly string[]noA comma-separated field selector, or the same selector as an array.
  timeoutnumbernoMilliseconds before a request is aborted. `0` disables the Axios timeout. Defaults to DEFAULT_REQUEST_TIMEOUT; timeout errors carry the effective duration as `AniLinkNetworkError.timeoutMs`.
  signalAbortSignalnoSignal used to cancel in-flight requests.
FieldTypeDescription
idnumberThe MyAnimeList numeric identifier.
titlestringThe canonical MyAnimeList title.
main_pictureMalPictureOptional image variants requested through the `fields` query parameter.
synopsisstringThe synopsis, when requested via the `fields` query parameter.
statusstringThe publication status, when requested (one of MAL's status values such as `finished`).
meannumberThe average score out of 10, when requested via the `fields` query parameter.
num_chaptersnumberThe total number of chapters, when requested via the `fields` query parameter.
num_volumesnumberThe total number of volumes, when requested via the `fields` query parameter.
media_typestringThe media type, when requested (for example `manga`, `novel`, or `one_shot`).
start_datestringThe first publication date in ISO 8601 format, when requested via the `fields` query parameter.
end_datestringThe end publication date in ISO 8601 format, when requested via the `fields` query parameter.
  • AniLinkRestError: for a non-success MyAnimeList response
  • AniLinkNetworkError: for timeout, cancellation, or other transport failures

Example

TypeScript
const api = new AniLink({ mal: { accessToken: "mal-token" } }).mal;
const manga = await api.manga.get({ id: 1 }, { fields: ["id", "title", "main_picture"] });

MyAnimeListMangaApi.search searches MyAnimeList manga by keyword through MalMangaOperation.search. It is the public facade for GET /manga; use MalRequestOptions.fields to select the response shape and MalRequestOptions transport settings to override per call.

Signature

TypeScript
search(params: MalMangaSearchParams, options?: MalRequestOptions): Promise<MalMangaSearchResponse>

Auth: Not required: a public read.

NameTypeRequiredDescription
paramsMalMangaSearchParamsyesThe search inputs; a MalMangaSearchParams carrying the keyword plus the optional paging filters.
  qstringnoThe search keyword.
  limitnumbernoThe number of entries per page; defaults to 100, capped at 100 by MyAnimeList.
  offsetnumbernoThe offset of the first entry; defaults to 0.
optionsMalRequestOptionsnoOptional field selection and transport settings; a MalRequestOptions merged over the instance defaults.
  fieldsstring | readonly string[]noA comma-separated field selector, or the same selector as an array.
  timeoutnumbernoMilliseconds before a request is aborted. `0` disables the Axios timeout. Defaults to DEFAULT_REQUEST_TIMEOUT; timeout errors carry the effective duration as `AniLinkNetworkError.timeoutMs`.
  signalAbortSignalnoSignal used to cancel in-flight requests.
FieldTypeDescription
dataMalMangaSearchEntry[]The search-result entries on this page.
pagingMalPagingThe paging node with the next-page URL, when the list continues.
  • AniLinkValidationError: when `q` is empty or only whitespace
  • AniLinkRestError: for a non-success MyAnimeList response
  • AniLinkNetworkError: for timeout, cancellation, or other transport failures

Example

TypeScript
const api = new AniLink({ mal: { accessToken: "mal-token" } }).mal;
const results = await api.manga.search(
  { q: "berserk" },
  { fields: ["id", "title", "main_picture"] }
);
console.log(results.data[0]?.node.title);

mal.manga.ranking

MyAnimeListMangaApi.ranking gets one of MyAnimeList's manga ranking lists through MalMangaOperation.ranking. It is the public facade for GET /manga/ranking; use MalRequestOptions.fields to select the response shape and MalRequestOptions transport settings to override per call.

Signature

TypeScript
ranking(params: MalMangaRankingParams, options?: MalRequestOptions): Promise<MalMangaRankingResponse>

Auth: Not required: a public read.

NameTypeRequiredDescription
paramsMalMangaRankingParamsyesThe ranking read inputs; a MalMangaRankingParams carrying the ranking list to fetch.
  rankingTypeMalMangaRankingTypenoThe ranking list to fetch; one of MalMangaRankingType.
optionsMalRequestOptionsnoOptional field selection and transport settings; a MalRequestOptions merged over the instance defaults.
  fieldsstring | readonly string[]noA comma-separated field selector, or the same selector as an array.
  timeoutnumbernoMilliseconds before a request is aborted. `0` disables the Axios timeout. Defaults to DEFAULT_REQUEST_TIMEOUT; timeout errors carry the effective duration as `AniLinkNetworkError.timeoutMs`.
  signalAbortSignalnoSignal used to cancel in-flight requests.
FieldTypeDescription
dataMalMangaRankingEntry[]The ranking entries on this page.
pagingMalPagingThe paging node with the next-page URL, when the list continues.
  • AniLinkRestError: for a non-success MyAnimeList response
  • AniLinkNetworkError: for timeout, cancellation, or other transport failures

Example

TypeScript
const api = new AniLink({ mal: { accessToken: "mal-token" } }).mal;
const top = await api.manga.ranking(
  { rankingType: "manga" },
  { fields: ["id", "title", "mean"] }
);
console.log(top.data[0]?.node.title, top.data[0]?.ranking.rank);

mal.manga.updateMyListStatus

MyAnimeListMangaApi.updateMyListStatus updates the authenticated user's manga list status through MalMangaOperation.updateMyListStatus. It is the public facade for PATCH /manga/{id}/my_list_status and requires a MAL access token from MalCredentials.accessToken via buildMyAnimeListApi; send only the MalMangaListStatusUpdate fields you want to change, form-encoded as MAL requires.

Signature

TypeScript
updateMyListStatus(params: MalMangaListStatusUpdateParams, options?: MalRequestOptions): Promise<MalMangaListStatus>

Auth: Required: MAL OAuth2 access token (`mal.accessToken` credential slot).

NameTypeRequiredDescription
paramsMalMangaListStatusUpdateParamsyesThe list-status write inputs; a MalMangaListStatusUpdateParams carrying the manga ID plus only the fields to change.
  idnumbernoThe MyAnimeList manga ID.
  statusMalMangaListStatusValuenoThe reading status to set; one of MalMangaListStatusValue.
  num_chapters_readnumbernoThe number of chapters the user has read.
  num_volumes_readnumbernoThe number of volumes the user has read.
  scorenumbernoThe user's score out of 10.
  commentsstringnoFree-form notes the user attached to the entry.
  is_rereadingbooleannoWhether the user is currently rereading the manga.
  num_times_rereadnumbernoThe number of times the user has reread the manga.
  reread_valuenumbernoThe reread value rating (0-5).
  prioritynumbernoThe priority rating (0-2).
  tagsreadonly string[]noUser-defined tags attached to the entry; sent as a comma-separated string.
optionsMalRequestOptionsnoOptional field selection and transport settings; a MalRequestOptions merged over the instance defaults.
  fieldsstring | readonly string[]noA comma-separated field selector, or the same selector as an array.
  timeoutnumbernoMilliseconds before a request is aborted. `0` disables the Axios timeout. Defaults to DEFAULT_REQUEST_TIMEOUT; timeout errors carry the effective duration as `AniLinkNetworkError.timeoutMs`.
  signalAbortSignalnoSignal used to cancel in-flight requests.
FieldTypeDescription
statusMalMangaListStatusValueThe current reading status; one of MalMangaListStatusValue.
num_chapters_readnumberThe number of chapters the user has read.
num_volumes_readnumberThe number of volumes the user has read.
scorenumberThe user's score out of 10.
start_datestringThe date the user started reading, in ISO 8601 form; may be a partial date (`YYYY-MM` or `YYYY`).
finish_datestringThe date the user finished reading, in ISO 8601 form; may be a partial date (`YYYY-MM` or `YYYY`).
commentsstringFree-form notes the user attached to the entry.
is_rereadingbooleanWhether the user is currently rereading the manga.
num_times_rereadnumberThe number of times the user has reread the manga.
reread_valuenumberThe reread value rating (0-5).
prioritynumberThe priority rating (0-2).
tagsstring[]User-defined tags attached to the entry, as an array of strings.
updated_atstringThe server-managed timestamp of the last update, in ISO 8601 form.
  • AniLinkAuthError: when no MAL access token is configured
  • AniLinkValidationError: when params carries no known list-status field to change
  • AniLinkRestError: for a non-success MyAnimeList response
  • AniLinkNetworkError: for timeout, cancellation, or other transport failures

Example

TypeScript
const api = new AniLink({ mal: { accessToken: "mal-token" } }).mal;
const status = await api.manga.updateMyListStatus({
  id: 1,
  status: "reading",
  num_chapters_read: 10,
  score: 9,
});

mal.manga.deleteFromList

MyAnimeListMangaApi.deleteFromList removes a manga from the authenticated user's list through MalMangaOperation.deleteFromList. It is the public facade for DELETE /manga/{id}/my_list_status and requires a MAL access token from MalCredentials.accessToken via buildMyAnimeListApi.

Signature

TypeScript
deleteFromList(params: MalMangaDeleteParams, options?: MalRequestOptions): Promise<void>

Auth: Required: MAL OAuth2 access token (`mal.accessToken` credential slot).

NameTypeRequiredDescription
paramsMalMangaDeleteParamsyesThe delete inputs; a MalMangaDeleteParams carrying the MyAnimeList manga ID.
  idnumbernoThe MyAnimeList manga ID.
optionsMalRequestOptionsnoOptional transport settings; a MalRequestOptions merged over the instance defaults.
  timeoutnumbernoMilliseconds before a request is aborted. `0` disables the Axios timeout. Defaults to DEFAULT_REQUEST_TIMEOUT; timeout errors carry the effective duration as `AniLinkNetworkError.timeoutMs`.
  signalAbortSignalnoSignal used to cancel in-flight requests.

See the TypeDoc page for the full void shape.

  • AniLinkAuthError: when no MAL access token is configured
  • AniLinkRestError: for a non-success MyAnimeList response
  • AniLinkNetworkError: for timeout, cancellation, or other transport failures

Example

TypeScript
const api = new AniLink({ mal: { accessToken: "mal-token" } }).mal;
await api.manga.deleteFromList({ id: 1 });

AniLink, typed AniList & MyAnimeList client for TypeScript.