Skip to content

Rate Limits

The xQR API enforces two layers of rate limiting to ensure fair usage and platform stability.

Two-Layer System

1. Burst Rate (per API key)

Token-bucket algorithm limiting requests per second. Tokens refill continuously at the plan’s rate.

PlanRequests/second
Pro10
Business50
Enterprise200

When burst-limited, the API returns 429 Too Many Requests with a Retry-After: 1 header.

2. Monthly Quota (per workspace)

Total API calls allowed per billing cycle, tracked in the database.

PlanMonthly API Calls
Free0 (API disabled)
Pro1,000
Business25,000
Enterprise100,000

When the monthly quota is exhausted, all API calls return 429 until the next billing cycle.

Rate Limit Headers

Every v1 response includes these headers:

HeaderDescription
X-RateLimit-LimitMonthly quota total
X-RateLimit-RemainingMonthly calls remaining
X-RateLimit-Burst-LimitMax requests per second
X-RateLimit-Burst-RemainingBurst tokens remaining

Handling Rate Limits

const res = await fetch("https://xqr.co/api/v1/links", {
headers: { Authorization: `Bearer ${apiKey}` },
});
if (res.status === 429) {
const retryAfter = res.headers.get("Retry-After");
// Wait and retry
await new Promise((r) => setTimeout(r, (parseInt(retryAfter || "1")) * 1000));
}

Monitoring Usage

Check your current usage via the API:

Terminal window
curl https://xqr.co/api/v1/workspace/usage \
-H "Authorization: Bearer YOUR_API_KEY"

Or visit Developers → Usage in your dashboard for a visual breakdown.

Was this page helpful?