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

# Rate Limiting

> Rate limiting for the MileIQ API

<Note>
  During the alpha phase, we implement rate limiting to ensure fair usage and
  optimal performance for all users.
</Note>

Each unique API Key is subject to the following rate limit:

* **60 requests per minute**

Please ensure your application adheres to these limits to avoid disruptions in service. If you exceed the rate limit, your requests may be temporarily blocked.

## Rate Limiting Headers

MileIQ's API rate limiting is in conformance with the [IETF standard](https://datatracker.ietf.org/doc/html/draft-ietf-httpapi-ratelimit-headers):

| Header Name             | Description                                                                       |
| ----------------------- | --------------------------------------------------------------------------------- |
| `X-RateLimit-Limit`     | The maximum number of requests that the consumer is permitted to make per minute. |
| `X-RateLimit-Remaining` | The number of requests remaining in the current rate limit window.                |
| `X-RateLimit-Reset`     | The time at which the current rate limit window resets in UTC epoch seconds.      |
| `Retry-After`           | The number of seconds to wait before retrying the request again.                  |

You’ll receive a `429 Too Many Requests` response code if the rate limit is exceeded.

## Best Practices

To handle rate limiting gracefully in your applications:

1. Implement retry logic with exponential backoff.
2. Check for 429 status codes in API responses.
3. Respect the 'Retry-After' header when provided in the response.
4. Monitor the `X-RateLimit-*` headers to track your usage and adjust your request rate accordingly.
5. Consider using a rate limiting library or implementing a request queue to manage your API calls.

For an example of how to implement these best practices, refer to our [Drive Retrieval Example](/api-reference/example-drive-retrieval).
