---
title: Array input type
url: https://docs.apify.com/actors/development/actor-definition/input-schema/specification/v1/array.md
parents:
  - [Apify documentation](https://docs.apify.com/llms.txt)
  - [Actors](https://docs.apify.com/actors.md)
  - [Develop](https://docs.apify.com/actors/development.md)
  - [Actor definition](https://docs.apify.com/actors/development/actor-definition.md)
  - [Actor input schema](https://docs.apify.com/actors/development/actor-definition/input-schema.md)
  - [Input schema specification](https://docs.apify.com/actors/development/actor-definition/input-schema/specification/v1.md)
previous: [Object](https://docs.apify.com/actors/development/actor-definition/input-schema/specification/v1/object.md)
next: [Resource](https://docs.apify.com/actors/development/actor-definition/input-schema/specification/v1/resource.md)
---

> ## Documentation index
> Fetch the complete documentation index at: https://docs.apify.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Array input type

Array fields hold a list of values. The editor decides how users enter them, from a URL list to key-value pairs or a multiselect, and an optional `items` sub-schema validates each item.

Example of request list sources configuration:


```json
{

    "title": "Start URLs",

    "type": "array",

    "description": "URLs to start with",

    "prefill": [{ "url": "https://apify.com" }],

    "editor": "requestListSources"

}
```


Rendered input:

![Apify Actor input schema start urls array](/assets/images/input-schema-start-urls-bef8993a2dd7f9700624e248f733f2e3.png)

Example of an array:


```json
{

    "title": "Colors",

    "type": "array",

    "description": "Enter colors you know",

    "prefill": ["Red", "White"],

    "editor": "json"

}
```


Rendered input:

![Apify Actor input schema colors array](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABm4AAAFcCAMAAAD29bGYAAABcVBMVEX////MzMzd3d1WmTvl7+URGBygoKC5ubne3t4ahP8Uf/8SFx2Ojo79/f3v7+/29fbg4OBjoUr4+fjq6upYmz78/P3j4+NWVlYkeJP7/Pvn5+cwMDDl5eWFtnJXmTzx8fHu9eyBtG3y8vOqq6t1fHttplX39/fs7Oy/2bWYm5y41KyLunkpMDTh7NuytLWWwIV0q15fn0YxNzva6dR7g4H09PSJuHZbnEAih//p6enHx8dbXV3k5OSwsbKho6MdJCf6+vqjx5RopE/b3NxwqVlPVFcx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4pBsASjcAPNINAKUbAB7pBoDSDQCPdANA6QaAR7oBoHQDwCPdAFC6AeCRbgAo3QDwSDcAlG4AeKQbAEo3ADzSDQClGwAe6QaA0g0Aj3QDQOkGgEe6AaB0A8Aj3QBQugHgkW4AKN0A8Eg3AJRuYOzVAQ0AAADCoP6tDWCCb1ACoEg3ADzdAFCkGwCebgAo0g0ATzcAFOkGgKcbAIp0A8DTDQBFugHg6QaAIt0A8HQDQJFuAHi6AaBINwA83QBQpBsAnm4AKNINAE83ABTpBoCnGwCKdAPA0w0ARboB4OkGgCLdAPB0A0CRbgB4ugGgSDcAPN0AUKQbAJ5uACjSDYy9OqABAABAGNS/tQGewA1KAJRuAHikGwBKNwA80g0ApRsAHukGgNINAI90A0DpBoBHugGgdAPAI90AULoB4JFuACjdAPBINwCUbgB4pBsASjcAPNINAKUbAB7pBoDSDQCPdANA6QaAR7oBoHQDwCPdAFC6AeCRbgAo3QDwSDcAlG4AeKQbAEo3ADzSDQClG2Ds1UENgDAMAMDioGZmYv4FIaA86EJImtyZOJhINwBUugFgIt0AUOkGgIl0A0ClGwAm0g0AlW4AmEg3AFS6AWAi3QBQ6QaAiXQDQKUbACbSDQCVbgCY6NNutm4A6Hezoyd1A0C/m4yepRsA+t2saMoAgKdu5AFA9U835/ICgIaMIyv3BQCv7FwBAAAAAAAAAAAAAAAAAAAAAAAAAAAA3O3BAQkAAACAoP+v+xEqAAAAAAAAAAAAAAAAAAAAAAAAAAAAALAXmqX8a95ntpsAAAAASUVORK5CYII=)

Properties:

| Property           | Value                                                                                                                                            | Required | Description                                                                                                          |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | -------------------------------------------------------------------------------------------------------------------- |
| `editor`           | One of - `json` - `requestListSources` - `pseudoUrls` - `globs` - `keyValue` - `stringList` - `fileupload` - `select` - `schemaBased` - `hidden` | Yes      | UI editor used for input.                                                                                            |
| `placeholderKey`   | String                                                                                                                                           | No       | Placeholder displayed for key field when no value is specified. Works only with `keyValue` editor.                   |
| `placeholderValue` | String                                                                                                                                           | No       | Placeholder displayed in value field when no value is provided. Works only with `keyValue` and `stringList` editors. |
| `maxItems`         | Integer                                                                                                                                          | No       | Maximum number of items the array can contain.                                                                       |
| `minItems`         | Integer                                                                                                                                          | No       | Minimum number of items the array can contain.                                                                       |
| `uniqueItems`      | Boolean                                                                                                                                          | No       | Specifies whether the array should contain only unique values.                                                       |
| `nullable`         | Boolean                                                                                                                                          | No       | Specifies whether null is an allowed value.                                                                          |
| `items`            | object                                                                                                                                           | No       | Specifies format of the items of the array, useful mainly for multiselect and for `schemaBased` editor (see below).  |
| `isSecret`         | Boolean                                                                                                                                          | No       | Specifies whether the input field will be stored encrypted. Only available with `json` and `hidden` editors.         |

Usage of this field is based on the selected editor:

* `requestListSources` - value from this field can be used as input for the [RequestList](https://crawlee.dev/api/core/class/RequestList) class from Crawlee.
* `pseudoUrls` - is intended to be used with a combination of the [PseudoUrl](https://crawlee.dev/api/core/class/PseudoUrl) class and the [enqueueLinks()](https://crawlee.dev/api/core/function/enqueueLinks) function from Crawlee.

Editor type `requestListSources` supports input in formats defined by the [sources](https://crawlee.dev/api/core/interface/RequestListOptions#sources) property of [RequestListOptions](https://crawlee.dev/api/core/interface/RequestListOptions).

Editor type `globs` maps to the Crawlee's [GlobInput](https://crawlee.dev/api/core#GlobInput) used by the [UrlPatterObject](https://crawlee.dev/api/core#UrlPatternObject).

Editor type `fileupload` enables users to specify a list of files as input. The input is passed to the Actor as an array of strings. The Actor author is responsible for interpreting the strings, including validating file existence and format. This editor simplifies the process for users to upload files to a key-value store of their choice.

## Select editor for arrays

The `select` editor for arrays allows users to pick multiple items from a dropdown list. This creates a multiselect field in the UI. You can either only allow users to select from a set of predefined values, or allow them to specify custom values in addition to suggested values.

To correctly define options for multiselect, you need to define the `items` property and then provide values in `enum`/`enumSuggestedValues` and (optionally) labels in `enumTitles` properties.

### Select from predefined values

When you need to restrict selections to a specific set of values, use the `enum` property:


```json
{

    "title": "Countries",

    "description": "Select multiple countries",

    "type": "array",

    "editor": "select",

    "items": {

        "type": "string",

        "enum": ["us", "de", "fr", "uk", "jp"],

        "enumTitles": ["United States", "Germany", "France", "United Kingdom", "Japan"]

    }

}
```


This creates a multiselect dropdown where users can only select from the predefined values:

![Apify Actor input schema - multiselect with predefined values](/assets/images/input-schema-country-multi-06939f93e101392f15ef95bc0626c812.png)

### Select with custom input

When you want to suggest values but still allow custom input, use the `enumSuggestedValues` property:


```json
{

    "title": "Tags",

    "description": "Select or enter custom tags",

    "type": "array",

    "editor": "select",

    "items": {

        "type": "string",

        "enumSuggestedValues": ["web", "scraping", "automation", "data", "api"],

        "enumTitles": ["Web", "Scraping", "Automation", "Data", "API"]

    }

}
```


This creates a multiselect dropdown with suggested values, but users can also enter custom values:

![Apify Actor input schema - multiselect with custom values](/assets/images/input-schema-tags-multi-suggestion-cdbf9727cfc9537f5be4c115c967b7dd.png)

## Array items validation

Arrays in the input schema can define an `items` field to specify the type and validation rules for each item. Each array item is validated according to its `type` and inside the `items` field it's also possible to define additional validation rules such as `pattern`, `minimum`, `maximum`, etc., depending on the item type.

If the item type is an `object`, it can define its own `properties`, `required`, and `additionalProperties` fields, working in the same way as a single object field (see [Object fields validation](https://docs.apify.com/actors/development/actor-definition/input-schema/specification/v1/object.md#object-fields-validation)).

Validation is performed both in the UI and during Actor execution via the API. Array items can themselves be objects with sub-schemas, and objects within objects, recursively, without any limit on nesting depth.

Example of an array of objects property with sub-schema


```json
{

    "title": "Request Headers",

    "type": "array",

    "description": "List of custom HTTP headers",

    "editor": "json",

    "items": {

        "type": "object",

        "properties": {

            "name": {

                "title": "Header Name",

                "description": "Name of the HTTP header",

                "type": "string",

                "minLength": 1

            },

            "value": {

                "title": "Header Value",

                "description": "Value of the HTTP header",

                "type": "string",

                "minLength": 1

            }

        },

        "required": ["name", "value"],

        "additionalProperties": false

    },

    "minItems": 1,

    "maxItems": 20

}
```


Rendered input: ![Apify Actor input schema with sub-schema array](/assets/images/sub-schema-array-json-ac43c1fad076eaf2840856a5b46462e0.png)

In this example:

* The array must contain between 1 and 20 items.
* Each item must be an object with `name` and `value` properties.
* Both `name` and `value` are required.
* No additional properties beyond those defined are allowed.
* The validation of each object item works the same as for a single object field (see [Object fields validation](https://docs.apify.com/actors/development/actor-definition/input-schema/specification/v1/object.md#object-fields-validation)).

### Handling default and prefill values array with object sub-properties

When defining an array of objects with sub-properties, it's possible to set `default` and `prefill` values in two ways:

1. *At the parent array level*: You can provide an array of complete objects as the `default` or `prefill` value, which will be used only if there is no value specified for the field.
2. *At the individual sub-property level*: You can specify `default` or `prefill` values for each sub-property within the `properties` definition of the object items. These values will be applied to each object in the array value.

For example, having an input schema like this:


```json
{

    "title": "Requests",

    "type": "array",

    "description": "List of HTTP requests",

    "editor": "schemaBased",

    "default": [

        { "url": "https://apify.com", "port": 80 }

    ],

    "items": {

        "type": "object",

        "properties": {

            "url": {

                "title": "URL",

                "type": "string",

                "description": "Request URL",

                "editor": "textfield"

            },

            "port": {

                "title": "Port",

                "type": "integer",

                "description": "Request port",

                "editor": "number",

                "default": 8080

            }

        },

        "required": ["url", "port"],

        "additionalProperties": false

    }

}
```


If there is no value specified for the field, the array will default to containing one object:


```json
[

    { "url": "https://apify.com", "port": 80 }

]
```


However, if the user adds a new item to the array, the `port` sub-property of that new object will default to `8080`, as defined in the sub-property itself.

## `schemaBased` editor

Arrays can use the `schemaBased` editor to provide a user-friendly interface for editing each item individually. It works for arrays of primitive types (like strings or numbers) as well as arrays of objects, rendering each item according to its type and optional `editor` configuration.

This makes it easy to manage complex arrays in the UI while still enforcing validation rules defined in the items field.

Example of an array of strings property with sub-schema


```json
{

    "title": "Start URLs",

    "type": "array",

    "description": "List of URLs for the scraper to visit",

    "editor": "schemaBased",

    "items": {

        "type": "string",

        "pattern": "^https?:\\/\\/(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,}(?:\\/\\S*)?$"

    },

    "minItems": 1,

    "maxItems": 50,

    "uniqueItems": true

}
```


Rendered input: ![Apify Actor input schema with sub-schema array string](/assets/images/sub-schema-array-string-268b62ea2a270343ab448873958ade84.png)

* Each item is rendered as a text field.
* The array must contain between 1 and 50 items.
* Duplicate values are not allowed.

Example of an array of objects property with sub-schema


```json
{

    "title": "Request Headers",

    "type": "array",

    "description": "List of custom HTTP headers",

    "editor": "schemaBased",

    "items": {

        "type": "object",

        "properties": {

            "name": {

                "title": "Header Name",

                "description": "Name of the HTTP header",

                "type": "string",

                "minLength": 1,

                "editor": "textfield"

            },

            "value": {

                "title": "Header Value",

                "description": "Value of the HTTP header",

                "type": "string",

                "minLength": 1,

                "editor": "textfield"

            }

        },

        "required": ["name", "value"],

        "additionalProperties": false

    },

    "minItems": 1,

    "maxItems": 20

}
```


Rendered input: ![Apify Actor input schema with sub-schema array object](/assets/images/sub-schema-array-object-915f0b98cacb4a2518251f611da6d4a6.png)

* Each array item is represented as a group of input fields (`name` and `value`).
* Validation ensures all required sub-properties are filled and no extra properties are allowed.
* New items can be added up to the `maxItems` limit, and each item is validated individually.

### Limitations

As with objects, the sub-schema feature for arrays only works for level 1 sub-properties. While the objects in the array can have properties with their own schema definitions, those properties cannot themselves use the `schemaBased` editor.
