Skip to content

Robust Minecraft Server Status API for Java Edition. Features SRV resolving, advanced MOTD parsing (HTML/Clean), and large packet support for networks like Hypixel.

Notifications You must be signed in to change notification settings

rdvn0/mcserver-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 

Repository files navigation

🟒 Creavory Minecraft Server API

Status Platform Response

A robust, high-performance Minecraft Server Status API for Java Edition. It supports SRV resolving, advanced MOTD parsing (HTML/Clean), and handles large packets from servers like Hypixel without timeout errors.

Base URL:

[https://api.creavory.com/minecraft/server/](https://api.creavory.com/minecraft/server/)

⚑ Features

  • πŸ›‘οΈ Robust Query Engine: Fixed packet reading loop that supports huge servers (e.g., Hypixel, CubeCraft) without data truncation.
  • 🎨 Advanced MOTD Parser:
    • Converts Legacy (Β§a) and Modern JSON color codes to HTML.
    • Fixes spacing issues for centered MOTDs (e.g., CubeCraft).
    • Cleans up version strings (removes Β§f artifacts).
  • πŸ” SRV Resolver: Automatically resolves domains like play.hypixel.net to their real IP and Port.
  • πŸš€ Caching: Server-side caching (60s) to prevent rate-limiting and ensure fast responses.

πŸ“‘ Usage

Send a GET request to api.php with the server address.

Endpoint:

GET /api.php?ip={SERVER_IP}&port={PORT}
Parameter Type Default Description
ip string Required Server address (e.g., mc.hypixel.net)
port int 25565 Server port (Optional)

Example Request

GET [https://api.creavory.com/minecraft/server/api.php?ip=mc.hypixel.net](https://api.creavory.com/minecraft/server/api.php?ip=mc.hypixel.net)

Example JSON Response

{
    "online": true,
    "ip": "mc.hypixel.net",
    "port": 25565,
    "resolved_ip": "209.222.115.114",
    "version": "1.8.x-1.21.x",
    "players": {
        "online": 45320,
        "max": 200000
    },
    "motd": {
        "raw": { ... },
        "clean": "Hypixel Network  |  1.21 SUPPORT",
        "html": "<span class='mc-motd'>...</span>"
    },
    "icon": "data:image/png;base64,iVBORw0KGgo...",
    "debug": {
        "ping": 45
    }
}

πŸ’» Integration Examples

PHP

<?php
$ip = "mc.hypixel.net";
$json = file_get_contents("[https://api.creavory.com/minecraft/server/api.php?ip=](https://api.creavory.com/minecraft/server/api.php?ip=)" . $ip);
$data = json_decode($json, true);

if($data['online']) {
    echo "Players: " . $data['players']['online'];
    echo $data['motd']['html'];
}
?>

JavaScript (Fetch)

fetch('[https://api.creavory.com/minecraft/server/api.php?ip=mc.hypixel.net](https://api.creavory.com/minecraft/server/api.php?ip=mc.hypixel.net)')
  .then(res => res.json())
  .then(data => {
    if(data.online) {
       console.log(data.players.online + " players online");
    }
  });

C# (HttpClient)

using System.Net.Http;

var client = new HttpClient();
var json = await client.GetStringAsync("[https://api.creavory.com/minecraft/server/api.php?ip=mc.hypixel.net](https://api.creavory.com/minecraft/server/api.php?ip=mc.hypixel.net)");
// Parse json using JObject or JsonSerializer

Β© Creavory Projects.

About

Robust Minecraft Server Status API for Java Edition. Features SRV resolving, advanced MOTD parsing (HTML/Clean), and large packet support for networks like Hypixel.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published