Guides
Limits and billing
What the API counts, where it stops you, and what each refusal means.
Rate limits
| Applies to | Limit | When you exceed it |
|---|---|---|
| Live keys, per live project | 100 requests a second, counted over 10 s (1,000 per 10 s), across everything made with that project's keys. | 429 rate-limited |
| Test keys, per test project | 20 requests per 10 s, 120 per minute and 5,000 per day, across everything made with that project's keys. On top of the per-IP limits. | 429 rate-limited |
| Everything else, per IP | Roughly 500 requests per 10 s and 1,500 per minute: calls made with a test key, and calls made with no key. | 429 rate-limited |
On a 429, back off and honor the Retry-After header, in whole seconds.
Live keys are limited per project, not per address. Your game servers
can call from one address or from many: the project has the same 100
requests a second either way, and its calls don't count against the per-IP
limit. Send the key in the x-api-key header.
The rate is set per organization: 100 requests a second unless yours has
been changed. It's counted over ten seconds, so a burst of several hundred
calls in one second is fine as long as the ten seconds stay under 1,000. An
organization can also have a limit per minute, per hour or per day. None is
set by default. The 429's message says which limit you hit. Ask us if
you need more.
Test keys are rate limited per test project, and far harder. The limit is sized for development and CI, not for players. Live keys don't have it.
- Windows are fixed and aligned to the clock, so the daily 5,000 resets at 00:00 UTC, and a live project's 1,000 every 10 seconds.
- A refused request still counts. For a test key, retrying before
Retry-Afteruses up the day's budget.
Plan allowances
Plan allowances are monthly and reset on the 1st, UTC. They apply to your live project only: test keys never count against them. There are two:
| Allowance | Counts | Spent when |
|---|---|---|
| Matches per month | Every match written. | The match is written: /match/record of a new match, /match/create, a /match/score that opens one, each match of /match/import, and each lobby the matchmaker forms. |
| Players per month | Distinct players who played at least one match that month. | A match they're in is rated: at once for a new match on /match/record or /match/import, and at /match/record for a match opened by /match/create, /match/score or the matchmaker. |
Going over either answers 402 over-plan-limit. Its message says which
one ran out.
- Treat a
402as "upgrade or wait", never as retryable. Retries fail the same way until the month rolls over or the plan changes. - Nothing was written or rated. Players new to the pool may already exist as rated users at the starting rating, which is free.
- Enforcement is near-real-time, not exact. Under load, usage can run a
little past an allowance before
402s begin.
How players are counted
- A player is your own
mmrEntityExternalId, so the same person in several pools counts once, as long as you send the samemmrEntityExternalIdin each. - A player counts once a match they're in is recorded, and only once per month however many they play. Creating pools and rated users is free.
- Players already counted this month don't count again, in any pool. A match between them still goes through when the player allowance is full. One with a new player won't.
- A rated user with no
mmrEntityExternalIdcounts on its own. Those come from/match/import, or from beforemmrEntityExternalIdwas required. Give it one in the portal.
How matches are counted
- A match you create and then delete still counts. The allowance is spent when the match is written, not when it's rated.
- Matchmaking spends matches. Every lobby the matchmaker forms writes a pending match, which counts the moment it's formed. A lobby nobody plays still counts.
/queue/joinchecks both allowances before it queues a party. A queued match's players are only counted when the match is recorded, so/match/recordcan still refuse./match/importbills in the current month, whatever each match'splayDate. A refusal partway through comes back infailedinside a200, not as a402.
Size limits
| What | Limit |
|---|---|
| Pools in a project | 50, the default pool included. Archived pools don't count. Ask us if you need more. |
Your ids: mmrEntityExternalId, matchExternalId, partyExternalId |
100 characters |
Pool name, player name |
50 characters |
Match name |
80 characters |
Match description |
300 characters |
| Teams in a match | 100 |
| Players in a team | 50 |
| Players in a matchmaking lobby | 200 |
| Parties waiting in a project's matchmaking queues | 5,000, across all its pools and rules. Ask us if you need more. |
A matchmaking rule's maxQueueSeconds |
3,600 (an hour) |
Players per /v1/user/migrate call |
1000 |
Matches per /v1/match/import call |
1000 |
Ids per /v1/user/ratings call |
100 |
A 51st pool is 400 max-groups-reached, whether it's created or restored
from the archive.
A /queue/join while 5,000 of the project's parties are waiting is
429 queue-full. Unlike a rate limit, it isn't about how fast you call:
room comes back as parties are matched, expire or leave, so retry after the
Retry-After header. A party you stop waiting on stays in the queue until
it expires, so take it out with /queue/leave.
A string over its cap is 400 Validation failed. One exception: an mmrEntityExternalId
inside matchResult or scores isn't checked, so keep it under 100
characters yourself. A longer one can't be used with /v1/user/create or
GET /v1/pools?mmrEntityExternalId=.