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.
Endpoint tested and returned HTTP 200 on 20 Aug 2026
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 20 Aug 2026, 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 'https://api.mojang.com/users/profiles/minecraft/Notch'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);import requests
res = requests.get("https://api.mojang.com/users/profiles/minecraft/Notch", timeout=20)
res.raise_for_status()
print(res.json()){
"id": "069a79f444e94726a5befca90e38aaf5",
"name": "Notch"
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
users/profiles/minecraft/<username> | path | Required | Username to UUID lookup. users/profiles/minecraft/Notch |
user/profile/<uuid> | path | Optional | UUID 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
JSON Formatter
Format, beautify and minify JSON online with 2-space, 4-space or tab indentation. Sort keys alphabetically and catch syntax errors instantly — free and private.
UUID Generator
Generate 1–100 cryptographically random UUID v4 identifiers at once. Uppercase and hyphen-less options, per-item copy and copy-all. Free UUID generator.
Base64 Decoder
Decode Base64 to readable text or download it as a file. Handles URL-safe base64url and missing padding automatically. Free, private, in-browser decoder.
Alternatives to Mojang (Minecraft) API
If Mojang (Minecraft) does not fit, these game & anime apis cover similar ground. Every one was called before publishing, and each links to its own reference page with a working curl command and the response it returned.
| API | What it does | Auth | CORS | Last verified |
|---|---|---|---|---|
| PokéAPI | Free Pokémon API with no key: stats, types, abilities, moves, evolutions and sprites for 1,000+ species. The most popular API for learning REST. Tested example. | No key | Yes | 19 Aug 2026 |
| Rick and Morty API | Free Rick and Morty API with no key: 800+ characters, episodes and locations with images, filtering and pagination. REST and GraphQL. Tested example. | No key | Yes | 19 Aug 2026 |
| Jikan (MyAnimeList) | Free unofficial MyAnimeList API with no key: anime and manga data, scores, characters, staff and seasonal listings. Tested curl example and live JSON. | No key | Yes | 19 Aug 2026 |
| Deck of Cards | Free playing card API with no key: shuffle decks, draw cards, manage piles and get card images. Stateful deck ids. Tested curl example and live JSON. | No key | Yes | 19 Aug 2026 |
| Monster Hunter World DB | Free Monster Hunter World API with no key: monsters with weaknesses and rewards, weapons, armour, skills, items and quests. Comprehensive. Tested example. | No key | No | 20 Aug 2026 |
| moogleAPI | Free Final Fantasy API with no key spanning the whole franchise: characters with race, role and affiliation, every mainline game, and monsters, with artwork. Live example. | No key | No | 21 Aug 2026 |
Mojang (Minecraft) is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 20 Aug 2026; always check the official documentation before relying on this API in production, as terms and limits can change.