# Get Category Counts

> How many notifications the key creator has in each category.

Requires an API key with the `read` scope.

The numbers on the filter pills of the notification page. One grouped query over the key creator's notifications in this workspace.

## Query Parameters

<ParamField query="unread" type="boolean">Count only notifications that are not read yet. Default false.</ParamField>

## Response

<ResponseField name="data" type="object">`counts` (an object with `replies`, `campaigns`, `inboxes`, `imports`, `billing` and `workspace`, each an integer) and `total` (their sum).</ResponseField>
<ResponseField name="meta" type="object">`enabled`.</ResponseField>

<RequestExample>
```bash cURL
curl "https://api.foxreach.io/api/v1/notifications/category-counts?unread=true" \
  -H "X-API-Key: otr_your_key"
```

```python Python SDK (beta)
from foxreach import FoxReach

client = FoxReach(api_key="otr_your_key")
counts = client.notifications.category_counts(unread=True)
```

```typescript TypeScript SDK (beta)
import { FoxReach } from "foxreach";

const client = new FoxReach({ apiKey: "otr_your_key" });
const counts = await client.notifications.categoryCounts({ unread: true });
```

</RequestExample>

<ResponseExample>
```json
{
  "data": {
    "counts": { "replies": 3, "campaigns": 5, "inboxes": 1, "imports": 0, "billing": 0, "workspace": 0 },
    "total": 9
  },
  "meta": { "enabled": true }
}
```
</ResponseExample>

## Errors

| Status | Description |
|--------|-------------|
| `401` | Missing, invalid, revoked or expired API key |
| `403` | API key does not have the required scope: `read` |

## Rate Limit

- **300 requests per minute, shared by every `read` call in your workspace.** Fixed 60-second window.
- Every response includes `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset` (unix epoch seconds) and `X-RateLimit-Bucket` (`read`).
- A `429` response includes a `Retry-After` header (seconds until the bucket resets).

For client-side patterns, see [Rate Limiting](/rate-limiting).
