All requests to the Shorturlx API are subject to rate limits to ensure fair usage.
Limits
| Request type | Limit |
|---|
| Authenticated | 100 requests per 10 minutes |
| Unauthenticated | 10 requests per 10 minutes |
Authenticated requests are tracked per API key. Unauthenticated requests are tracked per IP address.
Every API response includes the following headers so you can monitor your usage:
| Header | Description |
|---|
X-RateLimit-Limit | Maximum number of requests allowed in the current window |
X-RateLimit-Remaining | Number of requests remaining in the current window |
X-RateLimit-Reset | Unix timestamp (milliseconds) when the current window resets |
Example response headers:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 99
X-RateLimit-Reset: 1698759340000
Handling rate limit errors
When you exceed the limit, the API returns HTTP 429 with the following body:
{
"error": "Rate limit exceeded",
"limit": 100,
"remaining": 0,
"reset": 1698759340
}
Wait until the reset timestamp before retrying. You can read the X-RateLimit-Reset header from any prior response to know when your window will expire.
Cache shortened URLs on your side whenever possible. If you shorten the same long URL multiple times, store the result locally and reuse the shortUrl instead of making repeated API calls.