Rate limits
Request limits for each Adzen API, the headers that report them, and what to retry.
Limits
| Product | Limit |
|---|---|
| Ads API | 600 requests per minute per endpoint, per key, and 1,200 requests per minute per key across all endpoints. Each advertiser key has its own limits. Hourly insights (granularity=hour) at ad set or ad level, or with the ad_set or ad breakdown, allow 30 requests per minute per key. |
| Publisher insights | 60 requests per minute per account. |
| AI API | POST /v1/ai/process returns 429 with Retry-After: 1 when it is busy. |
| UGC API | Request each post once per window. After a match, request it again after ttl_seconds; after a no-match response, wait no_ad_retry_after_seconds seconds. See No match. |
Ads API
- An endpoint is the method and the route, with ids as placeholders. Pausing two campaigns counts twice against
POST /v1/ad-manager/campaigns/{id}/pause. - Windows are fixed clock minutes. Every count starts over at the top of each minute.
- An idempotent replay counts against the limits.
- Over a limit, the API returns
429with coderate_limit_exceeded:
{
"error": {
"type": "rate_limit_error",
"code": "rate_limit_exceeded",
"message": "more than 600 requests a minute on this endpoint; retry after 12 seconds",
"param": null
}
}Publisher insights
The limit counts every request for your account, whichever key sends it. The
429 uses the Publisher insights error body
with type rate_limit_error and code rate_limited.
AI API
The 429 body is {"error": "endpoint overloaded, retry shortly"}. Wait one
second, then send the request again. AI API responses carry no X-RateLimit-*
headers.
Headers
| Header | Ads API | Publisher insights |
|---|---|---|
X-RateLimit-Limit | Requests allowed in the current minute | Requests allowed in the current minute |
X-RateLimit-Remaining | Requests left in the current minute | Requests left in the current minute |
X-RateLimit-Reset | Unix time, in seconds, when the minute ends | Seconds until the minute ends |
Retry-After | On 429: seconds until the next minute, at least 1 | On 429: seconds until the minute ends |
The Ads API reports whichever of the per-endpoint and per-key limits has fewer
requests left. The headers do not reflect the 30-requests-per-minute hourly
insights limit. On the Ads API, every response to an authenticated request
carries the X-RateLimit-* headers. On Publisher insights, successful
responses and 429 responses carry them.
Retries
| Response | What to do |
|---|---|
429 | Wait Retry-After seconds, then send the same request again. |
409 idempotency_key_in_use (Ads API) | The first request with this Idempotency-Key is still running. Wait Retry-After seconds, then retry with the same key. |
503 with Retry-After | Wait Retry-After seconds, then retry. |
Other 5xx | Retry with exponential backoff and jitter. Cap the number of attempts. |
Other 4xx | Do not retry unchanged. Fix the request first. |
On the Ads API, send the same Idempotency-Key on every retry of a POST. See
Idempotency.