Game

Query MC Server

0calls
1 credits / call

Want to check how many people are online before joining a server? Or verify if the server is running? This endpoint is perfect for that!

GET
uapis.cn
/api/v1/game/minecraft/serverstatus
Query parameters
1
server
string
required

Minecraft server address, can be a domain (e.g., hypixel.net) or in IP:port format (e.g., mc.example.com:25565). If port is omitted, it will default to 25565.

Overview

By providing a server address (domain or IP), you can get the real-time status of a Minecraft Java Edition server. Returned information includes whether the server is online, current player count, max player count, server version, MOTD (Message of the Day) and server icon.

If the server returns a list of currently online players, the response will include an online_players field. This field may be omitted, and some servers may return incomplete lists.

Query parameters

server
stringrequired

Minecraft server address, can be a domain (e.g., hypixel.net) or in IP:port format (e.g., mc.example.com:25565). If port is omitted, it will default to 25565.

Response

200 / OK

Query successful! Returns detailed server status information.

JSON
{
  // Base64 Data URI of the server icon. You can use it directly in the `src` attribute of an `<img>` tag.
  "favicon_url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACayAAACqaXHeAAAA...",
  // The resolved IP address of the server.
  "ip": "172.65.252.238",
  // Maximum player capacity configured for the server.
  "max_players": 20000,
  // Plain text format of the server MOTD (Message of the Day), with all color and formatting codes removed.
  "motd_clean": "Hypixel Network [1.8-1.20]\n                                      SKYBLOCK",
  // HTML format of the server MOTD, preserving colors and styles for easy rendering on web pages.
  "motd_html": "<span style=\"color: #ffff55\"><b>Hypixel Network </b></span><span style=\"color: #555555\">[</span><span style=\"color: #aaaaaa\">1.8-1.20</span><span style=\"color: #555555\">]</span><br /><span style=\"color: #ffffff\">                                      </span><span style=\"color: #55ff55\"><b>SKYBLOCK</b></span>",
  // Whether the server is currently online.
  "online": true,
  // List of currently online players. If the server doesn't return this field, it will be omitted. Some servers may return incomplete lists.
  "online_players": [
    {
      // Player name.
      "name": "Steve",
      // Player's UUID. Some servers may not return this field.
      "uuid": "00000000-0000-0000-0000-000000000001"
    }
  ],
  // Current number of online players.
  "players": 45321,
  // Port used by the server.
  "port": 25565,
  // Version information reported by the server.
  "version": "Requires 1.8-1.20"
}

400 / Bad Request

Request failed. Please check if you provided the server parameter.

JSON
{
  "code": "INVALID_ARGUMENT",
  "details": {},
  "message": "Missing 'server' parameter."
}

404 / Not Found

Server not found. This may mean the server address you provided cannot be resolved, or the server is currently offline.

JSON
{
  "code": "NOT_FOUND",
  "details": {},
  "message": "Server not found or is offline."
}

502 / Bad Gateway

Query failed. A network or protocol error occurred while attempting to connect and retrieve server information.

JSON
{
  "code": "UPSTREAM_ERROR",
  "details": {},
  "message": "Failed to query server status."
}