## Bot stats (`bot-stats`)

Stats at the top of the bot management page and the per-class "requests today" column: today's requests, requests and action breakdown per bot class, number of sites with replay protection on, and node upgrade progress; tenants see their own sites only.

Authentication: User (some parameters admin only) · Docs: https://www-demo.kuxitong.com/en/docs/api/bot-stats

### GET `/api/v2/bot-stats`

Get bot stats · Authentication: User (some parameters admin only)

Query parameters:

| Field | Type | Required | Description |
|---|---|---|---|
| `site_id` | integer |  | Count this site only; omit for all sites. |

```sh
curl "https://panel.example.com/api/v2/bot-stats" \
  -H "X-API-Key: $GOCDN_API_KEY"
```

Bot stats object:

| Field | Type | Required | Description |
|---|---|---|---|
| `classes` | BotClassStat[] |  | Bot classes seen today with their action breakdown, in fixed class order (search, monitor, automation, headless, malicious, fake); classes not seen today are omitted; empty when the log database is unavailable. |
| `node_upgrade` | BotNodeUpgrade |  | Node upgrade progress - approved nodes whose reported version matches this master; visible to admins only, omitted from tenant responses. |
| `replay_sites` | BotReplaySites |  | Replay protection coverage. |
| `today_requests` | integer |  | All requests today; null when the log database is unavailable. |
