modl.gg

Player Lookup

Flexible player lookup that auto-detects UUID or username input.

POST /v1/minecraft/players/lookup

Perform a flexible player lookup by providing either a Minecraft UUID or username. The API automatically detects the input type based on format (UUIDs contain hyphens and are 36 characters long). Returns an enriched response with punishment statistics and profile URLs.

Authentication

Requires the X-API-Key header with your server's API key.

X-API-Key: your-api-key-here

Request

Headers

HeaderTypeRequiredDescription
X-API-KeystringYesYour server's API key.
Content-TypestringYesMust be application/json.

Body

FieldTypeRequiredDescription
querystringYesA Minecraft UUID or username. The API auto-detects the type.
{
  "query": "Notch"
}

Response

200 OK

{
  "status": 200,
  "message": "Player found",
  "data": {
    "minecraftUuid": "550e8400-e29b-41d4-a716-446655440000",
    "currentUsername": "Notch",
    "previousUsernames": ["OldName"],
    "firstSeen": "2023-06-01T00:00:00.000Z",
    "lastSeen": "2024-01-15T10:30:00.000Z",
    "isOnline": true,
    "punishmentStats": {
      "totalPunishments": 5,
      "activePunishments": 1,
      "bans": 1,
      "mutes": 2,
      "kicks": 1,
      "warnings": 1
    },
    "recentPunishments": [
      {
        "id": "pun789",
        "type": "Cheating",
        "issuer": "StaffMember",
        "issuedAt": "2024-01-12T14:00:00.000Z",
        "expiresAt": "2024-02-12T14:00:00.000Z",
        "isActive": true
      }
    ],
    "profileUrl": "https://myserver.modl.gg/player/550e8400-e29b-41d4-a716-446655440000",
    "punishmentsUrl": "https://myserver.modl.gg/player/550e8400-e29b-41d4-a716-446655440000/punishments"
  }
}

Response Fields

FieldTypeDescription
data.minecraftUuidstringThe player's Minecraft UUID.
data.currentUsernamestringThe player's most recent username.
data.previousUsernamesarrayList of previous usernames.
data.firstSeenstringISO 8601 timestamp of the player's first recorded login.
data.lastSeenstringISO 8601 timestamp of the player's most recent recorded login.
data.isOnlinebooleanWhether the player is currently online.
data.punishmentStatsobjectAggregated punishment statistics.
data.recentPunishmentsarrayThe 5 most recent punishments.
data.profileUrlstringDirect URL to the player's profile on your panel.
data.punishmentsUrlstringDirect URL to the player's punishments page on your panel.

Error Responses

Status CodeDescription
401Missing or invalid API key.
404Player not found for the given query.
429Rate limit exceeded.
500Internal server error.

On this page