Skip to main content
GET
/
api
/
items
Item Endpoints
curl --request GET \
  --url https://api.example.com/api/items

Overview

The Item endpoints provide access to League of Legends item data used in Crafter LoL. Items are loaded from the Riot Games Data Dragon API and cached for optimal performance.

Item Model

Items in the system follow the Item model structure. See the Item Model documentation for complete field details.

Endpoints

GET /api/items

Retrieves all League of Legends items in the database. Response: Map<String, Item> - Map of item IDs to Item objects Example Request:
curl http://localhost:5000/api/items
Example Response:
{
  "3078": {
    "id": "3078",
    "name": "Fuerza de trinidad",
    "description": "...",
    "totalCost": 3333,
    "from": ["3044", "3051", "3057"],
    "imageUrl": "https://ddragon.leagueoflegends.com/cdn/16.3.1/img/item/3078.png"
  },
  "1001": {
    "id": "1001",
    "name": "Botas de velocidad",
    "description": "...",
    "totalCost": 300,
    "imageUrl": "https://ddragon.leagueoflegends.com/cdn/16.3.1/img/item/1001.png"
  }
}

GET /api/items/craftable

Retrieves only craftable items (items that have component requirements). Response: Map<String, Item> - Map of craftable item IDs to Item objects Example Request:
curl http://localhost:5000/api/items/craftable
Craftable items are those with a populated from field, indicating they can be built from component items.

GET /api/items/

Retrieves a specific item by its unique identifier. Path Parameters:
itemId
string
required
The unique identifier of the item (e.g., “3078”, “1001”)
Response: Item - The item object or 404 if not found Example Request:
curl http://localhost:5000/api/items/3078
Example Response:
{
  "id": "3078",
  "name": "Fuerza de trinidad",
  "description": "Un objeto legendario...",
  "totalCost": 3333,
  "from": ["3044", "3051", "3057"],
  "into": [],
  "tags": ["Damage", "AttackSpeed", "CooldownReduction"],
  "imageUrl": "https://ddragon.leagueoflegends.com/cdn/16.3.1/img/item/3078.png",
  "image": {
    "full": "3078.png",
    "sprite": "item2.png",
    "group": "item"
  }
}

Internal Service Methods

The following service methods are available for internal use: ItemService.getCraftableItems() Retrieves all items that can be crafted (items that have component requirements). Used internally by the /craftable endpoint. ItemService.getItemById(String itemId) Retrieves a specific item by its unique identifier. Used internally by the /{itemId} endpoint. ItemService.isValidCraftingCombination(String targetItemId, List<String> componentIds) Validates whether the selected components correctly craft the target item. Used by the game validation endpoint.

Item Data Source

Items are sourced from the Riot Games Data Dragon API:
  • Base URL: https://ddragon.leagueoflegends.com/cdn/{version}/data/es_MX/item.json
  • Images: https://ddragon.leagueoflegends.com/cdn/{version}/img/item/{itemId}.png

Usage in Game Endpoints

Items are utilized by the game endpoints:

Notes

  • Items are filtered to include only craftable items (those with the from field populated)
  • Item images are automatically resolved from the Data Dragon CDN
  • Total cost is calculated from the gold.total field
  • Items include stats, tags, and upgrade paths (into field) for potential future features

Build docs developers (and LLMs) love