BYTETOOLS

Mojang (Minecraft) API

Free official Mojang API with no key: convert Minecraft usernames to UUIDs and back, fetch profiles and skin data. The canonical player identity API. Tested.

No API key requiredHTTPSFree tier

Endpoint tested and returned HTTP 200 on 2026-08-20

What is the Mojang (Minecraft) API?

The Mojang API is Minecraft's official, key-free API for player identity — converting usernames to UUIDs and back, and retrieving profile data including skin and cape textures.

Minecraft usernames can be changed, but a player's UUID never does. Any server plugin, statistics site or ban list that stores usernames rather than UUIDs will break the moment a player renames — which is why this lookup is fundamental to the ecosystem.

The UUID is returned without hyphens, while most Minecraft tooling expects the hyphenated form. Inserting the hyphens at positions 8, 12, 16 and 20 is a small but universal piece of Minecraft integration work.

Quick facts

Base URL
https://api.mojang.com
Authentication
No API key required for public profile lookups.
Rate limit
About 200 requests per minute per IP; the profile endpoint is stricter.
Pricing
Free, operated by Mojang.
CORS
Not enabled — call it from your server
Official docs
Read the docs

How to use the Mojang (Minecraft) API

Every request below was executed against the live API on 2026-08-20, and the response shown is the real body it returned — not an illustration.

1. Look up a Minecraft player's UUID

GET https://api.mojang.com/users/profiles/minecraft/Notch

curl
curl 'https://api.mojang.com/users/profiles/minecraft/Notch'
JavaScript (fetch)
const res = await fetch("https://api.mojang.com/users/profiles/minecraft/Notch");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);
Python (requests)
import requests

res = requests.get("https://api.mojang.com/users/profiles/minecraft/Notch", timeout=20)
res.raise_for_status()
print(res.json())
Response — HTTP 200
{
  "id": "069a79f444e94726a5befca90e38aaf5",
  "name": "Notch"
}

Parameters

ParameterTypeRequiredDescription
users/profiles/minecraft/<username>pathRequiredUsername to UUID lookup. users/profiles/minecraft/Notch
user/profile/<uuid>pathOptionalUUID to profile, on the sessionserver host. user/profile/069a79f4...

Response fields

idstring
The player's UUID, without hyphens.
namestring
Current username with correct capitalisation.
(profile) propertiesarray
Base64-encoded texture data containing skin and cape URLs.

What you can build with the Mojang (Minecraft) API

  • Store stable player identity in a server plugin or database
  • Build Minecraft statistics and leaderboard sites
  • Render player skins and avatars
  • Migrate a username-keyed system to UUIDs

Common errors and how to fix them

204 or empty response

The username does not exist.

Fix: Mojang returns no content rather than a 404 for unknown usernames — check for an empty body.

UUID has no hyphens

The API returns the compact form.

Fix: Insert hyphens at positions 8, 12, 16 and 20 for the standard format most Minecraft tooling expects.

429

Rate limit exceeded.

Fix: Cache aggressively — a username-to-UUID mapping is stable until the player renames, which is rare.

Mojang (Minecraft) API — frequently asked questions

Is the Mojang API free?

Yes, public profile lookups require no API key. It is operated by Mojang themselves.

Why should I store UUIDs instead of usernames?

Usernames can be changed; UUIDs never do. Any system keyed on usernames breaks when a player renames, which is why UUID storage is standard practice.

Why does the UUID have no hyphens?

The API returns the compact 32-character form. Most Minecraft tooling expects hyphens at positions 8, 12, 16 and 20, so you usually need to insert them.

What happens if a username doesn't exist?

You get a 204 No Content with an empty body rather than a 404, which catches people out — check for an empty response.

Tools that pair with this API

Mojang (Minecraft) is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-20; always check the official documentation before relying on this API in production, as terms and limits can change.