Online Server API Guide - LingFeng-bbben/MajdataPlay GitHub Wiki

At first, the game pulls the whole songlist.

GET /api/maichart/list

Server returns sample

[
  {
    "id": "1",
    "title": "花の塔",
    "artist": "さユり",
    "designer": "FTOWER",
    "description": "MMFC10场外",
    "levels": [null, null, null, null, "13+", null, null],
    "timestamp": "2025-03-05T14:45:24.4705018+08:00",
    "hash": "naksqJTTV0fMM//FRcdO0g=="
  },
]

Note the id is string, used for game to pull charts in next step.

Hash is the md5-b64 hash of the maidata.txt file. This is related to score saving.

Sample code to calculate hash:

var chartHash = MD5.Create().ComputeHash(File.ReadAllBytes(maidatapath + "maidata.txt"));
songDetail.Hash = Convert.ToBase64String(chartHash);

If the game discovers the downloaded hash does not match hash in the list, the game will exit.

When game pulls the charts

These method should return physical files.

GET /api/maichart/{chartId}/chart

Returns the actual maidata.txt

URL Params

Param Type Desc
chartId string

GET /api/maichart/{chartId}/track

In mp3 format. OGG should work but it is untested.

URL Params

Param Type Desc
chartId string

GET /api/maichart/{chartId}/image

The game gets the cover image. It is best practice to provide a thumbnail first to reduce bandwidth usage.

URL Params

Param Type Desc
chartId string

Query Params

Param Type Desc
fullImage bool default=false

GET /api/maichart/{chartId}/video

Should return 404 when there is no video.

URL Params

Param Type Desc
chartId string