Extract
Cancel a Batch
Stop a queued or running batch. No further URLs are fetched or billed, and every page already fetched stays readable from Batch Status until the results expire 3 days later. Returns the job summary with status cancelled. Free, and works at a zero balance. A batch that has already finished returns 409.
Authorizations
AuthorizationstringheaderrequiredBearer authentication header of the form Bearer <token>, where <token> is your Scavio API key (e.g. Bearer sk_live_your_key).
Parameters
pathidstringpathrequiredThe batch id from the 202 response (batch_...).
Example: batch_01a12d38-2eee-7297-b563-027644fda159
Notes
What you are charged. Only the pages that succeeded before the cancel, at the tier price; credits_used in the response is the total. No page is fetched or billed after the cancel.
Webhooks. If the batch set a webhook_url, a cancelled event is sent. See Batch Extract for the signature.
Freeing a job slot. Cancelling frees one of your plan's active-job slots, so it is also how to make room when a new crawl or batch returns 429 with running_jobs.
Request
from scavio import ScavioClient
client = ScavioClient(api_key="sk_live_your_key")
summary = client.extract.cancel_batch("batch_01a12d38-2eee-7297-b563-027644fda159")
print(summary["data"]["status"], summary["data"]["credits_used"])Response