The ER:LC API enforces rate limits to ensure fair access and to protect infrastructure for all users. Understanding how these limits work, and how to respond to them correctly, is essential for building a reliable integration.Documentation Index
Fetch the complete documentation index at: https://apidocs.erlc.gg/llms.txt
Use this file to discover all available pages before exploring further.
Definitions
Throughout this page, the following terms are used:- Application — an app (such as a Discord bot or website) that accesses the ER:LC API. Each application is uniquely identified by its global API key, provided in the
Authorizationheader. - Server — a private server identified by its server-key, provided via the
Server-Keyheader.
Global rate limit
By default, rate limits are applied per IP address. Each application is limited to a set number of requests per second, and this limit can vary per application and per server. Large-scale applications may be issued a global API key, which increases allowed request volume and provides higher per-IP limits. See Global API Keys for Large-Scale Applications for details.Per-route rate limit
Some routes have tighter limits than the global rate limit because they are more resource-intensive or more prone to abuse. These routes are identified by theX-RateLimit-Bucket response header containing a value other than global.
For example, the POST /command route has a limit of 1 request per 5 seconds (subject to change). This is indicated by X-RateLimit-Bucket being set to command-[Server-Key].
Rate limit headers
The API attaches the following headers to most standard responses:| Header | Example Value | Description |
|---|---|---|
X-RateLimit-Bucket | global | Which rate limit bucket the request was subject to |
X-RateLimit-Limit | 35 | The total number of requests allowed in this bucket before a 429 |
X-RateLimit-Remaining | 34 | The number of requests remaining in the current window |
X-RateLimit-Reset | *Epoch Timestamp* | Epoch timestamp when the current rate limit window resets |
Handling a 429 response
When you exceed a rate limit, the API returns an HTTP429 status code. The response body includes:
- A human-readable
message retry_after— the number of seconds to wait before retrying- The name of the
bucketthat was exceeded
retry_after value and pause requests until the window resets.
Repeat offenders
Applications that continue sending requests after receiving429 responses may be blocked for increasingly longer durations.
Applications that persistently fail to respect rate limits will be automatically blocked via Cloudflare. If you encounter a Cloudflare block page, you must contact us by opening an API ticket in the ER:LC Discord server to resolve the block.
Invalid server-key requests
Sending repeated requests to invalid server-keys will result in an IP ban. If a server owner regenerates their server-key, your old key will return403 responses.
