forum

osu!api open beta

posted
Total Posts
90
show more
Pannari
Would be great if there was a way to retrieve the current match ID of a user with

get_user
gearintellix
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
magnontobi
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?
XPJ38

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.
magnontobi

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.
gearintellix
oh man now osu api not worked :3 /

#why?
idk
Hi good initiative with this api ... Question ... Can we grab current user logged ?
shares5
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
Howl
For API feature requests, please use the issue tracker here.
ukco
*sigh*
Naracion_old
Sounds cool. :D
Zozimoto
Ok
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 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 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:

https://www.reddit.com/r/osugame/commen ... _pp_score/
EMENCII
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?
oliebol

EMENCII wrote:

So... Can I?
https://osu.ppy.sh/p/api ^^
EMENCII

oliebol wrote:

EMENCII wrote:

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

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?
oliebol
Join the dev-discord server (http://discord.gg/ppy) and ask in the api-channel there
EMENCII

oliebol wrote:

Join 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
wokalek
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/api/get_scores",
{
k : "my_api_key",
b : '1026729',
u : "Wilchq",
m : 0,
type : "string"
},
function(data) {
console.log(data);
}
);
Full Tablet

Vostok Sisters wrote:

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.
wokalek

Full Tablet wrote:

Vostok Sisters wrote:

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

Full Tablet
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.
wokalek

Full Tablet wrote:

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.
wokalek
/api/get_scores

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

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

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

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

The problems I ran into were Invalid answers : I cannot interprate them as a banned user 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 users 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 :)
ColdVolcano
[Redacted] turns out it's in the docs
Ameo
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_user` 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 users 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?
Adri
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
Adri
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
- Incarndine -
Honestly can't wait for new progress on the game! keep up the good progress!
vanessahime
I just didn't understand, can someone help me to tell what is the point of this discussion ?
MTG
Une api OSU! cool
CacTuZ
Its loooks preaty good xDDD
_Nox_

XPJ38 wrote:

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

For get_user, I suppose there is a mode parameter for getting user 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 remember the 2008 one. Random comment but your image gave me nostalgia lol xd
buggycode
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 user_id or a username to return metadata from.


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

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

I'd rather not register to discord with my actual email and using guerrilla mail to register didn't work either due to them asking for verification by phone because discord detected 'something out of the ordinary going on'.
varn88
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.
oSumAtrIX

varn88 wrote:

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 support a "since" parameter therefore I recommend using bloodcats api
Kimochi Warui
I'm trying to get an info about a player with login "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?
oliebol
WoctorDho
Is there a way to use the api to download all of someone's plays?
abraker
not all. Only if their score is in top 500
Adri
is it top 500 now ? i thought you could only get top 100 scores from a beatmap
Oderjunks

peppy wrote:

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 support 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!
Shinjxi
A web client osu! That would be cool
mathias777
making a livecount is legal?, ive made one
Carlodium

mathias777 wrote:

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

New reply