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

# Rate Limits

> Understanding API rate limits

The Solidroad API implements rate limiting to ensure system stability and fair usage.

## Rate Limit Policy

The Solidroad API enforces two independent rate limits to ensure system stability:

| Limit Type | Rate | Scope |
| - | - | - |
| **IP-based** | 50 requests per second | Per IP address |
| **API Key-based** | 5,000 requests per hour | Per API key |

Both limits apply to every request to `api.solidroad.com`, whatever the path, and are checked independently - exceeding either limit will result in a 429 error. The sliding window algorithm is used to track request rates.

> [!NOTE]
>
> Rate limits are subject to change with advance notice. Contact [support@solidroad.com](mailto:support@solidroad.com) if you need higher limits for your use case.

## Rate Limit Headers

Every API response includes headers showing your current rate limit status:

```
X-RateLimit-Limit: 5000
X-RateLimit-Remaining: 4995
X-RateLimit-Reset: 1704470400000
```

| Header | Description |
| - | - |
| `X-RateLimit-Limit` | Maximum requests allowed in the current window |
| `X-RateLimit-Remaining` | Requests remaining in the current window |
| `X-RateLimit-Reset` | Unix timestamp in milliseconds when the rate limit resets |

> [!NOTE]
>
> When multiple rate limits apply, the headers reflect the most restrictive limit (the one closest to being exceeded).

## 429 Response

When you exceed the rate limit, you'll receive a `429 Too Many Requests` response:

```json theme={null}
{
  "error": {
    "type": "rate_limit_error",
    "message": "Rate limit exceeded",
    "statusCode": 429
  }
}
```

The response includes a `Retry-After` header (in seconds) indicating when you can retry:

```
HTTP/1.1 429 Too Many Requests
Retry-After: 60
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.