Machine-readable format

The API documentation is available in a machine-readable JSON format. It allows for the creation of developer tools that provide code completion and related functionality. This page documents the structure of this format.

The current api_version that these docs reflect is 1, which was introduced with Factorio 1.1.35.

General notes

Some general notes that apply to the format in general:

Top level members

The format has some top level members indicating the context of the format. These are:

Then, there are several top level members that contain the API documentation itself, organized by their various types. These are:

Top level types

Class

Event

Define

Defines can be recursive in nature, meaning one Define can have multiple sub-Defines that have the same structure. These are singled out as subkeys instead of values.

BuiltinType

Concept

Depending on category, there might be additional members:

GlobalObject

Common structures

Several data structures are used in different parts of the format, which is why they are documented separately to avoid repetition.

BasicMember

Type

A type is either a string, in which case that string is the simple type. Otherwise, a type is a table:

Depending on complex_type, there are members:

Parameter

ParameterGroup

Method

Attribute

Basic types

string

A string, which can be an identifier for something, or a description-like text formatted in Markdown.

number

A number, which could either be an integer or a floating point number, as JSON doesn't distinguish between those two.

boolean

A boolean value, which is either true or false.