InspireMe

quote_of_the_dayauthorsapp

InspireMe

footer_description

© 2025 InspireMe.

App Widget (iOS)

  • Installation
  • Settings & Customization

Chrome Extension

  • Installation
  • Features

Getting Started

  • Introduction

Public API

  • API Key Generation
  • API Usage
  • Random Quote API
  • Quote of the Day API
  • Rate Limit

Web Widget

  • Getting Started with Widgets
  • Widget Customization
  • Troubleshooting

Rate Limit

Request Limits

Period Limit
Hourly 100 requests
Daily 1,000 requests

Limit Criteria

  • Rate limits are applied per API Key (not per user, but per individual API Key).
  • Hourly limits reset at the top of every hour (00 minutes) (not a sliding window).
  • Daily limits reset at midnight (UTC).

Response Headers

All API responses include Rate Limit related headers.

Header Description
X-RateLimit-Limit Maximum requests per hour (100)
X-RateLimit-Remaining Remaining requests
X-RateLimit-Reset Limit reset time (Unix timestamp)

When Limit is Exceeded

When the rate limit is exceeded, a 429 Too Many Requests response is returned.

{
  "error": {
    "code": "RATE_LIMIT_EXCEEDED",
    "message": "Rate limit exceeded. Please try again later.",
    "retry_after": 3600
  }
}

The Retry-After header contains the number of seconds to wait before retrying.

Recommendations

  • Monitor the X-RateLimit-Remaining value in responses.
  • When receiving a 429 response, wait for the duration specified in the Retry-After header before retrying.
  • The Quote of the Day changes only once per day, so caching on the client side is recommended.
  • Apply an exponential backoff strategy to gradually increase wait time when receiving 429 responses.
async function fetchWithBackoff(url, headers, maxRetries = 3) {
  for (let i = 0; i < maxRetries; i++) {
    const res = await fetch(url, { headers });
    if (res.status !== 429) return res;

    const retryAfter = parseInt(res.headers.get("Retry-After") || "60", 10);
    const delay = retryAfter * 1000 * Math.pow(2, i);
    await new Promise((r) => setTimeout(r, delay));
  }
  throw new Error("Rate limit exceeded after max retries");
}

Response Header Examples

Normal Response

HTTP/1.1 200 OK
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 87
X-RateLimit-Reset: 1741420800
Content-Type: application/json

429 Rate Limited

HTTP/1.1 429 Too Many Requests
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 1741420800
Retry-After: 1823
Content-Type: application/json