Official MAL API

Information
Welcome to the official MyAnimeList's API club! This is a place where developers can talk about the API, ask questions, look for help to fix bugs, suggest new features, and showcase their projects. Join us and subscribe to the club! First time here? No worries. You can start from this topic. Don't hesitate to leave a comment or open a new discussion if you need help! Quick access


Club Members


Displaying 5 of 257 topics | See All
Club Discussion
Log user on the main site with API access token
Niccol0 - Jul 26
3 repliesby ZeroCrystal »»
Jul 31, 8:23 AM
Deauthorization of third party apps/api - no setting?
Exodor - Jul 23
1 repliesby ZeroCrystal »»
Jul 24, 6:43 AM
Any plans to implement a non-web oauth flow?
plays2 - Jul 3
1 repliesby ZeroCrystal »»
Jul 6, 7:35 AM
Sticky: [USER SUBMITTED GUIDE] How to access the new MAL API using OAuth 2.0 ( 1 2 3 4 )
ZeroCrystal - Jul 7, 2020
189 repliesby ZeroCrystal »»
Jun 23, 5:05 AM
I made a webapp to compare plan-to-watch lists
daux - Apr 16, 2022
26 repliesby shunthespy »»
Jun 20, 3:04 PM



Club Comments
BytePusher | Jul 25, 6:59 AM
Hey everyone, I wanted to share here a web app that I've been working on and ask you for your thoughts and feedback.

It's an app that shows various insights, analyses and highlights of your anime list. Among some of it's features are a Spotify Wrapped-like yearly summary of your anime-watching activity, and a dissection of your plan-to-watch list into multiple categories so you can choose your next watch.

The app can be found at theanimeden.net and is optimized for both desktop and mobile! Here are some pics of the app's UI and features:


ZeroCrystal | Jun 30, 4:08 AM
@Zee530 It's true that you cannot sort them by title using the API, but it's very simple to do so from your client.
You can pass limit=500 to retrieve all anime for that season with a single request, and then you can sort them locally by any parameter you want.

Zee530 | Jun 28, 2:31 AM
@Jhiday, I see, thanks for clearing that up, i'm currently only needing publicly available data so X-MAL-CLIENT is good enough for me for now, thanks. Lastly, i'm trying to request for an entire season and according to the docs the only sort option listed is anime_score and anime_num_list_users, does this mean there is no way of sorting by stuff like title, start date, etc, as it appears on the seasonal site pages, thanks.

Jhiday | Jun 28, 2:16 AM
@Zee530 : there are two ways to authenticate with the API :
- X-MAL-CLIENT-ID is the simpler one, but limited to read-only public data
- "Authorization: Bearer" uses the more complex OAuth2 workflow (you can't use your MAL ClientId directly with it), which is detailed in one of the doc links atop the club. Since it has your app authenticate as a particular user, you have wider access for their data (both private, and in write mode).

Zee530 | Jun 28, 1:52 AM
Hi, still new to apis in general so apology in advance if this is too newb a question. The basic command to get details for a particular anime according to the docs is:

curl 'https://api.myanimelist.net/v2/anime/53410?fields=id,title,mean,num_list_users,media_type,status,num_episodes,start_season' \
-H 'Authorization: Bearer MY_TOKEN'


But this always returns a 401 error for me.

However after searching through one of the threads i saw this particular command:

request: 
    curl --request GET \
   --url https://api.myanimelist.net/v2/anime/53410?fields=id,title,mean,num_list_users,media_type,status,num_episodes,start_season
  --header 'X-MAL-CLIENT-ID: MY_TOKEN'\


...And this works for me everytime. I want to know what the difference between the two is and why one works as opposed to the other. For the console i'm using REST client to send the requests, an extension for VSCode, thanks in advance.

alexMadeira | May 29, 10:48 AM
Never mind, folks, it was a typo. Instead of 'Content-Type,' my code had 'Content_Type.' 🥲
I'll leave my previous comment in case it can be useful to someone.

alexMadeira | May 29, 8:38 AM
Hi, is anyone else facing an issue where the PUT method doesn't seem to update the value of the watched episodes?
I'm using the same code as before and hours ago it stopped working. Network status 200.
Body of the request: status=watching&score=0&num_watched_episodes=3&is_rewatching=false
Body of the response:
{
"status": "watching",
"score": 0,
"num_episodes_watched": 0,
"is_rewatching": false,
"updated_at": "2024-05-29T15:21:43+00:00",
"priority": 0,
"num_times_rewatched": 0,
"rewatch_value": 0,
"tags": [],
"comments": ""
}

ZeroCrystal | Mar 26, 8:27 AM
@INVADER056: It's not straightforward, but you can create a calendar from the seasonal data, with some post-processing on the client.

For example:
GET https://api.myanimelist.net/v2/anime/season/2024/winter?limit=500&fields=broadcast,start_date,end_date&nsfw=true

{
  "data": [
    {
      "node": {
        "id": 55866,
        "title": "Yubisaki to Renren",
        "main_picture": {...},
        "broadcast": {
          "day_of_the_week": "saturday",
          "start_time": "22:30"
        },
        "start_date": "2024-01-06",
        "end_date": "2024-03-23"
      }
    },
    {
      "node": {
        "id": 52701,
        "title": "Dungeon Meshi",
        "main_picture": {...},
        "broadcast": {
          "day_of_the_week": "thursday",
          "start_time": "22:30"
        },
        "start_date": "2024-01-04"
      }
    },
    [...]
}

You can retrieve all anime for a specific season with a single request. Then, you can filter them based on their airing days and store them as you prefer.

The broadcast object contains the airing day and time (Japan Standard Time) for an anime.
start_date and end_date, as the names suggest, tell you the first and last airing day for that series.

Be aware that all these fields are optional and could be missing for some anime, especially for the less popular ones.

Club in App
Chat features have been enabled for this club inside the official MAL app! Click here to get it.
Club Stats
Members: 1644
Pictures:
Category: Other
Created: Jul 14, 2009


Club Staff
Kineta (Secretary)
myanimelistllc (Secretary)
ZeroCrystal (Secretary)

Club Type
This is a public club.
Anyone can join and invite others to join. Club details, pictures, comments and club discussions can be viewed by any user, regardless of whether they are a member of the club or not.

Club Secretary can change the Club Type at any time. For more information on Club Types, click here.


It’s time to ditch the text file.
Keep track of your anime easily by creating your own list.
Sign Up Login