Concepts
Rate limits
Your plan gives each key a budget of units per minute:
| Plan | Units per minute |
|---|---|
| Essential | 60 |
| Team | 120 |
| Organisation | 300 |
GET /v1/me shows yours as limits.per_minute.
What a request costs#
Most requests cost 1 unit. Comparison sets cost more when you ask for more of them at once:
| Request | Cost |
|---|---|
GET /v1/comparison-sets with sku | 1 unit per 25 SKUs, rounded up: 1–25 SKUs cost 1, 100 SKUs cost 4 |
GET /v1/comparison-sets without sku | 1 unit per 100 sets of limit, rounded up: limit=100 costs 1, limit=500 costs 5 |
| Everything else | 1 unit |
A nightly sync of 3,000 sets at limit=100 costs 30 units. Looking up 3,000 SKUs, 100 at a time, costs 120
units. On a 60-unit plan that takes about a minute: the first 60 units go at once, and the retry code waits for
the rest to come back.
Read the headers#
Every response tells you where you stand:
RateLimit-Policy: "sustained";q=120;w=60
RateLimit: "sustained";r=117;t=12
X-RateLimit-Limit: 120
X-RateLimit-Remaining: 117
X-RateLimit-Reset: 12That reads: 120 units per 60 seconds, 117 left, full again in 12 seconds. The remaining count drops by each
request's cost. X-RateLimit-Reset counts seconds; it isn't a timestamp.
When a request costs more units than you have left, you get 429 rate_limited, and the request costs nothing.
Retry-After says how many seconds until enough units are back for that request:
{
"type": "https://api.getprice.ai/errors/rate-limited",
"title": "Rate limit exceeded",
"status": 429,
"detail": "Sustained limit of 120 requests per minute reached for this API key.",
"code": "rate_limited",
"request_id": "req_01JBX4Q8ZJ7M2K",
"limit": "sustained",
"retry_after": 21
}Retry safely#
| Response | Retry? | How |
|---|---|---|
429 or 503 | Yes | Wait Retry-After seconds, then retry |
502, 504, timeout, connection error | Yes | Back off: 1 s, 2 s, 4 s, up to 60 s, with a little jitter. Stop after about 6 tries |
500 | No | Repeating it won't help. Log the request_id and tell support if it keeps happening |
Other 4xx | No | Change the request first |
GET, PUT and DELETE are all safe to retry. Make requests one at a time: parallel loops are the usual cause
of 429. The Nightly ERP sync guide has a retry helper you can copy.