Rate Limit Headers

Understanding MarketCheck's rate limiting and quota headers for effective API usage monitoring and error handling.

MarketCheck implements rate limiting and quota management through custom HTTP headers that provide detailed information about your API usage, remaining capacity, and reset times.

Response Headers

MarketCheck adds comprehensive headers to all API responses to help you monitor your usage and plan your API calls effectively.

Rate Limiting Headers

HeaderDescription
RateLimit-LimitMaximum number of requests allowed per second
RateLimit-RemainingNumber of requests remaining in the current second
RateLimit-Reset-TimeISO timestamp indicating when the rate limit resets

Quota Headers

HeaderDescription
Quota-LimitMaximum number of requests allowed per month
Quota-RemainingNumber of requests remaining in the current month
Quota-Reset-TimeISO timestamp indicating when the monthly quota resets

Standard HTTP Headers

HeaderDescription
Retry-AfterNumber of seconds to wait before making another request. For example, if you exceed your monthly quota, this shows seconds until the next month (e.g., 86500 = ~24 hours remaining in current month)

Error Responses

429 Too Many Requests

When rate limits or quotas are exceeded, MarketCheck returns structured error responses with detailed information to help you understand the issue and determine the appropriate retry strategy.

Example Response — Monthly Quota Exceeded:

HTTP/1.1 429 Too Many Requests
Content-Type: application/json
RateLimit-Limit: 5
RateLimit-Remaining: 0
RateLimit-Reset-Time: 2025-07-22T14:30:16Z
Quota-Limit: 100000
Quota-Remaining: 0
Quota-Reset-Time: 2025-08-01T00:00:00Z
Retry-After: 86500

{
  "message": "Monthly API quota exhausted"
}

429 JSON Response Types

MarketCheck provides specific error messages based on the type of limit that was exceeded:

Rate Limit Exceeded:

{
  "message": "API rate limit exceeded"
}

Monthly Quota Exhausted:

{
  "message": "Monthly API quota exhausted"
}

Best Practices

Monitoring Usage

  • Check Headers Regularly — Monitor RateLimit-Remaining and Quota-Remaining headers to track your usage
  • Plan Ahead — Use reset time headers to schedule API calls efficiently

Handling Limits

  • Respect Retry-After — Always honor the Retry-After header value when receiving 429 responses
  • Implement Exponential Backoff — Use exponential backoff strategies for retry logic to avoid consecutive failures

See Also