Rate limits

The limit

300 requests a minute for each key, counted over a sliding minute. Every key has the same limit, whatever its label. A call with no valid key is refused with 401 before it is counted against any key.

Headers

Every response to a call made with a valid key carries:

HeaderMeaning
RateLimit-LimitThe limit: 300.
RateLimit-RemainingHow many calls are left in the current minute.
RateLimit-ResetSeconds until the count recovers.

When you are over the limit the answer is 429 rate_limited with a Retry-After header, in seconds:

HTTP/1.1 429 Too Many Requests
Content-Type: application/problem+json
Retry-After: 12
RateLimit-Limit: 300
RateLimit-Remaining: 0
RateLimit-Reset: 12

Wait that long before you call again. In a browser your script can read these headers: the API lists them as exposed.

The block rule

A key that keeps getting 429 and goes on calling for 5 minutes is blocked for 15 minutes. While it is blocked, every call answers 429 rate_limited with Retry-After set to the time left, and the detail says the key is blocked. A client that honours Retry-After never reaches this.

Staying under it

In the SDK

LovebowlsApiError carries retryAfter (seconds, or null) for a 429:

import { LovebowlsApiError } from "@lovebowls/api";

async function withRetry(call, tries = 3) {
  for (let attempt = 1; ; attempt++) {
    try {
      return await call();
    } catch (error) {
      const retriable = error instanceof LovebowlsApiError && (error.status === 429 || error.status === 502);
      if (!retriable || attempt === tries) throw error;
      await new Promise((r) => setTimeout(r, (error.retryAfter ?? 2 ** attempt) * 1000));
    }
  }
}

const club = await withRetry(() => lb.getClub("CLUB_ID"));