A blazingly fast Cloudflare Worker API for Minecraft player identity and profile lookups. Resolve Minecraft usernames and UUIDs to player data with built-in caching, rate limiting, and optimized performance.
Warning
Disclaimer: This is an independent recreation project and is not affiliated with api.minetools.eu, Mojang, or Microsoft. This service aggregates data from official Minecraft APIs for educational and development purposes.
Note: This project is deployed as a Cloudflare Worker with zero-cold-start execution, making it ideal for serverless Minecraft data services.
- ⚡ Lightning-Fast Lookups - Optimized route parsing and precompiled regex patterns
- 🔒 Player Identity Resolution - Convert usernames ↔ UUIDs with caching
- 👤 Profile Textures & Metadata - Fetch Minecraft player profiles with decoded texture data
- 💾 Intelligent Caching - 12-hour TTL with dual-key KV storage (by UUID and username)
- 🛡️ Rate Limiting - Built-in per-IP rate limiting (90 req/60s)
- 📖 Interactive Documentation - Comprehensive dashboard at
/with examples and error reference - 🎯 Flexible Input - Query by username OR UUID for all endpoints
Access the API through your deployed endpoint (e.g., https://your-worker.dev/).
Visit the root endpoint (/) to see the interactive documentation dashboard with examples and error reference.
Resolve a Minecraft username or UUID to player identity information.
Endpoint:
GET /uuid/{username_or_uuid}
Parameters:
{username_or_uuid}- A Minecraft username (case-insensitive) or UUID (with or without dashes)
Example Requests:
# By username
curl https://your-worker.dev/uuid/jeb_
# By UUID (with dashes)
curl https://your-worker.dev/uuid/8667ba71-b29a-4d67-abb5-a206094d940e
# By UUID (no dashes)
curl https://your-worker.dev/uuid/8667ba71b29a4d67abb5a206094d940eSuccess Response (200):
{
"cache": {
"HIT": true,
"cache_time_left": 43195
},
"id": "8667ba71b29a4d67abb5a206094d940e",
"name": "jeb_",
"status": "ok"
}Error Responses:
400 Bad Request- Missing or invalid username/UUID404 Not Found- Player not found in Minecraft database429 Too Many Requests- Rate limit exceeded500 Internal Server Error- Upstream service error
Fetch detailed player profile including texture data (skin and cape).
Endpoint:
GET /profile/{username_or_uuid}
Parameters:
{username_or_uuid}- A Minecraft username (case-insensitive) or UUID (with or without dashes)
Example Requests:
# By username
curl https://your-worker.dev/profile/jeb_
# By UUID
curl https://your-worker.dev/profile/8667ba71-b29a-4d67-abb5-a206094d940eSuccess Response (200):
{
"cache": {
"HIT": true,
"cache_time_left": 43192
},
"id": "8667ba71b29a4d67abb5a206094d940e",
"name": "jeb_",
"profile": {
"textures": {
"SKIN": {
"url": "http://textures.minecraft.net/texture/...",
"metadata": {
"model": "classic"
}
},
"CAPE": {
"url": "http://textures.minecraft.net/texture/..."
}
}
},
"status": "ok"
}Error Responses:
400 Bad Request- Missing or invalid username/UUID404 Not Found- Player or profile not found429 Too Many Requests- Rate limit exceeded500 Internal Server Error- Upstream service error
Interactive documentation dashboard with API usage examples and error reference.
Endpoint:
GET /
The API implements per-IP rate limiting:
- Limit: 90 requests per 60 seconds
- Per: Client IP address
- Response: 429 Too Many Requests (when exceeded)
Rate limit counters are tracked by Cloudflare's edge network and reset every 60 seconds.
MineTools uses an efficient unified cache schema:
- Scope: Each player identity is cached once per KV entry
- TTL: 12 hours
- Keys: Dual-indexed by UUID and username for fast lookups
uuid:id:{normalized_uuid}→ Full identity + profile datauuid:username:{username}→ Same entry (KV replication)
- Metadata: Cache hit status and remaining TTL returned with each response
- First Request: Queries Minecraft API, stores result in cache
- Subsequent Requests (within TTL): Returns cached entry with
HIT: trueand remaining TTL - After TTL Expires: Fresh lookup from Minecraft API, cache refreshed
- Fast Route Parsing - O(1) route resolution using string indexing
- Precompiled Regex - UUID validation patterns compiled once at startup
- Cached Profile Decode - Base64 texture decoding cached to avoid repeated work
- Dual-Key Caching - Single KV entry indexed by both UUID and username
- Pretty-Printed JSON - Automatic JSON formatting for browser readability
All errors follow a consistent format:
{
"status": "error",
"message": "Human-readable error message"
}Common error scenarios:
| Status | Scenario | Example |
|---|---|---|
| 400 | Invalid input | Missing username/UUID |
| 404 | Not found | Username doesn't exist in Minecraft DB |
| 429 | Rate limited | Exceeded 90 req/60s per IP |
| 500 | Server error | Minecraft API unavailable |
MineTools queries these official Minecraft APIs:
- Minecraft API -
api.minecraftservices.comfor username↔UUID resolution - Session Server -
sessionserver.mojang.comfor player profile textures
Both services are maintained by Mojang and are the official Minecraft player data sources.
MIT © Leon-JavaScript
See LICENSE for details.
Contributions are welcome! Please feel free to submit a Pull Request.
- 📖 Visit the API dashboard at
/for full documentation - 🐛 Report issues on GitHub Issues
- 💭 Discuss ideas in GitHub Discussions