Skip to main content
Version: Next

ActorStartOptions

Index

Properties

optionalbuild

build?: string

Tag or number of the actor build to run (e.g. beta or 1.2.345). If not provided, the run uses build tag or number from the default actor run configuration (typically latest).

optionalcontentType

contentType?: string

Content type for the input. If not specified, input is expected to be an object that will be stringified to JSON and content type set to application/json; charset=utf-8. If options.contentType is specified, then input must be a String or Buffer.

optionalforcePermissionLevel

forcePermissionLevel?: string

Override the Actor's permissions for this run. If not set, the Actor will run with permissions configured in the Actor settings.

optionalmaxItems

maxItems?: number

Specifies the maximum number of dataset items that will be charged for pay-per-result Actors. This does NOT guarantee that the Actor will return only this many items. It only ensures you won't be charged for more than this number of items. Only works for pay-per-result Actors. Value can be accessed in the Actor run using ACTOR_MAX_PAID_DATASET_ITEMS environment variable.

optionalmaxTotalChargeUsd

maxTotalChargeUsd?: number

Specifies the maximum cost of the Actor run. This parameter is used only for pay-per-event Actors. It allows you to limit the amount charged to your subscription. You can access the maximum cost in your Actor by using the ACTOR_MAX_TOTAL_CHARGE_USD environment variable.

optionalmemory

memory?: number

Memory in megabytes which will be allocated for the new actor run. If not provided, the run uses memory of the default actor run configuration.

optionalrestartOnError

restartOnError?: boolean

Determines whether the run will be restarted if it fails.

optionaltimeout

timeout?: number

Timeout for the actor run in seconds. Zero value means there is no timeout. If not provided, the run uses timeout of the default actor run configuration.

optionalwaitForFinish

waitForFinish?: number

Maximum time to wait for the actor run to finish, in seconds. If the limit is reached, the returned promise is resolved to a run object that will have status READY or RUNNING and it will not contain the actor run output. By default (or when waitForFinish is set to 0), the function resolves immediately without waiting. The wait is limited to 60s and happens on the API directly, as opposed to the call method and its waitSecs option, which is implemented via polling on the client side instead (and has no limit like that).

optionalwebhooks

webhooks?: readonly WebhookUpdateData[]

Specifies optional webhooks associated with the actor run, which can be used to receive a notification e.g. when the actor finished or failed, see ad hook webhooks documentation for detailed description.