Rate limits
How many requests a key may send, and the headers that say where you stand.
Rate limits keep one busy system from slowing the API for everyone. They are counted per key and per account, separately from use of the portal.
The limits
| Key | Requests per minute, per key | Requests at once, per key |
|---|---|---|
| Account API | 600 | 20 |
| Publisher API | 120 | 5 |
| Buyer API | 120 | 5 |
| All keys of one account together | 1,200 | - |
Each address also has a wide limit of its own, and many unknown keys from one address in a minute get the address blocked for 15 minutes.
The headers
Answers to a recognised key carry the state of its limit:
| Header | Meaning |
|---|---|
RateLimit-Limit | Requests allowed in the current minute |
RateLimit-Remaining | Requests left in the current minute |
RateLimit-Reset | Seconds until the minute starts again |
Going over answers 429 with rate_limited and a Retry-After header: the number of seconds to wait. Too many requests running at once answers concurrency_limited.
Staying inside them
- Watch
RateLimit-Remainingand slow down before it reaches 0. - On 429, wait for
Retry-Afterseconds, then retry. Do not retry at once. - Use webhooks for live updates instead of asking again and again. See webhooks.
- Ask for 100 records a page when you read a whole list.