Skip to main content
POST
Cancel a batch
0 credits Requires batches:write permission. See the guide for examples and usage.

Authorizations

Authorization
string
header
required

Send Authorization: Bearer <API_KEY>. Keys have full access unless restricted to scopes.

Path Parameters

batch_id
string
required

Batch ID.

Example:

"batch_9f2c8a"

Response

Cancellation started. Poll GET /batch/{batch_id} until the batch settles.

Acknowledgement that cancellation was requested. The batch has not settled, so it carries no results, no failure, no refund and no finish time; poll GET /batch/{batch_id} for those.

id
string
required

Batch ID.

Example:

"batch_9f2c8a"

status
enum<string>
required

Always cancelling. Work already in flight finishes; the batch reaches cancelled shortly after.

Available options:
cancelling
mode
enum<string>
required

How pages were selected.

Available options:
scrape,
crawl
format
enum<string>
required

What each page is returned as.

Available options:
markdown,
html
tags
string[]
required

Tags stored on the batch at submission.

Example:
crawl
Crawl controls · object | null
required

How the crawl was configured. Null for scrape batches.

input
object
required

What the submission accepted.

progress
object
required

How far the batch got before cancellation.

credits
object
required

What this batch cost so far.

timing
object
required

Batch timestamps.

page_errors
object[]
required

Page failures so far, grouped by error code and sorted by count.

request_id
string<uuid>
required

Unique ID of this request, also in X-Request-Id. Include it when contacting support.

Example:

"3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91"

key_metadata
object

API key usage for this request.