v10

latestOpenAPI 3.1.02026-08-0375143791.1 KB
Batch

Cancel a batch

Stop a batch from starting new pages. In-progress pages finish, and unused credits are refunded.

post/batch/{batch_id}/cancel

Path parameters

batch_idstring required

ID of the batch to retrieve or cancel.

Example:batch_9f2c8a

ID of the batch to retrieve or cancel.

Response

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

idstring required

Batch ID.

status'cancelling' required

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

mode'scrape' | 'crawl' required

How pages were selected.

format'markdown' | 'html' required

What each page is returned as.

tagsstring[] required

Tags stored on the batch at submission.

Example response

{
  "id": "batch_9f2c8a",
  "tags": [
    "docs"
  ],
  "crawl": {
    "source": {
      "url": "https://example.com/docs"
    },
    "max_pages": 500,
    "url_pattern": "^https://example\\.com/docs/"
  },
  "input": {
    "reserved": 24817,
    "submitted": 25000,
    "duplicates": 183
  },
  "progress": {
    "succeeded": 4120,
    "failed": 37,
    "pending": 20660
  },
  "credits": {
    "reserved": 24817
  },
  "page_errors": [
    {
      "code": "WEBSITE_ACCESS_ERROR",
      "count": 204
    }
  ]
}