Skip to content

Data Format

BluePsyduck edited this page Jul 10, 2021 · 2 revisions

This page describes which data is actually available through the Data API. The listings are meant to get an idea which data are available through the Data API, and do not always represent the actual data structure. If you want to see the actual response structures, have a look in the OpenAPI specification.

Item

Name Type Example Description
type "item" | "fluid" "item" The actual type of the item.
name string "electronic-circuit" The internal name of the item, as it is used in the game.
label string "Elektronischer Schaltkreis" The translated name of the item, as it is displayed to the player.
description string "" The translated description of the item, if specified by the mod.
Notes:
  • The term "item" is used in a more generic context by the Data API and includes both items and fluids. The type tells you, what you actually have.

Machine

Name Type Example Description
name string "assembling-machine-2" The internal name of the machine, as it is used in the game.
label string "Montagemaschine 2" The translated name of the machine, as it is displayed to the player.
description string "" The translated description of the machine, if specified by the mod.
craftingSpeed float 0.75 The crafting speed of the machine.
numberOfItemSlots int 255 The number of items the machine supports, or 255 for unlimited items.
numberOfFluidInputSlots int 1 The number of fluids the machine supports as ingredients.
numberOfFluidOutputSlots int 1 The number of fluids the machine supports as products.
numberOfModuleSlots int 2 The number of modules the machine supports.
energyUsage float 125.0 The energy usage of the machine.
energyUsageUnit string "kW" The unit used for the energy usage.
Notes:
  • Hand-crafting is represented by a machine with the name "character".
  • The energyUsage has a value between 0 and 1000. Greater values will be represented by the next energyUsageUnit accordingly. This is to avoid too big values.

Mod

Name Type Example Description
name string "Krastorio2" The internal name of the mod, as it is used in the game and the Factorio Mod Portal.
label string "Krastorio 2" The translated name of the mod, as it is displayed to the player.
description string "K2 is a global mod that [...]" The translated description of the mod, if specified.
author string Linver, Krastor The author(s) of the mod as specified in the info.json file of the mod.
version string "1.0.23" The (normalized) version number of the mod.
Notes:
  • Mod authors tend to make the description rather long, so expect half of the internet encoded in there.
  • The version is normalized to always contain 3 numbers. So it will always be "1.0.0" and never "1.0" or "1".

Recipe

Name Type Example Description
name string "kovarex-enrichment-process" The internal name of the recipe, as it is used in the game.
mode "normal" | "expensive" "normal" The difficulty mode in which the recipe is used.
label string "Kovarex-Anreicherungsprozes" The translated name of the recipe, as it is displayed to the player.
description string "" The translated description of the recipe, if specified by the mod.
ingredients[n].type "item" | "fluid" "item" The type of the nth ingredient.
ingredients[n].name string "uranium-235" The internal name of the ntg ingredient.
ingredients[n].label string "Uran-235" The translated name of the nth ingredient.
ingredients[n].description string "" The translated description of the nth ingredient.
ingredients[n].amount float 30 The amount of the nth ingredient needed in the recipe.
products[n].type "item" | "fluid" "item" The type of the nth product.
products[n].name string "uranium-235" The internal name of the nth product.
products[n].label string "Uran-235" The translated name of the nth product.
products[n].description string "" The translated description of the nth product.
products[n].amount float 31 The amount of the nth product the recipe will produce.
craftingTime float 60.0 The crafting time of the recipe, in seconds.
Notes:
  • The ingredients and products are arrays of items, with an additional amount property.
  • The crafting time is in seconds.