Sign In To Proceed 435v5c

Don't have an ? 473g1v

osu! to create your own !
forum

osu!api open beta 5f2m6y

posted
Total Posts
90
Topic Starter
I've had an API available for a while but until now it has been on a private on-request basis. In order to try and make developing third party services which expand and osu!, I have added an API key setup and started to document the API.

Reference:

osu!api wiki: http://github.com/peppy/osu-api/wiki
osu!api key management: http://osu-ppy-sh.jeuxcrack.net/p/api

Documentation will be expanded as I find time to do so! If anyone currently using the API is able to help expand the documentation then please do.
Before I spam it with requests that might not exist, is there anything to get 's information?
(Also, is there anything to s from this page in other places?)

comentarinformal wrote: 186m44

Before I spam it with requests that might not exist, is there anything to get 's information?
(Also, is there anything to s from this page in other places?)
There is /api/get_

Gonna write an entry with the information I have about it.

EDIT: Done.
Is there a fair use limit? (e.g. no more than XX requests per day)

For get_, I suppose there is a mode parameter for getting information for Taiko, CtB and osu!mania? Or do I have to file an issue in GitHub? Nevermind, I found it, the parameter to add is called "m" :D I have edited the GitHub wiki.
So is out...

Oh well. I have some questions:

Are only the beatmap and endpoints available?
The parameter "since" in /get_beatmap how I need to the time on it? UTC or unix timestamp?
Do I need to the key on the wiki's API too?
Edit: What the countX values mean? Number of beatmaps?
Topic Starter
@XPJ38: see doc.

@Repflez:
since = mysql date
wiki api = ?
everything else you asked is in the doc.
Topic Starter

comentarinformal wrote: 186m44

Before I spam it with requests that might not exist, is there anything to get 's information?
(Also, is there anything to s from this page in other places?)
"spamming" with requests is considered "evil" use. you may be banned from the api and/or osu! for doing so. the api is not provided to retrieve a full set of information. it is provided to do lookups when necessary.
I'd like to know beatmap's mode on get_beatmaps request.
Isn't it possible?
Minor gripe: Please return integers as such.
Topic Starter
All requests and bugs should be filed on github: https://github.com/peppy/osu-api/issues
Any rate limits?
Topic Starter
See doc.
With this now open, is getting data from http://osu-ppy-sh.jeuxcrack.net/pages/include/profile ... id&m=$mode will be still possible or it may becaume unavaillable ?
(Lazy to change my PHP code *o*)
Topic Starter
Please switch to using the API. Please please please. That page you are using will no doubt change in the future and cause you more grief than if you spend a bit of time and make your code use the new API.
I guess I'll update my bar too when I find some time.

Before I apply and pick a name that cannot be changed, is the API key going to be global to my osu! or is it set up in a way that I can have a second API key if I make another app/tool ?
Topic Starter
For now it's one per .

Damnae wrote: 4h4n1r

I guess I'll update my bar too when I find some time.

Before I apply and pick a name that cannot be changed, is the API key going to be global to my osu! or is it set up in a way that I can have a second API key if I make another app/tool ?
I ed it for osu!bar, but I also use it for my "Big ugly white signature", they are not on the same webserver, but it works fine :)
I belive only you and peppy can see the name you used, too.

(Yes I took my lazyness off, it was not that long to update ^^)
@Repflez: I tried using your API-powered signature and I get something weird.



Since I only aim for SS, I have 100% Accuracy all the time, and the Accuracy display is weird.

(I now know that despite having all-SS records, the note hit count for getting 50s and 100s are still counted all the time :P)

Winshley wrote: 5616h

@Repflez: I tried using your API-powered signature and I get something weird.



Since I only aim for SS, I have 100% Accuracy all the time, and the Accuracy display is weird.

(I now know that despite having all-SS records, the note hit count for getting 50s and 100s are still counted all the time :P)
So that's what the CountX values mean. Thanks for that. I already went and changed the accuracy to show a centered "100% Accuracy" if it's 100. Forget that. I ditched the bar on it and used the extra space for showing the PP.

(I love how the 300 count ended overlaping the border)

Repflez wrote: 3zl5z

So that's what the CountX values mean. Thanks for that.
Yeah. At first I thought that there was something wrong with the API showing 50s and 100s despite having 100% Accuracy, until I actually calculated all 300s + 100s + 50s = "Total Hits" on our profile. :P

About the 300 overlap though, it does need some fix:


When you reached 10 millions of 300 hits, the last number is cut off. Cookiezi has 17 millions of 300 hits.

And an extra:

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? :?

Winshley wrote: 5616h

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: 5616h

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:
SPOILER
Array
(
[0] => Array
(
[_id] => 864895
[name] => 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:
number_format(substr(unround_number($[level],true),0,3)*0.264,0)

That means: The first 3 decimals of $[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.
Avail_old_1
old

Still loads to do though :>

EDIT:

Available online for all you people at http://availu.net/osu/
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)?
Avail_old_1

peppy wrote: 6w4l42

@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_? 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_?
Topic Starter
Please request additions on the github issues page!
Ohhh!! :D
This like an almost a year threads, i don't know where do i ask about API things, most of s 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 s profile anymore.
Topic Starter
what for? and it is still in profiles

peppy wrote: 6w4l42

what for? and it is still in profiles
Say some guys app tracks names primarily (me, it cycles through logs for names not UIDs and editing the name 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 from the old name to the new much easier/faster. As for the profile, a quick view of source tells me I'm dumb and I need to hover over the name, didn't know that. Whoops.
Topic Starter
Logging based on name is horribly wrong. You should be using id from the start..

peppy wrote: 6w4l42

Logging based on name is horribly wrong. You should be using 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 with

get_
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: 6y7t

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 s to enter their own API key. It's as simple as that.

XPJ38 wrote: 364g3l

Request your s 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 /

#why?
Hi good initiative with this api ... Question ... Can we grab current 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_" any advice would be appreciated. Thanks
For API feature requests, please use the issue tracker here.
*sigh*
Sounds cool. :D
Ok
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 https://ameobea.me/osutrack/ , 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 have, for example: 200 pp of bonus (1090 ranked scores), because by doing this you could make some s 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 , 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 er 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 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:

https://www.reddit.com/r/osugame/commen ... _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 s' 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: 634t2b

So... Can I?
https://osu-ppy-sh.jeuxcrack.net/p/api ^^

oliebol wrote: 6k1m1a

EMENCII wrote: 634t2b

So... Can I?
https://osu-ppy-sh.jeuxcrack.net/p/api ^^
Yes, but... Isn't it too much data?
¯\_(ツ)_/¯

oliebol wrote: 6k1m1a

¯\_(ツ)_/¯
Well then, I'll try...

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

oliebol wrote: 6k1m1a

the dev-discord server (http://discord.gg/ppy) and ask in the api-channel there
Thank you very much, your help was very appreciated :D
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?

	$.post(
"https://osu-ppy-sh.jeuxcrack.net/api/get_scores",
{
k : "my_api_key",
b : '1026729',
u : "Wilchq",
m : 0,
type : "string"
},
function(data) {
console.log(data);
}
);

Vostok Sisters wrote: og1z

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?
If you specify the "u" parameter, it will return empty unless that player has an score in that map. Remove that parameter.
Also, try using '0' instead of 0 in the "m" parameter.
Put your api key in the "k" parameter if you haven't already.

Full Tablet wrote: e5e38

Vostok Sisters wrote: og1z

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?
If you specify the "u" parameter, it will return empty unless that player has an score in that map. Remove that parameter.
Also, try using '0' instead of 0 in the "m" parameter.
Put your api key in the "k" parameter if you haven't already.

Nope, same query response

https://github.com/ppy/osu-api/issues/139
It seems like get_scores doesn't work with POST requests in particular. Try doing a GET request instead.

Full Tablet wrote: e5e38

https://github.com/ppy/osu-api/issues/139
It seems like get_scores doesn't work with POST requests in particular. Try doing a GET request instead.
Yes, with get-request it's works. Thanks.
/api/get_scores

k - api key (required).
b - specify a beatmap_id to return score information from (required).
u - specify a _id or a name to return score information for.
If I specify the name in the query, does the 's top results return or result what in the top 100 best of all time and s?

//Ref API
how can i know if my request for api is declined or can be accepted soon? :cry: :cry: :cry: :cry: :cry:
Hello, as I do not think there is something about it yet, it's kind of a feature request;

When requesting information, how do we differentiate an error from a non existent from a restricted from a permanently banned ?

I have a set of s and I am thinking of lowering requests rates depending on activity / API repsonse.

The problems I ran into were Invalid answers : I cannot interprate them as a banned because they happen randomly as well, and I don't want to untrack someone totally legit, but it results in probably many restricted or banned s to generated requests once a day each, lowering the service quality for others :/

If it already exists I didn't know about it,if not this would be a great feature :)
[Redacted] turns out it's in the docs
Hi. I've noticed that the API has been changed from aggregating S+SH and SS+SSH ranks to now providing these values as separate entries in the returned JSON for the `get_` endpoint. This is a great change (although exposing it behind a new version or modified endpoint would have been nice), but it doesn't seem to be returning accurate data.

The `count_rank_s` and `count_rank_sh` attributes are reporting the same value for all s that I've tested. This value is lower than previous values for the `count_rank_s` attribute in the past, leading me to believe that this is a bug in the API.

My guess is that the API is reporting the count of non-HD S ranks for both of those attributes, and that the `count_rank_sh` is innacurate. Can anyone else confirm that this is the case?
Oh I didn't notice that this change had been made >< This is where all the SS went for the past month ! I made the change too but it would have been nice to be warned ^^ Also if this is reverted or something it would be nice to be warned ^^
Player368
Why?
SPOILER
This display site

This display api


please help me, I don `t know why this happens. and it breaks my code
Yes this is a known bug they didn't fix, rank_sh is the same as rank_ss somehow. For now I just dont count it because it's broken
Honestly can't wait for new progress on the game! keep up the good progress!
I just didn't understand, can someone help me to tell what is the point of this discussion ?
Une api OSU! cool
Its loooks preaty good xDDD

XPJ38 wrote: 364g3l

Is there a fair use limit? (e.g. no more than XX requests per day)

For get_, I suppose there is a mode parameter for getting information for Taiko, CtB and osu!mania? Or do I have to file an issue in GitHub? Nevermind, I found it, the parameter to add is called "m" :D I have edited the GitHub wiki.


Gooood, I totally the 2008 one. Random comment but your image gave me nostalgia lol xd
Can anyone help me understand the /get_beatmaps endpoint?

From my understanding is that based on these variables that you can narrow down what maps you want to search.

these variables
since - return all beatmaps ranked or loved since this date. Must be a MySQL date. In UTC
s - specify a beatmapset_id to return metadata from.
b - specify a beatmap_id to return metadata from.
u - specify a _id or a name to return metadata from.


For [since] is it possible to find beatmaps that aren't loved or ranked?

Thanks
Is it possible to get an API-key without having a discord ?

I'd rather not to discord with my actual email and using guerrilla mail to didn't work either due to them asking for verification by phone because discord detected 'something out of the ordinary going on'.
Hello,
I bumped into an issue trying to get the response from a request, that has more than 500 hits, but it's limited to giving 500. Is there a way to send a new request to get the remaining results that didn't fit in the first response(the next 500, and then the next 500 and so on)?

I'm trying to use the get_beatmaps query to get unranked mania maps, and since they are unranked the 'since' keyword doesn't apply and I can't find any other way to control from which point I want to get the results.

I've also opened an issue about it on the github page of the api wiki, but it didn't see much traffic and I'm hoping I can get an advice here.

varn88 wrote: 6kgr

Hello,
I bumped into an issue trying to get the response from a request, that has more than 500 hits, but it's limited to giving 500. Is there a way to send a new request to get the remaining results that didn't fit in the first response(the next 500, and then the next 500 and so on)?

I'm trying to use the get_beatmaps query to get unranked mania maps, and since they are unranked the 'since' keyword doesn't apply and I can't find any other way to control from which point I want to get the results.

I've also opened an issue about it on the github page of the api wiki, but it didn't see much traffic and I'm hoping I can get an advice here.


the osu! api does not a "since" parameter therefore I recommend using bloodcats api
I'm trying to get an info about a player with "Loli Hikikomori" trough old api but get null in return. I try 3 other players - everyhting is fine. Could the fact that he had been banned long time ago be the problem?
Is there a way to use the api to all of someone's plays?
not all. Only if their score is in top 500
is it top 500 now ? i thought you could only get top 100 scores from a beatmap

peppy wrote: 6w4l42

I've had an API available for a while but until now it has been on a private on-request basis. In order to try and make developing third party services which expand and osu!, I have added an API key setup and started to document the API.


I was just making a web client for osu! and this is going to be very helpful!
A web client osu! That would be cool
making a livecount is legal?, ive made one

mathias777 wrote: 6a232s

making a livecount is legal?, ive made one
i think yes?
Please sign in to reply.

New reply 1b384i