Rate limits
Limits keep one program from crowding out others, and catch a runaway loop before it does harm. They’re generous for reports and documents, which need only a handful of requests per run. Limits may be raised over time.
The limits during early access
Section titled “The limits during early access”| What | Allowance |
|---|---|
| Requests per key, in a burst | 10, refilled at 2 a second (120 a minute) |
| Requests per key, running at the same moment | 4 |
| Heavy calls (whole packages, the integrity check) per organisation | 6 a minute, 1 at a time, 200 a UTC day |
| Changes per key | 30 a minute |
| Requests per organisation | 300 a minute, across all its keys |
| Requests per organisation per day | 10,000, a UTC day |
GET /v1/me returns your organisation’s current limits in limits.
The headers on every response
Section titled “The headers on every response”| Header | What it says |
|---|---|
RateLimit-Limit |
How many requests this key may make in a burst (the table above) |
RateLimit-Remaining |
How many of those are left right now |
RateLimit-Reset |
Seconds until the next one is back (0 when there are plenty) |
Think of a key’s allowance as a bucket that holds a burst and refills a few times a second (the first row of the table). A burst goes straight through; after that, requests go through as fast as the bucket refills. A program making one request at a time, waiting for each answer, never notices the limit.
Heavy calls (a whole package, /contents and /markdown, and the integrity check) read a lot at once, so an organisation may make only a few, one at a time (the table above). Across all of Farkitect only so many run at once; if it’s busy you get 503 busy with a Retry-After. That isn’t a limit on you: wait and try again.
Separately, a key may have only a few requests running at the same moment (the table above). One more sent while those are still being answered gets 429 straight away. Firing many requests in parallel doesn’t make a program faster here: send them one after another, or a few at a time.
When you’re limited
Section titled “When you’re limited”A limited request gets 429 with the problem code rate_limited and a Retry-After header: the number of seconds to wait. Its detail says which limit was reached:
{ "status": 429, "code": "rate_limited", "detail": "This key may make … requests at once, and … a minute. Wait 1 second and try again. To read a lot at once, the whole-package calls take one request.", "requestId": "req_…"}What to do: wait Retry-After seconds, then try again. Most HTTP libraries can do this for you (Python’s urllib3.Retry with respect_retry_after_header, for example). If you’re limited often, make fewer requests that each do more: ask for up to 200 items a page with limit, and, once it arrives, read a whole package in one call.
Rate-limited requests are counted under Too many in Organisation › Developers › Usage, so you can see if a program is hitting the limit.