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

# Rate Limits

> Understanding rate limits and quotas

## Rate Limits

Rate limits control how many requests you can make per time period.

| Plan       | Requests/Minute | Requests/Hour |
| ---------- | --------------- | ------------- |
| Free       | 10              | 100           |
| Starter    | 60              | 1,000         |
| Pro        | 300             | 10,000        |
| Enterprise | Custom          | Custom        |

<Note>
  Rate limits reset at the start of each minute/hour window.
</Note>

## Monthly Quotas

Quotas limit total captures per billing period.

| Plan       | Monthly Captures |
| ---------- | ---------------- |
| Free       | 100              |
| Starter    | 5,000            |
| Pro        | 50,000           |
| Enterprise | Unlimited        |

## Response Headers

Rate limit info is included in response headers:

```
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 45
X-RateLimit-Reset: 1703001260
```

| Header                  | Description                      |
| ----------------------- | -------------------------------- |
| `X-RateLimit-Limit`     | Max requests per window          |
| `X-RateLimit-Remaining` | Remaining requests               |
| `X-RateLimit-Reset`     | Unix timestamp when limit resets |

## Handling Rate Limits

When rate limited, you receive a 429 response:

```json theme={null}
{
  "success": false,
  "error": {
    "code": "RATE_LIMIT_EXCEEDED",
    "message": "Too many requests. Please slow down."
  }
}
```

### Best Practices

1. **Check headers** - Monitor remaining requests
2. **Implement backoff** - Wait before retrying
3. **Queue requests** - Spread requests over time
4. **Use caching** - Avoid duplicate requests

### Retry Example

```javascript theme={null}
async function captureWithRateLimit(params) {
  const response = await fetch('https://api.snapopa.com/capture', {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${API_KEY}`,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify(params),
  });

  if (response.status === 429) {
    const resetTime = response.headers.get('X-RateLimit-Reset');
    const waitMs = (resetTime * 1000) - Date.now();
    await new Promise(r => setTimeout(r, Math.max(waitMs, 1000)));
    return captureWithRateLimit(params); // Retry
  }

  return response.json();
}
```

## Quota Management

Monitor quota usage in your [Dashboard](https://snapopa.com/dashboard/billing-usage).

### Quota Response

When quota is exceeded:

```json theme={null}
{
  "success": false,
  "error": {
    "code": "QUOTA_EXCEEDED",
    "message": "Monthly capture quota exceeded"
  }
}
```

### Tips to Reduce Usage

1. **Enable caching** - Reuse captures for identical requests
2. **Batch requests** - Plan captures efficiently
3. **Review history** - Remove unnecessary captures
4. **Upgrade plan** - Get more quota if needed

## Enterprise Limits

Need higher limits? [Contact us](https://snapopa.com/contact) for custom enterprise plans with:

* Unlimited monthly captures
* Custom rate limits
* Dedicated infrastructure
* Priority support
