osu!api open beta

Total Posts
show more

Winshley wrote:

When you reached 10 millions of 300 hits, the last number is cut off. Cookiezi has 17 millions of 300 hits.
I plan to change that to the Total Hit Count once I finish with some things with the API interface that the image uses.

Winshley wrote:

I'm not sure how the level bar breaking happens though... I was thinking that it probably because I don't have any ranked score on osu!mania? :?
The API says that you "full" stats in osu!mania:
[0] => Array
[user_id] => 864895
[username] => Winshley
[count300] => 7164
[count100] => 23
[count50] => 12
[playcount] => 338
[ranked_score] => 0
[total_score] => 144063600
[pp_rank] => 0
[level] => 28.0984
[pp_raw] => 0
[accuracy] => 0
[country] => ID


Probably the stats didn't got cleared after the score clear when the mode went gold so the API returns what it has. I'll go raise an issue to peppy when I have the time. issue #9

About the bar... Yeah, that's a bug. The formula to calculate the width of the bar is flawed:

That means: The first 3 decimals of $user[level] * 0.264 and the result gets rounded.

In your case is making this operation: 98 * 0.264 which is returning a width of 26 (The actual result is 25.872 but I round it) and it expects to be at least 71 for some reason and since the result is lower, the entire bar went backwards. I blame ImageFilledRectangle for that bug.

Still loads to do though :>


Available online for all you people at
Don't mind the ugly generator looks, still working on stylizing it.
Topic Starter
@Avail: you are currently doing *no* caching. That means every time that image is displayed, it is consuming huge resources on your server (and doing an underlying API call to osu!). best work on that if you plan on letting many people use it :p.
I'm curious... in osu!mania, what are count300, count100, and count50 based from? Is it MAX, 300, and 200 respectively? If so, how to get the remaining hits though (e.g: 100 and 50)?

peppy wrote:

@Avail: you are currently doing *no* caching. That means every time that image is displayed, it is consuming huge resources on your server (and doing an underlying API call to osu!). best work on that if you plan on letting many people use it :p.
I plan on adding caching, if I ever learn how to.
If you really have no idea how to do caching then I highly recommend that you at least use this: t/141331
Just recently found this. Pretty cool, helps me a lot to gather information and whatnot. But I got questions to ask:
1. Is it possible to get more than 5 events/recent activities from /api/get_user? Since profile page offers more than the API does.
2. Pretty much just a suggestion. Perhaps can you add the information about infringements into /api/get_user?
Topic Starter
Please request additions on the github issues page!
Ohhh!! :D
-Sandy Corzeta-
This like an almost a year threads, i don't know where do i ask about API things, most of users push me to the forum. And i don't know if this would be answered or not, but i kinda like to ask something..

The API stats for osu!Mania,
in the game there is a 200 Hit, but in stats there is no such thing for that...
so is that means 200 count as 300 hit on the stats? ... thank you !

#48 issues on GitHub
Is it possible to get API access for WIP projects, even if now official website exists yet?

If not, how likely is it to get the API access request accepted? I don't wan't to finish a project and then not being able to publish it because the api request was denied.
Topic Starter
go for it. it's automated.
Great, thanks!
I want to request something (not an API request but some data). Can someone send me some of their cached hits on /api/get_match? I want to do (or try) something related to multiplayer matches but I need some data to test with, especially matches with FreeMod because I want to make sure that I did the mod enum right on my application.
Could we have the old "previously known as" field that used to be in the profile page in the API?
Would be quite useful seeing as it's not even in the users profile anymore.
Topic Starter
what for? and it is still in user profiles

peppy wrote:

what for? and it is still in user profiles
Say some guys app tracks names primarily (me, it cycles through logs for usernames not UIDs and editing the username to UID would use way too much in resources and would break logging, unless you want logs like <39283> Hi there greg) it'd make migrating a user from the old username to the new much easier/faster. As for the user profile, a quick view of source tells me I'm dumb and I need to hover over the username, didn't know that. Whoops.
Topic Starter
Logging based on username is horribly wrong. You should be using user id from the start..

peppy wrote:

Logging based on username is horribly wrong. You should be using user id from the start..
Not as easy as that seeing how my stuff comes directly from IRC with no middleman for conversion. If there was a version of Bancho that used UID; I'd use it and create a postprocessor for converting the UID to real name but its a pain creating a preprocessor to convert to UID and a postprocessor to convert from for human readable format especially seeing the quantity people talk in all channels and the amount of API calls that'll be, even with caching it'll still be heavy.

Probably phrased that wrong as I'm typing this from my phone but you get my drift.
Would be great if there was a way to retrieve the current match ID of a user with

Sorry peppy,
your API not be possible with ajax (javascript),
result COR-Cross-Origin Request Blocked because some security things on HTTP request

but there is a solution for that with JSONP
with some additional callbacks

Please Fix it :D
Github issue #71
What about open source / easily to decompile java that is going to run on someone else's machine? What I mean is what would happen if people were to get hold of your api key and abuse it. Would that ban me on osu! for trying to make a cool application?

magnontobi wrote:

What I mean is what would happen if people were to get hold of your api key and abuse it. Would that ban me on osu! for trying to make a cool application?
Don't share your key. Request your users to enter their own API key. It's as simple as that.

XPJ38 wrote:

Request your users to enter their own API key.
That is one option. One that I have been thinking about at that. However, to get an API key you have to apply for access. The form on which you do so is quite obviously meant for developers only. Really, what I'd like is to have Peppy's opinion on what to do for this one.
oh man now osu api not worked :3 /

Hi good initiative with this api ... Question ... Can we grab current user logged ?
Sorry if bumping 2 year old threads is frowned upon here, I was just wondering if it was possible to get somebodies country rank using the API, i can only find the global rank in "/api/get_user" any advice would be appreciated. Thanks
For API feature requests, please use the issue tracker here.
Sounds cool. :D
Scarlet Evans
Is it possible to access either the number of all ranked scores done or number of bonus PP a player have? Or maybe you can somehow access number of B, C and D-rank scores that player have?

If not, I think it would be a great idea to add it and I am going to explain why.

I heard many times about people wanting to write a calculator / spreadsheet / other, that would allow us to input a new PP score on a certain position of top #100 highscores and calculate how much net PP we would gain from it. I even thought about doing it myself.

The problem is: bonus pp based on the number of ranked maps you have a score on.

Let's start from writing down how you can make such calculation as inserting a new PP score on #N-th position. To do this, we need to:
  1. Subtract the bonus pp from total pp. The bonus is: 416.6667 (1- 0.9994^Number_of_scores).
  2. Subtract all the scores (weighted) that are on the previous positions (that is: #1 to #(N-1)). Not needed for new #1 score.
  3. Multiply the result by 0.95, to shift all the lower scores down by one position.
  4. We add the new score, weighted 0.95^(N-1).
  5. We add all the subtracted previously weighted scores from positions #1 ... #(N-1) back.
  6. We add Bonus PP.

    This gives us new Total PP, after adding a new score at N-th position. If there are some very small errors, they come mostly from our knowledge about top PP scores being imperfect. However, if you was to use things like , instead of taking scores' PP from your profile page, you can make it really precise, at least up to 2-nd or 3-rd decimal!

Now, someone will ask: Can we somehow simplify it, so we don't need to know bonus PP? Well... not really.

Someone that have 100 ranked scores will have about 24.272 pp of bonus.
Someone that have 500 ranked scores will have about 108.02 pp of bonus.
Someone that have 1000 ranked scores will have about 188.036 pp of bonus.
Someone that have 2000 ranked scores will have about 291.214 pp of bonus.
Someone that have 5000 ranked scores will have about 395.941 pp of bonus.
Someone that have 10000 ranked scores will have about 415.636 pp of bonus.

So, you can't suppose that an average user have, for example: 200 pp of bonus (1090 ranked scores), because by doing this you could make some users gain or lose even about 10 pp with a single calculation! Purely from their difference with the bonus pp you assumed they have.
If you was to "assume that someone have X bonus pp" and subtract it during calculation, then simply shifted all the scores, multiplying them by 0.95, this person would "lose" 1pp for every 20 bonus pp he have above of your estimation and "gain" 1pp for every 20 bonus pp below your estimation.

Right now you can add number of SS, S and A scores, to get a minimum of the scores a player can have, but it would work almost only for the players that have many thousands of SS/S/A ranks and sometimes even only moderately (unless they have +10k scores...). Even with few 1000s' of plays, getting something like 0.5pp-1pp of error can result in calculation being useless, if the score was to be a very slight improvement or being somewhere at the lower half of top #100 list.
Also, the number of SS/S/A rank plays differ between the players. Some of them can have almost no B/C/D ranks and some of them can even have their plays doubled by adding these ranks into account, which can result in few PP of error too. What's the point of it, if the score was to give you +3pp, but error was -3pp and calculation would show you +0pp?

Someone could make a calculator, where a player can add a number of scores manually, leaving the problem to a player, but this number can be still hard to estimate even by themselves. Players with supporter could try to search for beatmaps they have SS/SSH/S/SH/A/B/C/D rank on and add these all scores, but even amongst them rarely anyone know or remember that you can do it.


So, the best solution would be to take an information about number of scores the player have directly from server, along with the top 100 PP values with precision up to few decimals. This could allow in making a very precise Calculator or Highscores Planner.


I would be really grateful for a response in this matter! Also, as a bonus, the most recent reddit post about it: ... _pp_score/
I'm sorry if this is not the proper place, or if someone already asked this.

I would like to have some of the users' stats, just for personal information, to calculate some numbers etc.
My point is, is there a way to get the first 100-200k players based on their rankings?
I haven't asked for an api key yet, since I'm not even sure if I can do this.

So... Can I?

EMENCII wrote:

So... Can I? ^^

oliebol wrote:

EMENCII wrote:

So... Can I? ^^
Yes, but... Isn't it too much data?

oliebol wrote:

Well then, I'll try...

Though, giving a better look at the APIs, I should basically know their IDs or names....
So... Any ideas?
Join the dev-discord server ( and ask in the api-channel there

oliebol wrote:

Join the dev-discord server ( and ask in the api-channel there
Thank you very much, your help was very appreciated :D
Vostok Sisters
Hello. I trying to grab information about top 100 scores of a specified beatmap.

But the server receives an empty response. Where error in my query?

k : "my_api_key",
b : '1026729',
u : "Wilchq",
m : 0,
type : "string"
function(data) {
show more
Please sign in to reply.

New reply