Skip to main content

Boolean and numeric input types

Boolean fields render as checkboxes and can be grouped under a caption. Numeric fields come in two types, integer and number, and can carry a range and a unit.

Boolean type

Example options with group caption:

{
"verboseLog": {
"title": "Verbose log",
"type": "boolean",
"description": "Debug messages will be included in the log.",
"default": true,
"groupCaption": "Options",
"groupDescription": "Various options for this Actor"
},
"lightspeed": {
"title": "Lightspeed",
"type": "boolean",
"description": "If checked then actors runs at the
speed of light.",
"prefill": true
}
}

Rendered input:

Apify Actor input schema options

Properties:

PropertyValueRequiredDescription
editorOne of
  • checkbox
  • hidden
NoVisual editor used for the input field.
groupCaptionStringNoIf you want to group
multiple checkboxes together,
add this option to the first
of the group.
groupDescriptionStringNoDescription displayed as help text
displayed of group title.
nullableBooleanNoSpecifies whether null is
an allowed value.

Numeric types

There are two numeric types supported in the input schema: integer and number.

  • The integer type represents whole numbers.
  • The number type can represent both integers and floating-point numbers.

Example:

{
"title": "Memory",
"type": "integer",
"description": "Select memory in megabytes",
"default": 64,
"maximum": 1024,
"unit": "MB"
}

Rendered input:

Apify Actor input schema memory

Properties:

PropertyValueRequiredDescription
typeOne of
  • integer
  • number
YesDefines the type of the field - either an integer or a floating-point number.
editorOne of:
  • number
  • hidden
NoVisual editor used for input field.
maximumInteger or Number
(based on the type)
NoMaximum allowed value.
minimumInteger or Number
(based on the type)
NoMinimum allowed value.
unitStringNoUnit displayed next to the field in UI,
for example second, MB, etc.
nullableBooleanNoSpecifies whether null is an allowed value.