Home Docs Rate Limits

Rate Limit

Understand rate limits and how to increase them.

The response headers describe your current rate limit following every request:

Header name Description
X-RateLimit-Limit Maximum number of requests allowed within a minute.
X-RateLimit-Remaining How many requests you have left within the current window.
Retry-After How many seconds you should wait before making a follow-up request. Only present when rate limit is exceeded.

The default maximum rate limit is 100 requests per minute. This number can be increased for trusted games upon request.

After that, you'll hit the rate limit and receive a 429 response error code.

To prevent this, we recommend reducing the rate at which you request the API. This can be done by introducing a queue mechanism or reducing the number of concurrent requests per minute. If you have specific requirements, contact support to request a rate increase.

Example Response Headers

Here's an example of the rate limit headers you'll receive with each API response:

HTTP/1.1 200 OK
Content-Type: application/json
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95

{
  "success": true,
  "message": "Submission received successfully"
}

When Rate Limit Is Exceeded

When you exceed the rate limit, you'll receive a 429 Too Many Requests response with a Retry-After header indicating how many seconds to wait:

HTTP/1.1 429 Too Many Requests
Content-Type: application/json
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 0
Retry-After: 45

{
  "success": false,
  "message": "Rate limit exceeded",
  "errors": {
    "rate_limit": [
      "Too many requests. Limit is 100 requests per minute."
    ]
  }
}

How Rate Limits Work

Rate limits are calculated per API key (per game) and reset every minute. This means:

  • Each game has its own independent rate limit of 100 requests per minute
  • The limit resets every 60 seconds on a rolling window basis
  • If no API key is provided, rate limiting is applied per IP address
  • Rate limit headers are included in every API response to help you track usage

Best Practices

To avoid hitting rate limits and ensure smooth operation of your game:

Implement Request Queuing

Queue player submissions locally and send them in batches rather than immediately. This helps smooth out traffic spikes and prevents rate limit errors during busy periods.

Use Exponential Backoff

When you receive a 429 response, implement exponential backoff: wait for the time specified in the Retry-After header before retrying, and increase the wait time with each subsequent failure.

Monitor Rate Limit Headers

Check the X-RateLimit-Remaining header in your responses. When it gets low, consider slowing down or pausing requests temporarily.

Spread Out Requests

Avoid sending bursts of requests at once. Distribute your API calls evenly throughout the minute to maintain consistent performance.