Cancel an owned active request or active structured-extraction run

Cancels a pending, running, or CAPTCHA-solving page request. If the page is already completed, the endpoint can still cancel active dependent AI extraction runs without deleting the retained page result. Pending page cancellations attempt an immediate base-debit refund; running page cancellations are left for the existing refund-recovery flow.

POST
/api/v1/data/requests/{id}/cancel

Cancels a pending, running, or CAPTCHA-solving page request. If the page is already completed, the endpoint can still cancel active dependent AI extraction runs without deleting the retained page result. Pending page cancellations attempt an immediate base-debit refund; running page cancellations are left for the existing refund-recovery flow.

Authorization

headerX-API-Key<token>

Path Parameters

id*string
Formatuuid

Header Parameters

Idempotency-Key?string

Optional. Generate a unique value before a write and retain it for an exact-body retry; replay is free and a different body returns 409 IDEMPOTENCY_CONFLICT.

Length8 <= length <= 200

Response Body

Cancellation accepted and persisted Error body uses the documented PublicError DTO.

application/json
  1. response
id*string
Formatuuid
status*string

Logical request/extraction cancellation status.

page_status*string

Persisted underlying page-request status after cancellation. It remains completed when cancellation only stopped extraction work.

page_cancelled*boolean

True when an active page request was changed to cancelled.

page_was_active*boolean

True when the page was pending

recipe_runs*
refund_status*string

Pending page cancellations attempt an immediate refund; running page cancellations remain recoverable work; extraction-only cancellation does not refund the already-completed page request.

Value in"completed""pending_recovery""not_applicable"
refund_tokens*integer

Base tokens included in the page cancellation refund path; zero for extraction-only cancellation.

Range0 <= value
batch_refresh_status*string
Value in"completed""pending_recovery"
curl -X POST 'https://api.runharvester.com/api/v1/data/requests/497f6eca-6276-4993-bfeb-53cbbbba6f08/cancel' \  --header "X-API-Key: ${RUNHARVESTER_API_KEY:?Set your Data API key}" \  --header "Idempotency-Key: ${RUNHARVESTER_IDEMPOTENCY_KEY:?Set a unique key for this submission; reuse it for retries}"
{  "id": "9a20bd58-ed33-4a5b-b63f-b52bb1a62248",  "status": "pending"}