lichess-org / lila

♞ lichess.org: the forever free, adless and open source chess server ♞
https://lichess.org
GNU Affero General Public License v3.0
14.91k stars 2.22k forks source link

API improvement: better Games Search API #14406

Open Siderite opened 6 months ago

Siderite commented 6 months ago

Related to https://github.com/lichess-org/lila/issues/12066, I was trying to use the /games/search endpoint to get the list of ids and then with the /api/games/export/_ids API downloading the results.

However, /games/search only returns 12 results at a time and has a strange rate limit policy (val cost = scala.math.sqrt(page.toDouble).toInt with a 50 budget for 5 minutes) meaning getting any results towards the end is practically impossible.

It also happens directly on the Advanced Search page, just by setting the page parameter in the URL to 64, for example, and going a few pages down. With a delay of 7 seconds before page loads, which is excruciatingly slow, I still get 429s at only 228 ids.

My suggestions:

Siderite commented 2 months ago

Any news here?