Skip to content
Docs
Async jobs

Cancel an async job

Cancel queued and running items. Unfinished work is not billed.

DELETE/v1/async/jobs/{job_id}
FreeAsync jobs, destinations, schedules and the callback secret are not changed from the docs; call this with your own key.

Credits already captured for an item that was running, or that had started and was put back on the queue, are returned. An item that never started is not refunded. The completion webhook, when configured, is still delivered. Free.

Request

DELETEhttps://api.scrapercompany.com/v1/async/jobs/{job_id}

Authenticate with your API key in the x-api-key header (see Authentication).

Parameters

  • job_idstringpathrequired

Example request

curl -X DELETE "https://api.scrapercompany.com/v1/async/jobs/asyncjob_0123456789abcdef0123456789abcdef" \
  -H "x-api-key: $SCRAPERCOMPANY_API_KEY"

Response

200 — Cancelled job; queued and running items stop and unfinished work is not billed.

200 response
{
  "id": "asyncjob_0123456789abcdef0123456789abcdef",
  "job_id": "asyncjob_0123456789abcdef0123456789abcdef",
  "status": "cancelled",
  "priority": 5,
  "status_url": "/v1/async/jobs/asyncjob_0123456789abcdef0123456789abcdef",
  "poll_url": "/v1/async/jobs/asyncjob_0123456789abcdef0123456789abcdef",
  "callback_status": "pending",
  "callback_attempts": 0,
  "meta": {},
  "credits_used": 0,
  "include_results": false,
  "items_total": 2,
  "items_succeeded": 0,
  "items_failed": 0,
  "error": "cancelled by the caller",
  "created_at": "2026-08-10T14:05:00Z",
  "finished_at": "2026-08-10T14:05:01Z",
  "items": []
}

Errors

Errors return a JSON body with a detail field. Failed requests are not charged. See Errors for the full list and retry advice.

StatusMeaningRetry?
401Unauthorized

Missing or invalid API key.

{"detail":"missing or invalid API key"}
No, fix the request
404Not Found

The property, stay, job or record was not found.

{"detail":"job not found"}
No, fix the request
409Conflict

The Idempotency-Key was already used for a different request body.

{"detail":"Idempotency-Key was already used for a different request"}
No, fix the request
422Unprocessable Content

Request validation failed.

{"detail":[{"loc":["body","token"],"msg":"Field required","type":"missing"}]}
No, fix the request
429Too Many Requests

Too many requests: the key's requests-per-minute limit was exceeded, or (in enforce credits mode) the plan's concurrent-request limit. No rate-limit or Retry-After headers are sent; back off and retry.

{"detail":"rate limit 60/min exceeded"}
Yes, with backoff
503Service Unavailable

Temporarily unavailable: a dependency of this endpoint is down, or the upstream source changed its contract. Retry later.

{"detail":"database unavailable: OperationalError"}
Yes, with backoff

Try it

Async jobs, destinations, schedules and the callback secret are not changed from the docs; call this with your own key.

  1. Export your key: export SCRAPERCOMPANY_API_KEY=sk_... (no key yet? start a free trial).
  2. Copy the cURL example above and run it in a terminal.

Questions about this page?

Send the page link and your question, and the team will answer.

Email support