Stay within the rate limits

Last checked:

The limits

Requests are counted in a sliding window:

  • per token: each token has its own allowance;
  • per token owner: the requests of every token one person created count together too;
  • per client address: every request from one IP address counts too, whatever the token.

The numbers differ per product. Each product’s reference page lists the token and address limits under Rate limits.

The headers

Every successful answer (and every 429) reports the limit that is closest to running out:

Header Meaning
x-ratelimit-limit Requests allowed in the window
x-ratelimit-remaining Requests left in the window
x-ratelimit-reset When the window resets (Unix time, seconds)
x-ratelimit-policy Which limit that is: token, user (the token’s owner), ip, or none when no limit applied

Slow down before x-ratelimit-remaining reaches 0.

When you go over

Over a limit, the request is refused with 429 and data.code RATE_LIMITED. The retry-after header (and data.retry_after_seconds) says how many seconds to wait. Wait at least that long before the next request; then continue at a lower pace.

The server also limits every client address as a whole. An address that keeps going over is blocked for the window: those requests answer 403 with data.code RATE_LIMITED and data.retry_after_seconds. Treat it like a 429.

Handle errors has retry code in Node.js and Python.

Use fewer requests

  • Ask for up to 100 records per page (per_page=100).
  • Read only what changed, with a date filter such as updated_at__from when the screen has one.
  • Ask for only the fields you use (fields).
  • Never poll faster than your data changes.