API rate limits
Every /api and /mcp request counts against a request budget: signed-in
callers per account, anonymous callers per network address. This page explains
how to read your limit, what a limited response looks like and how to recover.
Who is limited
- Signed-in callers. A request authenticated with a browser session, a personal access token or an OAuth access token (REST or MCP) counts against the account that owns the credential, including a token sent as the password in HTTP Basic. Every credential of one account shares one count. A brand-new credential counts on its own at the Free limit until its first successful request has been processed, usually within seconds.
- Anonymous callers. A request without credentials counts against its client address: an IPv4 address, or the IPv6 /64 network it belongs to.
- Not limited: HTTP Basic with an email and password, signed provider webhooks (Stripe, Buildkite), and the Actions runner control endpoints.
- Git transports (clone, fetch, push, LFS) are not covered by these limits yet.
Web pages count separately: each page load uses the web budget of the
visitor's address, and the API reads a page makes while it renders do not use
the anonymous API budget.
Policies
| Policy | Applies to | Limit |
|---|---|---|
api | Every signed-in /api request and every authenticated /mcp request | 1,000 per 60 s, times your plan multiplier |
api-heavy | Compare, blame, source search, archive downloads, pull request diffs and status, restack requests and Actions log search, on top of api | 120 per 60 s signed in (times your plan); 10 anonymous |
api-anon | Every anonymous /api and /mcp request | 30 per 60 s per address |
web | Every web page load | 120 per 60 s per address |
The OpenAPI document marks each limited operation with x-gc2-ratelimit,
naming its policies (for example {"policies": ["api", "api-heavy"]}), and a
429 response. The document-level x-gc2-ratelimit-policies gives each
policy's limit and window for signed-in and anonymous callers.
Plan multipliers
Signed-in limits are multiplied by the highest plan among your personal account and the organizations you belong to as a member (outside collaborators do not inherit an organization's plan). An app installation token uses its organization's plan. Anonymous and web limits are never multiplied.
| Plan | Multiplier |
|---|---|
| Free | 1× |
| Pro | 2× |
| Team Standard | 5× |
| Team Premium | 10× |
| Enterprise | 20× |
A plan or membership change, or a revoked credential, reaches your limit within about 11 minutes.
Read your limit
Successful limited responses carry the policies that were checked, with your
quota q and window w in seconds:
| 1 | RateLimit-Policy: "api";q=2000;w=60 |
| 2 | RateLimit-Policy: "api-anon";q=30;w=60 |
Error responses other than 429 do not carry this header. The API does not
report a remaining count.
Handle a 429
A request over its budget returns 429 Too Many Requests before any work is
done:
| 1 | HTTP/1.1 429 Too Many Requests |
| 2 | Retry-After: 17 |
| 3 | RateLimit: "api-heavy";r=0;t=17 |
| 4 | RateLimit-Policy: "api";q=1000;w=60, "api-heavy";q=120;w=60 |
| 5 | Content-Type: application/problem+json |
| 6 | |
| 7 | { |
| 8 | "type": "https://cafe.sh/errors/rate-limit-exceeded", |
| 9 | "title": "Rate limit exceeded", |
| 10 | "status": 429, |
| 11 | "detail": "The api-heavy limit allows 120 requests per 60 seconds.", |
| 12 | "policy": "api-heavy", |
| 13 | "limit": 120, |
| 14 | "window_seconds": 60, |
| 15 | "retry_after_seconds": 17 |
| 16 | } |
A limited web page returns the 429 page with the same Retry-After,
RateLimit and RateLimit-Policy headers.
- Wait at least
Retry-Afterseconds before retrying. - If the retry is also limited, back off further.
Retry-Afteris a hint: limits use a sliding window, so a caller far over its budget may need more than one window to recover. - Spread bulk work over time, sign in for a per-account budget, or upgrade the plan for a higher multiplier.
Each policy admits q requests per window. Counts are approximate across the
fleet, so a caller may occasionally be admitted slightly over its quota. Do not
rely on exact counts. If the rate-limit service itself is unavailable, requests
are not limited rather than rejected.