Skip to content

nicolo-rancan/minecraft-items-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minecraft items api

License: MIT


You can use this api to access all minecraft items (1.16.5)
Unofficial package

Installation

gh repo clone nicolo-rancan/minecraft-items-api
Internal port 3000 is used if an .env file is not present with the port variable.

Usage

Available endpoints

Get all minecraft items (limit: 1000 requests per hour)
const ... = await fetch("baseurl/api/items");
Example response:
{
  "generated": 1620803566367,
  "data": [
    {
      "name": "Air",
      "image": "https://minecraftitemids.com/item/32/stone.png",
      "url": "https://minecraftitemids.com/item/air",
      "id": "minecraft:air",
      "legacy_id": "N/A",
      "numerical_id": "N/A"
    },
    .
    .
    .
  ]
}

Get specific item informations (limit: 1000 requests per hour)
const ... = await fetch("baseurl/api/items/itemname");
Example response:
{
  "description": "Stone, not to be confused with cobblestone, can only be obtained when a stoneblock is broken with a silk touch pickaxe. It is required for many redstone items such as the comparator, and decorative items like stonebricks.",
  "properties": [
    {
      "key": "item_id",
      "value": "minecraft:stone"
    },
    .
    .
    .
  ]
}

Update cache memory (limit: 1 request per hour)
const ... = await fetch("baseurl/api/update");
This will update the memory cache used to serve the items list, so it is used to get more infos out of them.