Reference

API rate limits

Every request to /api and /mcp counts against a budget. Signed-in requests count against your account; anonymous requests count against your network address. This page lists the limits, how to read them and what to do when you hit one.

Limits

PolicyApplies toLimit
apiEvery signed-in API request and every signed-in MCP request1,000 per 60 s, times your plan multiplier
api-heavyExpensive requests (compare, blame, code search, archives, pull request diffs), on top of api120 per 60 s signed in, times your plan; 10 anonymous
api-anonEvery anonymous API and MCP request1,200 per hour per address
feedbackSending feedback, from the web, the API or MCP, on top of api20 per day
webEvery web page load3,600 per hour per address
web-git-*Anonymous web pages that read Git (files, trees, commits, history, pull request diffs)300 per hour per address; see below
ogEvery social preview image300 per hour per address
  • Every credential of one account (browser session, personal access token, OAuth token, CLI login) shares one count.
  • Anonymous requests are counted per IPv4 address or per IPv6 /64 network.
  • Password Basic authentication uses the anonymous address budgets, including the reduced heavy-request limit, before password verification. It does not receive a per-account or plan-multiplied budget. A grant token sent as a Basic password uses the token budget instead.
  • Each social preview image also spends up to three api-anon requests.
  • Anonymous web pages count their server-side API reads against api-anon (and heavy reads against the anonymous heavy limit) too.
  • Anonymous pages that read Git have tighter limits on top of web: 300 per hour per address (web-git), 60 for crawlers and other non-browser clients (web-git-automated), 600 per hour for each declared crawler across all its addresses (web-git-agent), and 600 per hour per repository for pages pinned to a commit ID (web-git-pinned). Signed-in pages are not affected.
  • Git clone, fetch and push are not rate limited. Git LFS batch requests are limited per address: 120 per 60 s without a credential, 1,200 with one. LFS object downloads and uploads are not limited.

The API reference marks each limited operation with its policies in x-gc2-ratelimit.

Plan multipliers

The api and api-heavy limits are multiplied by the highest plan among your personal account and the organizations you are a member of. Outside collaborators do not get an organization's plan. Anonymous, feedback, web and og limits are never multiplied.

PlanMultiplier
Free1×
Pro2×
Team Standard5×
Team Premium10×
Enterprise20×

A plan or membership change takes effect within about 11 minutes.

Read your limit

Successful responses carry the policies that were checked, with the quota q and the window w in seconds:

Text
1RateLimit-Policy: "api";q=2000;w=60

The API does not report how many requests remain.

Handle a 429

A request over its budget is refused with 429 Too Many Requests:

Text
1HTTP/1.1 429 Too Many Requests
2Retry-After: 17
3RateLimit: "api-heavy";r=0;t=17
4RateLimit-Policy: "api";q=1000;w=60, "api-heavy";q=120;w=60
5Content-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 minute.",
12 "policy": "api-heavy",
13 "limit": 120,
14 "window_seconds": 60,
15 "retry_after_seconds": 17
16}
  1. Wait at least Retry-After seconds before retrying.
  2. If the retry is limited too, back off further: limits use a sliding window, so a caller far over its budget can need more than one window to recover. An hourly or daily budget recovers gradually through the next hour or day.
  3. Spread bulk work over time, sign in to get a per-account budget, or upgrade your plan for a higher multiplier.
Read as MarkdownGitCafe documentation
Documentation