Skip to content

Rate limits

A rate limit is how many requests an organization may make in a given period. Its purpose is not to punish you, it is to stop a single client that has fallen into a loop from slowing the service down for everyone.

Counting is per organization, not per key. Creating three keys in the same organization does not triple the limit.

BucketLimitEndpoints covered
General requests60 per minuteAll endpoints
General requests10,000 per dayAll endpoints
Report reads20 per minute/reports/*
Queueing measurements10 per hourPOST /runs
Writes30 per minutePOST and PATCH endpoints

One request lands in several buckets. A POST /runs call consumes the general bucket, the write bucket and the measurement bucket; whichever fills first is the one the 429 is returned for.

The per minute bucket is a fixed minute window, not a sliding one: the counter resets at the start of every minute. The daily window resets on the UTC day.

Every response, even a successful one, tells you what you have left. The values belong to the narrowest bucket for that request.

HeaderWhat it meansExample
X-RateLimit-LimitThe total allowance in the window60
X-RateLimit-RemainingRequests left in the window41
X-RateLimit-ResetWhen the window resets, Unix timestamp in seconds1787907180
X-RateLimit-BucketWhich bucket is being reportedreports_per_minute
Retry-AfterOnly on 429 responses: how many seconds to wait18
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
X-RateLimit-Limit: 20
X-RateLimit-Remaining: 17
X-RateLimit-Reset: 1787907180
X-RateLimit-Bucket: reports_per_minute

When the limit is reached the request is not processed and 429 Too Many Requests is returned. There are no side effects: no credit is spent on a measurement that was not queued, and a prompt that was not created is not written.

{
"data": null,
"meta": {
"request_id": "req_01K3Z9B2T4HQ8M1PD6",
"generated_at": "2026-08-27T09:13:02Z"
},
"error": {
"code": "rate_limited",
"message": "The per-minute report limit is used up. Try again in 18 seconds.",
"field": null,
"doc_url": "/docs/api/rate-limits/"
}
}

The right behaviour is to wait for the period given in the Retry-After header. Retrying without waiting does not consume the counter, but it does not shorten the window either; it only keeps the network busy.

The loop below applies exponential backoff on 429 and temporary 5xx responses, and obeys the server when the server names a wait time. Adding a random jitter stops clients that failed at the same moment from coming back at the same moment.

import os, random, time, urllib.request, urllib.error, json
BASE = "https://api.zeoradar.com/v1"
KEY = os.environ["ZEO_RADAR_API_KEY"]
def call(path, tries=6):
request = urllib.request.Request(
BASE + path,
headers={"Authorization": "Bearer " + KEY},
)
delay = 1.0
for attempt in range(tries):
try:
with urllib.request.urlopen(request, timeout=60) as response:
return json.load(response)
except urllib.error.HTTPError as err:
# 4xx errors are not worth retrying, apart from 429.
if err.code != 429 and err.code < 500:
raise
wait = float(err.headers.get("Retry-After") or delay)
wait += random.uniform(0, 0.5) # jitter
print("waiting %.1f s (%s)" % (wait, err.code))
time.sleep(wait)
delay = min(delay * 2, 60) # exponential, capped at 60 s
raise RuntimeError("request did not complete in %d tries" % tries)
print(call("/reports/visibility?brand_id=8f14a0c2-5b7e-4a91-9d33-6c2e10b4f7a5"))
  • Increase the page size. A list pulled with limit=200 costs a quarter of the requests of the same list pulled with limit=50. See the response format page.
  • Use the report endpoints, not the raw answers. You do not need to download every answer to compute visibility; /reports/visibility already returns the aggregated number.
  • Narrow the date range. Instead of re-pulling the entire history every night, pull only the latest measurement.
  • Cache the result on your side. Once a measurement is finished, the numbers for that day never change again, so there is no need to ask for them twice.
SymptomCauseFix
Constant 429, Remaining always 0Another job in the same organization is also callingSeparate the keys by name and use X-RateLimit-Bucket to see which one is filling up
The very first request returns 429The daily bucket is fullLook at the X-RateLimit-Reset time; the day resets on UTC
Waited for Retry-After and still got 429Several processes came back at the same momentAdd random jitter to your backoff
Measurements cannot be started but listing worksThe hourly measurement bucket is fullLeave measurement to the frequency setting and trigger by hand less often

feedback.question