Skip to main content

Rate Limits

The Gomry API enforces rate limits to ensure fair usage and service stability.

Current Limits

ScopeLimit
Per IP address60 requests per 10 seconds
When you exceed the rate limit, the API returns a 429 Too Many Requests response:
{
  "error": "Rate limit exceeded. Try again shortly."
}

Best Practices

Batch where possible

Use list endpoints with pagination instead of fetching resources one by one.

Cache responses

Cache API responses on your end to reduce the number of requests, especially for data that doesn’t change frequently (events, ticket classes).

Use exponential backoff

When you receive a 429, wait before retrying. Double the wait time on each subsequent retry.

Spread requests over time

If syncing large datasets, spread requests evenly rather than bursting all at once.

Retry Strategy Example

async function fetchWithRetry(url, headers, maxRetries = 3) {
  for (let attempt = 0; attempt <= maxRetries; attempt++) {
    const response = await fetch(url, { headers });

    if (response.status !== 429) return response;

    const delay = Math.pow(2, attempt) * 1000; // 1s, 2s, 4s
    await new Promise((r) => setTimeout(r, delay));
  }

  throw new Error("Rate limit exceeded after retries");
}