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

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:

Header NameDescription
X-RateLimit-LimitThe maximum number of requests that the consumer is permitted to make per minute.
X-RateLimit-RemainingThe number of requests remaining in the current rate limit window.
X-RateLimit-ResetThe time at which the current rate limit window resets in UTC epoch seconds.
Retry-AfterThe 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.