🎮 Minecraft API

Server Query & Player Lookup

Public API No Auth Required CORS Enabled Free
🖥️

Server Query

Auto-detect Java, Bedrock, or Crossplay servers

👤

Player Lookup

Get player info, UUID, and skin data

🖥️ Server Query API

Automatically detect Java, Bedrock, or Crossplay servers by pinging both ports!

GET Query Any Minecraft Server
/query/<server-address>

Features:

  • ✅ Auto-detects Java Edition (port 25565)
  • ✅ Auto-detects Bedrock Edition (port 19132)
  • ✅ Auto-detects Crossplay servers (both ports)
  • ✅ Returns MOTD, players, version, ping time
  • ✅ No need to specify port or platform
  • ✅ Works with custom ports (server.com:25566)

Example Usage:

# Query Hypixel (Java)
curl https://api.minecraft.co.com/query/mc.hypixel.net

# Query CubeCraft (Bedrock)
curl https://api.minecraft.co.com/query/play.cubecraft.net

# Query with custom port
curl https://api.minecraft.co.com/query/myserver.com:25566

Response Structure:

{
  "success": true,
  "hostname": "play.cubecraft.net",
  "platform": "bedrock",           // "java", "bedrock", "crossplay", or "unknown"
  "online": true,
  "query_time": "125.5ms",

  "java": {
    "online": false,
    "port": 25565,
    "error": "Server offline"
  },

  "bedrock": {
    "online": true,
    "ip": "87.249.129.33",
    "port": 19132,
    "edition": "MCPE",
    "version": "1.21",
    "protocol": 844,
    "players": {
      "online": 5053,
      "max": 55000
    },
    "motd": {
      "line1": "§f‖ §c§lHALLOWEEN EVENT ‖",
      "line2": "CubeCraft Games"
    },
    "gamemode": "Survival"
  },

  "detection": {
    "java_detected": false,
    "bedrock_detected": true,
    "is_crossplay": false,
    "recommended_platform": "bedrock"
  }
}

👤 Player Lookup API

Get Minecraft player information including UUID, name history, and skin data from Mojang's API

GET Get Player by Username
/player/<username>
Get player UUID, name, skin URLs, and profile information

Example Usage:

# Get player info by username
curl https://api.minecraft.co.com/player/Notch

# Get player info by UUID
curl https://api.minecraft.co.com/player/069a79f4-44e9-4726-a5be-fca90e38aaf5

Response Structure:

{
  "success": true,
  "username": "Notch",
  "uuid": "069a79f4-44e9-4726-a5be-fca90e38aaf5",
  "uuid_formatted": "069a79f4-44e9-4726-a5be-fca90e38aaf5",
  "skin": {
    "url": "http://textures.minecraft.net/texture/...",
    "data": "base64_encoded_texture_data"
  },
  "cape": {
    "url": "http://textures.minecraft.net/texture/..."
  },
  "legacy": false,
  "demo": false
}

📚 Code Examples

JavaScript / Fetch API

// Query a server
fetch('https://api.minecraft.co.com/query/mc.hypixel.net')
  .then(res => res.json())
  .then(data => {
    console.log(`Platform: ${data.platform}`);
    console.log(`Online: ${data.online}`);
    if (data.java.online) {
      console.log(`Players: ${data.java.players.online}/${data.java.players.max}`);
    }
  });

// Lookup a player
fetch('https://api.minecraft.co.com/player/Notch')
  .then(res => res.json())
  .then(data => {
    console.log(`UUID: ${data.uuid}`);
    console.log(`Skin URL: ${data.skin.url}`);
  });

Python / Requests

import requests

# Query server
server = requests.get('https://api.minecraft.co.com/query/mc.hypixel.net').json()
print(f"Platform: {server['platform']}")
print(f"Online: {server['online']}")

# Lookup player
player = requests.get('https://api.minecraft.co.com/player/Notch').json()
print(f"UUID: {player['uuid']}")
print(f"Skin: {player['skin']['url']}")

Android / Kotlin (Retrofit)

interface MinecraftApi {
    @GET("query/{address}")
    suspend fun queryServer(@Path("address") address: String): ServerQuery

    @GET("player/{username}")
    suspend fun getPlayer(@Path("username") username: String): Player
}

// Usage
val server = apiService.queryServer("mc.hypixel.net")
println("Platform: ${server.platform}")

val player = apiService.getPlayer("Notch")
println("UUID: ${player.uuid}")

⚡ Rate Limiting & Best Practices

  • No authentication required - Completely public
  • CORS enabled - Works from browser/mobile apps
  • ⚠️ Recommended limit: 60 requests per minute
  • 💾 Cache responses locally when possible
  • ⏱️ Timeout: 5 seconds for server queries