v3

OpenAPI 3.1.2Apache 2.02026-07-31231237972.0 KB
Actors/Actor runs

Run Actor synchronously without input

Runs a specific Actor and returns a key-value store record. The response contains the record stored under the OUTPUT key in the run's default key-value store. This is a legacy approach that has been replaced by the Actor output object; the record may not exist, in which case the response contains no data. Use the outputRecordKey query parameter to return a different record. The run must finish in 300<!-- MAX_ACTOR_JOB_SYNC_WAIT_SECS --> seconds otherwise the API endpoint returns a timeout error. The Actor is not passed any input.

Beware that it might be impossible to maintain an idle HTTP connection for a long period of time, due to client timeout or network conditions. Make sure your HTTP client is configured to have a long enough connection timeout. If the connection breaks, you will not receive any information about the run and its status.

To run the Actor asynchronously, use the Run Actor API endpoint instead.

get/v2/actors/{actorId}/run-sync

Path parameters

actorIdstring required
Example:janedoe~my-actor

Actor ID or a tilde-separated owner's username and Actor name.

Query parameters

outputRecordKeystring
Example:OUTPUT

Key of the record from the run's default key-value store to return in the response. Defaults to OUTPUT. Actors aren't required to store a record under this key, so if it doesn't exist the response contains no data.

timeoutnumber double
Example:60

Optional timeout for the run, in seconds. By default, the run uses the timeout from its configuration.

memorynumber double
Example:256

Memory limit for the run, in megabytes. You can set the amount of memory to a power of 2 with a minimum of 128. By default, the run uses the memory limit from its configuration. Don't change this value unless the Actor's documentation recommends it or you're aware of the consequences.

maxItemsnumber double
Example:1000

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.

maxTotalChargeUsdnumber double
Example:5

Specifies the maximum total cost of the run. Use it to cap the total amount charged for all pricing models. You can access the maximum cost in your Actor by using the ACTOR_MAX_TOTAL_CHARGE_USD environment variable.

restartOnErrorboolean

Determines whether the run will be restarted if it fails.

buildstring
Example:0.1.234

Specifies the Actor build to run. It can be either a build tag or build number. By default, the run uses the build from its configuration (typically latest).

webhooksstring byte
Example:dGhpcyBpcyBqdXN0IGV4YW1wbGUK...

Specifies optional webhooks associated with the Actor run, which can be used to receive a notification e.g. when the Actor finished or failed. The value is a Base64-encoded JSON array whose items follow the WebhookRepresentation schema. For more information, see Webhooks documentation.

Response

object required