@hunt-labs/bytekit-mcp 0.3.22 → 0.3.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -10,6 +10,19 @@ today, see [README.md](./README.md), which remains the authoritative usage guide
10
10
 
11
11
  ## [Unreleased]
12
12
 
13
+ ## [0.3.23] - 2026-11-04
14
+
15
+ ### Changed
16
+
17
+ - Refreshed the bundled documentation snapshot after the new internal `GET /v1/bulk/concurrency`
18
+ operation (#3718): the bundled `api/bulk` index gains a `getbulkconcurrency` page and the
19
+ `guides/bulk` page gains a "Checking bulk concurrency" section. This refresh itself changes no tool,
20
+ schema or transport.
21
+ - Refreshed the bundled documentation snapshot after `device_scale_factor` narrowed to `1` (#5630):
22
+ the screenshot and bulk API pages and the screenshots guide now document only `1` (or `null`), and any
23
+ other value as a 422 `validation_error`. The server has no screenshot tool parameter for it, so no
24
+ tool, schema or transport changes.
25
+
13
26
  ## [0.3.22] - 2026-10-27
14
27
 
15
28
  ### Added
@@ -17,7 +17,7 @@
17
17
  "api/bulk": {
18
18
  "title": "Bulk",
19
19
  "section": "API Reference",
20
- "body": "# Bulk\n\nBulk API — endpoints, requests, and responses.\n\nThe **Bulk** API. 5 endpoints:\n\n- [List bulk jobs](https://bytekit.com/docs/api/bulk/listbulk) — GET /v1/bulk\n- [Create mixed bulk job](https://bytekit.com/docs/api/bulk/createbulk) — POST /v1/bulk\n- [Get bulk job status](https://bytekit.com/docs/api/bulk/getbulk) — GET /v1/bulk/:id\n- [Cancel a bulk job](https://bytekit.com/docs/api/bulk/deletebulk) — DELETE /v1/bulk/:id\n- [List bulk job items](https://bytekit.com/docs/api/bulk/listbulkscreenshots) — GET /v1/bulk/:id/screenshots"
20
+ "body": "# Bulk\n\nBulk API — endpoints, requests, and responses.\n\nThe **Bulk** API. 6 endpoints:\n\n- [List bulk jobs](https://bytekit.com/docs/api/bulk/listbulk) — GET /v1/bulk\n- [Create mixed bulk job](https://bytekit.com/docs/api/bulk/createbulk) — POST /v1/bulk\n- [Get bulk concurrency usage](https://bytekit.com/docs/api/bulk/getbulkconcurrency) — GET /v1/bulk/concurrency\n- [Get bulk job status](https://bytekit.com/docs/api/bulk/getbulk) — GET /v1/bulk/:id\n- [Cancel a bulk job](https://bytekit.com/docs/api/bulk/deletebulk) — DELETE /v1/bulk/:id\n- [List bulk job items](https://bytekit.com/docs/api/bulk/listbulkscreenshots) — GET /v1/bulk/:id/screenshots"
21
21
  },
22
22
  "api/bulk/createbulk": {
23
23
  "title": "Create mixed bulk job",
@@ -34,6 +34,11 @@
34
34
  "section": "API Reference",
35
35
  "body": "# Get bulk job status\n\nReturns the job envelope. Items are listed by `GET /v1/bulk/{id}/screenshots`.\n\n**Cancelled by the platform.** When the account can no longer spend (its bandwidth\nbalance is exhausted, or the account is deleted) while items are still pending, ByteKit\ncancels the job itself. It then reads `status: cancelled` even though you never called\n`DELETE /v1/bulk/{id}`, and the cancellation sends no webhook.\n\n**Job ids from other create routes.** The job is looked up by account only, so the id\nof a job created by `POST /v1/scrape/bulk` or `POST /v1/fetch/bulk` is found here too, not\na `404`, with that job's envelope. An id from another account answers `404`.\n\n**GET** `/v1/bulk/{id}`\n\n## Parameters\n\n- `id` (path, string, required)\n\n## Responses\n\n### 200 — Successful response.\n- `id`\n- `status`\n- `total`\n- `completed`\n- `failed`\n- `created_at`\n- `completed_at`\n- `total_credits_charged`\n- `total_billed_bytes`\n- `estimated_credits`\n- `webhook_url`\n\n### 202 — Bulk job still processing. `routes/bulk.ts` ends the poll handler with\n`status: isTerminal ? 200 : 202` over an identical body, so this is the\nSAME envelope the 200 documents — only the status code and the reachable\n`status` values differ. Keep polling until you get a 200 (issue #3533).\n- `id`\n- `status`\n- `total`\n- `completed`\n- `failed`\n- `created_at`\n- `completed_at`\n- `total_credits_charged`\n- `total_billed_bytes`\n- `estimated_credits`\n- `webhook_url`\n\n### 401 — Unauthorized. The request carried no valid credential, and no work was\nperformed. The unified `Error` envelope carries one of the codes below\nin `error.code`; match on the code, never on the prose.\n\n- `invalid_api_key` — a bearer API key was presented and rejected:\n unknown, revoked, expired or malformed. The bearer-only operations\n (`/v1/webhook-deliveries*` among them) also return it when no\n `Authorization` header is sent. `GET /v1/account` is the exception\n to \"malformed\": it returns `invalid_api_key` only for a key that\n starts `sk_test_` or `sk_live_` and is unknown, revoked or expired.\n- `unauthorized` — the `Authorization` header is absent or malformed on\n an operation that also accepts a dashboard session (the dual-auth and\n billing operations). `GET /v1/account` also returns it, for no\n `Authorization` header and for any bearer value that does not start\n `sk_test_` or `sk_live_` (that value is checked as a dashboard\n session token).\n\nNot retryable as-is: supply a valid API key first.\n- `status`\n- `error`\n- `error.code`\n- `error.message`\n- `error.http_status`\n- `error.failed_at`\n- `error.details`\n\n### 404 — Resource not found.\n- `status`\n- `error`\n- `error.code`\n- `error.message`\n- `error.http_status`\n- `error.failed_at`\n- `error.details`"
36
36
  },
37
+ "api/bulk/getbulkconcurrency": {
38
+ "title": "Get bulk concurrency usage",
39
+ "section": "API Reference",
40
+ "body": "# Get bulk concurrency usage\n\nReturns how many of the account's bulk concurrency slots are in use and\nthe plan cap they count against, so a dashboard can tell a bulk job that\nis waiting on the cap from one that is stalled. `active` is a live\napproximation of dispatched bulk children: a slot whose release never\narrived drops out of the count after 5 minutes. It is for display only\nand never decides a job's state or progress, which come from the job's\nown counters, nor enforcement or billing. Authenticates with an API key\nor a dashboard session, like the other `/v1/bulk` operations.\n\n**GET** `/v1/bulk/concurrency`\n\n## Responses\n\n### 200 — Successful response.\n- `active`\n- `limit`\n\n### 401 — Unauthorized. The request carried no valid credential, and no work was\nperformed. The unified `Error` envelope carries one of the codes below\nin `error.code`; match on the code, never on the prose.\n\n- `invalid_api_key` — a bearer API key was presented and rejected:\n unknown, revoked, expired or malformed. The bearer-only operations\n (`/v1/webhook-deliveries*` among them) also return it when no\n `Authorization` header is sent. `GET /v1/account` is the exception\n to \"malformed\": it returns `invalid_api_key` only for a key that\n starts `sk_test_` or `sk_live_` and is unknown, revoked or expired.\n- `unauthorized` — the `Authorization` header is absent or malformed on\n an operation that also accepts a dashboard session (the dual-auth and\n billing operations). `GET /v1/account` also returns it, for no\n `Authorization` header and for any bearer value that does not start\n `sk_test_` or `sk_live_` (that value is checked as a dashboard\n session token).\n\nNot retryable as-is: supply a valid API key first.\n- `status`\n- `error`\n- `error.code`\n- `error.message`\n- `error.http_status`\n- `error.failed_at`\n- `error.details`"
41
+ },
37
42
  "api/bulk/listbulk": {
38
43
  "title": "List bulk jobs",
39
44
  "section": "API Reference",
@@ -92,7 +97,7 @@
92
97
  "api/monitors/createmonitor": {
93
98
  "title": "Create a change-detection monitor",
94
99
  "section": "API Reference",
95
- "body": "# Create a change-detection monitor\n\nCreates a recurring change-detection monitor for a URL, delivering results via webhook.\n\n**Limits:** request bodies are capped at 512 KB. An oversized body\nreturns a `400` with error code `request_too_large`.\n\n**POST** `/v1/monitors`\n\n## Request Body\n\n- `url` (required)\n- `type`\n- `interval_type` (required)\n- `cron_expression`\n- `change_threshold`\n- `notify_on`\n- `webhook_url` (required)\n- `webhook_secret`\n- `webhook_headers`\n- `options`\n- `scrape_options`\n- `metadata`\n\n## Responses\n\n### 201 — Monitor created.\n- `id`\n- `type`\n- `url`\n- `status`\n- `interval_type`\n- `cron_expression`\n- `next_capture_at`\n- `notify_on`\n- `webhook_url`\n- `webhook_headers`\n- `change_threshold`\n- `scrape_options`\n- `last_content_hash`\n- `captures_count`\n- `changes_count`\n- `skipped_captures`\n- `last_captured_at`\n- `last_changed_at`\n- `consecutive_failures`\n- `last_error_code`\n- `suspension_reason`\n- `metadata`\n- `created_at`\n- `updated_at`\n- `cancelled_at`\n- `webhook_secret`\n\n### 400 — Bad request. When the `url` (or `webhook_url`) field fails strict\nvalidation the error code is `invalid_url` and the `details` object\ncontains:\n- `field` — the request field that failed (e.g. `\"url\"`)\n- `url` — the rejected value\n- `reason` — one of: `scheme_missing`, `scheme_unsupported`,\n `scheme_separator_typo`, `host_empty`, `host_invalid`,\n `host_blocked_private`, `host_blocked_loopback`, `host_too_long`,\n `host_unicode_not_punycode`, `userinfo_present`, `url_too_long`,\n `control_chars`, `not_a_url`\n- `status`\n- `error`\n- `error.code`\n- `error.message`\n- `error.http_status`\n- `error.failed_at`\n- `error.details`\n\n### 401 — Unauthorized. The request carried no valid credential, and no work was\nperformed. The unified `Error` envelope carries one of the codes below\nin `error.code`; match on the code, never on the prose.\n\n- `invalid_api_key` — a bearer API key was presented and rejected:\n unknown, revoked, expired or malformed. The bearer-only operations\n (`/v1/webhook-deliveries*` among them) also return it when no\n `Authorization` header is sent. `GET /v1/account` is the exception\n to \"malformed\": it returns `invalid_api_key` only for a key that\n starts `sk_test_` or `sk_live_` and is unknown, revoked or expired.\n- `unauthorized` — the `Authorization` header is absent or malformed on\n an operation that also accepts a dashboard session (the dual-auth and\n billing operations). `GET /v1/account` also returns it, for no\n `Authorization` header and for any bearer value that does not start\n `sk_test_` or `sk_live_` (that value is checked as a dashboard\n session token).\n\nNot retryable as-is: supply a valid API key first.\n- `status`\n- `error`\n- `error.code`\n- `error.message`\n- `error.http_status`\n- `error.failed_at`\n- `error.details`\n\n### 409 — Duplicate monitor for this URL.\n- `status`\n- `error`\n- `error.code`\n- `error.message`\n- `error.http_status`\n- `error.failed_at`\n- `error.details`\n\n### 422 — Validation error.\n- `status`\n- `error`\n- `error.code`\n- `error.message`\n- `error.http_status`\n- `error.failed_at`\n- `error.details`"
100
+ "body": "# Create a change-detection monitor\n\nCreates a recurring change-detection monitor for a URL, delivering results via webhook.\n\n**Limits:** request bodies are capped at 512 KB. An oversized body\nreturns a `400` with error code `request_too_large`.\n\n**POST** `/v1/monitors`\n\n## Request Body\n\n- `url` (required)\n- `type`\n- `interval_type` (required)\n- `cron_expression`\n- `change_threshold`\n- `notify_on`\n- `webhook_url` (required)\n- `webhook_secret`\n- `webhook_headers`\n- `options`\n- `scrape_options`\n- `metadata`\n\n## Responses\n\n### 201 — Monitor created.\n- `id`\n- `type`\n- `url`\n- `status`\n- `interval_type`\n- `cron_expression`\n- `next_capture_at`\n- `notify_on`\n- `webhook_url`\n- `webhook_headers`\n- `change_threshold`\n- `scrape_options`\n- `last_content_hash`\n- `captures_count`\n- `changes_count`\n- `skipped_captures`\n- `last_captured_at`\n- `last_changed_at`\n- `consecutive_failures`\n- `last_error_code`\n- `suspension_reason`\n- `metadata`\n- `created_at`\n- `updated_at`\n- `cancelled_at`\n- `webhook_secret`\n\n### 400 — Bad request. When the `url` (or `webhook_url`) field fails strict\nvalidation the error code is `invalid_url` and the `details` object\ncontains:\n- `field` — the request field that failed (e.g. `\"url\"`)\n- `url` — the rejected value\n- `reason` — one of: `scheme_missing`, `scheme_unsupported`,\n `scheme_separator_typo`, `host_empty`, `host_invalid`,\n `host_blocked_private`, `host_blocked_loopback`, `host_too_long`,\n `host_unicode_not_punycode`, `userinfo_present`, `url_too_long`,\n `control_chars`, `not_a_url`\n- `status`\n- `error`\n- `error.code`\n- `error.message`\n- `error.http_status`\n- `error.failed_at`\n- `error.details`\n\n### 401 — Unauthorized. The request carried no valid credential, and no work was\nperformed. The unified `Error` envelope carries one of the codes below\nin `error.code`; match on the code, never on the prose.\n\n- `invalid_api_key` — a bearer API key was presented and rejected:\n unknown, revoked, expired or malformed. The bearer-only operations\n (`/v1/webhook-deliveries*` among them) also return it when no\n `Authorization` header is sent. `GET /v1/account` is the exception\n to \"malformed\": it returns `invalid_api_key` only for a key that\n starts `sk_test_` or `sk_live_` and is unknown, revoked or expired.\n- `unauthorized` — the `Authorization` header is absent or malformed on\n an operation that also accepts a dashboard session (the dual-auth and\n billing operations). `GET /v1/account` also returns it, for no\n `Authorization` header and for any bearer value that does not start\n `sk_test_` or `sk_live_` (that value is checked as a dashboard\n session token).\n\nNot retryable as-is: supply a valid API key first.\n- `status`\n- `error`\n- `error.code`\n- `error.message`\n- `error.http_status`\n- `error.failed_at`\n- `error.details`\n\n### 409 — Duplicate monitor for this URL.\n- `status`\n- `error`\n- `error.code`\n- `error.message`\n- `error.http_status`\n- `error.failed_at`\n- `error.details`\n\n### 415 — `unsupported_content_type`: a `scrape` monitor whose `url` path ends in `.pdf` is refused\nbefore it is stored. The check is on the URL only: the path, lowercased, ends in `.pdf`;\nthe query string and fragment are not looked at. A PDF served from another path, or reached\nthrough a redirect, is not caught here — its polls fail as `unsupported_content_type` and\ncount toward auto-suspension. A `screenshot` monitor is not affected.\n- `status`\n- `error`\n- `error.code`\n- `error.message`\n- `error.http_status`\n- `error.failed_at`\n- `error.details`\n\n### 422 — Validation error.\n- `status`\n- `error`\n- `error.code`\n- `error.message`\n- `error.http_status`\n- `error.failed_at`\n- `error.details`"
96
101
  },
97
102
  "api/monitors/deletemonitor": {
98
103
  "title": "Cancel monitor",
@@ -117,7 +122,7 @@
117
122
  "api/monitors/updatemonitor": {
118
123
  "title": "Update monitor",
119
124
  "section": "API Reference",
120
- "body": "# Update monitor\n\n**PATCH** `/v1/monitors/{id}`\n\n## Parameters\n\n- `id` (path, string, required)\n\n## Request Body\n\n- `url`\n- `interval_type`\n- `cron_expression`\n- `change_threshold`\n- `notify_on`\n- `webhook_url`\n- `webhook_secret`\n- `webhook_headers`\n- `status`\n- `options`\n- `scrape_options`\n- `metadata`\n\n## Responses\n\n### 200 — Successful response.\n- `id`\n- `type`\n- `url`\n- `status`\n- `interval_type`\n- `cron_expression`\n- `next_capture_at`\n- `notify_on`\n- `webhook_url`\n- `webhook_headers`\n- `change_threshold`\n- `scrape_options`\n- `last_content_hash`\n- `captures_count`\n- `changes_count`\n- `skipped_captures`\n- `last_captured_at`\n- `last_changed_at`\n- `consecutive_failures`\n- `last_error_code`\n- `suspension_reason`\n- `metadata`\n- `created_at`\n- `updated_at`\n- `cancelled_at`\n\n### 400 — Bad request. When the `url` (or `webhook_url`) field fails strict\nvalidation the error code is `invalid_url` and the `details` object\ncontains:\n- `field` — the request field that failed (e.g. `\"url\"`)\n- `url` — the rejected value\n- `reason` — one of: `scheme_missing`, `scheme_unsupported`,\n `scheme_separator_typo`, `host_empty`, `host_invalid`,\n `host_blocked_private`, `host_blocked_loopback`, `host_too_long`,\n `host_unicode_not_punycode`, `userinfo_present`, `url_too_long`,\n `control_chars`, `not_a_url`\n- `status`\n- `error`\n- `error.code`\n- `error.message`\n- `error.http_status`\n- `error.failed_at`\n- `error.details`\n\n### 401 — Unauthorized. The request carried no valid credential, and no work was\nperformed. The unified `Error` envelope carries one of the codes below\nin `error.code`; match on the code, never on the prose.\n\n- `invalid_api_key` — a bearer API key was presented and rejected:\n unknown, revoked, expired or malformed. The bearer-only operations\n (`/v1/webhook-deliveries*` among them) also return it when no\n `Authorization` header is sent. `GET /v1/account` is the exception\n to \"malformed\": it returns `invalid_api_key` only for a key that\n starts `sk_test_` or `sk_live_` and is unknown, revoked or expired.\n- `unauthorized` — the `Authorization` header is absent or malformed on\n an operation that also accepts a dashboard session (the dual-auth and\n billing operations). `GET /v1/account` also returns it, for no\n `Authorization` header and for any bearer value that does not start\n `sk_test_` or `sk_live_` (that value is checked as a dashboard\n session token).\n\nNot retryable as-is: supply a valid API key first.\n- `status`\n- `error`\n- `error.code`\n- `error.message`\n- `error.http_status`\n- `error.failed_at`\n- `error.details`\n\n### 404 — Resource not found.\n- `status`\n- `error`\n- `error.code`\n- `error.message`\n- `error.http_status`\n- `error.failed_at`\n- `error.details`\n\n### 409 — Duplicate URL.\n- `status`\n- `error`\n- `error.code`\n- `error.message`\n- `error.http_status`\n- `error.failed_at`\n- `error.details`\n\n### 422 — Validation error.\n- `status`\n- `error`\n- `error.code`\n- `error.message`\n- `error.http_status`\n- `error.failed_at`\n- `error.details`"
125
+ "body": "# Update monitor\n\n**PATCH** `/v1/monitors/{id}`\n\n## Parameters\n\n- `id` (path, string, required)\n\n## Request Body\n\n- `url`\n- `interval_type`\n- `cron_expression`\n- `change_threshold`\n- `notify_on`\n- `webhook_url`\n- `webhook_secret`\n- `webhook_headers`\n- `status`\n- `options`\n- `scrape_options`\n- `metadata`\n\n## Responses\n\n### 200 — Successful response.\n- `id`\n- `type`\n- `url`\n- `status`\n- `interval_type`\n- `cron_expression`\n- `next_capture_at`\n- `notify_on`\n- `webhook_url`\n- `webhook_headers`\n- `change_threshold`\n- `scrape_options`\n- `last_content_hash`\n- `captures_count`\n- `changes_count`\n- `skipped_captures`\n- `last_captured_at`\n- `last_changed_at`\n- `consecutive_failures`\n- `last_error_code`\n- `suspension_reason`\n- `metadata`\n- `created_at`\n- `updated_at`\n- `cancelled_at`\n\n### 400 — Bad request. When the `url` (or `webhook_url`) field fails strict\nvalidation the error code is `invalid_url` and the `details` object\ncontains:\n- `field` — the request field that failed (e.g. `\"url\"`)\n- `url` — the rejected value\n- `reason` — one of: `scheme_missing`, `scheme_unsupported`,\n `scheme_separator_typo`, `host_empty`, `host_invalid`,\n `host_blocked_private`, `host_blocked_loopback`, `host_too_long`,\n `host_unicode_not_punycode`, `userinfo_present`, `url_too_long`,\n `control_chars`, `not_a_url`\n- `status`\n- `error`\n- `error.code`\n- `error.message`\n- `error.http_status`\n- `error.failed_at`\n- `error.details`\n\n### 401 — Unauthorized. The request carried no valid credential, and no work was\nperformed. The unified `Error` envelope carries one of the codes below\nin `error.code`; match on the code, never on the prose.\n\n- `invalid_api_key` — a bearer API key was presented and rejected:\n unknown, revoked, expired or malformed. The bearer-only operations\n (`/v1/webhook-deliveries*` among them) also return it when no\n `Authorization` header is sent. `GET /v1/account` is the exception\n to \"malformed\": it returns `invalid_api_key` only for a key that\n starts `sk_test_` or `sk_live_` and is unknown, revoked or expired.\n- `unauthorized` — the `Authorization` header is absent or malformed on\n an operation that also accepts a dashboard session (the dual-auth and\n billing operations). `GET /v1/account` also returns it, for no\n `Authorization` header and for any bearer value that does not start\n `sk_test_` or `sk_live_` (that value is checked as a dashboard\n session token).\n\nNot retryable as-is: supply a valid API key first.\n- `status`\n- `error`\n- `error.code`\n- `error.message`\n- `error.http_status`\n- `error.failed_at`\n- `error.details`\n\n### 404 — Resource not found.\n- `status`\n- `error`\n- `error.code`\n- `error.message`\n- `error.http_status`\n- `error.failed_at`\n- `error.details`\n\n### 409 — Duplicate URL.\n- `status`\n- `error`\n- `error.code`\n- `error.message`\n- `error.http_status`\n- `error.failed_at`\n- `error.details`\n\n### 415 — `unsupported_content_type`: a `scrape` monitor whose `url` path ends in `.pdf` is refused\nbefore it is stored. The check is on the URL only: the path, lowercased, ends in `.pdf`;\nthe query string and fragment are not looked at. A PDF served from another path, or reached\nthrough a redirect, is not caught here — its polls fail as `unsupported_content_type` and\ncount toward auto-suspension. A `screenshot` monitor is not affected.\n- `status`\n- `error`\n- `error.code`\n- `error.message`\n- `error.http_status`\n- `error.failed_at`\n- `error.details`\n\n### 422 — Validation error.\n- `status`\n- `error`\n- `error.code`\n- `error.message`\n- `error.http_status`\n- `error.failed_at`\n- `error.details`"
121
126
  },
122
127
  "api/plans": {
123
128
  "title": "Plans",
@@ -152,7 +157,7 @@
152
157
  "api/scrape-bulk/createscrapebulk": {
153
158
  "title": "Bulk scrape URLs",
154
159
  "section": "API Reference",
155
- "body": "# Bulk scrape URLs\n\nEnqueues multiple URLs for scraping. Results delivered via webhook.\nCompletion deliveries use `X-ByteKit-Event: bulk.completed` and the\n`BulkCompletedWebhook` contract: at most 500 complete items and 1 MiB,\nfollowed by cursor recovery through `GET /v1/scrape/bulk/{id}` whenever\n`recovery_required` is true.\n\n**Unknown keys.** An unknown key on an `items[]` entry, or at the top level of\nthe body, is rejected with `422 validation_error`. An unknown key inside\n`defaults` is not: it is dropped without a warning and the request is accepted\nwith `202`. The exception is `cookies` and `headers`, on an item or in `defaults`: they\nanswer `400 validation_error`.\n\n**POST** `/v1/scrape/bulk`\n\n## Request Body\n\n- `urls`\n- `items`\n- `items.url`\n- `items.formats`\n- `items.formats.type`\n- `items.formats.schema`\n- `items.formats.model`\n- `items.formats.prompt`\n- `items.country`\n- `items.delay_ms`\n- `items.timeout_ms`\n- `items.metadata`\n- `items.clean_markdown`\n- `items.custom`\n- `defaults`\n- `defaults.formats`\n- `defaults.formats.type`\n- `defaults.formats.schema`\n- `defaults.formats.model`\n- `defaults.formats.prompt`\n- `defaults.country`\n- `defaults.delay_ms`\n- `defaults.timeout_ms`\n- `defaults.clean_markdown`\n- `webhook_url` (required)\n- `webhook_secret`\n- `metadata`\n- `custom`\n\n## Responses\n\n### 202 — Bulk scrape job accepted.\n- `id`\n- `status`\n- `total`\n- `completed`\n- `failed`\n- `created_at`\n- `completed_at`\n- `total_credits_charged`\n- `total_billed_bytes`\n- `estimated_credits`\n- `webhook_url`\n\n### 400 — Bad request. When a `url` (or item URL) fails strict validation the\nerror code is `invalid_url` and the `details` object contains:\n- `field` — the request field that failed (e.g. `\"url\"`)\n- `url` — the rejected value\n- `reason` — one of: `scheme_missing`, `scheme_unsupported`,\n `scheme_separator_typo`, `host_empty`, `host_invalid`,\n `host_blocked_private`, `host_blocked_loopback`, `host_too_long`,\n `host_unicode_not_punycode`, `userinfo_present`, `url_too_long`,\n `control_chars`, `not_a_url`\n- `status`\n- `error`\n- `error.code`\n- `error.message`\n- `error.http_status`\n- `error.failed_at`\n- `error.details`\n\n### 401 — Unauthorized. The request carried no valid credential, and no work was\nperformed. The unified `Error` envelope carries one of the codes below\nin `error.code`; match on the code, never on the prose.\n\n- `invalid_api_key` — a bearer API key was presented and rejected:\n unknown, revoked, expired or malformed. The bearer-only operations\n (`/v1/webhook-deliveries*` among them) also return it when no\n `Authorization` header is sent. `GET /v1/account` is the exception\n to \"malformed\": it returns `invalid_api_key` only for a key that\n starts `sk_test_` or `sk_live_` and is unknown, revoked or expired.\n- `unauthorized` — the `Authorization` header is absent or malformed on\n an operation that also accepts a dashboard session (the dual-auth and\n billing operations). `GET /v1/account` also returns it, for no\n `Authorization` header and for any bearer value that does not start\n `sk_test_` or `sk_live_` (that value is checked as a dashboard\n session token).\n\nNot retryable as-is: supply a valid API key first.\n- `status`\n- `error`\n- `error.code`\n- `error.message`\n- `error.http_status`\n- `error.failed_at`\n- `error.details`\n\n### 402 — Payment required. The account cannot fund this request, and no work was\nperformed. The unified `Error` envelope carries one of the billing codes\nbelow in `error.code`; match on the code, never on the prose.\n\n- `quota_exceeded` — the enforced balance for this request's meter\n cannot fund it. Capture endpoints (`/v1/scrape`, `/v1/fetch`,\n `/v1/screenshots`, `/v1/sitemap` and the bulk siblings) meter\n bandwidth: they reject when the balance cannot fund the request's\n byte reservation, and `error.details.required_bytes` and\n `error.details.available_bytes` report the bytes the request reserves\n and the bytes available. `/v1/search` meters credits.\n- `spending_cap_reached` — the request would push overage spend past the\n account's configured cap. Only reachable on a custom overage-enabled\n plan; standard plans stop at `quota_exceeded`.\n- `billing_entitlement_impaired` — the paid subscription is in a payment\n impairment (e.g. `past_due`). `error.message` names the reason.\n- `billing_entitlement_expired` — the paid subscription entitlement\n period has ended, or its dunning grace period has run out.\n\nNot retryable as-is: settle the balance, raise the cap, or restore the\nsubscription first. This response carries no `X-Quota-*` headers — they\ntravel with the 2xx responses of the operations that emit them.\n- `status`\n- `error`\n- `error.code`\n- `error.message`\n- `error.http_status`\n- `error.failed_at`\n- `error.details`\n\n### 403 — One or more URLs in the request are on ByteKit's blocklist. The whole request is\nrejected before anything is queued or billed. This body is NOT the unified `Error`\nenvelope: it carries no `status`, `http_status` or `failed_at`. `blocked` lists every\noffending URL with the rule that matched (`domain`, `tld`, `port` or `path`) and the\ncode that rule maps to (`host_forbidden` for the first three, `path_forbidden` for\n`path`).\n- `error`\n- `error.code`\n- `error.message`\n- `blocked`\n- `blocked.url`\n- `blocked.rule_type`\n- `blocked.error_code`\n\n### 422 — Validation error. `bulk_too_large` is returned when the item count\nexceeds the account plan's `max_bulk_size` cap (also surfaced as\n`max_bulk_size` on `GET /v1/account`).\n- `status`\n- `error`\n- `error.code`\n- `error.message`\n- `error.http_status`\n- `error.failed_at`\n- `error.details`"
160
+ "body": "# Bulk scrape URLs\n\nEnqueues multiple URLs for scraping. Results delivered via webhook.\nCompletion deliveries use `X-ByteKit-Event: bulk.completed` and the\n`BulkCompletedWebhook` contract: at most 500 complete items and 1 MiB,\nfollowed by cursor recovery through `GET /v1/scrape/bulk/{id}` whenever\n`recovery_required` is true.\n\n**Unknown keys.** An unknown key on an `items[]` entry, or at the top level of\nthe body, is rejected with `422 validation_error`. An unknown key inside\n`defaults` is not: it is dropped without a warning and the request is accepted\nwith `202`. The exception is `cookies` and `headers`, on an item or in `defaults`: they\nanswer `400 validation_error`.\n\n**POST** `/v1/scrape/bulk`\n\n## Request Body\n\n- `urls`\n- `items`\n- `items.url`\n- `items.formats`\n- `items.formats.type`\n- `items.formats.schema`\n- `items.formats.model`\n- `items.formats.prompt`\n- `items.country`\n- `items.delay_ms`\n- `items.timeout_ms`\n- `items.metadata`\n- `items.clean_markdown`\n- `items.custom`\n- `defaults`\n- `defaults.formats`\n- `defaults.formats.type`\n- `defaults.formats.schema`\n- `defaults.formats.model`\n- `defaults.formats.prompt`\n- `defaults.country`\n- `defaults.delay_ms`\n- `defaults.timeout_ms`\n- `defaults.clean_markdown`\n- `webhook_url` (required)\n- `webhook_secret`\n- `metadata`\n- `custom`\n\n## Responses\n\n### 202 — Bulk scrape job accepted.\n- `id`\n- `status`\n- `total`\n- `completed`\n- `failed`\n- `created_at`\n- `completed_at`\n- `total_credits_charged`\n- `total_billed_bytes`\n- `estimated_credits`\n- `webhook_url`\n- `rejected`\n- `rejected.index`\n- `rejected.url`\n- `rejected.code`\n- `rejected.message`\n\n### 400 — Bad request. When a `url` (or item URL) fails strict validation the\nerror code is `invalid_url` and the `details` object contains:\n- `field` — the request field that failed (e.g. `\"url\"`)\n- `url` — the rejected value\n- `reason` — one of: `scheme_missing`, `scheme_unsupported`,\n `scheme_separator_typo`, `host_empty`, `host_invalid`,\n `host_blocked_private`, `host_blocked_loopback`, `host_too_long`,\n `host_unicode_not_punycode`, `userinfo_present`, `url_too_long`,\n `control_chars`, `not_a_url`\n- `status`\n- `error`\n- `error.code`\n- `error.message`\n- `error.http_status`\n- `error.failed_at`\n- `error.details`\n\n### 401 — Unauthorized. The request carried no valid credential, and no work was\nperformed. The unified `Error` envelope carries one of the codes below\nin `error.code`; match on the code, never on the prose.\n\n- `invalid_api_key` — a bearer API key was presented and rejected:\n unknown, revoked, expired or malformed. The bearer-only operations\n (`/v1/webhook-deliveries*` among them) also return it when no\n `Authorization` header is sent. `GET /v1/account` is the exception\n to \"malformed\": it returns `invalid_api_key` only for a key that\n starts `sk_test_` or `sk_live_` and is unknown, revoked or expired.\n- `unauthorized` — the `Authorization` header is absent or malformed on\n an operation that also accepts a dashboard session (the dual-auth and\n billing operations). `GET /v1/account` also returns it, for no\n `Authorization` header and for any bearer value that does not start\n `sk_test_` or `sk_live_` (that value is checked as a dashboard\n session token).\n\nNot retryable as-is: supply a valid API key first.\n- `status`\n- `error`\n- `error.code`\n- `error.message`\n- `error.http_status`\n- `error.failed_at`\n- `error.details`\n\n### 402 — Payment required. The account cannot fund this request, and no work was\nperformed. The unified `Error` envelope carries one of the billing codes\nbelow in `error.code`; match on the code, never on the prose.\n\n- `quota_exceeded` — the enforced balance for this request's meter\n cannot fund it. Capture endpoints (`/v1/scrape`, `/v1/fetch`,\n `/v1/screenshots`, `/v1/sitemap` and the bulk siblings) meter\n bandwidth: they reject when the balance cannot fund the request's\n byte reservation, and `error.details.required_bytes` and\n `error.details.available_bytes` report the bytes the request reserves\n and the bytes available. `/v1/search` meters credits.\n- `spending_cap_reached` — the request would push overage spend past the\n account's configured cap. Only reachable on a custom overage-enabled\n plan; standard plans stop at `quota_exceeded`.\n- `billing_entitlement_impaired` — the paid subscription is in a payment\n impairment (e.g. `past_due`). `error.message` names the reason.\n- `billing_entitlement_expired` — the paid subscription entitlement\n period has ended, or its dunning grace period has run out.\n\nNot retryable as-is: settle the balance, raise the cap, or restore the\nsubscription first. This response carries no `X-Quota-*` headers — they\ntravel with the 2xx responses of the operations that emit them.\n- `status`\n- `error`\n- `error.code`\n- `error.message`\n- `error.http_status`\n- `error.failed_at`\n- `error.details`\n\n### 403 — One or more URLs in the request are on ByteKit's blocklist. The whole request is\nrejected before anything is queued or billed. This body is NOT the unified `Error`\nenvelope: it carries no `status`, `http_status` or `failed_at`. `blocked` lists every\noffending URL with the rule that matched (`domain`, `tld`, `port` or `path`) and the\ncode that rule maps to (`host_forbidden` for the first three, `path_forbidden` for\n`path`).\n- `error`\n- `error.code`\n- `error.message`\n- `blocked`\n- `blocked.url`\n- `blocked.rule_type`\n- `blocked.error_code`\n\n### 415 — `unsupported_content_type`: every item in the batch was refused because its URL path ends in\n`.pdf` (the path, lowercased; the query string and fragment are not looked at). Nothing is\nqueued or billed. `details.rejected` lists each item as `{ index, url, code, message }`.\nWhen only some items are refused the batch is accepted with `202` and those items are\nlisted in `rejected` instead.\n- `status`\n- `error`\n- `error.code`\n- `error.message`\n- `error.http_status`\n- `error.failed_at`\n- `error.details`\n\n### 422 — Validation error. `bulk_too_large` is returned when the count of\naccepted items exceeds the account plan's `max_bulk_size` cap (also\nsurfaced as `max_bulk_size` on `GET /v1/account`). Items refused\nfor a `.pdf` path are listed in `rejected` and do not count.\n- `status`\n- `error`\n- `error.code`\n- `error.message`\n- `error.http_status`\n- `error.failed_at`\n- `error.details`"
156
161
  },
157
162
  "api/scrape-bulk/getscrapebulk": {
158
163
  "title": "Get scrape bulk job status",
@@ -162,7 +167,7 @@
162
167
  "api/scrape/createscrape": {
163
168
  "title": "Scrape a URL",
164
169
  "section": "API Reference",
165
- "body": "# Scrape a URL\n\nFetches and processes a URL, returning content in one or more formats wrapped in a ScrapeEnvelope.\n\n**The response shape is decided by your request, not by how we route it.** In precedence order:\n\n1. `async: true` in the body, or `?async=true` in the query string (either one is enough; `false` in one never cancels `true` in the other) → **202** with a `ScrapeQueuedEnvelope` receipt, returned immediately. Poll `GET /v1/scrape/{id}` for the result.\n2. Otherwise, a request that needs a full page render — today that is any of `delay_ms > 0`, `solve_challenge: true`, or `outline` in `formats` — is **held open** until the render reaches a terminal state, then returns **200** with the content envelope (`success` or `failed`). If the render is still running when the hold window expires (28 seconds by default), the request returns the **202** receipt instead and the job continues in the background. A `solve_challenge` render can outlast the hold window, so expect the 202 receipt from such a request.\n3. Otherwise the request is served by the fast HTTP path and returns **200** with the content envelope, typically in under a second.\n\n**A failed fetch is a result, not a transport error.** An unreachable host, a refused connection, or a target whose bot protection defeats every proxy tier all come back on the same **200** as a `failed` envelope — never a 5xx. Narrow on the envelope's `status` before reading the body. A failure the fast path decides inline is recorded as a failed job, so its envelope normally carries that job's `id` and `GET /v1/scrape/{id}` returns the same envelope; if recording the failed job itself fails, the envelope still arrives on the same 200 with `id` set to `null` and there is nothing to poll. A failure a held render reaches carries that render's real `id`. Either way the request transfers no billable bytes and is charged nothing.\n\n**A target that rate-limits us is not ByteKit rate-limiting you.** The `failed` envelope's `error.code` is `target_rate_limited` when the target rate-limits the request. On the fast path that means our proxy attempts end on an HTTP 429 and no bot protection is identified on any attempt, even if the browser fallback then fails or reaches only an unidentified block page; the inline failure carries `error.retry_after_seconds` when the target sent a usable `Retry-After`. On a held render the browser's own answer decides: it observes a 429 on the page itself, or it fails outright after the proxy attempts ended on an HTTP 429. A bot-protection verdict on an earlier fetch attempt does not keep a held render `blocked` when the browser then observes the 429. A held render never carries `error.retry_after_seconds`. Retrying a `target_rate_limited` failure later is likely to work. A held render whose browser reaches an unidentified 403 or 503 page after a proxy 429 is `blocked`. A 429 that bot protection sends as a block stays `blocked` when it is the answer that decides the code: the fast path's proxy attempts, or the browser render on a held render. Your own per-key limit is a separate case: it answers HTTP 429 `rate_limited` with a `Retry-After` header (see the `429` response).\n\nSo a 202 means one of exactly two things: you asked for one with `async: true` or `?async=true`, or the hold window expired. `wait_for_selector` and `wait_until` are `ScreenshotRequest` options, not `ScrapeRequest` options — sending either to this endpoint returns `422 validation_error`, so neither can produce a 202 here.\n\n**POST** `/v1/scrape`\n\n## Parameters\n\n- `async` (query, boolean) — Query-string spelling of the body `async` field. `true` returns the 202 receipt immediately; any other value is ignored. Either spelling turns async on, and `false` in one never cancels `true` in the other.\n\n## Request Body\n\n- `url` (required)\n- `formats`\n- `formats.type`\n- `formats.schema`\n- `formats.model`\n- `formats.prompt`\n- `country`\n- `delay_ms`\n- `timeout_ms`\n- `async`\n- `webhook_url`\n- `events`\n- `markdown_mode`\n- `markdown_query`\n- `markdown_links`\n- `markdown_images`\n- `with_links_summary`\n- `with_images_summary`\n- `markdown_compact`\n- `markdown_filter_images`\n- `markdown_include_media`\n- `markdown_include_warnings`\n- `markdown_include_stats`\n- `token_budget`\n- `token_encoding`\n- `mobile`\n- `solve_challenge`\n- `remove_base64_images`\n- `include_tags`\n- `exclude_tags`\n- `cache_ttl`\n- `custom`\n- `clean_markdown`\n\n## Responses\n\n### 200 — Scrape reached a terminal state and the body is that terminal envelope: `success` carrying content, or `failed` carrying the error envelope. Returned by the fast HTTP path in one round trip, and by a browser-path request without `async: true` or `?async=true` once its render reaches a terminal state inside the hold window. A held render that ends in failure answers 200 with the same `failed` envelope `GET /v1/scrape/{id}` returns — narrow on `status` before reading the body. A definitive upstream outcome is a result, not a transport error: an unreachable host, a refused connection, or a target whose bot protection defeats every proxy tier all answer 200 with the `failed` envelope, never a 5xx. An inline failure is recorded as a failed job, so its envelope normally carries that job's `id` and polling it returns the same envelope; `id` is `null` only when recording the failed job itself failed. `error.http_status` is present only when a real upstream HTTP status is known.\n- `schema_version`\n- `status`\n- `id`\n- `url`\n- `final_url`\n- `content_type`\n- `content_length`\n- `status_code`\n- `retrieved_at`\n- `formats`\n- `formats.raw`\n- `formats.markdown`\n- `formats.links`\n- `formats.links.url`\n- `formats.links.text`\n- `formats.links.isInternal`\n- `formats.links.rel`\n- `formats.images`\n- `formats.images.url`\n- `formats.images.alt`\n- `formats.images.width`\n- `formats.images.height`\n- `formats.images.format`\n- `formats.images.score`\n- `formats.json`\n- `formats.json.data`\n- `formats.json.validated`\n- `formats.json.model`\n- `formats.outline`\n- `metadata`\n- `metadata.title`\n- `metadata.description`\n- `metadata.language`\n- `metadata.canonicalUrl`\n- `metadata.ogTitle`\n- `metadata.ogDescription`\n- `metadata.ogImage`\n- `metadata.ogUrl`\n- `metadata.ogSiteName`\n- `metadata.robots`\n- `metadata.byline`\n- `metadata.publishedAt`\n- `tables`\n- `tables.kind`\n- `tables.gfm`\n- `tables.rows`\n- `tables.cols`\n- `warnings`\n- `warnings.code`\n- `warnings.message`\n- `warnings.element`\n- `stats`\n- `stats.chars`\n- `stats.tokens`\n- `stats.blocks`\n- `markdown_tokens`\n- `markdown_tokens.kept`\n- `markdown_tokens.total`\n- `markdown_tokens.truncated`\n- `billing`\n- `billing.raw_bytes`\n- `billing.factors`\n- `billing.factors.name`\n- `billing.factors.value`\n- `billing.factors.reason`\n- `billing.multiplier`\n- `billing.billed_bytes`\n- `custom`\n- `cache`\n- `cache_age_s`\n- `error`\n- `error.code`\n- `error.message`\n- `error.http_status`\n- `error.retry_after_seconds`\n- `error.failed_at`\n\n### 202 — Scrape accepted for background processing; the body is a receipt, not content. Returned when `async: true` or `?async=true` was requested, or when a browser-path request's hold window expired before the render finished. Poll `GET /v1/scrape/{id}` for the result.\n- `schema_version`\n- `status`\n- `id`\n- `url`\n- `status_url`\n- `queued_at`\n- `events`\n\n### 400 — Bad request. When the `url` field fails strict validation the error\ncode is `invalid_url` and the `details` object contains:\n- `field` — the request field that failed (e.g. `\"url\"`)\n- `url` — the rejected value\n- `reason` — one of: `scheme_missing`, `scheme_unsupported`,\n `scheme_separator_typo`, `host_empty`, `host_invalid`,\n `host_blocked_private`, `host_blocked_loopback`, `host_too_long`,\n `host_unicode_not_punycode`, `userinfo_present`, `url_too_long`,\n `control_chars`, `not_a_url`\n- `status`\n- `error`\n- `error.code`\n- `error.message`\n- `error.http_status`\n- `error.failed_at`\n- `error.details`\n\n### 401 — Unauthorized. The request carried no valid credential, and no work was\nperformed. The unified `Error` envelope carries one of the codes below\nin `error.code`; match on the code, never on the prose.\n\n- `invalid_api_key` — a bearer API key was presented and rejected:\n unknown, revoked, expired or malformed. The bearer-only operations\n (`/v1/webhook-deliveries*` among them) also return it when no\n `Authorization` header is sent. `GET /v1/account` is the exception\n to \"malformed\": it returns `invalid_api_key` only for a key that\n starts `sk_test_` or `sk_live_` and is unknown, revoked or expired.\n- `unauthorized` — the `Authorization` header is absent or malformed on\n an operation that also accepts a dashboard session (the dual-auth and\n billing operations). `GET /v1/account` also returns it, for no\n `Authorization` header and for any bearer value that does not start\n `sk_test_` or `sk_live_` (that value is checked as a dashboard\n session token).\n\nNot retryable as-is: supply a valid API key first.\n- `status`\n- `error`\n- `error.code`\n- `error.message`\n- `error.http_status`\n- `error.failed_at`\n- `error.details`\n\n### 402 — Payment required. The account cannot fund this request, and no work was\nperformed. The unified `Error` envelope carries one of the billing codes\nbelow in `error.code`; match on the code, never on the prose.\n\n- `quota_exceeded` — the enforced balance for this request's meter\n cannot fund it. Capture endpoints (`/v1/scrape`, `/v1/fetch`,\n `/v1/screenshots`, `/v1/sitemap` and the bulk siblings) meter\n bandwidth: they reject when the balance cannot fund the request's\n byte reservation, and `error.details.required_bytes` and\n `error.details.available_bytes` report the bytes the request reserves\n and the bytes available. `/v1/search` meters credits.\n- `spending_cap_reached` — the request would push overage spend past the\n account's configured cap. Only reachable on a custom overage-enabled\n plan; standard plans stop at `quota_exceeded`.\n- `billing_entitlement_impaired` — the paid subscription is in a payment\n impairment (e.g. `past_due`). `error.message` names the reason.\n- `billing_entitlement_expired` — the paid subscription entitlement\n period has ended, or its dunning grace period has run out.\n\nNot retryable as-is: settle the balance, raise the cap, or restore the\nsubscription first. This response carries no `X-Quota-*` headers — they\ntravel with the 2xx responses of the operations that emit them.\n- `status`\n- `error`\n- `error.code`\n- `error.message`\n- `error.http_status`\n- `error.failed_at`\n- `error.details`\n\n### 422 — Validation error. A `json` format entry whose `schema` the extractor cannot take is\nrefused with `schema_incompatible`, before anything is drawn.\n- `status`\n- `error`\n- `error.code`\n- `error.message`\n- `error.http_status`\n- `error.failed_at`\n- `error.details`\n\n### 429 — Rate limit (`rate_limited`) or concurrency limit (`concurrency_limit`) exceeded. Carries a `Retry-After` header — seconds derived from the same clock as `X-RateLimit-Reset` for the rate-limit variant, a fixed small back-off for the concurrency variant.\n- `status`\n- `error`\n- `error.code`\n- `error.message`\n- `error.http_status`\n- `error.failed_at`\n- `error.details`\n\n### 500 — Internal server error.\n- `status`\n- `error`\n- `error.code`\n- `error.message`\n- `error.http_status`\n- `error.failed_at`\n- `error.details`\n\n### 503 — The request carried a `json` format entry and JSON extraction is unavailable on this\ndeployment (`provider_unavailable`). It is refused before anything is drawn. A\nterminal upstream failure is never a `503`: it is a `200` result, described above.\n- `status`\n- `error`\n- `error.code`\n- `error.message`\n- `error.http_status`\n- `error.failed_at`\n- `error.details`"
170
+ "body": "# Scrape a URL\n\nFetches and processes a URL, returning content in one or more formats wrapped in a ScrapeEnvelope.\n\n**The response shape is decided by your request, not by how we route it.** In precedence order:\n\n1. `async: true` in the body, or `?async=true` in the query string (either one is enough; `false` in one never cancels `true` in the other) → **202** with a `ScrapeQueuedEnvelope` receipt, returned immediately. Poll `GET /v1/scrape/{id}` for the result.\n2. Otherwise, a request that needs a full page render — today that is any of `delay_ms > 0`, `solve_challenge: true`, or `outline` in `formats` — is **held open** until the render reaches a terminal state, then returns **200** with the content envelope (`success` or `failed`). If the render is still running when the hold window expires (28 seconds by default), the request returns the **202** receipt instead and the job continues in the background. A `solve_challenge` render can outlast the hold window, so expect the 202 receipt from such a request.\n3. Otherwise the request is served by the fast HTTP path and returns **200** with the content envelope, typically in under a second.\n\n**A failed fetch is a result, not a transport error.** An unreachable host, a refused connection, or a target whose bot protection defeats every proxy tier all come back on the same **200** as a `failed` envelope — never a 5xx. Narrow on the envelope's `status` before reading the body. A failure the fast path decides inline is recorded as a failed job, so its envelope normally carries that job's `id` and `GET /v1/scrape/{id}` returns the same envelope; if recording the failed job itself fails, the envelope still arrives on the same 200 with `id` set to `null` and there is nothing to poll. A failure a held render reaches carries that render's real `id`. Either way the request transfers no billable bytes and is charged nothing.\n\n**A target that rate-limits us is not ByteKit rate-limiting you.** The `failed` envelope's `error.code` is `target_rate_limited` when the target rate-limits the request. On the fast path that means our proxy attempts end on an HTTP 429 and no bot protection is identified on any attempt, even if the browser fallback then fails or reaches only an unidentified block page; the inline failure carries `error.retry_after_seconds` when the target sent a usable `Retry-After`. On a held render the browser's own answer decides: it observes a 429 on the page itself, or it fails outright after the proxy attempts ended on an HTTP 429. A bot-protection verdict on an earlier fetch attempt does not keep a held render `blocked` when the browser then observes the 429. A held render never carries `error.retry_after_seconds`. Retrying a `target_rate_limited` failure later is likely to work. A held render whose browser reaches an unidentified 403 or 503 page after a proxy 429 is `blocked`. A 429 that bot protection sends as a block stays `blocked` when it is the answer that decides the code: the fast path's proxy attempts, or the browser render on a held render. Your own per-key limit is a separate case: it answers HTTP 429 `rate_limited` with a `Retry-After` header (see the `429` response).\n\nSo a 202 means one of exactly two things: you asked for one with `async: true` or `?async=true`, or the hold window expired. `wait_for_selector` and `wait_until` are `ScreenshotRequest` options, not `ScrapeRequest` options — sending either to this endpoint returns `422 validation_error`, so neither can produce a 202 here.\n\n**POST** `/v1/scrape`\n\n## Parameters\n\n- `async` (query, boolean) — Query-string spelling of the body `async` field. `true` returns the 202 receipt immediately; any other value is ignored. Either spelling turns async on, and `false` in one never cancels `true` in the other.\n\n## Request Body\n\n- `url` (required)\n- `formats`\n- `formats.type`\n- `formats.schema`\n- `formats.model`\n- `formats.prompt`\n- `country`\n- `delay_ms`\n- `timeout_ms`\n- `async`\n- `webhook_url`\n- `events`\n- `markdown_mode`\n- `markdown_query`\n- `markdown_links`\n- `markdown_images`\n- `with_links_summary`\n- `with_images_summary`\n- `markdown_compact`\n- `markdown_filter_images`\n- `markdown_include_media`\n- `markdown_include_warnings`\n- `markdown_include_stats`\n- `token_budget`\n- `token_encoding`\n- `mobile`\n- `solve_challenge`\n- `remove_base64_images`\n- `include_tags`\n- `exclude_tags`\n- `cache_ttl`\n- `custom`\n- `clean_markdown`\n\n## Responses\n\n### 200 — Scrape reached a terminal state and the body is that terminal envelope: `success` carrying content, or `failed` carrying the error envelope. Returned by the fast HTTP path in one round trip, and by a browser-path request without `async: true` or `?async=true` once its render reaches a terminal state inside the hold window. A held render that ends in failure answers 200 with the same `failed` envelope `GET /v1/scrape/{id}` returns — narrow on `status` before reading the body. A definitive upstream outcome is a result, not a transport error: an unreachable host, a refused connection, or a target whose bot protection defeats every proxy tier all answer 200 with the `failed` envelope, never a 5xx. An inline failure is recorded as a failed job, so its envelope normally carries that job's `id` and polling it returns the same envelope; `id` is `null` only when recording the failed job itself failed. `error.http_status` is present only when a real upstream HTTP status is known.\n- `schema_version`\n- `status`\n- `id`\n- `url`\n- `final_url`\n- `content_type`\n- `content_length`\n- `status_code`\n- `retrieved_at`\n- `formats`\n- `formats.raw`\n- `formats.markdown`\n- `formats.links`\n- `formats.links.url`\n- `formats.links.text`\n- `formats.links.isInternal`\n- `formats.links.rel`\n- `formats.images`\n- `formats.images.url`\n- `formats.images.alt`\n- `formats.images.width`\n- `formats.images.height`\n- `formats.images.format`\n- `formats.images.score`\n- `formats.json`\n- `formats.json.data`\n- `formats.json.validated`\n- `formats.json.model`\n- `formats.outline`\n- `metadata`\n- `metadata.title`\n- `metadata.description`\n- `metadata.language`\n- `metadata.canonicalUrl`\n- `metadata.ogTitle`\n- `metadata.ogDescription`\n- `metadata.ogImage`\n- `metadata.ogUrl`\n- `metadata.ogSiteName`\n- `metadata.robots`\n- `metadata.byline`\n- `metadata.publishedAt`\n- `tables`\n- `tables.kind`\n- `tables.gfm`\n- `tables.rows`\n- `tables.cols`\n- `warnings`\n- `warnings.code`\n- `warnings.message`\n- `warnings.element`\n- `stats`\n- `stats.chars`\n- `stats.tokens`\n- `stats.blocks`\n- `markdown_tokens`\n- `markdown_tokens.kept`\n- `markdown_tokens.total`\n- `markdown_tokens.truncated`\n- `billing`\n- `billing.raw_bytes`\n- `billing.factors`\n- `billing.factors.name`\n- `billing.factors.value`\n- `billing.factors.reason`\n- `billing.multiplier`\n- `billing.billed_bytes`\n- `custom`\n- `cache`\n- `cache_age_s`\n- `error`\n- `error.code`\n- `error.message`\n- `error.http_status`\n- `error.retry_after_seconds`\n- `error.failed_at`\n\n### 202 — Scrape accepted for background processing; the body is a receipt, not content. Returned when `async: true` or `?async=true` was requested, or when a browser-path request's hold window expired before the render finished. Poll `GET /v1/scrape/{id}` for the result.\n- `schema_version`\n- `status`\n- `id`\n- `url`\n- `status_url`\n- `queued_at`\n- `events`\n\n### 400 — Bad request. When the `url` field fails strict validation the error\ncode is `invalid_url` and the `details` object contains:\n- `field` — the request field that failed (e.g. `\"url\"`)\n- `url` — the rejected value\n- `reason` — one of: `scheme_missing`, `scheme_unsupported`,\n `scheme_separator_typo`, `host_empty`, `host_invalid`,\n `host_blocked_private`, `host_blocked_loopback`, `host_too_long`,\n `host_unicode_not_punycode`, `userinfo_present`, `url_too_long`,\n `control_chars`, `not_a_url`\n- `status`\n- `error`\n- `error.code`\n- `error.message`\n- `error.http_status`\n- `error.failed_at`\n- `error.details`\n\n### 401 — Unauthorized. The request carried no valid credential, and no work was\nperformed. The unified `Error` envelope carries one of the codes below\nin `error.code`; match on the code, never on the prose.\n\n- `invalid_api_key` — a bearer API key was presented and rejected:\n unknown, revoked, expired or malformed. The bearer-only operations\n (`/v1/webhook-deliveries*` among them) also return it when no\n `Authorization` header is sent. `GET /v1/account` is the exception\n to \"malformed\": it returns `invalid_api_key` only for a key that\n starts `sk_test_` or `sk_live_` and is unknown, revoked or expired.\n- `unauthorized` — the `Authorization` header is absent or malformed on\n an operation that also accepts a dashboard session (the dual-auth and\n billing operations). `GET /v1/account` also returns it, for no\n `Authorization` header and for any bearer value that does not start\n `sk_test_` or `sk_live_` (that value is checked as a dashboard\n session token).\n\nNot retryable as-is: supply a valid API key first.\n- `status`\n- `error`\n- `error.code`\n- `error.message`\n- `error.http_status`\n- `error.failed_at`\n- `error.details`\n\n### 402 — Payment required. The account cannot fund this request, and no work was\nperformed. The unified `Error` envelope carries one of the billing codes\nbelow in `error.code`; match on the code, never on the prose.\n\n- `quota_exceeded` — the enforced balance for this request's meter\n cannot fund it. Capture endpoints (`/v1/scrape`, `/v1/fetch`,\n `/v1/screenshots`, `/v1/sitemap` and the bulk siblings) meter\n bandwidth: they reject when the balance cannot fund the request's\n byte reservation, and `error.details.required_bytes` and\n `error.details.available_bytes` report the bytes the request reserves\n and the bytes available. `/v1/search` meters credits.\n- `spending_cap_reached` — the request would push overage spend past the\n account's configured cap. Only reachable on a custom overage-enabled\n plan; standard plans stop at `quota_exceeded`.\n- `billing_entitlement_impaired` — the paid subscription is in a payment\n impairment (e.g. `past_due`). `error.message` names the reason.\n- `billing_entitlement_expired` — the paid subscription entitlement\n period has ended, or its dunning grace period has run out.\n\nNot retryable as-is: settle the balance, raise the cap, or restore the\nsubscription first. This response carries no `X-Quota-*` headers — they\ntravel with the 2xx responses of the operations that emit them.\n- `status`\n- `error`\n- `error.code`\n- `error.message`\n- `error.http_status`\n- `error.failed_at`\n- `error.details`\n\n### 415 — `unsupported_content_type`, in two cases:\n- The `url` path ends in `.pdf`: the path, lowercased, ends in `.pdf`; the query string and\n fragment are not looked at. It is refused before anything is drawn. A PDF served from\n another path, or reached through a redirect, is not caught by this check.\n- The page was fetched (or served from cache) and its content type cannot produce the\n requested formats. The charge is refunded.\n- `status`\n- `error`\n- `error.code`\n- `error.message`\n- `error.http_status`\n- `error.failed_at`\n- `error.details`\n\n### 422 — Validation error. A `json` format entry whose `schema` the extractor cannot take is\nrefused with `schema_incompatible`, before anything is drawn.\n- `status`\n- `error`\n- `error.code`\n- `error.message`\n- `error.http_status`\n- `error.failed_at`\n- `error.details`\n\n### 429 — Rate limit (`rate_limited`) or concurrency limit (`concurrency_limit`) exceeded. Carries a `Retry-After` header — seconds derived from the same clock as `X-RateLimit-Reset` for the rate-limit variant, a fixed small back-off for the concurrency variant.\n- `status`\n- `error`\n- `error.code`\n- `error.message`\n- `error.http_status`\n- `error.failed_at`\n- `error.details`\n\n### 500 — Internal server error.\n- `status`\n- `error`\n- `error.code`\n- `error.message`\n- `error.http_status`\n- `error.failed_at`\n- `error.details`\n\n### 503 — The request carried a `json` format entry and JSON extraction is unavailable on this\ndeployment (`provider_unavailable`). It is refused before anything is drawn. A\nterminal upstream failure is never a `503`: it is a `200` result, described above.\n- `status`\n- `error`\n- `error.code`\n- `error.message`\n- `error.http_status`\n- `error.failed_at`\n- `error.details`"
166
171
  },
167
172
  "api/scrape/getscrape": {
168
173
  "title": "Get scrape result",
@@ -307,7 +312,7 @@
307
312
  "cli/screenshots": {
308
313
  "title": "Screenshots",
309
314
  "section": "CLI Reference",
310
- "body": "# Screenshots\n\nScreenshot operations\n\nScreenshot operations\n\n### screenshots › create\n\nCapture a screenshot\n\n| Option | Description |\n| --- | --- |\n| `--url <url>` | URL to screenshot |\n| `--full-page` | Capture the full page (default: viewport only) |\n| `--device <device>` | Device profile: desktop, mobile |\n| `--viewport <WxH>` | Viewport size WIDTHxHEIGHT (e.g. 1280x720) |\n| `--format <format>` | Image format: jpeg, png |\n| `--quality <n>` | JPEG quality (1-100) |\n| `--wait-until <event>` | Wait condition: load, domcontentloaded, networkidle |\n| `--clip <x,y,w,h>` | Clip region X,Y,WIDTH,HEIGHT (e.g. 0,0,800,600) |\n| `--block-ads` | Block ads before capture (server default) |\n| `--no-block-ads` | Do not block ads |\n| `--block-cookie-banners` | Block cookie-consent banners before capture (server default) |\n| `--no-block-cookie-banners` | Do not block cookie-consent banners |\n| `--scroll` | Scroll the page before capture to trigger lazy content (server default) |\n| `--no-scroll` | Do not scroll the page before capture |\n| `--wait-for-selector <sel>` | Wait until this CSS selector is present before capture |\n| `--delay-ms <n>` | Post-load delay in milliseconds before capture |\n| `--dark-mode` | Emulate prefers-color-scheme: dark |\n| `--device-scale-factor <n>` | Device pixel ratio: 1, 2 |\n| `--include-html` | Include the rendered HTML alongside the screenshot |\n| `--country <cc>` | Two-letter country code to route the request through (e.g. us, de) |\n| `--language <lang>` | Accept-Language override (e.g. en-US) |\n| `--metadata <json>` | Arbitrary metadata echoed on the screenshot envelope, as a JSON object, e.g. '\\{\"run\":\"7\"\\}' (omitted → none) |\n| `--async` | Queue the screenshot and return a job envelope immediately (no wait) |\n| `-o, --output <file>` | Download the captured image to this file path (use - for stdout). Not valid with --json. |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit screenshots create --url <url> --full-page --device <device> --viewport <WxH> --format <format> --quality <n> --wait-until <event> --clip <x,y,w,h> --block-ads --no-block-ads --block-cookie-banners --no-block-cookie-banners --scroll --no-scroll --wait-for-selector <sel> --delay-ms <n> --dark-mode --device-scale-factor <n> --include-html --country <cc> --language <lang> --metadata <json> --async\n```\n\n### screenshots › get\n\nGet a screenshot by ID\n\n| Option | Description |\n| --- | --- |\n| `-o, --output <file>` | Download the captured image to this file path (use - for stdout). Not valid with --json. |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit screenshots get <id>\n```"
315
+ "body": "# Screenshots\n\nScreenshot operations\n\nScreenshot operations\n\n### screenshots › create\n\nCapture a screenshot\n\n| Option | Description |\n| --- | --- |\n| `--url <url>` | URL to screenshot |\n| `--full-page` | Capture the full page (default: viewport only) |\n| `--device <device>` | Device profile: desktop, mobile |\n| `--viewport <WxH>` | Viewport size WIDTHxHEIGHT (e.g. 1280x720) |\n| `--format <format>` | Image format: jpeg, png |\n| `--quality <n>` | JPEG quality (1-100) |\n| `--wait-until <event>` | Wait condition: load, domcontentloaded, networkidle |\n| `--clip <x,y,w,h>` | Clip region X,Y,WIDTH,HEIGHT (e.g. 0,0,800,600) |\n| `--block-ads` | Block ads before capture (server default) |\n| `--no-block-ads` | Do not block ads |\n| `--block-cookie-banners` | Block cookie-consent banners before capture (server default) |\n| `--no-block-cookie-banners` | Do not block cookie-consent banners |\n| `--scroll` | Scroll the page before capture to trigger lazy content (server default) |\n| `--no-scroll` | Do not scroll the page before capture |\n| `--wait-for-selector <sel>` | Wait until this CSS selector is present before capture |\n| `--delay-ms <n>` | Post-load delay in milliseconds before capture |\n| `--dark-mode` | Emulate prefers-color-scheme: dark |\n| `--device-scale-factor <n>` | Device pixel ratio: 1 |\n| `--include-html` | Include the rendered HTML alongside the screenshot |\n| `--country <cc>` | Two-letter country code to route the request through (e.g. us, de) |\n| `--language <lang>` | Accept-Language override (e.g. en-US) |\n| `--metadata <json>` | Arbitrary metadata echoed on the screenshot envelope, as a JSON object, e.g. '\\{\"run\":\"7\"\\}' (omitted → none) |\n| `--async` | Queue the screenshot and return a job envelope immediately (no wait) |\n| `-o, --output <file>` | Download the captured image to this file path (use - for stdout). Not valid with --json. |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit screenshots create --url <url> --full-page --device <device> --viewport <WxH> --format <format> --quality <n> --wait-until <event> --clip <x,y,w,h> --block-ads --no-block-ads --block-cookie-banners --no-block-cookie-banners --scroll --no-scroll --wait-for-selector <sel> --delay-ms <n> --dark-mode --device-scale-factor <n> --include-html --country <cc> --language <lang> --metadata <json> --async\n```\n\n### screenshots › get\n\nGet a screenshot by ID\n\n| Option | Description |\n| --- | --- |\n| `-o, --output <file>` | Download the captured image to this file path (use - for stdout). Not valid with --json. |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit screenshots get <id>\n```"
311
316
  },
312
317
  "cli/search": {
313
318
  "title": "Search",
@@ -342,7 +347,7 @@
342
347
  "guides/bulk": {
343
348
  "title": "Bulk",
344
349
  "section": "Guides",
345
- "body": "# Bulk\n\nSubmit many URLs in one request — which of the three bulk APIs to use, how results arrive, how to cancel a job, what it costs, and the limits.\n\nByteKit has three bulk APIs. Each takes a list of URLs in one request, answers `202` with a job id, and does the work in the background.\nYou get the results by webhook when the job completes, and you can also read them by polling. A job that is cancelled or failed sends no webhook, so poll it.\n\n## Which bulk API to use\n\n| You want | Use | Entries are |\n| ------------------------------------------------------- | ---------------------- | ------------------------------------------------------------ |\n| Screenshots, or screenshots and scrapes in one job | `POST /v1/bulk` | `urls`, or `items` that each choose `screenshot` or `scrape` |\n| Scrapes only, as `raw`, `markdown`, `links` or `images` | `POST /v1/scrape/bulk` | `urls`, or `items` with per-URL options |\n| The raw response from each URL | `POST /v1/fetch/bulk` | `urls`, as strings or small objects |\n\nThe three do not share one field set. For example, `clean_markdown` is accepted on `/v1/scrape/bulk` and\nrejected on `/v1/bulk` with a `422`, and `wait_until` is accepted on `/v1/bulk` and rejected on a\n`/v1/scrape/bulk` item with a `422`. The API Reference lists the fields of each:\n[Bulk](https://bytekit.com/docs/api/bulk/createbulk), [Scrape bulk](https://bytekit.com/docs/api/scrape-bulk/createscrapebulk) and\n[Fetch bulk](https://bytekit.com/docs/api/fetch-bulk/createfetchbulk).\n\n`/v1/fetch/bulk` does not render pages. A `cookies` or `headers` field in its body, in `defaults`, or in a `urls` object returns\n`400 validation_error` with the message `cookies is no longer accepted: caller-supplied cookies and headers were removed from the capture API. Every capture presents ByteKit's own identity to the target site.` (the message for `headers` is the same with `headers` in place of the leading `cookies`; for a `urls` object it starts with `Item 0: `, using the object's position). No bulk route accepts `cookies` or `headers`, so there is no other route to send them to. A `wait_for_selector`, `delay_ms` or `wait_until` field in the same three places returns `400 validation_error` with the message `Use /v1/bulk for browser-backed options.`, with the same `Item 0: ` prefix, because `/v1/bulk` accepts all three. Naming a scrape format such as `markdown` as `format` is also a `400`. For\nMarkdown, links or images from a batch, use `/v1/scrape/bulk`.\n\n## Submit a job\n\nAll three create routes require `webhook_url`, an `https://` URL. An `http://` URL is rejected with\n`400 invalid_url` and the reason `scheme_unsupported`. Set `webhook_secret` to have the deliveries signed;\nsee the [Webhooks guide](https://bytekit.com/docs/guides/webhooks) for verification.\n\n### Mixed screenshots and scrapes\n\n```bash\ncurl -i -X POST https://api.bytekit.com/v1/bulk \\\n -H \"Authorization: Bearer sk_live_YOUR_KEY_HERE\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"items\": [\n {\"url\": \"https://example.com/?page=bulk-guide-1\", \"type\": \"screenshot\"},\n {\"url\": \"https://example.com/?page=bulk-guide-1\", \"type\": \"scrape\", \"formats\": [\"markdown\"]}\n ],\n \"webhook_url\": \"https://hooks.example.com/bytekit\"\n }'\n```\n\n```json\n{\n \"id\": \"bulk_01a125a61d9777909cff22879e7d0165\",\n \"status\": \"processing\",\n \"total\": 2,\n \"completed\": 0,\n \"failed\": 0,\n \"total_credits_charged\": 0,\n \"total_billed_bytes\": null,\n \"estimated_credits\": 2.5,\n \"webhook_url\": \"https://hooks.example.com/bytekit\",\n \"created_at\": \"2026-10-10T11:50:05.984Z\",\n \"completed_at\": null\n}\n```\n\n> This request was run for real and returned `202`.\n\nKeep the `id`: it is how you read and cancel the job. `total_billed_bytes` is `null` here because nothing has completed yet.\n\n### Scrapes only\n\n```bash\ncurl -i -X POST https://api.bytekit.com/v1/scrape/bulk \\\n -H \"Authorization: Bearer sk_live_YOUR_KEY_HERE\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"urls\": [\"https://example.com/?page=bulk-guide-2\"],\n \"defaults\": {\"formats\": [\"markdown\"]},\n \"webhook_url\": \"https://hooks.example.com/bytekit\"\n }'\n```\n\n> This request was run for real and returned `202`, with the same job envelope as above.\n\n### Raw fetches\n\n```bash\ncurl -i -X POST https://api.bytekit.com/v1/fetch/bulk \\\n -H \"Authorization: Bearer sk_live_YOUR_KEY_HERE\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"urls\": [\"https://example.com/?page=bulk-guide-3\"],\n \"webhook_url\": \"https://hooks.example.com/bytekit\"\n }'\n```\n\n> This request was run for real and returned `202`, with the same job envelope as above.\n\n### `urls` or `items`\n\nOn `/v1/bulk` and `/v1/scrape/bulk`, send `urls` or `items`, not both. A request with both returns\n`422 validation_error` (`Provide either urls or items, not both.`), and a request with neither returns\n`422 validation_error` (`Either urls or items must be provided.`).\n\n- `urls` is a plain list of URLs. Each one takes the values in `defaults`.\n- `items` is a list of objects, each with a `url` and its own options. An option on an item wins over the\n same option in `defaults`.\n- On `/v1/bulk`, an entry that names no `type` is a screenshot unless `defaults.type` says `scrape`. A bare\n `urls` list on `/v1/bulk` therefore produces screenshots, and with `\"defaults\": {\"type\": \"scrape\"}` it\n produces scrapes. Both were run for real.\n- `/v1/fetch/bulk` has no `items`. It takes `urls`, as strings or as objects with `url`, `country` and\n `cache_ttl`, and a body with `items` and no `urls` returns `422 validation_error`.\n\n## Get the results\n\n### By webhook\n\nWhen the job reaches `completed`, ByteKit sends a `POST` to your `webhook_url` with the header `X-ByteKit-Event: bulk.completed`, so you can dispatch on the header without reading the body. A job that ends `cancelled` or `failed` gets no webhook, so poll it. The\n[Scraping guide](https://bytekit.com/docs/guides/scraping#webhook-event-header) lists the other event types.\n\nThe body is bounded: it carries at most 500 complete items and 1 MiB of JSON. These are its fields, from\nthe API Reference (this page shows no captured delivery):\n\n| Field | Meaning |\n| ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `bulk_id` | The job id |\n| `status` | `completed` |\n| `total`, `completed`, `failed` | Counts for the whole job |\n| `total_billed_bytes` | Bandwidth billed for the job, in bytes, or `null` when it cannot be reported in full |\n| `total_credits_charged` | Deprecated: read `total_billed_bytes` instead |\n| `webhook_url` | The `webhook_url` the job was created with |\n| `items` | Complete item records, up to 500. Each has an `id`, a `type` and a `status` (`success`, `completed`, `failed` or `cancelled`), and may carry `error_code` and `error_message` |\n| `recovery_api` | `fetch`, `scrape` or `mixed`: which API created the job |\n| `recovery_url` | The path to read the rest of the results from |\n| `manifest_item_count` | How many items this body carries |\n| `manifest_items_complete` | `true` when every item that reached a final status is in `items` |\n| `manifest_artifacts_complete` | `true` when every included completed item has a usable result reference |\n| `manifest_complete` | `true` when both of the above are `true` |\n| `recovery_required` | The inverse of `manifest_complete` |\n\nWhen `recovery_required` is `true`, the body does not hold the whole job. Read the rest from\n`recovery_url` with cursors: request it, then repeat the request with `?cursor=` set to the `next_cursor`\nyou were given, until `has_more` is `false`. `recovery_url` depends on the API that created the job:\n\n| Created with | `recovery_url` |\n| ---------------------- | --------------------------- |\n| `POST /v1/bulk` | `/v1/bulk/{id}/screenshots` |\n| `POST /v1/scrape/bulk` | `/v1/scrape/bulk/{id}` |\n| `POST /v1/fetch/bulk` | `/v1/fetch/bulk/{id}` |\n\nA delivery can arrive more than once or late. Use `bulk_id` together with each item `id` to process an item\nonce.\n\n### By polling\n\nEach API has `GET` routes for its own jobs. The job routes (`GET /v1/bulk/{id}`,\n`GET /v1/scrape/bulk/{id}` and `GET /v1/fetch/bulk/{id}`) answer `202` while the job is `processing` and `200` once it is `completed`, `failed` or `cancelled`. `GET /v1/bulk/{id}/screenshots` answers `200` whatever the job's status; an item that\nhas not completed shows `null` in `billing`.\n\n| Created with | Job status | Items |\n| ---------------------- | -------------------------- | --------------------------------------------------------- |\n| `POST /v1/bulk` | `GET /v1/bulk/{id}` | `GET /v1/bulk/{id}/screenshots`, whatever the item `type` |\n| `POST /v1/scrape/bulk` | `GET /v1/scrape/bulk/{id}` | the same response, in `items` |\n| `POST /v1/fetch/bulk` | `GET /v1/fetch/bulk/{id}` | the same response, in `items` |\n\n`GET /v1/bulk/{id}/screenshots` lists the items of a mixed job and is not limited to screenshots; each item\nhas a `type` of `screenshot` or `scrape`. Unless the job is cancelled, its `status` is `processing` until every item has completed or failed, and `completed` after. A `completed` job can have a non-zero `failed`; read `failed` to tell. The other values are `failed` and `cancelled`.\n\n```bash\ncurl -i https://api.bytekit.com/v1/bulk/bulk_01a125a61d9777909cff22879e7d0165 \\\n -H \"Authorization: Bearer sk_live_YOUR_KEY_HERE\"\n```\n\n```json\n{\n \"id\": \"bulk_01a125a61d9777909cff22879e7d0165\",\n \"status\": \"completed\",\n \"total\": 2,\n \"completed\": 2,\n \"failed\": 0,\n \"total_credits_charged\": 0,\n \"total_billed_bytes\": 1002,\n \"estimated_credits\": null,\n \"webhook_url\": \"https://hooks.example.com/bytekit\",\n \"created_at\": \"2026-10-10T11:50:05.951Z\",\n \"completed_at\": \"2026-10-10T11:50:16.313Z\"\n}\n```\n\n> This request was run for real and returned `200`. Called while the job was still running, it returned `202`.\n\nThe items of that job:\n\n```bash\ncurl -i https://api.bytekit.com/v1/bulk/bulk_01a125a61d9777909cff22879e7d0165/screenshots \\\n -H \"Authorization: Bearer sk_live_YOUR_KEY_HERE\"\n```\n\n```json\n{\n \"bulk_id\": \"bulk_01a125a61d9777909cff22879e7d0165\",\n \"items\": [\n {\n \"type\": \"screenshot\",\n \"id\": \"ss_01a125a61d9d744299721fb4b915b626\",\n \"status\": \"completed\",\n \"url\": \"https://example.com/?page=bulk-guide-1\",\n \"image_url\": \"https://…\",\n \"billing\": { \"raw_bytes\": 334, \"multiplier\": 1.5, \"billed_bytes\": 501 },\n \"error_code\": null\n },\n {\n \"type\": \"scrape\",\n \"id\": \"sc_01a125a61d9973569644148e9697b8ba\",\n \"status\": \"completed\",\n \"url\": \"https://example.com/?page=bulk-guide-1\",\n \"content_url\": \"https://…\",\n \"markdown_url\": \"https://…\",\n \"billing\": { \"raw_bytes\": 334, \"multiplier\": 1.5, \"billed_bytes\": 501 },\n \"error_code\": null\n }\n ],\n \"total\": 2,\n \"next_cursor\": null,\n \"has_more\": false,\n \"job_counters\": { \"total\": 2, \"completed\": 2, \"failed\": 0 }\n}\n```\n\n> This request was run for real and returned `200`. Links are shortened, and other fields, such as\n> `page_title`, `artifacts` and `created_at`, are left out.\n\nThe item routes take `limit`, `cursor` and `status` (`pending`, `processing`, `completed`, `failed` or\n`cancelled`). `limit` runs from 1 to 500; its default is 100 on `/v1/bulk/{id}/screenshots` and 500 on the\nother two. Pass the `next_cursor` of one page as `cursor` of the next while `has_more` is `true`, and reuse\nthe same `status` filter for the whole walk.\n\nDownload links in the item lists are signed and expire. `content_url`, `markdown_url` and `image_url` on\n`/v1/bulk/{id}/screenshots` and `content_url` on `/v1/fetch/bulk/{id}` are valid for 600 seconds; read the\njob again for a fresh link. On `/v1/scrape/bulk/{id}`, a `raw` or `markdown` result up to 10 MiB is returned\ninline, and a larger one is replaced by a signed link valid for 24 hours.\n\nRead a job through the routes of the API that created it. Another API's routes can answer `200` with\nsomething else: in a run for real, `GET /v1/fetch/bulk/{id}` on a `POST /v1/bulk` job returned `200` with an\nempty `items` list.\n\n### Listing jobs\n\n`GET /v1/bulk` lists your bulk jobs, most recent first, whichever API created them. It takes `status`\n(`processing`, `completed`, `failed` or `cancelled`), `limit` (1 to 100, default 25) and `cursor`. Follow\n`next_cursor` while `has_more` is `true`. Each entry is the job envelope without `items`.\n\n```bash\ncurl -i \"https://api.bytekit.com/v1/bulk?limit=2\" \\\n -H \"Authorization: Bearer sk_live_YOUR_KEY_HERE\"\n```\n\n> This request was run for real and returned `200` with `data`, `next_cursor` and `has_more`.\n\n## Cancel a job\n\n`DELETE /v1/bulk/{id}` cancels a job that is still running. It takes the id from any of the three create\nroutes. `/v1/scrape/bulk/{id}` and `/v1/fetch/bulk/{id}` have no `DELETE`; they answer `404`.\n\nCancelling drains the items that are still waiting to start and refunds the quota held for exactly those.\nItems that already completed or are in progress are not refunded by the cancel. A failed item adds nothing to `total_billed_bytes`, and on `GET /v1/bulk/{id}/screenshots` it shows `null` in `billing`. Repeating a `DELETE` is safe: on a job that is already `completed`, `failed` or `cancelled` it returns `200` with the job's current status. An id that does not exist, or that belongs to another account, returns `404 not_found`.\n\nByteKit can also cancel a job without a `DELETE`. When your balance has run out as the next waiting item is about to start, the waiting items are cancelled, their quota is refunded, and the job's `status` becomes `cancelled`. No webhook is sent for it, so poll the job.\n\n\n---\n[Truncated to the 16384-byte per-page limit — this page is 22315 bytes in full. The text cut here is not searchable either: search_docs matches only the part kept above. Read all of it at https://bytekit.com/docs/guides/bulk]"
350
+ "body": "# Bulk\n\nSubmit many URLs in one request — which of the three bulk APIs to use, how results arrive, how to cancel a job, what it costs, and the limits.\n\nByteKit has three bulk APIs. Each takes a list of URLs in one request, answers `202` with a job id, and does the work in the background.\nYou get the results by webhook when the job completes, and you can also read them by polling. A job that is cancelled or failed sends no webhook, so poll it.\n\n## Which bulk API to use\n\n| You want | Use | Entries are |\n| ------------------------------------------------------- | ---------------------- | ------------------------------------------------------------ |\n| Screenshots, or screenshots and scrapes in one job | `POST /v1/bulk` | `urls`, or `items` that each choose `screenshot` or `scrape` |\n| Scrapes only, as `raw`, `markdown`, `links` or `images` | `POST /v1/scrape/bulk` | `urls`, or `items` with per-URL options |\n| The raw response from each URL | `POST /v1/fetch/bulk` | `urls`, as strings or small objects |\n\nThe three do not share one field set. For example, `clean_markdown` is accepted on `/v1/scrape/bulk` and\nrejected on `/v1/bulk` with a `422`, and `wait_until` is accepted on `/v1/bulk` and rejected on a\n`/v1/scrape/bulk` item with a `422`. The API Reference lists the fields of each:\n[Bulk](https://bytekit.com/docs/api/bulk/createbulk), [Scrape bulk](https://bytekit.com/docs/api/scrape-bulk/createscrapebulk) and\n[Fetch bulk](https://bytekit.com/docs/api/fetch-bulk/createfetchbulk).\n\n`/v1/fetch/bulk` does not render pages. A `cookies` or `headers` field in its body, in `defaults`, or in a `urls` object returns\n`400 validation_error` with the message `cookies is no longer accepted: caller-supplied cookies and headers were removed from the capture API. Every capture presents ByteKit's own identity to the target site.` (the message for `headers` is the same with `headers` in place of the leading `cookies`; for a `urls` object it starts with `Item 0: `, using the object's position). No bulk route accepts `cookies` or `headers`, so there is no other route to send them to. A `wait_for_selector`, `delay_ms` or `wait_until` field in the same three places returns `400 validation_error` with the message `Use /v1/bulk for browser-backed options.`, with the same `Item 0: ` prefix, because `/v1/bulk` accepts all three. Naming a scrape format such as `markdown` as `format` is also a `400`. For\nMarkdown, links or images from a batch, use `/v1/scrape/bulk`.\n\n## Submit a job\n\nAll three create routes require `webhook_url`, an `https://` URL. An `http://` URL is rejected with\n`400 invalid_url` and the reason `scheme_unsupported`. Set `webhook_secret` to have the deliveries signed;\nsee the [Webhooks guide](https://bytekit.com/docs/guides/webhooks) for verification.\n\n### Mixed screenshots and scrapes\n\n```bash\ncurl -i -X POST https://api.bytekit.com/v1/bulk \\\n -H \"Authorization: Bearer sk_live_YOUR_KEY_HERE\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"items\": [\n {\"url\": \"https://example.com/?page=bulk-guide-1\", \"type\": \"screenshot\"},\n {\"url\": \"https://example.com/?page=bulk-guide-1\", \"type\": \"scrape\", \"formats\": [\"markdown\"]}\n ],\n \"webhook_url\": \"https://hooks.example.com/bytekit\"\n }'\n```\n\n```json\n{\n \"id\": \"bulk_01a125a61d9777909cff22879e7d0165\",\n \"status\": \"processing\",\n \"total\": 2,\n \"completed\": 0,\n \"failed\": 0,\n \"total_credits_charged\": 0,\n \"total_billed_bytes\": null,\n \"estimated_credits\": 2.5,\n \"webhook_url\": \"https://hooks.example.com/bytekit\",\n \"created_at\": \"2026-10-10T11:50:05.984Z\",\n \"completed_at\": null\n}\n```\n\n> This request was run for real and returned `202`.\n\nKeep the `id`: it is how you read and cancel the job. `total_billed_bytes` is `null` here because nothing has completed yet.\n\n### Scrapes only\n\n```bash\ncurl -i -X POST https://api.bytekit.com/v1/scrape/bulk \\\n -H \"Authorization: Bearer sk_live_YOUR_KEY_HERE\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"urls\": [\"https://example.com/?page=bulk-guide-2\"],\n \"defaults\": {\"formats\": [\"markdown\"]},\n \"webhook_url\": \"https://hooks.example.com/bytekit\"\n }'\n```\n\n> This request was run for real and returned `202`, with the same job envelope as above.\n\n### Raw fetches\n\n```bash\ncurl -i -X POST https://api.bytekit.com/v1/fetch/bulk \\\n -H \"Authorization: Bearer sk_live_YOUR_KEY_HERE\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"urls\": [\"https://example.com/?page=bulk-guide-3\"],\n \"webhook_url\": \"https://hooks.example.com/bytekit\"\n }'\n```\n\n> This request was run for real and returned `202`, with the same job envelope as above.\n\n### `urls` or `items`\n\nOn `/v1/bulk` and `/v1/scrape/bulk`, send `urls` or `items`, not both. A request with both returns\n`422 validation_error` (`Provide either urls or items, not both.`), and a request with neither returns\n`422 validation_error` (`Either urls or items must be provided.`).\n\n- `urls` is a plain list of URLs. Each one takes the values in `defaults`.\n- `items` is a list of objects, each with a `url` and its own options. An option on an item wins over the\n same option in `defaults`.\n- On `/v1/bulk`, an entry that names no `type` is a screenshot unless `defaults.type` says `scrape`. A bare\n `urls` list on `/v1/bulk` therefore produces screenshots, and with `\"defaults\": {\"type\": \"scrape\"}` it\n produces scrapes. Both were run for real.\n- `/v1/fetch/bulk` has no `items`. It takes `urls`, as strings or as objects with `url`, `country` and\n `cache_ttl`, and a body with `items` and no `urls` returns `422 validation_error`.\n\n## Get the results\n\n### By webhook\n\nWhen the job reaches `completed`, ByteKit sends a `POST` to your `webhook_url` with the header `X-ByteKit-Event: bulk.completed`, so you can dispatch on the header without reading the body. A job that ends `cancelled` or `failed` gets no webhook, so poll it. The\n[Scraping guide](https://bytekit.com/docs/guides/scraping#webhook-event-header) lists the other event types.\n\nThe body is bounded: it carries at most 500 complete items and 1 MiB of JSON. These are its fields, from\nthe API Reference (this page shows no captured delivery):\n\n| Field | Meaning |\n| ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `bulk_id` | The job id |\n| `status` | `completed` |\n| `total`, `completed`, `failed` | Counts for the whole job |\n| `total_billed_bytes` | Bandwidth billed for the job, in bytes, or `null` when it cannot be reported in full |\n| `total_credits_charged` | Deprecated: read `total_billed_bytes` instead |\n| `webhook_url` | The `webhook_url` the job was created with |\n| `items` | Complete item records, up to 500. Each has an `id`, a `type` and a `status` (`success`, `completed`, `failed` or `cancelled`), and may carry `error_code` and `error_message` |\n| `recovery_api` | `fetch`, `scrape` or `mixed`: which API created the job |\n| `recovery_url` | The path to read the rest of the results from |\n| `manifest_item_count` | How many items this body carries |\n| `manifest_items_complete` | `true` when every item that reached a final status is in `items` |\n| `manifest_artifacts_complete` | `true` when every included completed item has a usable result reference |\n| `manifest_complete` | `true` when both of the above are `true` |\n| `recovery_required` | The inverse of `manifest_complete` |\n\nWhen `recovery_required` is `true`, the body does not hold the whole job. Read the rest from\n`recovery_url` with cursors: request it, then repeat the request with `?cursor=` set to the `next_cursor`\nyou were given, until `has_more` is `false`. `recovery_url` depends on the API that created the job:\n\n| Created with | `recovery_url` |\n| ---------------------- | --------------------------- |\n| `POST /v1/bulk` | `/v1/bulk/{id}/screenshots` |\n| `POST /v1/scrape/bulk` | `/v1/scrape/bulk/{id}` |\n| `POST /v1/fetch/bulk` | `/v1/fetch/bulk/{id}` |\n\nA delivery can arrive more than once or late. Use `bulk_id` together with each item `id` to process an item\nonce.\n\n### By polling\n\nEach API has `GET` routes for its own jobs. The job routes (`GET /v1/bulk/{id}`,\n`GET /v1/scrape/bulk/{id}` and `GET /v1/fetch/bulk/{id}`) answer `202` while the job is `processing` and `200` once it is `completed`, `failed` or `cancelled`. `GET /v1/bulk/{id}/screenshots` answers `200` whatever the job's status; an item that\nhas not completed shows `null` in `billing`.\n\n| Created with | Job status | Items |\n| ---------------------- | -------------------------- | --------------------------------------------------------- |\n| `POST /v1/bulk` | `GET /v1/bulk/{id}` | `GET /v1/bulk/{id}/screenshots`, whatever the item `type` |\n| `POST /v1/scrape/bulk` | `GET /v1/scrape/bulk/{id}` | the same response, in `items` |\n| `POST /v1/fetch/bulk` | `GET /v1/fetch/bulk/{id}` | the same response, in `items` |\n\n`GET /v1/bulk/{id}/screenshots` lists the items of a mixed job and is not limited to screenshots; each item\nhas a `type` of `screenshot` or `scrape`. Unless the job is cancelled, its `status` is `processing` until every item has completed or failed, and `completed` after. A `completed` job can have a non-zero `failed`; read `failed` to tell. The other values are `failed` and `cancelled`.\n\n```bash\ncurl -i https://api.bytekit.com/v1/bulk/bulk_01a125a61d9777909cff22879e7d0165 \\\n -H \"Authorization: Bearer sk_live_YOUR_KEY_HERE\"\n```\n\n```json\n{\n \"id\": \"bulk_01a125a61d9777909cff22879e7d0165\",\n \"status\": \"completed\",\n \"total\": 2,\n \"completed\": 2,\n \"failed\": 0,\n \"total_credits_charged\": 0,\n \"total_billed_bytes\": 1002,\n \"estimated_credits\": null,\n \"webhook_url\": \"https://hooks.example.com/bytekit\",\n \"created_at\": \"2026-10-10T11:50:05.951Z\",\n \"completed_at\": \"2026-10-10T11:50:16.313Z\"\n}\n```\n\n> This request was run for real and returned `200`. Called while the job was still running, it returned `202`.\n\nThe items of that job:\n\n```bash\ncurl -i https://api.bytekit.com/v1/bulk/bulk_01a125a61d9777909cff22879e7d0165/screenshots \\\n -H \"Authorization: Bearer sk_live_YOUR_KEY_HERE\"\n```\n\n```json\n{\n \"bulk_id\": \"bulk_01a125a61d9777909cff22879e7d0165\",\n \"items\": [\n {\n \"type\": \"screenshot\",\n \"id\": \"ss_01a125a61d9d744299721fb4b915b626\",\n \"status\": \"completed\",\n \"url\": \"https://example.com/?page=bulk-guide-1\",\n \"image_url\": \"https://…\",\n \"billing\": { \"raw_bytes\": 334, \"multiplier\": 1.5, \"billed_bytes\": 501 },\n \"error_code\": null\n },\n {\n \"type\": \"scrape\",\n \"id\": \"sc_01a125a61d9973569644148e9697b8ba\",\n \"status\": \"completed\",\n \"url\": \"https://example.com/?page=bulk-guide-1\",\n \"content_url\": \"https://…\",\n \"markdown_url\": \"https://…\",\n \"billing\": { \"raw_bytes\": 334, \"multiplier\": 1.5, \"billed_bytes\": 501 },\n \"error_code\": null\n }\n ],\n \"total\": 2,\n \"next_cursor\": null,\n \"has_more\": false,\n \"job_counters\": { \"total\": 2, \"completed\": 2, \"failed\": 0 }\n}\n```\n\n> This request was run for real and returned `200`. Links are shortened, and other fields, such as\n> `page_title`, `artifacts` and `created_at`, are left out.\n\nThe item routes take `limit`, `cursor` and `status` (`pending`, `processing`, `completed`, `failed` or\n`cancelled`). `limit` runs from 1 to 500; its default is 100 on `/v1/bulk/{id}/screenshots` and 500 on the\nother two. Pass the `next_cursor` of one page as `cursor` of the next while `has_more` is `true`, and reuse\nthe same `status` filter for the whole walk.\n\nDownload links in the item lists are signed and expire. `content_url`, `markdown_url` and `image_url` on\n`/v1/bulk/{id}/screenshots` and `content_url` on `/v1/fetch/bulk/{id}` are valid for 600 seconds; read the\njob again for a fresh link. On `/v1/scrape/bulk/{id}`, a `raw` or `markdown` result up to 10 MiB is returned\ninline, and a larger one is replaced by a signed link valid for 24 hours.\n\nRead a job through the routes of the API that created it. Another API's routes can answer `200` with\nsomething else: in a run for real, `GET /v1/fetch/bulk/{id}` on a `POST /v1/bulk` job returned `200` with an\nempty `items` list.\n\n### Listing jobs\n\n`GET /v1/bulk` lists your bulk jobs, most recent first, whichever API created them. It takes `status`\n(`processing`, `completed`, `failed` or `cancelled`), `limit` (1 to 100, default 25) and `cursor`. Follow\n`next_cursor` while `has_more` is `true`. Each entry is the job envelope without `items`.\n\n```bash\ncurl -i \"https://api.bytekit.com/v1/bulk?limit=2\" \\\n -H \"Authorization: Bearer sk_live_YOUR_KEY_HERE\"\n```\n\n> This request was run for real and returned `200` with `data`, `next_cursor` and `has_more`.\n\n### Checking bulk concurrency\n\n`GET /v1/bulk/concurrency` returns `{ active, limit }`: how many of your account's bulk concurrency slots\nare in use, and your plan's maximum concurrency. Compare the two to see whether your jobs are held at the\ncap. `active` is `null` when the count cannot be read right now; it is not zero. A slot whose release never\narrived drops out of the count after 5 minutes.\n\n## Cancel a job\n\n`DELETE /v1/bulk/{id}` cancels a job that is still running. It takes the id from any of the three create\nroutes. `/v1/scrape/bulk/{id}` and `/v1/fetch/bulk/{id}` have no `DELETE`; they answer `404`.\n\nCancelling drains the items that are still waiting to start and refunds the quota held for exactly those.\nItems that already completed or are in progress are not refunded by the cancel. A failed item adds nothing to `total_billed_bytes`, and on `GET /v1/bulk/{id}/screenshots` it shows `null` in `billing`. Repeating a `DELETE` is safe: on a job that is already `completed`, `failed` or `cancelled` it retu\n\n---\n[Truncated to the 16384-byte per-page limit — this page is 22715 bytes in full. The text cut here is not searchable either: search_docs matches only the part kept above. Read all of it at https://bytekit.com/docs/guides/bulk]"
346
351
  },
347
352
  "guides/choosing-an-endpoint": {
348
353
  "title": "Choosing an endpoint",
@@ -382,7 +387,7 @@
382
387
  "guides/screenshots": {
383
388
  "title": "Screenshots",
384
389
  "section": "Guides",
385
- "body": "# Screenshots\n\nCapture a screenshot of any URL — a working request, the options that matter, the response, what it costs, and the errors to handle.\n\n`POST /v1/screenshots` loads a URL in a real browser and returns an image of the page. Send a\nURL and you get back a `jpeg` (the default) or `png`, plus the page title and the image\ndimensions. Everything else — device, viewport, how long to wait, what to hide — is optional.\n\n## Capture a screenshot\n\n```bash\ncurl -X POST https://api.bytekit.com/v1/screenshots \\\n -H \"Authorization: Bearer sk_live_YOUR_KEY_HERE\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"url\": \"https://example.com\"}'\n```\n\nBy default the call is **synchronous**: the request is held open for up to 28 seconds and\nreturns `200` with the finished screenshot. The response is JSON — `image_url` is a link to the\nimage, not the image bytes:\n\n```json\n{\n \"id\": \"ss_01a1210c210477f6838a6256629087e6\",\n \"status\": \"completed\",\n \"url\": \"https://example.com\",\n \"image_url\": \"https://<storage-host>/.../screenshot.jpeg?X-Amz-Signature=...\",\n \"page_title\": \"Example Domain\",\n \"image_width\": 1440,\n \"image_height\": 900,\n \"file_size_bytes\": 62635,\n \"credits_charged\": 1,\n \"billing\": {\n \"raw_bytes\": 334,\n \"factors\": [\n {\n \"name\": \"phase1_render\",\n \"value\": 1.5,\n \"reason\": \"phase 1 proxy fetch + render overhead\"\n }\n ],\n \"multiplier\": 1.5,\n \"billed_bytes\": 501\n },\n \"error_code\": null,\n \"error_message\": null,\n \"created_at\": \"2026-10-09T14:23:25.417Z\",\n \"completed_at\": \"2026-10-09T14:23:33.047Z\",\n \"expires_at\": \"2027-10-09T14:23:25.407Z\",\n \"poll_url\": \"https://api.bytekit.com/v1/screenshots/ss_01a1210c210477f6838a6256629087e6\"\n}\n```\n\n> This response was returned by a real request. Two values are edited for the page: the signed `image_url` is shortened, and `poll_url` shows the production\n> host.\n\n| Field | Description |\n| ----------------------------- | ----------------------------------------------------------------------------------------------------------------- |\n| `id` | Screenshot id, prefixed `ss_`. Use it with `GET /v1/screenshots/{id}` |\n| `status` | `pending`, `processing`, `completed`, or `failed` |\n| `image_url` | Signed link to the image. It stays valid for 10 minutes — fetch a fresh one by polling `GET /v1/screenshots/{id}` |\n| `page_title` | The page's `<title>` |\n| `image_width`, `image_height` | Image dimensions in pixels |\n| `file_size_bytes` | Size of the image file. Informational only — it is not what you are billed on (see [Cost](#cost)) |\n| `billing` | What the capture was billed: `raw_bytes`, the `factors` applied, the resulting `multiplier`, and `billed_bytes` |\n| `error_code`, `error_message` | Why a capture failed. `null` on success |\n| `expires_at` | When the stored image expires |\n| `poll_url` | Where to poll this screenshot |\n\nThe `200` response also carries `X-Screenshot-*` headers (the same id, status and timestamps as\nthe JSON) and `X-Quota-*` headers reporting your quota.\n\nIf the capture is still running when the 28 seconds are up, the call returns `202` with\n`status: \"processing\"` and the same `id`. The capture keeps running in the background — poll it\nas described in [Async captures](#async-captures).\n\n## Options\n\nSend any of these alongside `url`. All are optional and the defaults suit most pages. Unknown\nfields are rejected with `422 validation_error`.\n\n```bash\ncurl -X POST https://api.bytekit.com/v1/screenshots \\\n -H \"Authorization: Bearer sk_live_YOUR_KEY_HERE\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"url\": \"https://example.com\",\n \"format\": \"png\",\n \"viewport\": {\"width\": 1280, \"height\": 720},\n \"dark_mode\": true,\n \"wait_until\": \"networkidle\"\n }'\n```\n\n> This request was run for real and returned `200` with\n> `\"image_width\": 1280` and `\"image_height\": 720`.\n\n**Output**\n\n| Option | Default | Description |\n| --------------------- | ------- | -------------------------------------------------------------------------------------------------------------------- |\n| `format` | `jpeg` | Image format: `jpeg` or `png` |\n| `quality` | `80` | Image quality, an integer from `1` to `100` |\n| `full_page` | `false` | Capture the whole scrollable page instead of only the viewport |\n| `clip` | `null` | Capture only a region: `{\"x\": 0, \"y\": 0, \"width\": 800, \"height\": 600}` in pixels (`width` and `height` at least `1`) |\n| `device_scale_factor` | `null` | Pixel density: `1` or `2` (`2` for a retina-sharp image) |\n\n**Device**\n\n| Option | Default | Description |\n| ----------- | --------- | --------------------------------------------------------------------------------------------- |\n| `device` | `desktop` | `desktop` or `mobile` |\n| `viewport` | `null` | Browser window size, `{\"width\": 1280, \"height\": 720}` in pixels. Overrides the device default |\n| `dark_mode` | `false` | Render the page with a dark colour scheme preference |\n\n**Page readiness**\n\n| Option | Default | Description |\n| ------------------- | ------- | ------------------------------------------------------------------------------ |\n| `wait_until` | `load` | Navigation event to wait for: `load`, `domcontentloaded`, or `networkidle` |\n| `wait_for_selector` | `null` | CSS selector that must be visible before the capture is taken |\n| `delay_ms` | `0` | Extra wait after the page is ready, in milliseconds (`0` to `10000`) |\n| `scroll` | `true` | Scroll the page to the bottom before capturing, so lazy-loaded content appears |\n\n`wait_until` and `wait_for_selector` are Screenshot options. They are not `POST /v1/scrape`\noptions — sending either there returns `422`. See the [Scraping guide](https://bytekit.com/docs/guides/scraping).\n\n**Clean-up**\n\n| Option | Default | Description |\n| ---------------------- | ------- | --------------------------- |\n| `block_ads` | `true` | Block ads on the page |\n| `block_cookie_banners` | `true` | Hide cookie-consent banners |\n\n**Geo and language**\n\n| Option | Default | Description |\n| ---------- | ------- | ---------------------------------------------------------------------------------- |\n| `country` | `US` | Two-letter, upper-case country code the page is requested from |\n| `language` | `null` | Browser language, for example `de-DE`. When `null`, the language follows `country` |\n\n**Other**\n\n| Option | Default | Description |\n| -------------- | ------- | ----------------------------------------------------------------------------------------------------------- |\n| `include_html` | `false` | Also capture the page's rendered HTML alongside the image. The HTML is not returned in the response |\n| `metadata` | `{}` | Your own key-value pairs to attach to the capture. At most 4096 bytes as JSON; keys must not start with `_` |\n\n`cookies` and `headers` are not request options on any capture endpoint. Sending either returns\n`400 validation_error`.\n\n## Async captures\n\nFor pages that take a while, add `?async=true` to the URL, or send `\"async\": true` in the request\nbody. Either one is enough, and `false` in one never cancels `true` in the other. The call returns\n`202` immediately with an `ss_` id and `status: \"pending\"`, and the capture runs in the background.\n`POST /v1/scrape` accepts the same two spellings.\n\n```bash\n# Start an async capture\ncurl -X POST \"https://api.bytekit.com/v1/screenshots?async=true\" \\\n -H \"Authorization: Bearer sk_live_YOUR_KEY_HERE\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"url\": \"https://example.com\"}'\n\n# Poll for the result\ncurl https://api.bytekit.com/v1/screenshots/ss_... \\\n -H \"Authorization: Bearer sk_live_YOUR_KEY_HERE\"\n```\n\nThe first call returns:\n\n```json\n{\n \"id\": \"ss_01a1210d0e3a719589e9c3d70c4791d2\",\n \"status\": \"pending\",\n \"url\": \"https://example.com\",\n \"image_url\": null,\n \"page_title\": null,\n \"image_width\": null,\n \"image_height\": null,\n \"file_size_bytes\": null,\n \"credits_charged\": 1,\n \"error_code\": null,\n \"error_message\": null,\n \"created_at\": \"2026-10-09T14:24:26.172Z\",\n \"completed_at\": null,\n \"expires_at\": \"2027-10-09T14:24:26.149Z\",\n \"poll_url\": \"https://api.bytekit.com/v1/screenshots/ss_01a1210d0e3a719589e9c3d70c4791d2\"\n}\n```\n\n> This response was returned by a real request; `poll_url` shows the production host.\n\n`GET /v1/screenshots/{id}` answers by state:\n\n| State | Status | Body |\n| ------------------------------- | ------ | ---------------------------------------------------------------------- |\n| Still `pending` or `processing` | `202` | The screenshot resource; poll again |\n| `completed` | `200` | The full screenshot resource, with a fresh signed `image_url` |\n| `failed` | `200` | The [error envelope](https://bytekit.com/docs/guides/errors), with the failure in `error.code` |\n\nA failed capture is a successfully retrieved terminal state, so check `status` before reading\n`image_url`.\n\n## Cost\n\nScreenshots are billed on bandwidth, not credits. A capture is billed on the bytes of the\ninitial page fetch, multiplied by 1.5 — the extra 0.5 covers rendering the page. The size of the\nimage file is not the basis. If that initial fetch is skipped or fails, the capture bills nothing.\n\nIn the example above, the page fetch transferred 334 bytes (`raw_bytes`), so the capture was\nbilled 501 bytes (`billed_bytes`). The `billing` object is the authoritative breakdown; its\n`factors[].reason` text is descriptive and may change, so read `value` and `multiplier` rather\nthan parsing it. The same figures arrive in the `X-Raw-Bytes`, `X-Billing-Multiplier`, and\n`X-Billable-Bytes` response headers.\n\nThe `credits_charged` field and the `X-Screenshot-Credits-Charged` header carry a legacy weight\n(`1`, `2` or `4`, doubling for `full_page` and again for retina or mobile). It is recorded for\nreporting only and is not what you are billed. For how capture bandwidth is billed,\nsee [Bandwidth billing](https://bytekit.com/docs/billing/bandwidth).\n\n## Errors\n\nErrors use the unified envelope described in the [Errors guide](https://bytekit.com/docs/guides/errors). These are the\nones you are most likely to meet on this endpoint:\n\n| Status | Code | When | Retry? |\n| ------ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------ |\n| `400` | `invalid_url` | `url` is not a valid HTTP(S) URL. `error.details.reason` says why, for example `scheme_unsupported` | No — fix the URL |\n| `400` | `request_too_large` | The request body is over 512 KB | No — send a smaller body |\n| `401` | `unauthorized`, `invalid_api_key` | The API key is missing, malformed, or not valid | No — check your key |\n| `400` | `validation_error` | The request carries a removed field such as `cookies` or `headers` | No — remove the field |\n| `402` | `quota_exceeded` | The balance cannot fund the capture. `error.details.required_bytes` and `available_bytes` give the numbers | No — add balance or upgrade |\n| `402` | `spending_cap_reached`, `billing_entitlement_impaired`, `billing_entitlement_expired` | The spending cap or the subscription state blocks the request — see the [Errors guide](https://bytekit.com/docs/guides/errors) | No — resolve the billing state first |\n| `403` | `host_forbidden`, `path_forbidden` | The URL's host or path is not allowed as a capture target | No — use a different URL |\n| `422` | `validation_error` | A field failed validation (`error.details` names the field), an unknown field was sent, or the body is not valid JSON (no `details`) | No — fix the request |\n| `422` | `blocked`, `timeout`, … | The capture ran and failed inside the 28-second hold. The body is the screenshot resource, with `error_code` and `error_message` set | Possibly — a retry is a new capture |\n| `429` | `rate_limited` | Too many requests per second | Yes — wait for the `Retry-After` header, then back off |\n| `429` | `concurrency_limit` | Too many captures in flight at once | Yes — wait for the `Retry-After` header |\n| `404` | `not_found` | `GET /v1/screenshots/{id}` for an id that does not exist on your account \n\n---\n[Truncated to the 16384-byte per-page limit — this page is 17580 bytes in full. The text cut here is not searchable either: search_docs matches only the part kept above. Read all of it at https://bytekit.com/docs/guides/screenshots]"
390
+ "body": "# Screenshots\n\nCapture a screenshot of any URL — a working request, the options that matter, the response, what it costs, and the errors to handle.\n\n`POST /v1/screenshots` loads a URL in a real browser and returns an image of the page. Send a\nURL and you get back a `jpeg` (the default) or `png`, plus the page title and the image\ndimensions. Everything else — device, viewport, how long to wait, what to hide — is optional.\n\n## Capture a screenshot\n\n```bash\ncurl -X POST https://api.bytekit.com/v1/screenshots \\\n -H \"Authorization: Bearer sk_live_YOUR_KEY_HERE\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"url\": \"https://example.com\"}'\n```\n\nBy default the call is **synchronous**: the request is held open for up to 28 seconds and\nreturns `200` with the finished screenshot. The response is JSON — `image_url` is a link to the\nimage, not the image bytes:\n\n```json\n{\n \"id\": \"ss_01a1210c210477f6838a6256629087e6\",\n \"status\": \"completed\",\n \"url\": \"https://example.com\",\n \"image_url\": \"https://<storage-host>/.../screenshot.jpeg?X-Amz-Signature=...\",\n \"page_title\": \"Example Domain\",\n \"image_width\": 1440,\n \"image_height\": 900,\n \"file_size_bytes\": 62635,\n \"credits_charged\": 1,\n \"billing\": {\n \"raw_bytes\": 334,\n \"factors\": [\n {\n \"name\": \"phase1_render\",\n \"value\": 1.5,\n \"reason\": \"phase 1 proxy fetch + render overhead\"\n }\n ],\n \"multiplier\": 1.5,\n \"billed_bytes\": 501\n },\n \"error_code\": null,\n \"error_message\": null,\n \"created_at\": \"2026-10-09T14:23:25.417Z\",\n \"completed_at\": \"2026-10-09T14:23:33.047Z\",\n \"expires_at\": \"2027-10-09T14:23:25.407Z\",\n \"poll_url\": \"https://api.bytekit.com/v1/screenshots/ss_01a1210c210477f6838a6256629087e6\"\n}\n```\n\n> This response was returned by a real request. Two values are edited for the page: the signed `image_url` is shortened, and `poll_url` shows the production\n> host.\n\n| Field | Description |\n| ----------------------------- | ----------------------------------------------------------------------------------------------------------------- |\n| `id` | Screenshot id, prefixed `ss_`. Use it with `GET /v1/screenshots/{id}` |\n| `status` | `pending`, `processing`, `completed`, or `failed` |\n| `image_url` | Signed link to the image. It stays valid for 10 minutes — fetch a fresh one by polling `GET /v1/screenshots/{id}` |\n| `page_title` | The page's `<title>` |\n| `image_width`, `image_height` | Image dimensions in pixels |\n| `file_size_bytes` | Size of the image file. Informational only — it is not what you are billed on (see [Cost](#cost)) |\n| `billing` | What the capture was billed: `raw_bytes`, the `factors` applied, the resulting `multiplier`, and `billed_bytes` |\n| `error_code`, `error_message` | Why a capture failed. `null` on success |\n| `expires_at` | When the stored image expires |\n| `poll_url` | Where to poll this screenshot |\n\nThe `200` response also carries `X-Screenshot-*` headers (the same id, status and timestamps as\nthe JSON) and `X-Quota-*` headers reporting your quota.\n\nIf the capture is still running when the 28 seconds are up, the call returns `202` with\n`status: \"processing\"` and the same `id`. The capture keeps running in the background — poll it\nas described in [Async captures](#async-captures).\n\n## Options\n\nSend any of these alongside `url`. All are optional and the defaults suit most pages. Unknown\nfields are rejected with `422 validation_error`.\n\n```bash\ncurl -X POST https://api.bytekit.com/v1/screenshots \\\n -H \"Authorization: Bearer sk_live_YOUR_KEY_HERE\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"url\": \"https://example.com\",\n \"format\": \"png\",\n \"viewport\": {\"width\": 1280, \"height\": 720},\n \"dark_mode\": true,\n \"wait_until\": \"networkidle\"\n }'\n```\n\n> This request was run for real and returned `200` with\n> `\"image_width\": 1280` and `\"image_height\": 720`.\n\n**Output**\n\n| Option | Default | Description |\n| --------------------- | ------- | -------------------------------------------------------------------------------------------------------------------- |\n| `format` | `jpeg` | Image format: `jpeg` or `png` |\n| `quality` | `80` | Image quality, an integer from `1` to `100` |\n| `full_page` | `false` | Capture the whole scrollable page instead of only the viewport |\n| `clip` | `null` | Capture only a region: `{\"x\": 0, \"y\": 0, \"width\": 800, \"height\": 600}` in pixels (`width` and `height` at least `1`) |\n| `device_scale_factor` | `null` | Pixel density: `1` or `null`; any other value is a 422 `validation_error` |\n\n**Device**\n\n| Option | Default | Description |\n| ----------- | --------- | --------------------------------------------------------------------------------------------- |\n| `device` | `desktop` | `desktop` or `mobile` |\n| `viewport` | `null` | Browser window size, `{\"width\": 1280, \"height\": 720}` in pixels. Overrides the device default |\n| `dark_mode` | `false` | Render the page with a dark colour scheme preference |\n\n**Page readiness**\n\n| Option | Default | Description |\n| ------------------- | ------- | ------------------------------------------------------------------------------ |\n| `wait_until` | `load` | Navigation event to wait for: `load`, `domcontentloaded`, or `networkidle` |\n| `wait_for_selector` | `null` | CSS selector that must be visible before the capture is taken |\n| `delay_ms` | `0` | Extra wait after the page is ready, in milliseconds (`0` to `10000`) |\n| `scroll` | `true` | Scroll the page to the bottom before capturing, so lazy-loaded content appears |\n\n`wait_until` and `wait_for_selector` are Screenshot options. They are not `POST /v1/scrape`\noptions — sending either there returns `422`. See the [Scraping guide](https://bytekit.com/docs/guides/scraping).\n\n**Clean-up**\n\n| Option | Default | Description |\n| ---------------------- | ------- | --------------------------- |\n| `block_ads` | `true` | Block ads on the page |\n| `block_cookie_banners` | `true` | Hide cookie-consent banners |\n\n**Geo and language**\n\n| Option | Default | Description |\n| ---------- | ------- | ---------------------------------------------------------------------------------- |\n| `country` | `US` | Two-letter, upper-case country code the page is requested from |\n| `language` | `null` | Browser language, for example `de-DE`. When `null`, the language follows `country` |\n\n**Other**\n\n| Option | Default | Description |\n| -------------- | ------- | ----------------------------------------------------------------------------------------------------------- |\n| `include_html` | `false` | Also capture the page's rendered HTML alongside the image. The HTML is not returned in the response |\n| `metadata` | `{}` | Your own key-value pairs to attach to the capture. At most 4096 bytes as JSON; keys must not start with `_` |\n\n`cookies` and `headers` are not request options on any capture endpoint. Sending either returns\n`400 validation_error`.\n\n## Async captures\n\nFor pages that take a while, add `?async=true` to the URL, or send `\"async\": true` in the request\nbody. Either one is enough, and `false` in one never cancels `true` in the other. The call returns\n`202` immediately with an `ss_` id and `status: \"pending\"`, and the capture runs in the background.\n`POST /v1/scrape` accepts the same two spellings.\n\n```bash\n# Start an async capture\ncurl -X POST \"https://api.bytekit.com/v1/screenshots?async=true\" \\\n -H \"Authorization: Bearer sk_live_YOUR_KEY_HERE\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"url\": \"https://example.com\"}'\n\n# Poll for the result\ncurl https://api.bytekit.com/v1/screenshots/ss_... \\\n -H \"Authorization: Bearer sk_live_YOUR_KEY_HERE\"\n```\n\nThe first call returns:\n\n```json\n{\n \"id\": \"ss_01a1210d0e3a719589e9c3d70c4791d2\",\n \"status\": \"pending\",\n \"url\": \"https://example.com\",\n \"image_url\": null,\n \"page_title\": null,\n \"image_width\": null,\n \"image_height\": null,\n \"file_size_bytes\": null,\n \"credits_charged\": 1,\n \"error_code\": null,\n \"error_message\": null,\n \"created_at\": \"2026-10-09T14:24:26.172Z\",\n \"completed_at\": null,\n \"expires_at\": \"2027-10-09T14:24:26.149Z\",\n \"poll_url\": \"https://api.bytekit.com/v1/screenshots/ss_01a1210d0e3a719589e9c3d70c4791d2\"\n}\n```\n\n> This response was returned by a real request; `poll_url` shows the production host.\n\n`GET /v1/screenshots/{id}` answers by state:\n\n| State | Status | Body |\n| ------------------------------- | ------ | ---------------------------------------------------------------------- |\n| Still `pending` or `processing` | `202` | The screenshot resource; poll again |\n| `completed` | `200` | The full screenshot resource, with a fresh signed `image_url` |\n| `failed` | `200` | The [error envelope](https://bytekit.com/docs/guides/errors), with the failure in `error.code` |\n\nA failed capture is a successfully retrieved terminal state, so check `status` before reading\n`image_url`.\n\n## Cost\n\nScreenshots are billed on bandwidth, not credits. A capture is billed on the bytes of the\ninitial page fetch, multiplied by 1.5 — the extra 0.5 covers rendering the page. The size of the\nimage file is not the basis. If that initial fetch is skipped or fails, the capture bills nothing.\n\nIn the example above, the page fetch transferred 334 bytes (`raw_bytes`), so the capture was\nbilled 501 bytes (`billed_bytes`). The `billing` object is the authoritative breakdown; its\n`factors[].reason` text is descriptive and may change, so read `value` and `multiplier` rather\nthan parsing it. The same figures arrive in the `X-Raw-Bytes`, `X-Billing-Multiplier`, and\n`X-Billable-Bytes` response headers.\n\nThe `credits_charged` field and the `X-Screenshot-Credits-Charged` header carry a legacy weight\n(`1`, `2` or `4`, doubling for `full_page` and again for mobile). It is recorded for\nreporting only and is not what you are billed. For how capture bandwidth is billed,\nsee [Bandwidth billing](https://bytekit.com/docs/billing/bandwidth).\n\n## Errors\n\nErrors use the unified envelope described in the [Errors guide](https://bytekit.com/docs/guides/errors). These are the\nones you are most likely to meet on this endpoint:\n\n| Status | Code | When | Retry? |\n| ------ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------ |\n| `400` | `invalid_url` | `url` is not a valid HTTP(S) URL. `error.details.reason` says why, for example `scheme_unsupported` | No — fix the URL |\n| `400` | `request_too_large` | The request body is over 512 KB | No — send a smaller body |\n| `401` | `unauthorized`, `invalid_api_key` | The API key is missing, malformed, or not valid | No — check your key |\n| `400` | `validation_error` | The request carries a removed field such as `cookies` or `headers` | No — remove the field |\n| `402` | `quota_exceeded` | The balance cannot fund the capture. `error.details.required_bytes` and `available_bytes` give the numbers | No — add balance or upgrade |\n| `402` | `spending_cap_reached`, `billing_entitlement_impaired`, `billing_entitlement_expired` | The spending cap or the subscription state blocks the request — see the [Errors guide](https://bytekit.com/docs/guides/errors) | No — resolve the billing state first |\n| `403` | `host_forbidden`, `path_forbidden` | The URL's host or path is not allowed as a capture target | No — use a different URL |\n| `422` | `validation_error` | A field failed validation (`error.details` names the field), an unknown field was sent, or the body is not valid JSON (no `details`) | No — fix the request |\n| `422` | `blocked`, `timeout`, … | The capture ran and failed inside the 28-second hold. The body is the screenshot resource, with `error_code` and `error_message` set | Possibly — a retry is a new capture |\n| `429` | `rate_limited` | Too many requests per second | Yes — wait for the `Retry-After` header, then back off |\n| `429` | `concurrency_limit` | Too many captures in flight at once | Yes — wait for the `Retry-After` header |\n| `404` | `not_found` | `GET /v1/screenshots/{id}` for an id that does not exist on your account \n\n---\n[Truncated to the 16384-byte per-page limit — this page is 17570 bytes in full. The text cut here is not searchable either: search_docs matches only the part kept above. Read all of it at https://bytekit.com/docs/guides/screenshots]"
386
391
  },
387
392
  "guides/search": {
388
393
  "title": "Search",
@@ -487,7 +492,7 @@
487
492
  "sdk/python/screenshots": {
488
493
  "title": "Screenshots",
489
494
  "section": "SDK Reference",
490
- "body": "# Screenshots\n\nFunctions for interacting with the `screenshots` API resource. Each operation ships in four forms — `sync` / `sync_detailed` and their `async` counterparts.\n\n## Create Screenshot\n\nCapture a screenshot\n\nSync by default (holds up to 28s). Pass `async: true` in the body or `?async=true` in the\nquery string to return 202 immediately; either one is enough, and `false` in one never\ncancels `true` in the other.\nPoll via GET /v1/screenshots/\\{id\\}.\n\n**Limits:** request bodies are capped at 512 KB. An oversized body\nreturns a `400` with error code `request_too_large`.\n\n**Parameters**\n\n- `async_ (bool | Unset)`\n- `body (ScreenshotRequest)`\n- `url` — `str`\n- `device` — `ScreenshotRequestDevice | Unset`\n- `viewport` — `None | Unset | Viewport`\n- `async_` — `bool | Unset` — When true, the request returns 202 immediately and the screenshot is captured in the background; poll `GET /v1/screenshots/\\{id\\}`. The `?async=true` query parameter is a second spelling of this field: the request is async when either one says true, and `false` in one never cancels `true` in the other.\n- `full_page` — `bool | Unset`\n- `format_` — `ScreenshotRequestFormat | Unset`\n- `quality` — `int | Unset`\n- `block_ads` — `bool | Unset`\n- `block_cookie_banners` — `bool | Unset`\n- `wait_until` — `ScreenshotRequestWaitUntil | Unset`\n- `wait_for_selector` — `None | str | Unset`\n- `delay_ms` — `int | Unset`\n- `scroll` — `bool | Unset`\n- `clip` — `Clip | None | Unset`\n- `dark_mode` — `bool | Unset`\n- `device_scale_factor` — `None | ScreenshotRequestDeviceScaleFactorType1 | ScreenshotRequestDeviceScaleFactorType2Type1 | ScreenshotRequestDeviceScaleFactorType3Type1 | Unset`\n- `include_html` — `bool | Unset`\n- `country` — `str | Unset`\n- `language` — `None | str | Unset`\n- `metadata` — `Metadata | Unset` — Arbitrary key-value metadata. Max 4096 bytes when JSON-serialized.\n\n**Call styles**\n\n```python\nsync_detailed(client=client, body=body, async_=async_) -> Response[Error | Error | ScreenshotResponse | ScreenshotResponse]\nsync(client=client, body=body, async_=async_) -> Error | Error | ScreenshotResponse | ScreenshotResponse | None\nawait asyncio_detailed(client=client, body=body, async_=async_) -> Response[Error | Error | ScreenshotResponse | ScreenshotResponse]\nawait asyncio(client=client, body=body, async_=async_) -> Error | Error | ScreenshotResponse | ScreenshotResponse | None\n```\n\n## Get Screenshot\n\nGet screenshot status\n\n**Parameters**\n\n- `id (str)`\n\n**Call styles**\n\n```python\nsync_detailed(id=id, client=client) -> Response[Error | Error | ScreenshotResponse | ScreenshotResponse]\nsync(id=id, client=client) -> Error | Error | ScreenshotResponse | ScreenshotResponse | None\nawait asyncio_detailed(id=id, client=client) -> Response[Error | Error | ScreenshotResponse | ScreenshotResponse]\nawait asyncio(id=id, client=client) -> Error | Error | ScreenshotResponse | ScreenshotResponse | None\n```"
495
+ "body": "# Screenshots\n\nFunctions for interacting with the `screenshots` API resource. Each operation ships in four forms — `sync` / `sync_detailed` and their `async` counterparts.\n\n## Create Screenshot\n\nCapture a screenshot\n\nSync by default (holds up to 28s). Pass `async: true` in the body or `?async=true` in the\nquery string to return 202 immediately; either one is enough, and `false` in one never\ncancels `true` in the other.\nPoll via GET /v1/screenshots/\\{id\\}.\n\n**Limits:** request bodies are capped at 512 KB. An oversized body\nreturns a `400` with error code `request_too_large`.\n\n**Parameters**\n\n- `async_ (bool | Unset)`\n- `body (ScreenshotRequest)`\n- `url` — `str`\n- `device` — `ScreenshotRequestDevice | Unset`\n- `viewport` — `None | Unset | Viewport`\n- `async_` — `bool | Unset` — When true, the request returns 202 immediately and the screenshot is captured in the background; poll `GET /v1/screenshots/\\{id\\}`. The `?async=true` query parameter is a second spelling of this field: the request is async when either one says true, and `false` in one never cancels `true` in the other.\n- `full_page` — `bool | Unset`\n- `format_` — `ScreenshotRequestFormat | Unset`\n- `quality` — `int | Unset`\n- `block_ads` — `bool | Unset`\n- `block_cookie_banners` — `bool | Unset`\n- `wait_until` — `ScreenshotRequestWaitUntil | Unset`\n- `wait_for_selector` — `None | str | Unset`\n- `delay_ms` — `int | Unset`\n- `scroll` — `bool | Unset`\n- `clip` — `Clip | None | Unset`\n- `dark_mode` — `bool | Unset`\n- `device_scale_factor` — `None | ScreenshotRequestDeviceScaleFactorType1 | ScreenshotRequestDeviceScaleFactorType2Type1 | ScreenshotRequestDeviceScaleFactorType3Type1 | Unset` — Pixel density. Only `1` is supported; any other value is a 422 `validation_error`.\n- `include_html` — `bool | Unset`\n- `country` — `str | Unset`\n- `language` — `None | str | Unset`\n- `metadata` — `Metadata | Unset` — Arbitrary key-value metadata. Max 4096 bytes when JSON-serialized.\n\n**Call styles**\n\n```python\nsync_detailed(client=client, body=body, async_=async_) -> Response[Error | Error | ScreenshotResponse | ScreenshotResponse]\nsync(client=client, body=body, async_=async_) -> Error | Error | ScreenshotResponse | ScreenshotResponse | None\nawait asyncio_detailed(client=client, body=body, async_=async_) -> Response[Error | Error | ScreenshotResponse | ScreenshotResponse]\nawait asyncio(client=client, body=body, async_=async_) -> Error | Error | ScreenshotResponse | ScreenshotResponse | None\n```\n\n## Get Screenshot\n\nGet screenshot status\n\n**Parameters**\n\n- `id (str)`\n\n**Call styles**\n\n```python\nsync_detailed(id=id, client=client) -> Response[Error | Error | ScreenshotResponse | ScreenshotResponse]\nsync(id=id, client=client) -> Error | Error | ScreenshotResponse | ScreenshotResponse | None\nawait asyncio_detailed(id=id, client=client) -> Response[Error | Error | ScreenshotResponse | ScreenshotResponse]\nawait asyncio(id=id, client=client) -> Error | Error | ScreenshotResponse | ScreenshotResponse | None\n```"
491
496
  },
492
497
  "sdk/python/search": {
493
498
  "title": "Search",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hunt-labs/bytekit-mcp",
3
- "version": "0.3.22",
3
+ "version": "0.3.23",
4
4
  "description": "ByteKit MCP server — exposes ByteKit web-data tools (scrape, screenshot, search, docs) to AI agents over the Model Context Protocol, hosted or as a local stdio server.",
5
5
  "license": "MIT",
6
6
  "type": "module",