Skip to Content
AffFast

Rate limits

How many requests a key can send, and how to read the limit headers.

The API limits the requests of each API key. The default limit is 100 requests in 60 seconds. A request that is over the limit gets 429 and the error code rate_limit_exceeded.

The MCP server uses the same limit. A tool call counts as one request.

The headers

Each response has these headers:

HeaderMeaning
RateLimit-LimitThe number of requests that the key can send in a window.
RateLimit-RemainingThe number of requests that the key can still send.
RateLimit-ResetThe number of seconds until the window resets.

A 429 response also has Retry-After. It is the number of seconds to wait.

What to do when you get a 429

  1. Stop sending requests.
  2. Wait for Retry-After seconds.
  3. Send the request again.
async function request(url, options, attempt = 0) {
  const response = await fetch(url, options);
  if (response.status !== 429 || attempt >= 5) return response;
  const seconds = Number(response.headers.get("retry-after") ?? 1);
  await new Promise((resolve) => setTimeout(resolve, seconds * 1000));
  return request(url, options, attempt + 1);
}

Use fewer requests

  • Use conditional requests. Each GET response has a weak ETag. Send it back in If-None-Match. When the data did not change, the API answers 304 with no body. A 304 does not count against the limit. This helps a lot when you poll.
  • Use webhooks instead of polling. See Webhooks.
  • Use batch operations. POST /v1/links/batch and POST /v1/deeplinks take up to 100 items in one request.
  • Use big pages. Set limit=100 on a list. See Pagination.

Other limits

  • The postback endpoint has its own limit for each IP address and each token. See Postbacks.
  • The plan limits of your workspace (connections, conversions and clicks) are separate. See Plans and billing. They never stop redirects or click logging.

On this page