API Rate Limits
← General
API Rate Limits
Section titled “API Rate Limits”A rate limit is a policy that restricts how frequently an API endpoint can be called within a given time window. SIPSTACK applies rate limits to protect platform infrastructure from abuse and to maintain consistent performance for all users.
Rate Limit Policies
Section titled “Rate Limit Policies”API requests are categorized into four policies, each with a different limit:
| Policy | Rate Limit | Throttle Window |
|---|---|---|
| Light | 50 requests/minute | 60 seconds |
| Medium | 40 requests/minute | 60 seconds |
| Heavy | 10 requests/minute | 60 seconds |
| Auth | 5 requests/minute | 0 seconds |
If you exceed the limit for a given policy, the server returns HTTP 429 Too Many Requests. The Retry-After response header specifies how many seconds to wait before retrying.
Rate Limit Response Headers
Section titled “Rate Limit Response Headers”Every API response includes rate limit headers (unless the endpoint is unlimited):
| Header | Description |
|---|---|
X-Rate-Limit-Policy | The policy category for this request (Light, Medium, Heavy, Auth) |
X-Rate-Limit-Limit | The maximum number of requests allowed in the current window |
X-Rate-Limit-Remaining | Requests remaining in the current window |
X-Rate-Limit-Window | The window duration in seconds |
Example response headers:
HTTP/1.1 200 OKX-Rate-Limit-Policy: lightX-Rate-Limit-Limit: 50X-Rate-Limit-Remaining: 49X-Rate-Limit-Window: 60Content-Type: application/json; charset=UTF-8Handling Rate Limits in Your Application
Section titled “Handling Rate Limits in Your Application”Single-threaded applications
Section titled “Single-threaded applications”- Monitor
X-Rate-Limit-Remainingin each response. - When it reaches
0, pause for the number of seconds specified inX-Rate-Limit-Window. - If you receive a 429 response, wait for the number of seconds in the
Retry-Afterheader before retrying.
Server overload (503 responses)
Section titled “Server overload (503 responses)”If the API returns HTTP 503 Service Unavailable:
- Wait a default retry interval (e.g., 5–10 seconds).
- Retry once.
- If the retry also fails, implement exponential backoff with a configurable maximum number of retries.