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

# Check Usage

> Check your API quota and remaining scans

## GET /api/static/usage

Check your current API quota and usage information, broken down by scan mode.

### Request

**Headers:**

* `x-api-key` (required): Your Rafter API key

**Example:**

```bash theme={null}
curl -H "x-api-key: RFabc-your-api-key-here" \
  https://rafter.so/api/static/usage
```

### Response

**Success (200 OK):**

```json theme={null}
{
  "quota": {
    "fast": { "used": 3, "limit": 15, "remaining": 12 },
    "plus": { "used": 1, "limit": 1, "remaining": 0 },
    "quota_reset_date": "2026-04-12T00:00:00Z"
  }
}
```

**Error (401 Unauthorized):**

```json theme={null}
{
  "error": "Invalid or inactive API key."
}
```

**Error (400 Bad Request):**

```json theme={null}
{
  "error": "Missing API key."
}
```

### Response Fields

| Field                    | Type    | Description                        |
| ------------------------ | ------- | ---------------------------------- |
| `quota.fast.used`        | integer | Fast scans used in current period  |
| `quota.fast.limit`       | integer | Fast scan limit for current period |
| `quota.fast.remaining`   | integer | Fast scans remaining               |
| `quota.plus.used`        | integer | Plus scans used in current period  |
| `quota.plus.limit`       | integer | Plus scan limit for current period |
| `quota.plus.remaining`   | integer | Plus scans remaining               |
| `quota.quota_reset_date` | string  | ISO 8601 date when quota resets    |

### Plan Limits

Fast and Plus scans draw from separate quota pools — using one does not affect the other. See [rafter.so/pricing](https://rafter.so/pricing) for current plan limits.

### Common Scenarios

#### Quota Available

```json theme={null}
{
  "quota": {
    "fast": { "used": 3, "limit": 15, "remaining": 12 },
    "plus": { "used": 0, "limit": 1, "remaining": 1 },
    "quota_reset_date": "2026-04-12T00:00:00Z"
  }
}
```

#### Fast Quota Exhausted (Plus Still Available)

```json theme={null}
{
  "quota": {
    "fast": { "used": 15, "limit": 15, "remaining": 0 },
    "plus": { "used": 0, "limit": 1, "remaining": 1 },
    "quota_reset_date": "2026-04-12T00:00:00Z"
  }
}
```

## Rate Limiting

The API implements rate limiting to ensure fair usage:

* **Rate Limit**: 100 requests per minute per IP address
* **Quota**: Based on your subscription plan

### Examples

#### JavaScript

```javascript theme={null}
const response = await fetch('https://rafter.so/api/static/usage', {
  headers: {
    'x-api-key': 'RFabc-your-api-key-here'
  }
});

const data = await response.json();
const { fast, plus } = data.quota;
console.log(`Fast scans: ${fast.remaining}/${fast.limit} remaining`);
console.log(`Plus scans: ${plus.remaining}/${plus.limit} remaining`);
```

#### Python

```python theme={null}
import requests

response = requests.get(
    'https://rafter.so/api/static/usage',
    headers={'x-api-key': 'RFabc-your-api-key-here'}
)

data = response.json()
fast = data['quota']['fast']
plus = data['quota']['plus']
print(f"Fast scans: {fast['remaining']}/{fast['limit']} remaining")
print(f"Plus scans: {plus['remaining']}/{plus['limit']} remaining")
```

#### Shell

```bash theme={null}
#!/bin/bash

API_KEY="RFabc-your-api-key-here"
RESPONSE=$(curl -s -H "x-api-key: $API_KEY" \
  https://rafter.so/api/static/usage)

echo "Fast remaining: $(echo $RESPONSE | jq '.quota.fast.remaining')"
echo "Plus remaining: $(echo $RESPONSE | jq '.quota.plus.remaining')"
```
