AniList API¶
Structure¶
AniLink for AniList is divided into two main sections: anilist.query
and anilist.mutation
. The anilist.query
section contains methods for querying data from the AniList API, while the anilist.mutation
section contains methods for mutating data.
Custom Queries and Mutations¶
If needed there is a custom section anilist.custom
that allows the user to pass a custom query or mutation to the AniList API.
The method accepts two parameters: the query or mutation string and an optional variables object.
Custom Query
Query Methods¶
The anilist.query
section is further divided into main query methods and page query methods. The main query methods return a single piece of data, while the page query methods return pages of data.
List of main query methods in anilist.query
:
Method | Description | Example |
---|---|---|
user | Get a user | aniLink.anilist.query.user({'id': 542244}) |
media | Get a media | aniLink.anilist.query.media({'id': 1}) |
mediaTrend | Get media trends | aniLink.anilist.query.mediaTrend({'mediaId': 1}) |
airingSchedule | Get airing schedule | aniLink.anilist.query.airingSchedule() |
character | Get a character | aniLink.anilist.query.character({'id': 1}) |
staff | Get a staff | aniLink.anilist.query.staff({'id': 1}) |
mediaList | Get a media list | aniLink.anilist.query.mediaList({'id': 1}) |
mediaListCollection | Get media list collection | aniLink.anilist.query.mediaListCollection() |
genreCollection | Get genre collection | aniLink.anilist.query.genreCollection() |
mediaTagCollection | Get media tag collection | aniLink.anilist.query.mediaTagCollection() |
viewer | Get the current viewer | aniLink.anilist.query.viewer() |
notification | Get notifications | aniLink.anilist.query.notification() |
studio | Get a studio | aniLink.anilist.query.studio({'id': 1}) |
review | Get a review | aniLink.anilist.query.review({'id': 1}) |
activity | Get an activity | aniLink.anilist.query.activity({'id': 1}) |
activityReply | Get an activity reply | aniLink.anilist.query.activityReply({'id': 1}) |
following | Get following users | aniLink.anilist.query.following() |
follower | Get follower users | aniLink.anilist.query.follower() |
thread | Get a thread | aniLink.anilist.query.thread({'id': 1}) |
threadComment | Get a thread comment | aniLink.anilist.query.threadComment({'id': 1}) |
recommendation | Get a recommendation | aniLink.anilist.query.recommendation({'id': 1}) |
markdown | Get markdown | aniLink.anilist.query.markdown({'markdown': 'Hello'}) |
aniChartUser | Get AniChart user | aniLink.anilist.query.aniChartUser({'id': 1}) |
siteStatistics | Get site statistics | aniLink.anilist.query.siteStatistics() |
externalLinkSourceCollection | Get external link sources | aniLink.anilist.query.externalLinkSourceCollection() |
List of page query methods in anilist.query.page
:
Method | Description | Example |
---|---|---|
users | Get users | aniLink.anilist.query.page.users({'page': 1}) |
medias | Get medias | aniLink.anilist.query.page.medias({'page': 1}) |
characters | Get characters | aniLink.anilist.query.page.characters({'page': 1}) |
staffs | Get staffs | aniLink.anilist.query.page.staffs({'page': 1}) |
studios | Get studios | aniLink.anilist.query.page.studios({'page': 1}) |
mediaLists | Get media lists | aniLink.anilist.query.page.mediaLists({'page': 1}) |
airingSchedules | Get airing schedules | aniLink.anilist.query.page.airingSchedules({'page': 1}) |
mediaTrends | Get media trends | aniLink.anilist.query.page.mediaTrends({'page': 1}) |
notifications | Get notifications | aniLink.anilist.query.page.notifications({'page': 1}) |
followers | Get followers | aniLink.anilist.query.page.followers({'page': 1}) |
following | Get following users | aniLink.anilist.query.page.following({'page': 1}) |
activities | Get activities | aniLink.anilist.query.page.activities({'page': 1}) |
activityReplies | Get activity replies | aniLink.anilist.query.page.activityReplies({'page': 1}) |
threads | Get threads | aniLink.anilist.query.page.threads({'page': 1}) |
threadComments | Get thread comments | aniLink.anilist.query.page.threadComments({'page': 1}) |
reviews | Get reviews | aniLink.anilist.query.page.reviews({'page': 1}) |
recommendations | Get recommendations | aniLink.anilist.query.page.recommendations({'page': 1}) |
likes | Get likes | aniLink.anilist.query.page.likes({'page': 1}) |
Mutation Methods¶
List of methods in anilist.mutation
:
Method | Description | Example |
---|---|---|
updateUser | Update a user | aniLink.anilist.mutation.updateUser({'about': 'New about text'}) |
saveMediaListEntry | Save a media list entry | aniLink.anilist.mutation.saveMediaListEntry({'mediaId': 1, 'status': 'COMPLETED'}) |
updateMediaListEntries | Update media list entries | aniLink.anilist.mutation.updateMediaListEntries({'mediaId': 1, 'status': 'COMPLETED'}) |
deleteMediaListEntries | Delete media list entries | aniLink.anilist.mutation.deleteMediaListEntries({'ids': [1, 2, 3]}) |
deleteCustomLists | Delete custom lists | aniLink.anilist.mutation.deleteCustomLists({'ids': [1, 2, 3]}) |
saveTextActivity | Save a text activity | aniLink.anilist.mutation.saveTextActivity({'text': 'Hello'}) |
saveMessageActivity | Save a message activity | aniLink.anilist.mutation.saveMessageActivity({'message': 'Hello'}) |
deleteActivity | Delete an activity | aniLink.anilist.mutation.deleteActivity({'id': 1}) |
toggleActivityPin | Toggle activity pin | aniLink.anilist.mutation.toggleActivityPin({'id': 1}) |
toggleActivitySubscription | Toggle activity subscription | aniLink.anilist.mutation.toggleActivitySubscription({'id': 1}) |
saveActivityReply | Save an activity reply | aniLink.anilist.mutation.saveActivityReply({'activityId': 1, 'text': 'Hello'}) |
deleteActivityReply | Delete an activity reply | aniLink.anilist.mutation.deleteActivityReply({'id': 1}) |
toggleLike | Toggle like | aniLink.anilist.mutation.toggleLike({'id': 1}) |
toggleLikeV2 | Toggle like v2 | aniLink.anilist.mutation.toggleLikeV2({'id': 1}) |
toggleFollow | Toggle follow | aniLink.anilist.mutation.toggleFollow({'id': 1}) |
toggleFavourite | Toggle favourite | aniLink.anilist.mutation.toggleFavourite({'id': 1}) |
updateFavouriteOrder | Update favourite order | aniLink.anilist.mutation.updateFavouriteOrder({'ids': [1, 2, 3]}) |
saveReview | Save a review | aniLink.anilist.mutation.saveReview({'mediaId': 1, 'body': 'Review text'}) |
deleteReview | Delete a review | aniLink.anilist.mutation.deleteReview({'id': 1}) |
saveRecommendation | Save a recommendation | aniLink.anilist.mutation.saveRecommendation({'mediaId': 1, 'body': 'Recommendation text'}) |
saveThread | Save a thread | aniLink.anilist.mutation.saveThread({'title': 'Thread title', 'body': 'Thread body'}) |
deleteThread | Delete a thread | aniLink.anilist.mutation.deleteThread({'id': 1}) |
toggleThreadSubscription | Toggle thread subscription | aniLink.anilist.mutation.toggleThreadSubscription({'id': 1}) |
saveThreadComment | Save a thread comment | aniLink.anilist.mutation.saveThreadComment({'threadId': 1, 'body': 'Comment body'}) |
deleteThreadComment | Delete a thread comment | aniLink.anilist.mutation.deleteThreadComment({'id': 1}) |
updateAniChartSettings | Update AniChart settings | aniLink.anilist.mutation.updateAniChartSettings({'settings': 'Settings'}) |
updateAniChartHighlights | Update AniChart highlights | aniLink.anilist.mutation.updateAniChartHighlights({'highlights': 'Highlights'}) |