Rate limiting

Understanding how the Consumer Research API limits the rate of API requests

The Consumer Research API applies rate limiting at a per-Client level, based on the number of API requests within a rolling time window.

The default rate limit is 30 API requests every 10 minutes: this means that for an API request to be within the rate limit, there must have been fewer than 30 other API requests for the same Client made in the 10 minutes previous to the current request. Requests beyond the rate limit will be rejected with an HTTP 429 Too Many Requests error.

Each API response will include HTTP headers describing the rate limit for the requesting Client, as well as the current usage:

  • x-rate-limit: Indicates the Client's rate limit in the format <limit>/<period>m, where <limit> is the number of API calls that may be made in any given window of<period> minutes
  • x-rate-limit-used: Indicates the number of API calls made by the Client in the last <period>minutes

For example, a Client with the default rate limit making their 5th API request in a 10 minute period would receive the following HTTP headers in the response:

x-rate-limit: 30/10m
x-rate-limit-used: 5