API Rate Limiting

To allow fair usage of the API across all users of the API, we have applied rate limiting to requests made to the API. All user's have the same limits, which are independent from all other users, therefore one user's requests do not affect other user's limits. The details of how this works with the API are:
 
The rate limiting we use is what is known as 'sliding window rate limiting'. This is used to manage the flow of incoming requests to the API over a rolling time period. This has many benefits including:
  • Preventing Abuse: Rate limiting helps protect an app from abuse by limiting the number of requests a user or client can make in a given time period.
  • Ensuring Fair Usage: By setting limits, all users have fair access to resources, preventing a single user monopolizing the system.
  • Protecting Resources: Rate limiting helps prevent server overload by controlling the number of requests that can be processed, thus protecting the backend resources from being overwhelmed.
  • Improving Performance: By controlling the rate of incoming requests, optimal performance and responsiveness of the API can be maintained, ensuring a better user experience for all users.
 

How it works

We use three variables to determine the rate limiting of the API:
  • The number of requests allowed during a time period. This is currently set to 30000.
  • The duration of the time period, in minutes. This is currently set to 10.
  • The number of segments the time period is broken down into. This is currently set to 40.
This means that each user can currently make 30000 requests to endpoints across the API over any time period of 10 minutes, recalculated every 15 seconds.
 

Responses from the API

So that you can keep track of your current usage, and monitor if you get close to or reach your limit, we include custom headers in each response from the API detailing your current status of your usage and how this compares to the current limit. Details of these custom headers can be found here, under the 'Rate limiting headers' section.
 

What happens when I reach my limit?

If you reach your limit, then you will not be able to make any further requests until the current time period has rolled on, such that the number of requests you've make during the current time period is less than the allowed limit for the time period.
 
Any further requests made during the time period where you've reached you're limit will be returned with a 429 (Too Many Requests) status code in the response, and the following message: 'You have recently made too many requests, please wait and retry after 10 minutes.'
 
Once the current period has rolled on, you will start to be able to make queries to the API again - assuming you don't reach your limit again.