Minecraft Structure Locator
Route: POST /api/minecraft/locate
Locates in-game structures (villages, woodland mansions, ruins, temples, and more) directly from a world
seed. Unlike many services, this implementation runs
pure JavaScript — the seed locator (including its WASM-free structure finder) is embedded locally, so there are no external seed-locator dependencies.
Parameters
The locator accepts a JSON body with the following fields:
| Field | Type | Required | Default | Description |
seed | string | No | 0 | The world seed. Pass empty to use 0. |
version | string | No | "1.21" | Target Minecraft version. Any MAJOR.MINOR works. The locator ships with bundled structure data up to v1.21.7. |
structure | number | No | 8 | Numeric structure ID in the current version's registry. Defaults to village. |
maxResults | number | No | 64 | Maximum number of results to return. |
minDistance | number | No | 1 | Minimum distance from origin to consider. |
maxDistance | number | No | 1,800,000,000 | Maximum distance from origin to consider. |
useGridForStructures | boolean | No | true | Whether to use the structure grid. Required for most structures on 1.18+; always true. |
countType | string | No | "structure" | Either "structure" or "feature" (a looser structure lookup). |
limit | number | No | 64 | Upper bound on the number of results returned. |
Note: maxResults, minDistance, and maxDistance are used internally to search the grid but do not affect the final result set, which the locator trims to the first countType-based matches.
Response fields
The response returns
structureId, the queried
version, the list of coordinate results, and metadata:
| Field | Description |
data.structureId | The resolved structure ID. |
data.version | The version the structure data was resolved against. |
data.type | The category the structure belongs to. |
data.uncertain | true if the returned ID is a fallback for an unknown structure. |
data.name | Human readable structure name (e.g. "minecraft:village_plains"). |
data.countType | "structure" or "feature". |
data.results | Array of { x, y, z } coordinate objects. |
data.searchedResults | Number of candidates considered. |
data.resultCount | Number of results in the array above. |
Examples
Locate plains villages for the default seed (0) on the default villager structure:
curl -s -X POST https://api.xnite.net/api/minecraft/locate \
-H "Content-Type: application/json" \
-d '{ "seed": 0, "version": "1.21", "structure": 8 }'
Find up to 8 ruins of the morass on seed 12345:
curl -s -X POST https://api.xnite.net/api/minecraft/locate \
-H "Content-Type: application/json" \
-d '{ "seed": "12345", "structure": 66, "maxResults": 8 }'
Extract only the coordinates with
jq:
curl -s -X POST https://api.xnite.net/api/minecraft/locate \
-H "Content-Type: application/json" \
-d '{ "seed": "12345" }' | jq '.data.results'
Sample response
{
"plugin": "minecraft",
"success": true,
"data": {
"structureId": 8,
"version": "1.21",
"type": "unit",
"uncertain": false,
"name": "minecraft:village_plains",
"countType": "structure",
"results": [
{ "x": 128, "y": 0, "z": 256 },
{ "x": -340, "y": 0, "z": 712 }
],
"searchedResults": 8192,
"resultCount": 2
}
}