Skip to content

Server Status

Retrieve real-time server status and return JSON data.

methods: GET, POST

bash
https://sr-api.sfirew.com/server/<server_address>:<port>

Here's a tip

If the server port defaults to 25565, you don't need to specify it. You can simply write like this:
https://sr-api.sfirew.com/server/mc.hypixel.net

Query Parameters

NameTypeDescription
timeoutstringYou can customize the time limit for the query in milliseconds.
For example: 5000 for 5 seconds.
protocolnumberYou can choose a specific server version to query.
For example: 765, for Minecraft version 1.20.3.
bedrockbooleanWhether to use Bedrock Edition query mode.

Query Path Parameter

NameTypeDescription
server_addressstringFor example: mc.hypixel.net
portnumberServer port
Range: 0 ~ 65535
Default: 25565

Response Example

The server's online status, Status Code response will always be 200.

Response Example

The server's online status. The Status Code response will always be 200.

JSON
{
  "ip": "catnoob.net", // server address
  "port": 25565, // server port
  "online": true, // if server is online will be true, else false.
  "isp": false, // ISP info, current is not available.
  "source_address": "hidden", // real server hostname, current is not available.
  "dns_records": false, // DNS records, current is not available.
  "query_place": "Taiwan", // queried server host place.
  "query_host_id": "taipei-1", // queried server host id.
  "bedrock": false, // if server version is bedrock version will be true
  "icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABAC......", // server icon data
  "motd": {
    // source MOTD data
    "raw": {
      "extra": [
        {
          "extra": [
            { "color": "#FFA500", "text": "【" },
            { "color": "#FFAB05", "text": "貓" },
            { "color": "#FFB00B", "text": "咪" },
            { "color": "#FFB610", "text": "村" },
            { "color": "#FFBC15", "text": "伺" },
            { "color": "#FFC11B", "text": "服" },
            { "color": "#FFC720", "text": "器" },
            { "color": "#FFCC25", "text": " " },
            { "color": "#FFD22B", "text": "-" },
            { "color": "#FFD830", "text": " " },
            { "color": "#FFDD35", "text": "1" },
            { "color": "#FFE33A", "text": "." },
            { "color": "#FFE940", "text": "2" },
            { "color": "#FFEE45", "text": "0" },
            { "color": "#FFF44A", "text": "." },
            { "color": "#FFF950", "text": "1" },
            { "color": "yellow", "text": "】" }
          ],
          "text": "                    "
        },
        // ...
      ],
      "text": ""
    },
    // HTML MOTD conversion, applicable for websites
    "html": "                    \u003Cspan style=\"color:#FFA500;\"\u003E\u003C/span\u003E\u003Cspan style=\"color:#FFAB05;\"\u003E\u003C/span\u003E\u003Cspan style=\"color:#FFB00B;\"\u003E\u003C/span\u003E\u003Cspan style=\"color:#FFB610;\"\u003E\u003C/span\u003E\u003Cspan style=\"color:#FFBC15;\"\u003E\u003C/span\u003E\u003Cspan style=\"color:#FFC11B;\"\u003E\u003C/span\u003E\u003Cspan style=\"color:#FFC720;\"\u003E\u003C/span\u003E\u003Cspan style=\"color:#FFCC25;\"\u003E \u003C/span\u003E\u003Cspan style=\"color:#FFD22B;\"\u003E-\u003C/span\u003E\u003Cspan style=\"color:#FFD830;\"\u003E \u003C/span\u003E\u003Cspan style=\"color:#FFDD35;\"\u003E1\u003C/span\u003E\u003Cspan style=\"color:#FFE33A;\"\u003E.\u003C/span\u003E\u003Cspan style=\"color:#FFE940;\"\u003E2\u003C/span\u003E\u003Cspan style=\"color:#FFEE45;\"\u003E0\u003C/span\u003E\u003Cspan style=\"color:#FFF44A;\"\u003E.\u003C/span\u003E\u003Cspan style=\"color:#FFF950;\"\u003E1\u003C/span\u003E\u003Cspan style=\"color:#FFFF55;\"\u003E\u003C/span\u003E\u003Cbr/\u003E         \u003Cspan style=\"color:#FFFFFF;font-weight: bold;\"\u003E\u003Cspan style=\"color:#FFA500;\"\u003E公告\u003Cspan style=\"color:#FFFFFF;\"\u003E\u003Cspan style=\"color:#00FFFF;\"\u003E\u003C/span\u003E\u003Cspan style=\"color:#0EFFFF;\"\u003E\u003C/span\u003E\u003Cspan style=\"color:#1CFFFF;\"\u003E\u003C/span\u003E\u003Cspan style=\"color:#2BFFFF;\"\u003E\u003C/span\u003E\u003Cspan style=\"color:#39FFFF;\"\u003E\u003C/span\u003E\u003Cspan style=\"color:#47FFFF;\"\u003E\u003C/span\u003E\u003Cspan style=\"color:#55FFFF;\"\u003E\u003C/span\u003E\u003Cspan style=\"color:#63FFFF;\"\u003E\u003C/span\u003E\u003Cspan style=\"color:#71FFFF;\"\u003E\u003C/span\u003E\u003Cspan style=\"color:#80FFFF;\"\u003E\u003C/span\u003E\u003Cspan style=\"color:#8EFFFF;\"\u003E~\u003C/span\u003E\u003Cspan style=\"color:#9CFFFF;\"\u003E \u003C/span\u003E\u003Cspan style=\"color:#AAFFFF;\"\u003E\u003C/span\u003E\u003Cspan style=\"color:#B8FFFF;\"\u003E\u003C/span\u003E\u003Cspan style=\"color:#C6FFFF;\"\u003E1\u003C/span\u003E\u003Cspan style=\"color:#D5FFFF;\"\u003E6\u003C/span\u003E\u003Cspan style=\"color:#E3FFFF;\"\u003E\u003C/span\u003E\u003Cspan style=\"color:#F1FFFF;\"\u003E\u003C/span\u003E\u003Cspan style=\"color:#FFFFFF;\"\u003E\u003C/span\u003E\u003C/span\u003E\u003C/span\u003E\u003C/span\u003E"
  },
  // info
  "info": {
    // source data
    "raw": "",
    // converted HTML string
    "html": ""
  },
  // players info
  "players": {
    "max": 200, // max players
    "online": 116, // online players
    "sample": [] // players list, some servers will hide this
  },
  // version info
  "version": {
    "name": "1.20.4", // version name
    "protocol": 765, // version protocol number
    "raw": "BungeeCord 1.8.x-1.20.x" // server software or name
  },
  // mod info, some server will hide this.
  "modinfo": {
    "type": "FML", // MOD type name, for example this server is Forage Mod Loader (FML).
    "modList": [] // MOD info list
  },
  "ping": 5 // server latency time - Using milliseconds (ms) as the unit
}

Usage Example

bash

bash
curl -X 'GET' \
   'https://sr-api.sfirew.com/server/mc.hypixel.net'

JavaScript

javascript
async function queryServerStatus() {
  const response = await fetch("https://sr-api.sfirew.com/server/mc.hypixel.net");
  const status = await response.json();
  console.log(status);
}
queryServerStatus();