The rate limit currently stands at 750 units per minute per user. Each API function has a cost, which is deducted from your rate limit when you call it. Rate limits aren't reset, instead they are replenished continuously - so after 30 seconds, a previously empty rate limit will have 375 units available.
Avoiding rate limiting
Spread your requests
Performing a high number of API calls in a short space of time will quickly use your rate limit. Spreading the requests over a minute or so will allow the rate limit to replenish so you are less likely to get limited.
Cache API calls for at least a few seconds, and try to avoid making repetitive API calls.
- The Tracking API is not rate limited, instead it's covered by your Account Limits.
- GoSquared dashboards use the API and therefore use your rate limit, but the cost of each function is divided by 8.
- If you need a higher limit then get in contact through our support page where we can arrange a custom package.
HTTP Headers and Response Codes
API responses contain
X-RateLimit headers which can be used to monitor and control your usage.
If the cost of the API function is higher than the number of remaining units, the API will respond with a
HTTP 429 Too Many Requests status code and a
Retry-After header informing you how many seconds you must wait before you can retry the request.
|The unit cost of this API function.|
|The number of seconds until your rate limit will be full again if it's left to replenish.|
|The maximum number of units which can be built up.|
|The number of units remaining and available for use.|
|When rate limited, this is the number of seconds until you may retry the request.|