lichess.org
Donate

API Rate Limiting

I'm trying to use the 'GET /api/user/<username>/games', but I'm getting a 429 error after about 20 requests. I'm grabbing 100 at a time with the moves and cycling through the pages. Basically getting all the games of a particular player.

I'm putting 70 seconds between requests, I thought this would be more than enough. How long should I wait between requests?
I've been told if I get a 429 I can wait 60s and even getting multiple 429s in a row is OK as long as its 60s apart.

I've also heard that's not true at all and getting multiple 429s can get me banned no matter what.

It'd be nice to have something more clear on the limits.
The official policy (from the github readme):

To respect the API servers and avoid an IP ban, please wait 1 second between requests. If you receive an HTTP response with a 429 status, please wait a full minute before resuming API usage.

This topic has been archived and can no longer be replied to.