Skip to content

Minecraft

Sprax edited this page Mar 4, 2020 · 1 revision

/mc-Routes

The following routes cache the Mojang API response to 'bypass' Mojang's rate limits (Obviously it will not be bypassed, but you will not accidentally hit the limit [e.g. BungeeCord setup]). For example, if a route is restricted to one request per minute, the cached version is still available for 60 seconds.

For a more detailed explanation of the Mojang API, see https://wiki.vg/Mojang_API.

Rate Limiting

Currently no rate limiting but keep in mind that lookups by username are deprecated and uuids should be used instead. If there are too many requests by username, rate limiting may be introduced afterwards.


Content (Routes)
Username → UUID
Username/UUID → Profile
Username/UUID → Name History
Username/UUID → Skin
Username/UUID → Rendered Skin
Username/UUID → Cape
Blocked Servers
Custom Routes
Known Blocked Servers
Check a host (Blocked Servers)

Username → UUID

GET /mc/uuid/:username

Parameter Description
:username The username you want the uuid for
Query-Parameter Description
at (optional) A timestamp to retrieve the UUID at a specifc time (passed milliseconds since midnight, January 1, 1970 UTC)

Example Response:

{
  "id": "407b28ede7bd451693d93361fecb7889",
  "name": "Sprax2013"
}

https://api.sprax2013.de/mc/uuid/Sprax2013

Username/UUID → Profile

GET /mc/profile/:user

Parameter Description
:user The name or UUID (with or without hyphens) for which you want to retrieve the profile
Query-Parameter Description
raw (optional) Extracts some additional information (Possible values: true, false, 0, 1 - Default: 0)

If raw is 1 or true the response looks like it came directly from Mojang. Otherwise the following fields are added: id_hyphens (like id but with hyphens), legacy (true or false, maybe null if unknown), textures object (contains: skinURL (string or null), capeURL (string or null), texture_value, texture_signature), name_history (array of current and past names)

Example Responses:

{
  "id": "407b28ede7bd451693d93361fecb7889",
  "name": "Sprax2013",
  "properties": [
    {
      "name": "textures",
      "value": "<Base64 string>",
      "signature": "<Base64 string; signed data using Yggdrasil's private key>"
    }
  ]
}

https://api.sprax2013.de/mc/profile/407b28ede7bd451693d93361fecb7889

{
  "id": "407b28ede7bd451693d93361fecb7889",
  "id_hyphens": "407b28ed-e7bd-4516-93d9-3361fecb7889",
  "name": "Sprax2013",
  "legacy": false,
  "textures": {
    "skinURL": "http://textures.minecraft.net/texture/67f69b2160872ad214544c94041d9d233e679fd1bab0d18fe1b38f1b91190ae",
    "capeURL": null,
    "texture_value": "<Base64 string>",
    "texture_signature": "<Base64 string; signed data using Yggdrasil's private key>"
  },
  "name_history": [
    {
      "name": "Sprax2013"
    }
  ]
}

https://api.sprax2013.de/mc/profile/407b28ede7bd451693d93361fecb7889?raw=false

Username/UUID → Name History

GET /mc/history/:user

Parameter Description
:user The name or UUID (with or without hyphens) for which you want to retrieve the profile

Example Response:

[
  {
    "name": "Sprax2013"
  }
]

https://api.sprax2013.de/mc/history/407b28ede7bd451693d93361fecb7889

Username/UUID → Skin

GET /mc/skin/:user

Retrieves a skin for a specific player and clean it up beforehand. If not disbled, skins are upgraded to 1.8 (64x64 pixels) format and areas not used by the vanilla client are removed (set transparent).

Parameter Description
:user The name or UUID (with or without hyphens) for which you want to retrieve the profile
Query-Parameter Description
download (optional) Automatically start the download instead of showing the image (true or false, Default: false)
raw (optional) Don't clean and upgrade the skin (send it, as it came directly from Mojang) (true or false, Default: false)
url (optional) Get's a skin by URL instead of Username/UUID. :user has to be set to x-url

Examples:

https://api.sprax2013.de/mc/skin/407b28ede7bd451693d93361fecb7889

https://api.sprax2013.de/mc/skin/407b28ede7bd451693d93361fecb7889?download=true

https://api.sprax2013.de/mc/skin/x-url?url=https://textures.minecraft.net/texture/545c0a41f5a9cbb95a2d5f989557147c3dae03235b0ca5c0c9e6bf00c985bcfd (consider url encoding the url

Username/UUID → Rendered Skin

GET /mc/skin/:user/:skinArea

Retrieves a skin for a specific player and clean it up beforehand. If not disbled, skins are upgraded to 1.8 (64x64 pixels) format and areas not used by the vanilla client are removed (set transparent).

Parameter Description
:user The name or UUID (with or without hyphens) for which you want to retrieve the profile
:skinArea One of the following: head, bust, body
Query-Parameter Description
download (optional) Automatically start the download instead of showing the image (true or false, Default: false)
size (optional) The resulting image size in pixels (Default: 512)
slim (optional) Override the used model to render (3px or 4px arms) (true or false)
overlay (optional) Should the overlay skin parts be rendered (true or false, Default: true)
url (optional) Get's a rendered skin by URL instead of Username/UUID. :user has to be set to x-url

Examples:

https://api.sprax2013.de/mc/skin/407b28ede7bd451693d93361fecb7889/bust

https://api.sprax2013.de/mc/skin/407b28ede7bd451693d93361fecb7889/body?overlay=false

https://api.sprax2013.de/mc/skin/x-url/head?url=https://textures.minecraft.net/texture/545c0a41f5a9cbb95a2d5f989557147c3dae03235b0ca5c0c9e6bf00c985bcfd (consider url encoding the url

Username/UUID → Cape

GET /mc/capes/:capeType/:user

Retrieves a skin for a specific player and clean it up beforehand. If not disbled, skins are upgraded to 1.8 (64x64 pixels) format and areas not used by the vanilla client are removed (set transparent).

Parameter Description
:user The name or UUID (with or without hyphens) for which you want to retrieve the profile
:capeType One of the following: Mojang, OptiFine, Laby_Mod
Query-Parameter Description
download (optional) Automatically start the download instead of showing the image (true or false, Default: false)

Examples:

https://api.sprax2013.de/mc/capes/mojang/61699b2ed3274a019f1e0ea8c3f06bc6

https://api.sprax2013.de/mc/capes/optifine/407b28ede7bd451693d93361fecb7889

https://api.sprax2013.de/mc/capes/laby_mod/069a79f444e94726a5befca90e38aaf5