Minecraft REST API
Base URL: https://api.pugtools.com. The API is read-only,
uses JSON, and currently supports normalized Java Edition data.
Quick examples
curl "https://api.pugtools.com/v1/meta"
curl "https://api.pugtools.com/v1/search?q=diamond%20ore"
curl "https://api.pugtools.com/v1/blocks/minecraft:diamond_ore"
curl "https://api.pugtools.com/v1/recipes/piston"
curl "https://api.pugtools.com/v1/enchantments/minecraft:fortune"
curl "https://api.pugtools.com/v1/loot/minecraft:creeper" const response = await fetch(
'https://api.pugtools.com/v1/enchantments/minecraft:fortune?version=latest'
);
if (!response.ok) throw new Error(`Pugtools returned ${response.status}`);
const { minecraftVersion, data, provenance } = await response.json(); Endpoints
GET /v1/healthGET /v1/metaGET /v1/versionsGET /v1/search?q=GET /v1/blocks/:idGET /v1/items/:idGET /v1/entities/:idGET /v1/recipes/:idGET /v1/trades/:professionGET /v1/ores/:oreGET /v1/enchantments/:idGET /v1/loot/:idGET /v1/structures/:idGET /v1/assets/search?q=GET /v1/assets/:idGET /v1/players/:usernameOrUuidGET /v1/players/:usernameOrUuid/skin
Response envelope
Every successful response uses the same envelope. The resolved dataset
version is always explicit, warnings is always present and
may be empty, and provenance records the catalog commit the
data was generated from.
{
"ok": true,
"requestId": "6f1c0f0e-6a1a-4c2a-9a1b-2f9b0c5f7d21",
"schemaVersion": "1",
"minecraftVersion": "26.2",
"data": { "id": "minecraft:diamond_ore", "type": "block" },
"warnings": [],
"meta": {
"edition": "java",
"provider": "pugtools",
"canonicalUrl": "https://pugtools.com/tools/assets/?q=Diamond%20Ore",
"contentClass": "DATA"
},
"provenance": {
"source": "mc-datahub",
"sourceCommit": "2ed9c96",
"generatedAt": "2026-07-27T20:22:44.579Z"
}
} Dataset versions
Every data endpoint accepts an optional version parameter.
Pass an exact published version id, latest for the newest
stable release, or latest-snapshot for the newest snapshot.
Leaving it out is the same as latest. The response always
reports the resolved immutable id in minecraftVersion, never
the alias. latest never falls forward to a snapshot. An
unavailable exact version returns UNSUPPORTED_VERSION rather
than substituting current data. Exact-version responses are immutable and
cached for a day; alias responses are cached for a few minutes.
curl "https://api.pugtools.com/v1/versions"
curl "https://api.pugtools.com/v1/blocks/minecraft:diamond_ore?version=latest-snapshot"
The data payload of /v1/versions lists every
published version, newest first, with the id each alias points at right
now. An alias is null when nothing is published for it.
{
"versions": [
{ "id": "26.3-pre-1", "channel": "snapshot" },
{ "id": "26.2", "channel": "release" }
],
"aliases": {
"latest": "26.2",
"latest-snapshot": "26.3-pre-1"
}
} Asset responses are metadata
Model and texture fields are Minecraft resource identifiers. The API does not expose a filesystem browser, raw vanilla file route, bulk archive, or arbitrary URL proxy. Requests for bulk vanilla assets are rejected by the shared service.
Errors
Errors use a stable code and message. The body repeats the
X-Request-Id header value as requestId so a
failure can be reported without the response headers.
{
"ok": false,
"requestId": "6f1c0f0e-6a1a-4c2a-9a1b-2f9b0c5f7d21",
"error": {
"code": "NOT_FOUND",
"message": "No block was found for minecraft:not_a_real_block."
}
} Validation errors return 400, missing records 404, restricted content 403, rate limits 429, and configurable or upstream player failures 502 to 504.
Complete specification
Use the OpenAPI 3.1 document for schemas and client generation. Service policies are on the terms and policies page.