π Rate Limiting
Rate limiting is a mechanism that controls how many requests a client can make to the API within a specific time window. It ensures fair usage across clients, protects system stability, and prevents abuse or overloading.
Each account may have different rate limits depending on its setup and service agreement.
β What Happens When You Exceed the LimitCopied!
When your client exceeds the allowed number of requests within the rate limit window:
- The API returns an HTTP 429 β Too Many Requests status code.
- You must wait until the limit resets before making new requests.
- You should not retry immediately. Instead, implement exponential backoff or wait until the reset time provided by the API.
π¦ Rate Limit Response HeadersCopied!
Every response includes headers to help you monitor your current rate limit status:
Header | Description |
---|---|
X-RateLimit-Limit |
Total number of requests allowed in the current window. |
X-RateLimit-Remaining |
Number of requests remaining before you hit the limit. |
X-RateLimit-Reset |
Seconds until the limit resets and you can make requests again. |
π§ͺ ExampleCopied!
Suppose your account is limited to 100 requests per minute:
X-RateLimit-Limit: 100 X-RateLimit-Remaining: 99 X-RateLimit-Reset: 60
This means:
- You can make 99 more requests before hitting the limit.
- After 60 seconds, the counter will reset and you'll be allowed to make requests again.
Once you reach the limit:
HTTP/1.1 429 Too Many Requests X-RateLimit-Limit: 100 X-RateLimit-Remaining: 0 X-RateLimit-Reset: 30
You must now wait 30 seconds before retrying.
π Best PracticesCopied!
- β
Monitor
X-RateLimit-Remaining
andX-RateLimit-Reset
in every response. - β³ When
X-RateLimit-Remaining
is close to 0, pause or slow down your requests. - π If you receive a 429, wait for the number of seconds indicated by
X-RateLimit-Reset
before retrying. - π§ Implement retry logic with exponential backoff to avoid hammering the API.
βNeed Help?Copied!
If you need a higher limit or are unsure about your rate plan, please contact our support team.