The Buildr API employs a leaky bucket based rate limit system to prevent excessive usage of the API. The rate limit allows for a maximum of 10 API calls per 10 seconds. Any request that exceeds this limit will receive an HTTP 429 status code along with a header indicating when the next call will succeed.

HTTP 429 Status Code

When a request exceeds the rate limit, the API will return an HTTP 429 status code to the client. The body of the response will be a JSON object with the following format:

{ "error": "rate_limit_exceeded" }

Rate Limit Headers

When a request exceeds the rate limit, the API will also return one header indicating the time until the next call can be made:

  • X-Rate-Limited-For: The number of seconds until the next API call will succeed.

Clients should wait for the number of seconds specified in the X-Rate-Limited-For header before making another API call.

Example

Here is an example response when a client exceeds the rate limit:

HTTP/1.1 429 Too Many Requests
X-Rate-Limited-For: 5
Content-Type: application/json

{
  "error": "rate_limit_exceeded"
}

In this example, the client has exceeded the rate limit for the current 10 second window. The X-Rate-Limited-For header indicates that the client should wait for 5 seconds before making another API call that will succeed. The response body is a JSON object indicating that the rate limit has been exceeded.