Documentation on how to use our API in your service
The goal of this API documentation is to accurately and precisely describe the functionality of this service in plain terms. This page will go over everything you need to know before implementing our API into your service. If you believe there is anything missing, any typos, or incorrect information on this page, please reach out to me via email at [email protected].
The majority of this API uses the standardized REST API, which in simple terms means you will be making HTTP requests to our service. We currently only support endpoints using the GET
method. You will never have to use POST
or any other method with requires you to send body data or headers with your request. All status endpoints return a response body in JSON format. No other data formatting standard is available at this time, and there is currently no future plan to support anything other than JSON. All JSON returned from this service will have whitespace and any unnecessary characters removed to reduce network bandwidth and wasted information. You may learn more about the properties you receive from these routes by reading the documented response body from the route on this page.
To reduce the amount of spam and deliberate denial-of-service attacks of our service, we implement a caching system for all of the data we fetch, including but not limited to status responses and server icons. Each route has its own cache duration, unique to the pathname of the request. Please note that adding query parameters to the request will not force a fresh request, it will still return the cached response. All routes with data retrieved from the cache will contain a header in the response with the key X-Cache-Hit
which will contain a boolean value whether or not our service used a value from cache. The response will also contain a X-Cache-Time-Remaining
if the cache was hit, which contains an integer with the amount of seconds remaining until the cache expires for this request. Any request made after this cache expiration time will result in fresh data being retrieved on our end. No exceptions will be made to the cache duration. If you want to bypass the cache, we recommend that you self-host the ping-server available on our GitHub organization.
All Minecraft servers, including pre-netty rewrite Java Edition and Bedrock Edition servers, are supported. Make sure you are using the correct endpoint when retrieving a server status, as attempting to use the Java Edition status route with a Bedrock Edition host (or vise-versa) will result in a response saying the server is offline unless the server explicitly has cross-play supported. If the server you specify does not use the standard port value (25565
for Java Edition, 19132
for Bedrock Edition), then you will need to specify the port by using the following format: host:port
.
Retrieves the status of any Java Edition Minecraft server. <address>
should be replaced with the connection address of the server. For example, play.hypixel.net
is a valid connection address as well as play.hypixel.net:25565
. You can also set ?query=false
in the URL query parameters to disable query lookup for faster status retrieval at the expense of missing software
and plugins
properties.
GEThttps://api.mcstatus.io/v2/status/java/<address>
{
// Determines whether the server is online or offline.
// @type {boolean}
"online": true,
// The hostname of the server that was resolved from the address string.
// @type {string}
"host": "demo.mcstatus.io",
// The port of the server that was resolved from the address string.
// @type {number}
"port": 25565,
// Whether or not this server address has been blocked by Mojang.
// If this is true, Notchian clients will not be able to connect to the
// server via the Minecraft client because it previously violated the EULA.
// @type {boolean}
"eula_blocked": false,
// The timestamp in Unix milliseconds of when the status was retrieved from
// the Minecraft server itself.
// @type {number}
"retrieved_at": 1681883645007,
// The Unix milliseconds timestamp at which the cache will expire for this
// status. The first proceeding request made after this timestamp will
// return an up-to-date status of the server.
"expires_at": 1681883705007,
// The version data of the server. This will be null if the server
// version is pre-1.3.2. This property will be missing if the server
// is offline.
// @type {object | null}
"version": {
// The version name of the server, typically modified by the server
// itself to show version range. This value may contain special formatting
// characters.
// @type {string}
"name_raw": "§f1.19.4",
// The version name of the server, typically modified by the server
// itself to show version range. This value will have all formatting
// characters removed.
// @type {string}
"name_clean": "1.19.4",
// The version name of the server, typically modified by the server
// itself to show version range, as an HTML string with proper
// formatting applied.
// @type {string}
"name_html": "<span><span style=\"color: #ffffff;\">1.19.4</span></span>",
// The protocol version of the server which is used to identify
// what client versions are supported.
// @type {number}
"protocol": 762
},
// Information about the amount of players online and *some* sample
// players if provided. This property will be missing if the server
// is offline.
// @type {object}
"players": {
// The amount of online players in the server.
// @type {number}
"online": 71,
// The maximum number of allowed players in the server.
// @type {number}
"max": 100,
// Some sample players online in the server. Most (if not all) major
// servers disable this or modify the data for custom formatting. If you
// do not have any items in this array, it is because the server has
// disabled sample players for a reason.
// @type {Array.<object>}
"list": [
{
// The UUID of the player logged into the server.
// @type {string}
"uuid": "069a79f4-44e9-4726-a5be-fca90e38aaf5",
// The username of the player logged into the server. The server
// may have plugins that modify this data to show special
// formatting. This value may have formatting characters.
// @type {string}
"name_raw": "Notch",
// The username of the player logged into the server. The server
// may have plugins that modify this data to show special
// formatting. This value will not have any formatting characters.
// @type {string}
"name_clean": "Notch",
// The username of the player logged into the server, as an HTML
// string with proper formatting applied.
// @type {string}
"name_html": "<span><span style=\"color: #ffffff;\">Notch</span></span>"
}
]
},
// The message of the day (or MOTD/description) of the server. This is the
// message shown below the server name in the client multiplayer menu. This
// property will be missing if the server is offline.
// @type {object}
"motd": {
// The raw MOTD with formatting codes. Refer to
// https://minecraft.fandom.com/wiki/Formatting_codes for information
// on how to use formatting codes.
// @type {string}
"raw": " §c§k;;; §c§l>§6§l>§e§l> §lMinecraft Server Status §e§l<§6§l<§c§l< §c§k;;;\n §6§nhttps://mcstatus.io/",
// A clean text-only version of the MOTD with all formatting codes removed.
// @type {string}
"clean": " ;;; >>> Minecraft Server Status <<< ;;;\n https://mcstatus.io/",
// An HTML representation of the MOTD with proper formatting. All formatting
// codes are supported and are equal to their value in the Minecraft fandom wiki.
// Magic/obfuscated formatting codes are a <span> with the class `.minecraft-format-obfuscated`.
// Line breaks are encoded as the "\n" escape code and may be replaced with <br> by the user.
// @type {string}
"html": "<span><span style=\"color: #ffffff;\"> </span><span class=\"minecraft-format-obfuscated\" style=\"color: #ff5555;\">;;;</span><span style=\"color: #ffffff;\"> </span><span style=\"color: #ff5555; font-weight: bold;\">></span><span style=\"color: #ffaa00; font-weight: bold;\">></span><span style=\"color: #ffff55; font-weight: bold;\">></span><span style=\"color: #ffffff;\"> </span><span style=\"color: #ffffff; font-weight: bold;\">Minecraft Server Status</span><span style=\"color: #ffffff;\"> </span><span style=\"color: #ffff55; font-weight: bold;\"><</span><span style=\"color: #ffaa00; font-weight: bold;\"><</span><span style=\"color: #ff5555; font-weight: bold;\"><</span><span style=\"color: #ffffff;\"> </span><span class=\"minecraft-format-obfuscated\" style=\"color: #ff5555;\">;;;</span><span style=\"color: #ffffff;\"></span><span style=\"color: #ffffff;\">\n </span><span style=\"color: #ffaa00; text-decoration: underline;\">https://mcstatus.io/</span></span>"
},
// The base64-encoded PNG data of the 64x64 server icon. You may require
// additional libraries or utilities for using this property. There are
// several examples out there. This property may be null if the server does
// not set an icon image. This property will also be missing if the server
// is offline.
// @type {string | null}
"icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABAEAYAAAD6...",
// Any Forge mods loaded if provided by the server. Most servers do not
// have Forge installed so this property will be empty a majority of the time.
// Legacy FML and FML2 are supported.
// @type {Array.<object>}
"mods": [
{
// The name of the mod that is loaded on the server.
// @type {string}
"name": "applied-energistics-2",
// The version of the mod that is loaded on the server.
// @type {string}
"version": "11.7.2"
}
],
// If query lookup is successful, then this property will contain the
// software that the server is running. This will be missing if the server
// is offline.
// @type {string | null}
"software": "github.com/mcstatus-io/demo-server",
// If query lookup is successful, then this property will contain the
// list of plugins that the server is running. This will be missing if the
// server is offline.
// @type {Array.<object>}
"plugins": [
{
// The name of the plugin.
// @type {string}
"name": "WorldEdit",
// The semantic version of the plugin.
// @type {string}
"version": "7.2.14"
}
]
}
Retrieves the status of any Bedrock Edition Minecraft server. <address>
should be replaced with the connection address of the server. For example, pe.mineplex.com
is a valid connection address as well as pe.mineplex.com:19132
.
GEThttps://api.mcstatus.io/v2/status/bedrock/<address>
{
// Determines whether the server is online or offline.
// @type {boolean}
"online": true,
// The hostname of the server that was resolved from the address string.
// @type {string}
"host": "demo.mcstatus.io",
// The port of the server that was resolved from the address string.
// @type {number}
"port": 19132,
// Whether or not this server address has been blocked by Mojang.
// If this is true, Notchian clients will not be able to connect to the
// server via the Minecraft client because it previously violated the EULA.
// @type {boolean}
"eula_blocked": false,
// The timestamp in Unix milliseconds of when the status was retrieved from
// the Minecraft server itself.
// @type {number}
"retrieved_at": 1681884126942,
// The Unix milliseconds timestamp at which the cache will expire for this
// status. The first proceeding request made after this timestamp will
// return an up-to-date status of the server.
"expires_at": 1681884186942,
// The version data of the server. This property will be missing if
// the server is offline.
// @type {object}
"version": {
// The version name of the server.
// @type {string}
"name": "1.19.70",
// The protocol version of the server which is used to identify
// what client versions are supported.
// @type {number}
"protocol": 575
},
// Information about the amount of online and max players. This property
// will be missing if the server is offline.
// @type {object}
"players": {
// The amount of online players in the server.
// @type {number}
"online": 71,
// The maximum number of allowed players in the server.
// @type {number}
"max": 100
},
// The message of the day (or MOTD/description) of the server. This is the
// message shown below the server name in the client multiplayer menu. This
// property will be missing if the server is offline.
// @type {object}
"motd": {
// The raw MOTD with formatting codes. Refer to
// https://minecraft.fandom.com/wiki/Formatting_codes for information
// on how to use formatting codes.
// @type {string}
"raw": "A Bedrock server\nYou cannot connect!",
// A clean text-only version of the MOTD with all formatting codes removed.
// @type {string}
"clean": "A Bedrock server\nYou cannot connect!",
// An HTML representation of the MOTD with proper formatting. All formatting
// codes are supported and are equal to their value in the Minecraft fandom wiki.
// Magic/obfuscated formatting codes are a <span> with the class `.minecraft-format-obfuscated`.
// Line breaks are encoded as the "\n" escape code and may be replaced with <br> by the user.
// @type {string}
"html": "<span><span style=\"color: #ffffff;\">A Bedrock server</span><span style=\"color: #ffffff;\">\nYou cannot connect!</span></span>"
},
// The default gamemode that players will spawn into when joining
// the server.
// @type {string}
"gamemode": "Survival",
// The ID of the server itself. There is little to no documentation
// online about the use of this value.
// @type {string}
"server_id": "8919800251809186875",
// The type of server that was retrieved. Possible values are "MCPE" for
// Bedrock and Pocket Edition, or "MCEE" for Education Edition.
// @type {"MCPE" | "MCEE"}
"edition": "MCPE"
}
Returns a widget image containing information about the Java Edition server. This widget can be embedded into any website or any source that allows images via URL. All query parameters are optional.
GEThttps://api.mcstatus.io/v2/widget/java/<address>?dark=<true/false>&rounded=<true/false>
Returns just the icon/favicon of any Java Edition Minecraft server. If connection to the server fails or if the server is offline then the default icon is returned. The address value is optional, and if not provided then the default icon is returned.
GEThttps://api.mcstatus.io/v2/icon/<address>
We try and provide official support for integrating our service into many languages. The list of official and unofficial libraries are below.
If you require any additional assistance or found a bug you would like to report, please send an email to [email protected].