# Get instance stats

`GET /api/v1/server/stats`

Get instance public statistics. This endpoint is cached.

Authentication: no security requirement declared for this operation.

Responses:

- 200: successful operation

Content type: application/json

Type: ServerStats

Schema: [ServerStats](https://sourcey-peertube.pages.dev/api-rest-reference/models/serverstats.md)

- `totalUsers` (optional)
  Type: number

- `totalDailyActiveUsers` (optional)
  Type: number

- `totalWeeklyActiveUsers` (optional)
  Type: number

- `totalMonthlyActiveUsers` (optional)
  Type: number

- `totalModerators` (optional)
  Type: number
  
  **PeerTube >= 6.1** Value is null if the admin disabled total moderators stats

- `totalAdmins` (optional)
  Type: number
  
  **PeerTube >= 6.1** Value is null if the admin disabled total admins stats

- `totalLocalVideos` (optional)
  Type: number

- `totalLocalVideoViews` (optional)
  Type: number
  
  Total video views made on the instance

- `totalLocalVideoDownloads` (optional)
  Type: number
  
  Total video downloads made on the instance

- `totalLocalVideoComments` (optional)
  Type: number
  
  Total comments made by local users

- `totalLocalVideoFilesSize` (optional)
  Type: number

- `totalVideos` (optional)
  Type: number

- `totalVideoComments` (optional)
  Type: number

- `totalLocalVideoChannels` (optional)
  Type: number

- `totalLocalDailyActiveVideoChannels` (optional)
  Type: number

- `totalLocalWeeklyActiveVideoChannels` (optional)
  Type: number

- `totalLocalMonthlyActiveVideoChannels` (optional)
  Type: number

- `totalLocalPlaylists` (optional)
  Type: number

- `totalInstanceFollowers` (optional)
  Type: number

- `totalInstanceFollowing` (optional)
  Type: number

- `videosRedundancy` (optional)
  Type: Array<object>
  
  Items:
    Type: object
    
    - `strategy` (optional)
      Type: string
    
    - `totalSize` (optional)
      Type: number
    
    - `totalUsed` (optional)
      Type: number
    
    - `totalVideoFiles` (optional)
      Type: number
    
    - `totalVideos` (optional)
      Type: number

- `totalActivityPubMessagesProcessed` (optional)
  Type: number

- `totalActivityPubMessagesSuccesses` (optional)
  Type: number

- `totalActivityPubMessagesErrors` (optional)
  Type: number

- `activityPubMessagesProcessedPerSecond` (optional)
  Type: number

- `totalActivityPubMessagesWaiting` (optional)
  Type: number

- `averageRegistrationRequestResponseTimeMs` (optional)
  Type: number
  
  **PeerTube >= 6.1** Value is null if the admin disabled registration requests stats

- `totalRegistrationRequestsProcessed` (optional)
  Type: number
  
  **PeerTube >= 6.1** Value is null if the admin disabled registration requests stats

- `totalRegistrationRequests` (optional)
  Type: number
  
  **PeerTube >= 6.1** Value is null if the admin disabled registration requests stats

- `averageAbuseResponseTimeMs` (optional)
  Type: number
  
  **PeerTube >= 6.1** Value is null if the admin disabled abuses stats

- `totalAbusesProcessed` (optional)
  Type: number
  
  **PeerTube >= 6.1** Value is null if the admin disabled abuses stats

- `totalAbuses` (optional)
  Type: number
  
  **PeerTube >= 6.1** Value is null if the admin disabled abuses stats

## Examples

### cURL

```bash
curl -X GET 'https://peertube2.cpy.re/api/v1/server/stats'
```

### JavaScript

```javascript
const response = await fetch('https://peertube2.cpy.re/api/v1/server/stats', {
  method: 'GET',
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.get('https://peertube2.cpy.re/api/v1/server/stats')
print(response.text)
```
