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

# Server statistics

> ER:LC online count and Discord server member counts. Several servers and metrics can be requested at once.

## Compatibility of Metrics and Servers

API V3 supports multiple server and metrics selection. Each server has its own set of data:

| Server | Server Description | `membercount` (online) | `allmembercount` (total) | `botcount` (bots) | `playercount` (ER:LC) |
| :- | :- | :-: | :-: | :-: | :-: |
| **MRP** | Moscow RolePlay (Main Project) | ✅ | ✅ | ✅ | ✅ |
| **MVD** | Ministry of Internal Affairs | ✅ | ✅ | ✅ | ❌ |
| **FSB** | Federal Security Service | ✅ | ✅ | ✅ | ❌ |
| **MCHS** | Russian Emergency Situations Ministry | ✅ | ✅ | ✅ | ❌ |
| **MZ** | Ministry of Health | ✅ | ✅ | ✅ | ❌ |
| **112** | Emergency Call Service 112 | ✅ | ✅ | ✅ | ❌ |
| **DOT** | Department of Transport | ✅ | ❌ | ❌ | ❌ |

> [!WARNING]
>
> **Please note:**
> The `playercount` metric reflects the number of players on the ER:LC server and is available **only** for the `MRP` server. If you try to request `playercount` for any other server, the error `400 Bad Request` will be returned.


## OpenAPI

````yaml en/openapi/en-api-v3-openapi.yaml GET /stats
openapi: 3.1.0
info:
  title: ER:LC Russia API V3
  description: >-
    ER:LC Russia API for servers, users, CDN, redirects, subscriptions, and
    access keys.
  version: 3.0.0
servers:
  - url: https://api.erlcrussia.com/v3
    description: Production server (com)
  - url: https://api.erlcrussia.xyz/v3
    description: Backup server (xyz)
security: []
tags:
  - name: ER:LC Server
    description: Obtaining status, online, lists of players and staff of the ER:LC server.
  - name: ER:LC Teams
    description: Sending and queuing in-game server commands (:h, :m, :kick, :ban, etc.).
  - name: Economics
    description: >-
      Interaction with the economic system (users, businesses, mafias, stores,
      advertising).
  - name: Statistics API
    description: >-
      High-performance obtaining statistics of discord servers and game servers
      (online, participants, bots).
  - name: Verification API
    description: Search and comparison of Discord ID and Roblox ID accounts.
  - name: CDN Assets
    description: >-
      Load, manage, statistic and clear MinIO/Edge CDN object storage file
      cache.
  - name: CDN Folders
    description: Hierarchical structure and sorting of CDN media library folders.
  - name: Punishment API
    description: Manage the balance and transaction history of players' points.
  - name: Subscriptions API
    description: >-
      Catalog of plans, FunPay orders, accrual of benefits and activation of
      subscriptions.
  - name: Authorization API
    description: >-
      Login via Discord and Roblox OAuth2, manage user sessions and link
      accounts.
  - name: Management API - WebSocket Keys
    description: Managing access keys to the WebSocket gateway and channel subscriptions.
  - name: Management API - Webhooks
    description: Registration, accessibility validation and monitoring of custom webhooks.
  - name: Control API - Panel
    description: >-
      Management of users, subscriptions, tariffs, manual balance and system
      statistics.
  - name: State API
    description: >-
      Monitoring the performance of the service, connections to PostgreSQL and
      Redis.
  - name: AI Audio
  - name: AI Studio
  - name: AI administration
  - name: API Keys
  - name: Admin API - Servers
  - name: Administration of E-Coins
  - name: CDN
  - name: CDN Domains
  - name: CDN V3
  - name: Custom Webhooks
  - name: Management API - Servers
  - name: Management API - Tokens
  - name: Organization redirects V3
  - name: Private files and library
  - name: Рекламные кампании V3
paths:
  /stats:
    get:
      tags:
        - Statistics API
      summary: Server statistics
      description: >-
        ER:LC online count and Discord server member counts. Several servers and
        metrics can be requested at once.
      parameters:
        - name: servers
          in: query
          required: true
          description: >
            Имена серверов. Выберите один или несколько серверов из выпадающего
            списка:

            - `MRP` — Moscow RolePlay (поддерживает все 4 метрики)

            - `MVD`, `FSB`, `MCHS`, `MZ`, `112` — поддерживают `membercount`,
            `allmembercount`, `botcount`

            - `DOT` — поддерживает только `membercount`
          schema:
            type: array
            items:
              type: string
              enum:
                - MRP
                - MVD
                - FSB
                - MCHS
                - MZ
                - '112'
                - DOT
          example:
            - MRP
        - name: metrics
          in: query
          required: true
          description: >
            Типы запрашиваемых метрик:

            - `playercount` — онлайн игроков в игре ER:LC (**доступен ТОЛЬКО для
            `MRP`**)

            - `membercount` — количество участников Discord онлайн (доступен для
            всех)

            - `allmembercount` — общее число участников Discord сервера (все
            кроме `DOT`)

            - `botcount` — количество ботов на сервере (все кроме `DOT`)
          schema:
            type: array
            items:
              type: string
              enum:
                - membercount
                - allmembercount
                - botcount
                - playercount
          example:
            - playercount
      responses:
        '200':
          description: An object with statistics for each server and the requested metrics.
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: object
                  additionalProperties:
                    type: integer
                example:
                  MRP:
                    membercount: 1450
                    playercount: 38
                  MVD:
                    membercount: 320
                    playercount: 12
        '400':
          $ref: '#/components/responses/BadRequestError'
components:
  responses:
    BadRequestError:
      description: Bad Request (400) - invalid request parameters.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            missing_params:
              summary: Missing Parameters (5002)
              value:
                code: 5002
                message: Missing Parameters
            invalid_json:
              summary: Invalid JSON (5034)
              value:
                code: 5034
                message: Invalid Json
            invalid_param:
              summary: Invalid Param Name (5004)
              value:
                code: 5004
                message: Invalid Param Name
  schemas:
    ErrorResponse:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: integer
          example: 5009
          description: Numeric error code ER:LC Russia API.
        message:
          type: string
          example: Forbidden
          description: System error message in English.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.