SDK ReferencePython SDK

Bulk

API functions for the Bulk resource.

Bulk

Functions for interacting with the bulk API resource. Each operation ships in four forms — sync / sync_detailed and their async counterparts.

Create Bulk

Create mixed bulk job

Enqueues screenshots or scrapes in a single batch. Provide urls (simple list) or items (per-item config), not both. Webhook deliveries include X-ByteKit-Event: bulk.completed so receivers can dispatch on the header without parsing the body shape.

Limits: request bodies are guarded in a two-tier shape. A streamed body with no Content-Length header is capped at 4 MB before your API key is checked; a body that declares Content-Length is instead bounded there by a 32 MB fail-safe (not the real limit — see below), since that branch reads nothing until your key is verified. Once your key is verified, a second check re-gates the body against your account's own max_bulk_size (at this endpoint's richer per-item override budget), which reaches 28.7 MB for the largest documented account. A standard-plan account's effective ceiling is 4 MB; either tier's overrun returns a 400 with error code request_too_large.

Parameters

  • body (CreateBulkBody): Provide urls(simple list) ORitems (per-item config), not
  • both. type selects the capture kind per entry — only
  • ``screenshotandscrape are accepted (recording is
  • deactivated). Behaviour fields may be set per item or via
  • ``defaults; a per-item value overrides the matching default.
  • This includes type: an entry with no type of its own
  • inherits defaults.type, falling back to screenshot only
  • when neither is set.
  • The top-level object, each items[]entry, anddefaults``
  • each reject unrecognized keys with a 422 validation_error``
  • (the offending key name appears in the error's details``
  • message text) rather than silently discarding them.
  • ``items[]anddefaults do not share one field set
  • ``device_scale_factoris accepted only underdefaults (a
  • per-item value 422s), and duration/scenario are accepted
  • only per item (a defaultsvalue 422s).metadata is
  • different from those three: it is valid both at the top
  • level of the body and per item, but rejected with a 422 if
  • placed under defaults. See the 422 response below.

Call styles

sync_detailed(client=client, body=body) -> Response[Union[CreateBulkResponse202, Error]]
sync(client=client, body=body) -> Optional[Union[CreateBulkResponse202, Error]]
await asyncio_detailed(client=client, body=body) -> Response[Union[CreateBulkResponse202, Error]]
await asyncio(client=client, body=body) -> Optional[Union[CreateBulkResponse202, Error]]

Delete Bulk

Cancel a bulk job

Cancels an in-flight bulk job: drains its still-queued (pending) child jobs and refunds the quota held for exactly those drained children. Children already completed, failed, or in progress are untouched and keep their charge. Idempotent — cancelling an already-terminal job (completed, failed, or cancelled) is a no-op that returns 200 with the job's real, unchanged status and refunds nothing.

Parameters

  • id (str)

Call styles

sync_detailed(id=id, client=client) -> Response[Union[DeleteBulkResponse200, Error]]
sync(id=id, client=client) -> Optional[Union[DeleteBulkResponse200, Error]]
await asyncio_detailed(id=id, client=client) -> Response[Union[DeleteBulkResponse200, Error]]
await asyncio(id=id, client=client) -> Optional[Union[DeleteBulkResponse200, Error]]

Get Bulk

Get bulk job status

Parameters

  • id (str)

Call styles

sync_detailed(id=id, client=client) -> Response[Union[Error, GetBulkResponse200]]
sync(id=id, client=client) -> Optional[Union[Error, GetBulkResponse200]]
await asyncio_detailed(id=id, client=client) -> Response[Union[Error, GetBulkResponse200]]
await asyncio(id=id, client=client) -> Optional[Union[Error, GetBulkResponse200]]

List Bulk Screenshots

List bulk job items

Parameters

  • id (str)

Call styles

sync_detailed(id=id, client=client) -> Response[ListBulkScreenshotsResponse200]
sync(id=id, client=client) -> Optional[ListBulkScreenshotsResponse200]
await asyncio_detailed(id=id, client=client) -> Response[ListBulkScreenshotsResponse200]
await asyncio(id=id, client=client) -> Optional[ListBulkScreenshotsResponse200]