# Get batch scrape status (/docs/reference/get-batch-scrape)

Returns a batch scrape's progress counters and its package, whose url downloads every result once it is ready.

`GET /v2/batch/scrape/{id}`

Requires an API key.

## Example request

```sh
curl 'https://api.elisebot.dev/v2/batch/scrape/<id>' \
  -H "Authorization: Bearer $ELISEBOT_API_KEY"
```

## Parameters

- `id` (path, string, required): The batch scrape ID.

## Responses

### 200

OK.

Type: `BatchScrapeStatusResponse`

- `completed` (integer (int64), required): Number of URLs done so far.
- `completedAt` (string (date-time)): When the last URL got its result.
- `createdAt` (string (date-time), required)
- `expiresAt` (string (date-time), required): When the results expire.
- `package` (BatchScrapePackage, required): The batch scrape's results package.
  - `bytes` (integer (int64)): The package's size in bytes, gzipped, set once status is ready.
  - `status` (string, required): Pending until the batch scrape ends and its results are packaged; failed when packaging gave up, which refunded the batch scrape's credits. One of `pending`, `ready`, `failed`.
  - `url` (string): The download URL, set once status is ready. It answers 302 to the gzipped NDJSON file, one document per line in URL order.
- `status` (string, required): Completed once every URL is done; cancelled after a cancel, whose unfetched URLs end with errorCode cancelled. One of `scraping`, `completed`, `cancelled`.
- `success` (boolean, required): Always true. One of `true`.
- `total` (integer (int64), required): Number of URLs.
- `webhookError` (WebhookEventErrors): Why a webhook event failed.
  - `finish` (string): Why the finish event failed.
  - `start` (string): Why the start event failed.
- `webhookStatus` (WebhookEventStatuses): Delivery status of each webhook event.
  - `finish` (string): Delivery status of the finish event. One of `pending`, `delivered`, `failed`.
  - `start` (string): Delivery status of the start event. One of `pending`, `delivered`, `failed`.

### 401

UNAUTHORIZED: The API key is invalid or revoked; API_KEY_REQUIRED: This endpoint needs an API key; INVALID_ACCESS_TOKEN: The OAuth access token is unknown, expired or revoked, or was sent to an endpoint other than /mcp, the only one it works on.

Type: `UnauthorizedResponse`

- `code` (string, required): A machine-readable error code. One of `UNAUTHORIZED`, `API_KEY_REQUIRED`, `INVALID_ACCESS_TOKEN`.
- `details` (array of ValidationErrorDetail or null): The invalid fields.
  - `location` (string): Where the error occurred, e.g. body.urls[3].
  - `message` (string): What went wrong.
  - `value` (any): The rejected value.
- `error` (string, required): A human-readable message.
- `success` (boolean, required): Always false. One of `false`.

### 404

SCRAPE_NOT_FOUND: The scrape does not exist, has expired or is another caller's; BATCH_SCRAPE_NOT_FOUND: The batch scrape does not exist, has expired or is another caller's, or the download token does not match.

Type: `NotFoundResponse`

- `code` (string, required): A machine-readable error code. One of `SCRAPE_NOT_FOUND`, `BATCH_SCRAPE_NOT_FOUND`.
- `details` (array of ValidationErrorDetail or null): The invalid fields.
  - `location` (string): Where the error occurred, e.g. body.urls[3].
  - `message` (string): What went wrong.
  - `value` (any): The rejected value.
- `error` (string, required): A human-readable message.
- `success` (boolean, required): Always false. One of `false`.

### 422

VALIDATION_FAILED: One or more fields are invalid; TOO_MANY_URLS: The request has more URLs than your rate limit allows; IDEMPOTENCY_CONFLICT: The Idempotency-Key was already used with a different request.

Type: `ValidationFailedResponse`

- `code` (string, required): A machine-readable error code. One of `VALIDATION_FAILED`, `TOO_MANY_URLS`, `IDEMPOTENCY_CONFLICT`.
- `details` (array of ValidationErrorDetail or null): The invalid fields.
  - `location` (string): Where the error occurred, e.g. body.urls[3].
  - `message` (string): What went wrong.
  - `value` (any): The rejected value.
- `error` (string, required): A human-readable message.
- `success` (boolean, required): Always false. One of `false`.

### 429

RATE_LIMITED: Rate limit exceeded, retry after Retry-After seconds.

Headers:

- `Retry-After` (integer): Seconds to wait before retrying. Minimum 1.

Type: `TooManyRequestsResponse`

- `code` (string, required): A machine-readable error code. One of `RATE_LIMITED`.
- `details` (array of ValidationErrorDetail or null): The invalid fields.
  - `location` (string): Where the error occurred, e.g. body.urls[3].
  - `message` (string): What went wrong.
  - `value` (any): The rejected value.
- `error` (string, required): A human-readable message.
- `success` (boolean, required): Always false. One of `false`.

### 500

INTERNAL_ERROR: Something went wrong on our side, try again.

Type: `InternalErrorResponse`

- `code` (string, required): A machine-readable error code. One of `INTERNAL_ERROR`.
- `details` (array of ValidationErrorDetail or null): The invalid fields.
  - `location` (string): Where the error occurred, e.g. body.urls[3].
  - `message` (string): What went wrong.
  - `value` (any): The rejected value.
- `error` (string, required): A human-readable message.
- `success` (boolean, required): Always false. One of `false`.
