Abort an asynchronous run
Relays to https://api.apify.com/v2/actor-runs/{runId}/abort, rewriting Authorization to
the secret Apify token; a client-sent token query parameter is discarded. Stops a run you
created and answers with the run object in its new state. No request body is required.
Ownership-gated exactly like the poll above: another account’s run id answers 404.
Aborting keeps the run readable: it still answers GET /apify/v2/actor-runs/{runId} with
its terminal status and final usage, and its dataset still serves whatever it produced
before stopping. An abort that lands the run in a terminal state settles its exact
usageTotalUsd plus the gateway’s 5.5% fee, once, against the account that created it.
Authentication
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
The run, from data.id of the create that started it. Only the account that created the run
can name it: another account’s run id, and one that never existed, answer the same 404,
refused locally with no upstream call. A run you do own that Apify has since expired also
answers 404 — that read is authorized and reaches Apify, so what comes back is Apify’s own
answer rather than the local refusal.
Request
Response
Apify’s own run envelope, relayed as it arrived. data.status follows Apify’s run
lifecycle: READY and RUNNING while the run is live, SUCCEEDED, FAILED, TIMED-OUT,
or ABORTED once it is finished, with TIMING-OUT and ABORTING in between.
data.usageTotalUsd is a running total until the run is terminal — which is why nothing is
charged before then. Once terminal, that exact figure plus the gateway’s 5.5% fee is
charged once, to the account that created the run.

