> ## Documentation Index
> Fetch the complete documentation index at: https://docs.withterminal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Rate Limits

Terminal enforces API Rate Limits to protect against traffic spikes impacting our system and other Terminal customers.

## Global Rate Limits

Every endpoint enforces the following rate limits:

* **Per Connection**
  * Each connection token may make **100 API requests per second**
* **Per Application**
  * Each application may make **400 API requests per second**
* **Per Public IP** (for unauthenticated requests)
  * Each IP address may make **20 API requests per second**

This means that if you have multiple connections, you may make up to 100 requests per second per connection with a maximum of 400 requests per second across all connections.

## Historical Data Query Rate Limits

For dense time-series data endpoints (vehicle locations and vehicle stats), additional rate limits apply when querying historical data from previous months:

* **Historical Query Requests**
  * **5 requests per second** per connection per model per month range
  * Only applies to data from **previous months** (current month data is not rate limited)

## Handling Rate Limit Errors

When you exceed the rate limit, you will receive a `429 Too Many Requests` error. The response body will contain a `Retry-After` header with the number of seconds you should wait before retrying the request.

### Example

```http theme={null}
HTTP/1.1 429 Too Many Requests
Retry-After: 0.62
Content-Type: application/json
Body: {
  "message": "Too Many Requests",
  "detail": "API rate limit exceeded - please try again in 0.62 s"
}
```
