Rate limits and good practice
The API is shared by all partners and by our own sites, so requests are limited per API key.
Limits
Section titled “Limits”| Limit per API key | |
|---|---|
| All endpoints | 100 requests per second |
The limit is an average over 10 seconds, so short bursts are fine as long as you stay under 1,000 requests in any 10 seconds. Requests over the limit get 429 Too Many Requests. If you need more, see Need more?.
Handling 429
Section titled “Handling 429”When you get 429:
- Stop sending new requests for that key.
- Wait. If the response has a
Retry-Afterheader, wait that many seconds; otherwise start at 1 second. - Retry, doubling the wait on every further
429(1, 2, 4, 8 … seconds, max 60), with some random jitter.
import randomimport time
def get_with_backoff(session, url, **kwargs): delay = 1 for _ in range(8): response = session.get(url, **kwargs) if response.status_code != 429 and response.status_code < 500: return response wait = float(response.headers.get("Retry-After", delay)) time.sleep(wait + random.uniform(0, 0.5)) delay = min(delay * 2, 60) return responseApply the same backoff to 5xx responses and network errors.
Spreading your load
Section titled “Spreading your load”Most 429s we see come from scheduled jobs that start many requests at the same moment, for example a price refresh every few hours that fires all requests at once.
- Limit concurrency. Run a fixed number of requests in parallel (a handful is plenty) instead of starting everything at once.
- Spread scheduled runs. Pace a refresh of 20,000 products over the run rather than as fast as possible, and don’t schedule two large jobs (for example a product refresh and a price refresh) at the same time.
- Reuse connections. Use one HTTP client with keep-alive instead of a new connection per request.
- Use compression. Send
Accept-Encoding: gzip.
Don’t request what you already have
Section titled “Don’t request what you already have”- Prices are cached for 5 minutes per product. Polling one product more often gives the same answer.
- Product details change rarely. Refreshing them daily is enough.
- Use the list endpoint with
Limit=100instead of fetching products one by one when you need many. - 404 on prices means no offers right now. Don’t retry it in a tight loop; check again on your next scheduled run.
Need more?
Section titled “Need more?”If your use case needs a higher volume, for example a full price export several times a day, talk to us before you build it. There may be a better-suited endpoint or a separate limit for your key.