ppy / osu-api

Public API for accessing osu! related data.
318 stars 16 forks source link

Searching Users/Beatmaps #5

Closed kkartaltepe closed 3 years ago

kkartaltepe commented 11 years ago

As an osu-api enabled application I want to be able to search through users/beatmaps at least as effectively as I can on the osu! website.

So searching for users by partial name (similarly to the autocomplete when searching users on the website shows names that are close).

And Searching beatmaps by all or most of the search criteria available on osu.ppy.sh/p/beatmaplist

--Edit-- Postponed until someone has an real use for it. Just add a comment if you plan on using this feature should it be implemented.

peppy commented 11 years ago

Sounds fair. Can you state your use case(s) for this?

kkartaltepe commented 11 years ago

I honestly just want to see this thrive but don't have any plans on using the API at the moment.

But some simple use cases are any community site that wants to offer info on users is going to need someway to search them or gather all users in existance and save them to their own database which the current api doesnt offer.

For beatmaps we have a way to batch get all beatmaps but no way to selectively get them for something like a custom !search bot on my own irc net or similar things.

peppy commented 11 years ago

Gathering all users is not a feasible use case. It's not one of my intentions in making this API. Nor is retrieving all beatmaps. Nor all of anything. That's not how an API works.

Search functions are permissible, but I will not add them without a specific use case.

kkartaltepe commented 11 years ago

Retrieving all beatmaps and all users is the forced alternative to not having a search you want implemented at the API level. So if I wanted to search for all maps that SapphireGhost is ranked in the top 50 for this kind of search isnt implemented in the API (and most likely never will for good reason). But as a community site wanting to offer user oriented things like this I would need to aggregate some of the data to enable searching on criteria like this. But maybe I only want to offer this for CtB to start off with. Well without a method of basic searching I would have to begin by gathering all beatmaps CtB or not and then filter them and start building my nifty relations between users and the beatmaps they play.

This is building off of sites like dotabuff.com and lolking.net where I can get advanced statistics on users that may not be available on the main site.

peppy commented 11 years ago

Are you planning on using the search APIs should I implement them?

kkartaltepe commented 11 years ago

Unfortunately not. If you want to close this issue until some entrepreneuring individual who does plan on using them brings it up that's fine with me.

Or I come up with a really nifty idea that requires them. :)

peppy commented 11 years ago

I'll leave it open until someone else comes to find it. I just don't want to implement things unless necessary to avoid wasting time.

ddevault commented 9 years ago

I would like search functions. My use-case is for osu!web, I want to make it so that you can search for a beatmap instead of having to drag-and-drop it.

ddevault commented 9 years ago

I also have an IRC bot that I'd like to add beatmap searching to.

liberaid2 commented 8 years ago

Peppy, as I understood: If I have plan of using search API you will give it to me? Sorry for missunderstanding, Im bad at English

My plan is: Android application with stats and beatmaps (download, extract music/image etc.) 1st step (stats) is ready now. So it'd be nice if you implement beatmap search API

Thanks!

jsw1174 commented 8 years ago

I manage a website for an internet radio station which plays some music that is also playable on Osu.

My use case for this type of functionality involves being able to tie together the songs that the station plays (and are listed on my website) to songs which our listeners might be able to play on Osu. To do this, I need to be able to search via a string i.e. a song title.

Ultimately this could drive more traffic to your platform, it's a win-win.

Phxntxm commented 7 years ago

From what I've gathered, to request a searching feature made available to us we need to request that here? I have a Discord bot that I want to integrate Osu commands on, and with no way to search for beatmaps (minus actually logging in and web scraping) it requires all users to have to provide a beatmap ID for searching up scores on a beatmap.

Considering the steps needed for an end user to find the beatmap ID from searching the site, this can be a hassle for people who might not know what they are doing. The way I design my bot is to be idiot proof; without a search feature for beatmaps it makes that impossible to do atm (again short of web scraping).

tsbreuer commented 7 years ago

Yeah. i'm using osusearch.com on AutoHost bot, but i'd love to have an API part for searching for beatmps (Per gamemode (std/tai/etc), ranked/unranked/loved, star difficulty ranges, etc.

christopher-dG commented 7 years ago

Echoing a duplicate issue I opened:

I wrote a reddit bot that gets beatmap links from score posts but it needs to look at the player's recent plays to get the beatmap ID which isn't quite as reliable as it could be. It would be much easier if I could search by beatmap/song name, the same way you can on the main website.

ekgame commented 7 years ago

http://osusearch.com/ has a nice, but undocumented API for searching beatmaps.

tsbreuer commented 7 years ago

Adding to ek's comment, you can document it yourself by testing the options and looking at the url bae.

jy-roda commented 6 years ago

Hi there. Even if using osusearch is possible, I don't really consider it as a solution. Having the possibility to search for beatmaps from the api would be great, and I brought a use case with me. Because I have plenty of songs in my iTunes library, and that I do not want to search for each of them manually, i would like to make a tool that will give me a list of beatmaps when given the list of my library contents. Of course, I will try to make importing lists from other libraries possible.

Thanks

tsbreuer commented 6 years ago

Its not a solution. Its a temporary patch until we get the proper tool.

Should be possible to do this on lazer (And if not, i'll hop myself in into the api and write it myself (since open-source), when writing autohost).

superloach commented 6 years ago

I'd like this, too. Use: Discord Bot Ability to help: probably not, sorry. (I could help pushing the new api to osu_apy, though)

lukeacat commented 5 years ago

This would be very awsome! I also have uses, Discord Bot and a website.

ignissak commented 4 years ago

I'd really like to see this feature in future, I want to implement it in my discord bot.

heagan01 commented 3 years ago

I want to see this feature in action, I want to make a beatmap searching website with all of the json object displayed

peppy commented 3 years ago

I believe this is already available via api v2. As such I'm closing it here. Please take a look at consuming our newer API if you want this functionality!

muumif commented 2 years ago

ik this is closed but there still isnt this kind of feature in the api v2 or it just isnt documented. making a website that takes anime from mal and searches for the osu song

tybug commented 2 years ago

For searching users you can use https://osu.ppy.sh/docs/index.html#search.

For searching beatmapsets there's https://osu.ppy.sh/docs/index.html#beatmapsetssearchfilters but it's not documented yet. I've implemented the basic query option for beatmapset searching in my api wrapper if you'd like to use that as a reference, though I'm also waiting for it to be documented before implementing all query options.

You should be able to guess the available query options pretty easily though, as they correspond to the url params on https://osu.ppy.sh/beatmapsets.