Rate Limits

The API uses rate limiting and monthly quotas to ensure fair usage.

Rate Limiting

Rate limits are applied per API key to prevent abuse. The default limit is 10 requests per minute per API key.

Rate limiting is tracked in Redis. When you exceed the limit, you'll receive a 429 Too Many Requests response with a Retry-After header.

Monthly Quotas

Each user has a monthly screenshot quota. The quota resets on the 1st of each month at 00:00 UTC.

Check your current usage in the dashboard. When your quota is exceeded, you'll receive a 402 Payment Required response.

Response Headers

Rate limit and quota information is included in response headers:

Header Description
X-RateLimit-Limit Maximum requests per window
X-RateLimit-Remaining Requests remaining in current window
X-RateLimit-Reset Unix timestamp when the rate limit resets
X-Quota-Limit Monthly screenshot quota
X-Quota-Remaining Screenshots remaining this month
X-Quota-Reset Unix timestamp when the monthly quota resets

Handling Rate Limits

When you hit a rate limit, the API returns a 429 status code:

{
  "error": "rate limit exceeded"
}

Best practices for handling rate limits:

  • Check X-RateLimit-Remaining before making requests
  • Implement exponential backoff when hitting limits
  • Queue requests and process them at a steady rate
  • Cache results to avoid duplicate requests

Quota Exceeded

When your monthly quota is exceeded, the API returns a 402 status code:

{
  "error": "monthly quota exceeded",
  "limit": 5000,
  "used": 5000,
  "resetAt": 1706745600,
  "upgrade": "Upgrade your plan to get more screenshots"
}