Skip to navigation

Start an asynchronous saved-task run

View as Markdown

Relays to https://api.apify.com/v2/actor-tasks/{actorTaskId}/runs, rewriting Authorization to the secret Apify token; a client-sent token query parameter is discarded. The saved-task spelling of POST /apify/v2/acts/{actorId}/runs, with the same ownership and settlement behaviour: both ids are registered to your account, the create carries no flat charge, and the run’s exact usageTotalUsd plus the gateway’s 5.5% fee is charged once it is terminal.

Authentication

AuthorizationBearer

Your per-client bearer token — the API key the gateway issued to you. Present it in Authorization: Bearer <token> form. A token that is missing, unknown, or revoked draws a 401. Before the call is sent upstream the token is removed (stripped, or swapped for the upstream’s own credential); it never makes it past the gateway.

Path parameters

actorTaskIdstringRequired

The saved task, as one path segment — its id, or its tilde-form username~task-name. The slash-separated spelling is not accepted.

Query parameters

timeoutintegerOptional>=0
How long the run may take, in seconds, before Apify times it out. Apify's own default applies when omitted.
memoryintegerOptional

Memory for the run, in megabytes. Apify’s own default applies when omitted; more memory costs more compute.

buildstringOptional
A specific actor build tag or number to run, instead of the actor's default build.
waitForFinishintegerOptional>=0

Seconds to hold the response open waiting for the run to finish, up to Apify’s own maximum. The call still answers with the run object either way — it just may already be terminal, in which case the run’s exact usage, plus the gateway’s 5.5% fee, settles right there.

Request

Optional input overrides for the saved task. A task already carries its stored input, so an empty object runs it as saved; any fields you send are merged over that input by Apify.

Response

An asynchronous run was started and the run object returned. The run and its defaultDatasetId are registered to your account before this reaches you, so the very next poll or dataset read is already authorized — and no other account can make either.

Keep data.id to poll GET /apify/v2/actor-runs/{data.id}, and data.defaultDatasetId to read GET /apify/v2/datasets/{data.defaultDatasetId}/items once the run succeeds.

dataobjectOptional
The run object.

Errors

401
Unauthorized Error
404
Not Found Error
500
Internal Server Error