Skip to content
/ mulv Public

Minecraft UUID Lookup Vercel (because Cloudflare is globally ratelimited)

License

Notifications You must be signed in to change notification settings

tycrek/mulv

Repository files navigation

mulv

Minecraft UUID Lookup Vercel

What is this?

mulv is a simple API that allows you to lookup a Minecraft player's UUID or grab their skin from their username. It is intended to be hosted on Vercel, because pretty much every other lookup service uses Cloudflare Workers, which is currently globally ratelimited by Mojang.

Usage

If you wish to host this via Vercel yourself (please do, I don't want to have to limit people since I'm only using the free tier), you'll have to set these settings in your Vercel project:

Name Value
Framework Preset Other
Build Command npm run render
Output Directory public
Install Command npm i

The rest of the settings can be left as default.

API

The API is very simple and only has one endpoint: GET /api/lookup. The following query parameters are supported:

Name Description
username The username of the player to lookup. Must be a valid Minecraft Java Edition username.
type? The type of data to return. Can be either uuid or skin. Defaults to uuid.

If an invalid username is provided, the API will return a 400 status code with the following JSON:

{
    "err": "Username not found"
}

Requesting skins

Skins are returned as an arraybuffer. Below is a quick example on loading skins with Axios and Sharp:

axios.get(`https://mulv.tycrek.dev/api/lookup?type=skin&username=${USERNAME}`, { responseType: 'arraybuffer' })
    .then((res) => sharp(Buffer.from(res.data, 'base64')))
    .then(resolve)
    .catch(reject);

Sample URLs