Node.js
mcapitr
A Promise-based Node.js client with complete TypeScript declarations and Buffer helpers for generated media.
npm install mcapitrMCAPI.TR Developer Platform
The complete MCAPI.TR developer guide for querying Minecraft Java, Legacy and Bedrock servers and using icons, banners, widgets, trends and platform statistics.
https://mcapi.tr/api/v101 — Quick start
No setup or keys. Pick a client, copy the example and run it.
curl "https://mcapi.tr/api/v1/status/mc.hypixel.net"02 — API Playground
The request goes directly to the MCAPI.TR API and the formatted response appears below.
03 — Endpoint Reference
Open a card for parameters, caching behavior and runnable examples.
/api/v1/serversLists previously discovered servers using their latest snapshot. Fresh offline servers are excluded. A snapshot older than 24 hours or a missing snapshot produces status stale and online null. last_snapshot_online preserves the last observation. No live probe is performed. Results are ordered by server ID.
| Parameter | Location | Type | Default | Description |
|---|---|---|---|---|
limit | query | integer (1–100) | 50 | 1–100 servers per page, default 50. |
page | query | integer (1–2147483647) | 1 | Page number, default 1. With limit=100, pages 1–10 can return 1,000 records. Continue with meta.nextPage; null means the last page. Do not combine page and cursor. |
cursor | query | opaque string | — | meta.nextCursor from the previous response. Continue until meta.hasNext is false to retrieve every page. |
edition | query | java | bedrock | — | java or bedrock. Excludes entries whose edition has not been confirmed. |
status | query | online | stale | offline | — | online, stale or offline. The default includes online and stale. |
min_players | query | integer | — | Minimum player count on the latest snapshot. |
max_snapshot_age | query | integer | — | Maximum age of the latest snapshot in seconds (1–2592000). |
sort | query | id | players | recent | — | id ascending; players and recent descending with UUID ascending on ties. Use a filtered cursor with the same filters within 24 hours. |
curl "https://mcapi.tr/api/v1/servers?limit=100&page=2"
curl "https://mcapi.tr/api/v1/servers?edition=java&status=online&min_players=10&max_snapshot_age=3600&sort=players"{
"success": true,
"data": [
{
"server_id": "00000000-0000-4000-8000-000000000001",
"hostname": "play.example.net",
"address": "play.example.net:25565",
"port": 25565,
"status": "online",
"online": true,
"stale": false,
"last_snapshot_online": true,
"checked_at": "2026-11-05T12:00:00.000Z",
"players_online": 20,
"players_max": 100,
"version": "1.21.11",
"protocol": 774,
"ping": 35
}
],
"meta": {
"limit": 50,
"page": 1,
"nextPage": null,
"hasNext": false,
"nextCursor": null
}
}/api/v1/status/bulkChecks up to 50 servers per request with at most 10 different targets in flight. Results retain input order and include the single-status response and status_code. Offline results use item code 404 and internal failures 500; a valid batch returns HTTP 200. Limited to 6 requests per minute per IP.
| Parameter | Location | Type | Default | Description |
|---|---|---|---|---|
servers* | body | object[] (1–50) | — | 1–50 server objects in the JSON body. An invalid item rejects the entire request with 400. Repeated identical targets reuse their result. |
servers[].address* | body | string | — | Hostname or IP; an optional port may be appended: play.example.net:25565 |
servers[].legacy / bedrock | body | boolean | false | Both false for Java. Set bedrock true for Bedrock or legacy true for older Java. They cannot both be true. Use JSON booleans. |
curl -X POST "https://mcapi.tr/api/v1/status/bulk" -H "Content-Type: application/json" -d '{"servers":[{"address":"mc.hypixel.net"},{"address":"play.example.net:19132","bedrock":true}]}'{
"success": true,
"data": [
{
"address": "mc.hypixel.net",
"status_code": 200,
"data": {
"online": true,
"stale": false,
"players": {
"online": 52184,
"max": 200000
}
}
},
{
"address": "play.example.net:19132",
"status_code": 404,
"data": {
"online": false,
"stale": false,
"error": "Failed to connect"
}
}
],
"meta": {
"count": 2
}
}/api/v1/statusVerifies service availability, version and server time. A lightweight endpoint for uptime monitors.
curl "https://mcapi.tr/api/v1/status"{
"status": "OK",
"timestamp": "2026-09-08T20:12:00.000Z",
"service": "mcapi.tr-engine",
"version": "0.1.0"
}/api/v1/status/:addressReturns Java, Legacy Java or Bedrock availability with player, version, MOTD, favicon and latency data.
| Parameter | Location | Type | Default | Description |
|---|---|---|---|---|
address* | path | string | — | Hostname or IP; an optional port may be appended: play.example.net:25565 |
legacy | query | boolean | false | Forces the pre-1.7.2 Java ping protocol. |
bedrock | query | boolean | false | Uses the Bedrock Edition query; the default port becomes 19132. |
edition | query | java | bedrock | legacy | auto | — | Select an edition. auto tries both protocols. Do not combine with legacy or bedrock set to true. |
fields | query | string | — | Comma separated. Status and freshness fields are always included. |
query | query | boolean | — | true runs Java UDP Query: adds software, plugins and query_data (map, game type, version, player list) when the server enables Query. Fields are omitted when unavailable. |
queryPort | query | integer (1–65535) | — | UDP port for Query when it differs from the game port. Requires query=true. |
curl "https://mcapi.tr/api/v1/status/mc.hypixel.net"
curl "https://mcapi.tr/api/v1/status/mc.hypixel.net?edition=auto&fields=online,players,version"
curl "https://mcapi.tr/api/v1/status/%5B2606:4700::1001%5D:25565?edition=java"
curl "https://mcapi.tr/api/v1/status/mc.hypixel.net?query=true"
curl "https://mcapi.tr/api/v1/status/play.example.net?query=true&queryPort=25575"{
"query": {
"host": "mc.hypixel.net",
"port": 25565,
"legacy": false,
"bedrock": false,
"edition": "java"
},
"server_id": "f17d4f75-...",
"ip_address": "209.222.115.11",
"icmp": true,
"online": true,
"stale": false,
"error": null,
"reason_code": null,
"checked_at": "2026-09-12T15:59:36.430Z",
"observed_at": "2026-09-12T15:59:36.430Z",
"last_attempt_at": "2026-09-12T15:59:36.430Z",
"cache_expires_at": "2026-09-12T16:00:36.430Z",
"version": { "name": "Requires MC 1.8 / 1.21", "protocol": 47 },
"players": { "online": 52184, "max": 200000, "sample": [] },
"motd": {
"raw": "§aHypixel Network",
"clean": "Hypixel Network",
"html": "<span style=\"color:#55FF55\">Hypixel Network</span>",
"raw_lines": ["§aHypixel Network"],
"clean_lines": ["Hypixel Network"]
},
"favicon": "data:image/png;base64,...",
"srvRecord": null,
"roundTripLatency": 18
}HTTP 404 · 429 · 503 — Avoid repeatedly retrying a 404 while the server is unavailable.
{
"fresh": {
"online": true,
"stale": false,
"reason_code": null,
"observed_at": "2026-11-08T12:00:00.000Z",
"last_attempt_at": "2026-11-08T12:00:00.000Z",
"cache_expires_at": "2026-11-08T12:01:00.000Z",
"players": {
"online": 24,
"max": 100
}
},
"stale": {
"online": true,
"stale": true,
"reason_code": "TIMEOUT",
"observed_at": "2026-11-08T12:00:00.000Z",
"last_attempt_at": "2026-11-08T12:05:00.000Z",
"cache_expires_at": "2026-11-08T12:05:15.000Z",
"players": {
"online": 24,
"max": 100
}
},
"dns": {
"error": "DNS_LOOKUP_FAILED",
"online": false,
"stale": false,
"reason_code": "DNS_NO_RECORD",
"observed_at": null,
"last_attempt_at": "2026-11-08T12:00:00.000Z",
"cache_expires_at": "2026-11-08T12:00:15.000Z"
},
"deadline": {
"error": "Server status lookup timed out.",
"reason_code": "LOOKUP_DEADLINE"
},
"limit": {
"status": "error",
"error": "Rate limit exceeded, retry in 1 minute"
},
"unavailable": {
"error": "This service is temporarily unavailable. Please retry."
}
}/api/v1/badge/:addressShows online, offline, or stale status. Provide your own alt text when embedding it as an image.
| Parameter | Location | Type | Default | Description |
|---|---|---|---|---|
address* | path | string | — | Hostname or IP; an optional port may be appended: play.example.net:25565 |
edition | query | java | bedrock | legacy | auto | — | Select an edition. auto tries both protocols. Do not combine with legacy or bedrock set to true. |
<img src="https://mcapi.tr/api/v1/badge/mc.hypixel.net" alt="Current Hypixel status and player count">/api/v1/simple/:addressAnswers 200 with "online" or 404 with "offline" as plain text, for uptime monitors that only read the status code. A stale result (the last successful answer while an outage is not yet confirmed) counts as online; the X-MCAPI-State header says online, stale or offline. HEAD requests are supported.
| Parameter | Location | Type | Default | Description |
|---|---|---|---|---|
address* | path | string | — | Hostname or IP; an optional port may be appended: play.example.net:25565 |
edition | query | java | bedrock | legacy | auto | — | Select an edition. auto tries both protocols. Do not combine with legacy or bedrock set to true. |
curl -i "https://mcapi.tr/api/v1/simple/mc.hypixel.net"
curl -I "https://mcapi.tr/api/v1/simple/play.example.net:19132?edition=bedrock"HTTP/1.1 200 OK
Content-Type: text/plain; charset=utf-8
X-MCAPI-State: online
onlineHTTP 404 · 429 · 503 — Avoid repeatedly retrying a 404 while the server is unavailable.
/api/v1/text/:address/:fieldReturns one value as plain text, for overlays, signs, bots and shell scripts. Offline servers answer 404 "offline", except the online field, which answers 200 "false". A value the server did not report answers 404 "unavailable".
| Parameter | Location | Type | Default | Description |
|---|---|---|---|---|
address* | path | string | — | Hostname or IP; an optional port may be appended: play.example.net:25565 |
field* | path | online | players | max_players | version | protocol | motd | ping | — | Value to return: online, players, max_players, version, protocol, motd (without colour codes, may span lines) or ping (ms). |
edition | query | java | bedrock | legacy | auto | — | Select an edition. auto tries both protocols. Do not combine with legacy or bedrock set to true. |
curl "https://mcapi.tr/api/v1/text/mc.hypixel.net/players"
curl "https://mcapi.tr/api/v1/text/mc.hypixel.net/version"52184HTTP 404 · 429 · 503 — Avoid repeatedly retrying a 404 while the server is unavailable.
/api/v1/service-statusHealth, Java, Bedrock, and media measurements, coverage, and incidents for the last 7 days.
curl "https://mcapi.tr/api/v1/service-status"/api/v1/history/:addressReturns saved observations and their coverage.
| Parameter | Location | Type | Default | Description |
|---|---|---|---|---|
address* | path | string | — | Hostname or IP; an optional port may be appended: play.example.net:25565 |
period | query | 24h | 7d | 30d | — | History window. |
bedrock | query | boolean | — | Uses the Bedrock Edition query; the default port becomes 19132. |
curl "https://mcapi.tr/api/v1/history/mc.hypixel.net?period=7d"HTTP 404 · 429 · 503 — Avoid repeatedly retrying a 404 while the server is unavailable.
/api/v1/diagnostics/:addressShows separate DNS, SRV, transport, and Minecraft protocol steps.
| Parameter | Location | Type | Default | Description |
|---|---|---|---|---|
address* | path | string | — | Hostname or IP; an optional port may be appended: play.example.net:25565 |
edition | query | java | bedrock | legacy | — | Select an edition. auto tries both protocols. Do not combine with legacy or bedrock set to true. |
curl "https://mcapi.tr/api/v1/diagnostics/mc.hypixel.net?edition=java"/api/v1/trendsReturns servers ranked by trend score with page or cursor pagination. Protocol-verified servers discovered from external lists are included. Scores combine user interest, observed player population and availability. Automated checks do not count as user queries. Daily growth compares user queries in the last complete 24 hours with the preceding 24 hours; a missing baseline returns 0. Scores refresh at startup and every 15 minutes.
| Parameter | Location | Type | Default | Description |
|---|---|---|---|---|
limit | query | integer | 10 | Page size, clamped between 1 and 50. |
page | query | integer | 1 | Page number, default 1. meta.nextPage points to the next page or is null at the end. Ordered by trend score, then server ID for ties. Do not combine page and cursor. |
cursor | query | UUID | — | The meta.nextCursor value from the previous response. |
curl "https://mcapi.tr/api/v1/trends?limit=10&page=1"
curl "https://mcapi.tr/api/v1/trends?limit=10&page=2"{
"success": true,
"data": [
{
"server_id": "f17d4f75-...",
"hostname": "mc.hypixel.net",
"address": "mc.hypixel.net",
"port": 25565,
"edition": "java",
"trend_score": 842,
"daily_growth": 14.6,
"is_online": true,
"stale": false,
"checked_at": "2026-09-12T15:59:36.430Z",
"players_online": 52184,
"players_max": 200000,
"version": "Requires MC 1.8 / 1.21",
"favicon": "21aa8597...",
"record_players": 74312,
"uptime_percentage": 99.8
}
],
"meta": { "nextCursor": "f17d4f75-...", "hasNext": true, "limit": 10, "page": 1, "nextPage": 2 }
}/api/v1/statsProvides totals for requests, checked servers, online rate, active players and recent checks.
curl "https://mcapi.tr/api/v1/stats"{
"totalRequests": 1284502,
"apiRequests": 612340,
"serverQueries": 672162,
"totalChecks": 672162,
"onlineServers": 428,
"offlineServers": 91,
"activePlayers": 184205,
"recentChecks": [],
"onlineRate": 82.5
}/api/v1/icon/dynamicReturns a server favicon and falls back to the MCAPI.TR default image when unavailable.
| Parameter | Location | Type | Default | Description |
|---|---|---|---|---|
address* | query | string | — | Server address. server is accepted as a backwards-compatible alias. |
size | query | integer | 80 | WebP output size, between 16 and 256 pixels. |
format | query | png | webp | png | Produces an optimized square image when set to webp. |
curl "https://mcapi.tr/api/v1/icon/dynamic?address=mc.hypixel.net&size=128&format=webp" --output server.webp/api/v1/widget/:size/:addressReturns customizable live server-status HTML for websites and dashboards.
| Parameter | Location | Type | Default | Description |
|---|---|---|---|---|
size* | path | small | normal | large | — | Widget layout and default height. |
address* | path | string | — | Server address; demo may be used for previewing. |
theme | query | dark | light | dark | Base color theme. |
showPlayers / showVersion / showMotd | query | boolean | true | Toggles the main information fields independently. |
showLatency / showFavicon | query | boolean | true | Controls ping and favicon visibility. |
showProtocol / showBorder | query | boolean | false | Optionally displays protocol and border. |
bgColor / textColor | query | hex color | — | Widget background and text colors. |
onlineColor / offlineColor | query | hex color | #10b981 / #ef4444 | Online and offline state colors. |
gradientBg / gradientFrom / gradientTo | query | boolean / hex | false | Gradient background controls. |
statusIndicator | query | dot | text | badge | none | dot | Status indicator style. |
iconSize | query | small | medium | large | medium | Favicon size. |
font | query | system | sans | mono | Inter | Roboto | Montserrat | Poppins | Outfit | Open Sans | Lato | Nunito | system | Typeface. system, sans and mono use fonts already on the device; the other names load the font from Google Fonts. |
textAlign | query | left | center | right | left | Text alignment. |
customHeight | query | CSS px | — | Custom height between 50 and 600 pixels. |
borderRadius / borderWidth | query | number | 0.75 / 1 | Corner and border measurements. |
hoverEffect / glowEffect / boxShadow | query | boolean | false | Enables visual effects. |
playerBarStyle | query | default | gradient | striped | animated | default | Player capacity bar appearance. |
curl "https://mcapi.tr/api/v1/widget/normal/mc.hypixel.net?theme=dark&showFavicon=true"04 — Schema
| Field | Type | Description |
|---|---|---|
query | object | Resolved host, port and query mode. |
server_id | UUID | Stable server identifier inside MCAPI.TR. |
online | boolean | Whether the Minecraft ping completed successfully. |
stale | boolean | Whether the response comes from the last known successful query rather than a fresh ping. |
checked_at | ISO 8601 | For stale data, time of the successful observation. For a 404, time of the failed attempt. |
observed_at | ISO 8601 | null | Time of the last successful Minecraft observation; null if none is known. |
last_attempt_at | ISO 8601 | When the last network attempt ended. A cache hit does not change it. |
cache_expires_at | ISO 8601 | Scheduled expiration of this cached response. |
reason_code | string | null | Machine-readable failure reason; null for a successful observation. |
mods | string[] | Mod IDs when advertised by Java status. |
mod_details | { id, version }[] | Forge mods with their versions (FML1, FML2 and the compressed FML3 list of 1.18.2+). version is null for server-only mods. |
plugins | string[] | Plugin names when published through Java Query. |
software | string | Server software reported by Java Query. |
query_data | object | Java Query full stat (with query=true): map, game type, version and the player list (at most 1000 names). The host IP the server reports is not exposed. |
icmp | boolean | ICMP reachability result for the target IP. |
version | object | null | Server version label and protocol number. |
players | object | null | Online count, capacity and optional player sample. |
motd | object | null | Raw, clean and HTML MOTD forms plus line arrays. |
favicon | data URL | null | Base64-encoded server favicon. |
srvRecord | object | null | Resolved Minecraft SRV record details when discovery was used. |
roundTripLatency | number | null | Minecraft query latency in milliseconds. |
latency_source | "pong" | "status" | How the latency was measured: pong (ping/pong packet) or status (time of the status response). |
target | { ip, port } | IP address and port the status request went to (after SRV resolution). |
edition, serverGUID, serverID, gameMode, gameModeID, portIPv4, portIPv6 | Bedrock | Only for Bedrock: edition (MCPE or MCEE), server GUID and ID, game mode and the advertised IPv4/IPv6 ports from the RakNet pong. |
error | string | null | Safe error summary for a failed query. |
HTTP
200Request succeeded.400Invalid address or query parameter.404Server is offline or unreachable.429Per-minute request limit exceeded.500Unexpected server error.503Maintenance mode is active, or the status lookup did not finish in time (LOOKUP_DEADLINE). Retry after the Retry-After header.Policies
Official SDKs
Official zero-dependency clients provide typed server queries, discovery, statistics and media helpers without requiring an API key.
Node.js
A Promise-based Node.js client with complete TypeScript declarations and Buffer helpers for generated media.
npm install mcapitrPython
Synchronous and asynchronous Python clients with typed exceptions, pagination and byte downloads.
pip install mcapitrExplore observed history on server profiles.
GET /api/v1/history/{address}?period=24h&bedrock=falseSee which step of a connection is failing.
GET /api/v1/diagnostics/{address}?edition=javaUse examples for different languages and environments.
Snapshots are stored on meaningful changes or hourly. This is not time-based uptime; empty buckets mean no observations. Checks run from the MCAPI probe location only. They do not test player login, authentication, whitelist or gameplay access. Results may be cached for 5 minutes.