# Rate Limits

The Limy API enforces rate limits to ensure fair usage and platform stability.

## Default Limits

| Limit             | Value                        |
| ----------------- | ---------------------------- |
| Requests per hour | 600 per API key              |
| Burst             | Up to 10 requests per second |

## Rate Limit Headers

Every API response includes rate limit headers:

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

Example response headers:

```
X-RateLimit-Limit: 600
X-RateLimit-Remaining: 594
X-RateLimit-Reset: 1717596000
```

## Exceeding the Limit

When you exceed the rate limit, the API returns a `429 Too Many Requests` response:

```json
{
  "error": {
    "code": "RATE_LIMIT_EXCEEDED",
    "message": "Rate limit exceeded. Retry after 42 seconds.",
    "retryAfter": 42
  }
}
```

The response also includes a `Retry-After` header with the number of seconds to wait.

## Best Practices

* **Cache responses** — Analytics data updates on a run schedule (typically daily), not in real-time. Cache responses for at least 1 hour.
* **Use filters** — Narrow your queries with filters (providers, topics, regions) instead of fetching all data and filtering client-side.
* **Batch requests** — If you need data for multiple topics, use the `topicIds` filter parameter instead of making separate requests per topic.
* **Implement exponential backoff** — On 429 responses, wait for the `Retry-After` duration, then retry with exponential backoff.

## Rate Limit by Plan

| Plan       | Requests/Hour |
| ---------- | ------------- |
| Growth     | 600           |
| Pro        | 600           |
| Scale      | 1,200         |
| Enterprise | Custom        |

Contact your account manager for higher limits.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://api-reference.limy.ai/getting-started/rate-limits.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
