Skip to content

osu!

osu ppv2 API使用说明

API

API提供 POST 请求方法

http
POST https://api.yuzuchan.moe/osu/ppcalc

请求

*为必带参数

参数名数据类型默认值说明
beatmap *int地图ID
mode *int模式,0:std,1:taiko,2:ctb,3:mania
scoredict精确数据,详见 score
isplaybool是否为游玩成绩,如果为否则只计算地图信息

score

参数名数据类型默认值说明
accuracydoublenull准确度 0-100
combointnull连击数
n300intnullcombo 300
n100intnullcombo 100
n50intnullcombo 50
missesintnullmiss
n_gekiintnullmania的黄 300
n_katuintnullcatch的 SmallTickMiss / mania的 200
modsstringnull附带mods,如 DTHD

示例

Std

  • 计算地图ID:2717460std 模式
http
POST https://api.yuzuchan.moe/osu/ppcalc
Content-Type: application/json

{
   "beatmap": 2717460,
   "mode": 0
}
  • 计算游玩地图ID:2717460std 模式的结果
http
POST https://api.yuzuchan.moe/osu/ppcalc
Content-Type: application/json

{
   "beatmap": 2717460,
   "mode": 0,
   "score": {
      "accuracy": 99.17,
      "combo": 1564
      "n300": 1026,
      "n100": 13,
      "mods": "HDDT",
   },
   "isplay": true
}

Taiko

  • 计算游玩地图ID:2717460taiko 模式
http
POST https://api.yuzuchan.moe/osu/ppcalc
Content-Type: application/json

{
   "beatmap": 2717460,
   "mode": 1,
   "score": {
      "accuracy": 98.73,
      "n100": 37,
      "misses": 0,
   },
   "isplay": true
}

Ctb

  • 计算游玩地图ID:2717460ctb 模式
http
POST https://api.yuzuchan.moe/osu/ppcalc
Content-Type: application/json

{
   "beatmap": 2717460,
   "mode": 2,
   "score": {
      "accuracy": 99.92,
      "misses": 1,
   },
   "isplay": true
}

Mania

  • 计算游玩地图ID:2717460mania 模式
http
POST https://api.yuzuchan.moe/osu/ppcalc
Content-Type: application/json

{
   "beatmap": 2717460,
   "mode": 3,
   "score": {
      "n300": 1634,
      "n_geki": 157,
      "n_katu": 10,
      "n100": 1,
      "n50": 1,
   },
   "isplay": true
}

响应

字段名数据类型说明
StarRatingdouble地图难度
HPdouble地图 HP
CSdouble地图 CS
Aimdouble地图 Aim 难度
Speeddouble地图 Speed 难度
ARdouble地图 AR
ODdouble地图 OD
aimdoubleAim PP
speeddoubleSpeed PP
accuracydoubleAcc PP
flashlightdouble
effective_miss_countdouble
ppdouble计算游玩的PP
ssppdouble计算该地图SS的PP
ifppdouble计算游玩的地图如果FC的PP

示例

仅显示 std 模式

json
{
   "StarRating": 5.738587643332177,
   "HP": 5.0,
   "CS": 3.5999999046325684,
   "Aim": 2.976119978852806,
   "Speed": 2.502084429304671,
   "AR": 9.300000190734863,
   "OD": 8.800000190734863,
   "aim": 117.62958934808009,
   "speed": 68.54505269302295,
   "accuracy": 69.36988825950219,
   "flashlight": 0.0,
   "effective_miss_count": 0.0,
   "pp": 259.90454059224646,
   "sspp": 293.8718595656594,
   "ifpp": 260.02799911732274
}

基于 VitePress 生成 | MIT 许可发布