@hunt-labs/bytekit-mcp 0.3.13 → 0.3.15
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 +35 -0
- package/dist/docs-bundle/docs-bundle.json +17 -17
- package/dist/docs-bundle/helpers.d.ts +16 -14
- package/dist/docs-bundle/helpers.js +23 -19
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,41 @@ today, see [README.md](./README.md), which remains the authoritative usage guide
|
|
|
10
10
|
|
|
11
11
|
## [Unreleased]
|
|
12
12
|
|
|
13
|
+
## [0.3.15] - 2026-09-30
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- The docs-bundle builder now reads the `llms.txt` index in its new `- [Title](url): description`
|
|
18
|
+
link shape and ignores URLs outside `/docs` (the new summary block's `api.bytekit.com` and
|
|
19
|
+
`app.bytekit.com`), so regenerating the bundled documentation snapshot after the docs
|
|
20
|
+
`llms.txt` reorder (#5007) still yields the same page set. No tool, schema or transport change.
|
|
21
|
+
|
|
22
|
+
### Changed
|
|
23
|
+
|
|
24
|
+
- The bundled documentation snapshot now carries the rewritten Introduction page, which states the
|
|
25
|
+
base URL, the `BYTEKIT_API_KEY` auth header, the install lines for both SDKs, one curl call and one
|
|
26
|
+
TypeScript SDK call, so an agent that reads only that page can integrate ByteKit (#5005). The
|
|
27
|
+
`get_doc` and `search_docs` tools serve the new text; no tool, schema or transport change.
|
|
28
|
+
- The bundled documentation snapshot now carries the SDK package names on the Client Libraries,
|
|
29
|
+
TypeScript SDK, Python SDK and Quickstart pages: install `@hunt-labs/bytekit-sdk` (npm) /
|
|
30
|
+
`bytekit-sdk` (PyPI), and the npm package named `bytekit` is not ByteKit's (#5004). The `get_doc`
|
|
31
|
+
and `search_docs` tools serve the new text; no tool, schema or transport change.
|
|
32
|
+
|
|
33
|
+
## [0.3.14] - 2026-09-29
|
|
34
|
+
|
|
35
|
+
### Changed
|
|
36
|
+
|
|
37
|
+
- Pinned `@modelcontextprotocol/sdk` to the exact version `1.31.0` instead of the range
|
|
38
|
+
`^1.12.1`, so an `npx @hunt-labs/bytekit-mcp` install and the hosted `/mcp` endpoint run one SDK
|
|
39
|
+
version instead of the `npx` install floating to whatever upstream last published (#4949). The
|
|
40
|
+
pin moves only when we release a deliberate bump. Earlier releases keep the caret range in their
|
|
41
|
+
published manifest. No tool, schema or transport change.
|
|
42
|
+
- Refreshed the bundled documentation snapshot after the top-ups page (`billing/top-ups`) gained a
|
|
43
|
+
section on bandwidth owed: an overage that no allowance, USD balance or starter grant can cover
|
|
44
|
+
is recorded as bandwidth you owe, a top-up, renewal or plan upgrade pays it off first, and new
|
|
45
|
+
billable requests are refused with `402 quota_exceeded` while any is owed (#4960). No behavior
|
|
46
|
+
change: bundled content only, no tool, schema or transport change.
|
|
47
|
+
|
|
13
48
|
## [0.3.13] - 2026-09-24
|
|
14
49
|
|
|
15
50
|
### Changed
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"api/bulk/createbulk": {
|
|
23
23
|
"title": "Create mixed bulk job",
|
|
24
24
|
"section": "API Reference",
|
|
25
|
-
"body": "# Create mixed bulk job\n\nEnqueues screenshots or scrapes in a single batch.\nProvide `urls` (simple list) or `items` (per-item config), not both.\nWebhook deliveries include `X-ByteKit-Event: bulk.completed` so\nreceivers can dispatch on the header without parsing the body shape.\nThe body follows `BulkCompletedWebhook`: at most 500 complete items and\n1 MiB, followed by cursor recovery through the existing mixed-item route\nwhenever `recovery_required` is true.\n\n**Limits:** request bodies are guarded in a two-tier shape. A streamed body\nwith no `Content-Length` header is capped at 4 MB before your API key\nis checked; a body that declares `Content-Length` is instead bounded\nthere by a 32 MB fail-safe (not the real limit — see below), since\nthat branch reads nothing until your key is verified. Once your key\nis verified, a second check re-gates the body against your account's\nown `max_bulk_size` (at this endpoint's richer per-item override\nbudget), which reaches 28.7 MB for the largest documented account. A\nstandard-plan account's effective ceiling is 4 MB; either tier's\noverrun returns a `400` with error code `request_too_large`.\n\n**POST** `/v1/bulk`\n\n## Request Body\n\n- `urls`\n- `items`\n- `defaults`\n- `webhook_url` (required)\n- `webhook_secret`\n- `metadata`\n\n## Responses\n\n### 202 — Bulk job accepted.\n- `id`\n- `status`\n- `total`\n- `completed`\n- `failed`\n- `created_at`\n- `completed_at`\n- `total_credits_charged`\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\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
|
|
25
|
+
"body": "# Create mixed bulk job\n\nEnqueues screenshots or scrapes in a single batch.\nProvide `urls` (simple list) or `items` (per-item config), not both.\nWebhook deliveries include `X-ByteKit-Event: bulk.completed` so\nreceivers can dispatch on the header without parsing the body shape.\nThe body follows `BulkCompletedWebhook`: at most 500 complete items and\n1 MiB, followed by cursor recovery through the existing mixed-item route\nwhenever `recovery_required` is true.\n\n**Limits:** request bodies are guarded in a two-tier shape. A streamed body\nwith no `Content-Length` header is capped at 4 MB before your API key\nis checked; a body that declares `Content-Length` is instead bounded\nthere by a 32 MB fail-safe (not the real limit — see below), since\nthat branch reads nothing until your key is verified. Once your key\nis verified, a second check re-gates the body against your account's\nown `max_bulk_size` (at this endpoint's richer per-item override\nbudget), which reaches 28.7 MB for the largest documented account. A\nstandard-plan account's effective ceiling is 4 MB; either tier's\noverrun returns a `400` with error code `request_too_large`.\n\n**POST** `/v1/bulk`\n\n## Request Body\n\n- `urls`\n- `items`\n- `defaults`\n- `webhook_url` (required)\n- `webhook_secret`\n- `metadata`\n\n## Responses\n\n### 202 — Bulk job accepted.\n- `id`\n- `status`\n- `total`\n- `completed`\n- `failed`\n- `created_at`\n- `completed_at`\n- `total_credits_charged`\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\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\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`). `validation_error` is\nreturned when the request body contains an unrecognized key\nanywhere in the top-level object, an `items[]` entry, or\n`defaults` — all three reject unknown keys with a 422\n`validation_error` whose `details` message names the offending\nkey, instead of silently discarding it. The two nested objects\ndo not accept the same field set: `device_scale_factor` is\n`defaults`-only (rejected per item), and `duration`/`scenario`\nare `items[]`-only (rejected under `defaults`). `metadata` is\nvalid both at the top level of the body and per item, but is\nrejected with this same 422 if placed under `defaults`.\n- `status`\n- `error`"
|
|
26
26
|
},
|
|
27
27
|
"api/bulk/deletebulk": {
|
|
28
28
|
"title": "Cancel a bulk job",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"api/fetch-bulk/createfetchbulk": {
|
|
58
58
|
"title": "Bulk fetch URLs",
|
|
59
59
|
"section": "API Reference",
|
|
60
|
-
"body": "# Bulk fetch URLs\n\nEnqueues multiple URLs for HTTP fetching. Results delivered via webhook.\nDoes not support options that require page rendering (wait_for_selector, etc.).\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/fetch/bulk/{id}` whenever\n`recovery_required` is true.\n\n**Limits:** request bodies are guarded in a two-tier shape. A streamed body\nwith no `Content-Length` header is capped at 2 MB before your API key\nis checked; a body that declares `Content-Length` is instead bounded\nthere by a 20 MB fail-safe (not the real limit — see below), since\nthat branch reads nothing until your key is verified. Once your key\nis verified, a second check re-gates the body against your account's\nown `max_bulk_size` (at this endpoint's per-item override budget),\nwhich reaches 16.8 MB for the largest documented account. A\nstandard-plan account's effective ceiling is 2 MB; either tier's\noverrun returns a `400` with error code `request_too_large`.\n\n**POST** `/v1/fetch/bulk`\n\n## Request Body\n\n- `urls` (required)\n- `defaults`\n- `webhook_url` (required)\n- `webhook_secret`\n- `metadata`\n\n## Responses\n\n### 202 — Fetch bulk job accepted.\n- `id`\n- `status`\n- `total`\n- `completed`\n- `failed`\n- `created_at`\n- `completed_at`\n- `total_credits_charged`\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\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
|
|
60
|
+
"body": "# Bulk fetch URLs\n\nEnqueues multiple URLs for HTTP fetching. Results delivered via webhook.\nDoes not support options that require page rendering (wait_for_selector, etc.).\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/fetch/bulk/{id}` whenever\n`recovery_required` is true.\n\n**Limits:** request bodies are guarded in a two-tier shape. A streamed body\nwith no `Content-Length` header is capped at 2 MB before your API key\nis checked; a body that declares `Content-Length` is instead bounded\nthere by a 20 MB fail-safe (not the real limit — see below), since\nthat branch reads nothing until your key is verified. Once your key\nis verified, a second check re-gates the body against your account's\nown `max_bulk_size` (at this endpoint's per-item override budget),\nwhich reaches 16.8 MB for the largest documented account. A\nstandard-plan account's effective ceiling is 2 MB; either tier's\noverrun returns a `400` with error code `request_too_large`.\n\n**POST** `/v1/fetch/bulk`\n\n## Request Body\n\n- `urls` (required)\n- `defaults`\n- `webhook_url` (required)\n- `webhook_secret`\n- `metadata`\n\n## Responses\n\n### 202 — Fetch bulk job accepted.\n- `id`\n- `status`\n- `total`\n- `completed`\n- `failed`\n- `created_at`\n- `completed_at`\n- `total_credits_charged`\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\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\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`"
|
|
61
61
|
},
|
|
62
62
|
"api/fetch-bulk/getfetchbulk": {
|
|
63
63
|
"title": "Get fetch bulk job status",
|
|
@@ -67,12 +67,12 @@
|
|
|
67
67
|
"api/fetch/getfetch": {
|
|
68
68
|
"title": "Fetch a URL (GET)",
|
|
69
69
|
"section": "API Reference",
|
|
70
|
-
"body": "# Fetch a URL (GET)\n\nDirect HTTP fetch. Successful responses return the upstream response bytes verbatim;\nmetadata is returned in X-Fetch-* headers. Non-2xx upstream responses use the\n`upstream_error` JSON envelope with the upstream HTTP status.\n\n**GET** `/v1/fetch`\n\n## Parameters\n\n- `url` (query, string, required)\n- `country` (query, string)\n- `timeout_ms` (query, integer)\n- `cache_ttl` (query) — How long a freshly fetched URL may be served from cache. `0` skips the cache read; cache-eligible fresh results are still written with the default 7-day TTL so later non-zero-TTL callers can HIT. Safety-classified WAF husks remain live-only and are not written. Accepts `Nh` (hours, up to 168h), `Nd` (days, up to 7d), or the integer `0`. Examples: `0`, `48h`, `2d`. Invalid values receive a 422 validation_error with an actionable message.\n\n## Responses\n\n### 200 — Content from upstream.\n\n### 400 — Invalid URL (`invalid_url`) or oversized request.\n- `status`\n- `error`\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
|
|
70
|
+
"body": "# Fetch a URL (GET)\n\nDirect HTTP fetch. Successful responses return the upstream response bytes verbatim;\nmetadata is returned in X-Fetch-* headers. Non-2xx upstream responses use the\n`upstream_error` JSON envelope with the upstream HTTP status.\n\n**GET** `/v1/fetch`\n\n## Parameters\n\n- `url` (query, string, required)\n- `country` (query, string)\n- `timeout_ms` (query, integer)\n- `cache_ttl` (query) — How long a freshly fetched URL may be served from cache. `0` skips the cache read; cache-eligible fresh results are still written with the default 7-day TTL so later non-zero-TTL callers can HIT. Safety-classified WAF husks remain live-only and are not written. Accepts `Nh` (hours, up to 168h), `Nd` (days, up to 7d), or the integer `0`. Examples: `0`, `48h`, `2d`. Invalid values receive a 422 validation_error with an actionable message.\n\n## Responses\n\n### 200 — Content from upstream.\n\n### 400 — Invalid URL (`invalid_url`) or oversized request.\n- `status`\n- `error`\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\n### 422 — Validation error (e.g. slow-path-only field), or a fetch that failed for a\ntarget-side reason.\n\nTwo distinct conditions answer `422`. Read `error.code` to tell them apart.\n\n- **`validation_error`** — the request itself was rejected.\n- **`blocked`** or **`upstream_error`** — the fetch ran and the target could not\n be read. `blocked` means the target's bot protection refused every attempt;\n `upstream_error` (message `Failed to fetch URL.`) is any other exhausted-retries\n failure, such as a host that does not resolve. This is a result about the URL,\n not an outage of this API, so it is a `4xx` rather than `502` or `503`. No\n upstream HTTP status was received, so `error.http_status` reports `422`,\n mirroring what was served — unlike the relayed `upstream_error` under `502`\n below, whose status is the target's own. The request transfers no billable\n bytes and is charged nothing (#4669).\n- `status`\n- `error`\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\n### 503 — Two distinct conditions answer `503`, and they disagree about what the body's\n`error.http_status` reports. Read `error.code` to tell them apart.\n\n- **`upstream_error`** — the target returned HTTP `502` or `504`, relayed here as\n `503`. Cloudflare fronts this API and replaces a clean origin 502 or 504 with its\n own generic `text/plain` error page, discarding the envelope before it reaches\n you, while a 503 is passed through unchanged. The body's `error.http_status`\n still reports the **true upstream status**, `502` or `504` — not `503` — and is\n the only surviving record of what the target answered, so the body rather than\n the HTTP status is authoritative here (#3355, #4891). Every other non-2xx\n upstream response is relayed at its own HTTP status with the same\n `upstream_error` envelope, so any other 4xx/5xx the target returns surfaces as an\n Error envelope rather than a raw body (#1462).\n- **`internal_error`** (message `Fetch service unavailable.`) — no fetch service\n endpoint could be resolved on this deployment, a fault of this API and not of the\n target. There is no upstream status to preserve: the `503` is this API's own\n choice of wire status, so the body's `error.http_status` reports `503`, mirroring\n what was served (#3373). A fetch that ran and failed for a target-side reason\n answers `422` instead (#4669).\n- `status`\n- `error`"
|
|
71
71
|
},
|
|
72
72
|
"api/fetch/postfetch": {
|
|
73
73
|
"title": "Fetch a URL (POST)",
|
|
74
74
|
"section": "API Reference",
|
|
75
|
-
"body": "# Fetch a URL (POST)\n\nSame as GET /v1/fetch but with a JSON request body.\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/fetch`\n\n## Request Body\n\n- `url` (required)\n- `country`\n- `timeout_ms`\n- `cache_ttl`\n- `custom`\n\n## Responses\n\n### 200 — Content from upstream.\n\n### 400 — Invalid URL (`invalid_url`) or oversized request body.\n- `status`\n- `error`\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
|
|
75
|
+
"body": "# Fetch a URL (POST)\n\nSame as GET /v1/fetch but with a JSON request body.\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/fetch`\n\n## Request Body\n\n- `url` (required)\n- `country`\n- `timeout_ms`\n- `cache_ttl`\n- `custom`\n\n## Responses\n\n### 200 — Content from upstream.\n\n### 400 — Invalid URL (`invalid_url`) or oversized request body.\n- `status`\n- `error`\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\n### 422 — Validation error (e.g. malformed JSON, unsupported fetch format, or slow-path-only\nfield), or a fetch that failed for a target-side reason.\n\nTwo distinct conditions answer `422`. Read `error.code` to tell them apart.\n\n- **`validation_error`** — the request itself was rejected.\n- **`blocked`** or **`upstream_error`** — the fetch ran and the target could not\n be read. `blocked` means the target's bot protection refused every attempt;\n `upstream_error` (message `Failed to fetch URL.`) is any other exhausted-retries\n failure, such as a host that does not resolve. This is a result about the URL,\n not an outage of this API, so it is a `4xx` rather than `502` or `503`. No\n upstream HTTP status was received, so `error.http_status` reports `422`,\n mirroring what was served — unlike the relayed `upstream_error` under `502`\n below, whose status is the target's own. The request transfers no billable\n bytes and is charged nothing (#4669).\n- `status`\n- `error`\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\n### 503 — Two distinct conditions answer `503`, and they disagree about what the body's\n`error.http_status` reports. Read `error.code` to tell them apart.\n\n- **`upstream_error`** — the target returned HTTP `502` or `504`, relayed here as\n `503`. Cloudflare fronts this API and replaces a clean origin 502 or 504 with its\n own generic `text/plain` error page, discarding the envelope before it reaches\n you, while a 503 is passed through unchanged. The body's `error.http_status`\n still reports the **true upstream status**, `502` or `504` — not `503` — and is\n the only surviving record of what the target answered, so the body rather than\n the HTTP status is authoritative here (#3355, #4891). Every other non-2xx\n upstream response is relayed at its own HTTP status with the same\n `upstream_error` envelope, so any other 4xx/5xx the target returns surfaces as an\n Error envelope rather than a raw body (#1462).\n- **`internal_error`** (message `Fetch service unavailable.`) — no fetch service\n endpoint could be resolved on this deployment, a fault of this API and not of the\n target. There is no upstream status to preserve: the `503` is this API's own\n choice of wire status, so the body's `error.http_status` reports `503`, mirroring\n what was served (#3373). A fetch that ran and failed for a target-side reason\n answers `422` instead (#4669).\n- `status`\n- `error`"
|
|
76
76
|
},
|
|
77
77
|
"api/health": {
|
|
78
78
|
"title": "Health",
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
"api/schema/createschemaextraction": {
|
|
138
138
|
"title": "Schema-driven structured extraction",
|
|
139
139
|
"section": "API Reference",
|
|
140
|
-
"body": "# Schema-driven structured extraction\n\nFetches `url` and extracts structured JSON conforming to the supplied\nJSON Schema (draft 2020-12) using an LLM. Fast-path only — slow-path\nrendering options (`wait_until=networkidle`, `delay_ms`,\n`wait_for_selector`) cause a `400 unsupported_option`.\n\nDual-axis billing: a fixed per-request credit charge **plus** the\nunderlying page's bandwidth, billed at its upstream wire bytes with no\nendpoint factor (a 100 KiB estimate is pre-charged, then reconciled). The\nbandwidth is still billed when the scrape succeeds but extraction later\nfails; both axes are refunded only when the scrape itself never runs.\n\nAvailability is gated by a server-side feature flag; when disabled the\nendpoint returns `404`.\n\n**POST** `/v1/schema`\n\n## Request Body\n\n- `url` (required)\n- `schema` (required)\n- `prompt`\n- `model`\n- `wait_for_selector`\n- `wait_until`\n- `delay_ms`\n- `country`\n- `language`\n\n## Responses\n\n### 200 — Extraction completed (success or graceful extract failure).\n- `data`\n- `model`\n- `validated`\n- `metrics`\n- `scrape`\n- `warnings`\n\n### 400 — Invalid URL (`invalid_url`), unsupported model (`unsupported_model`), or unsupported slow-path option (`unsupported_option`).\n- `status`\n- `error`\n\n### 401 — Missing or invalid bearer key.\n- `status`\n- `error`\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
|
|
140
|
+
"body": "# Schema-driven structured extraction\n\nFetches `url` and extracts structured JSON conforming to the supplied\nJSON Schema (draft 2020-12) using an LLM. Fast-path only — slow-path\nrendering options (`wait_until=networkidle`, `delay_ms`,\n`wait_for_selector`) cause a `400 unsupported_option`.\n\nDual-axis billing: a fixed per-request credit charge **plus** the\nunderlying page's bandwidth, billed at its upstream wire bytes with no\nendpoint factor (a 100 KiB estimate is pre-charged, then reconciled). The\nbandwidth is still billed when the scrape succeeds but extraction later\nfails; both axes are refunded only when the scrape itself never runs.\n\nAvailability is gated by a server-side feature flag; when disabled the\nendpoint returns `404`.\n\n**POST** `/v1/schema`\n\n## Request Body\n\n- `url` (required)\n- `schema` (required)\n- `prompt`\n- `model`\n- `wait_for_selector`\n- `wait_until`\n- `delay_ms`\n- `country`\n- `language`\n\n## Responses\n\n### 200 — Extraction completed (success or graceful extract failure).\n- `data`\n- `model`\n- `validated`\n- `metrics`\n- `scrape`\n- `warnings`\n\n### 400 — Invalid URL (`invalid_url`), unsupported model (`unsupported_model`), or unsupported slow-path option (`unsupported_option`).\n- `status`\n- `error`\n\n### 401 — Missing or invalid bearer key.\n- `status`\n- `error`\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\n### 404 — Endpoint not available (feature flag disabled).\n- `status`\n- `error`\n\n### 422 — Validation error (`validation_error`) or non-normalizable schema (`schema_incompatible`).\n- `status`\n- `error`\n\n### 429 — Per-account rate limit (`rate_limited`) or upstream provider rate limit (`provider_rate_limited`); a `Retry-After` header may be present.\n- `status`\n- `error`\n\n### 503 — Read `error.code` to tell the conditions apart: underlying scrape failed or the\nextraction service was unreachable (`scrape_failed`), upstream provider error\n(`provider_error`), extraction provider unconfigured (`provider_unavailable`), or\nupstream provider timed out (`provider_timeout`). None of these answers `502` or\n`504`: Cloudflare fronts this API and replaces an origin 502 or 504 with its own\n`text/plain` page, discarding the error envelope, while a 503 passes through\nunchanged (#4891).\n- `status`\n- `error`"
|
|
141
141
|
},
|
|
142
142
|
"api/scrape": {
|
|
143
143
|
"title": "Scrape",
|
|
@@ -152,7 +152,7 @@
|
|
|
152
152
|
"api/scrape-bulk/createscrapebulk": {
|
|
153
153
|
"title": "Bulk scrape URLs",
|
|
154
154
|
"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**POST** `/v1/scrape/bulk`\n\n## Request Body\n\n- `urls`\n- `items`\n- `defaults`\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- `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\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
|
|
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**POST** `/v1/scrape/bulk`\n\n## Request Body\n\n- `urls`\n- `items`\n- `defaults`\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- `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\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\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`"
|
|
156
156
|
},
|
|
157
157
|
"api/scrape-bulk/getscrapebulk": {
|
|
158
158
|
"title": "Get scrape bulk job status",
|
|
@@ -162,7 +162,7 @@
|
|
|
162
162
|
"api/scrape/createscrape": {
|
|
163
163
|
"title": "Scrape a URL",
|
|
164
164
|
"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` → **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 `delay_ms > 0` — 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.\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\nSo a 202 means one of exactly two things: you asked for one with `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## Request Body\n\n- `url` (required)\n- `formats`\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- `x_internal_scrape_path`\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` 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- `metadata`\n- `tables`\n- `warnings`\n- `stats`\n- `markdown_tokens`\n- `billing`\n- `custom`\n- `cache`\n- `cache_age_s`\n- `error`\n\n### 202 — Scrape accepted for background processing; the body is a receipt, not content. Returned when `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\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
|
|
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` → **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 `delay_ms > 0` — 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.\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\nSo a 202 means one of exactly two things: you asked for one with `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## Request Body\n\n- `url` (required)\n- `formats`\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- `x_internal_scrape_path`\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` 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- `metadata`\n- `tables`\n- `warnings`\n- `stats`\n- `markdown_tokens`\n- `billing`\n- `custom`\n- `cache`\n- `cache_age_s`\n- `error`\n\n### 202 — Scrape accepted for background processing; the body is a receipt, not content. Returned when `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\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\n### 422 — Validation error.\n- `status`\n- `error`\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\n### 500 — Internal server error.\n- `status`\n- `error`"
|
|
166
166
|
},
|
|
167
167
|
"api/scrape/getscrape": {
|
|
168
168
|
"title": "Get scrape result",
|
|
@@ -177,7 +177,7 @@
|
|
|
177
177
|
"api/screenshots/createscreenshot": {
|
|
178
178
|
"title": "Capture a screenshot",
|
|
179
179
|
"section": "API Reference",
|
|
180
|
-
"body": "# Capture a screenshot\n\nSync by default (holds up to 28s). Pass `?async=true` to return 202 immediately.\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**POST** `/v1/screenshots`\n\n## Parameters\n\n- `async` (query, boolean)\n\n## Request Body\n\n- `url` (required)\n- `device`\n- `viewport`\n- `full_page`\n- `format`\n- `quality`\n- `block_ads`\n- `block_cookie_banners`\n- `wait_until`\n- `wait_for_selector`\n- `delay_ms`\n- `scroll`\n- `clip`\n- `dark_mode`\n- `device_scale_factor`\n- `include_html`\n- `country`\n- `language`\n- `metadata`\n\n## Responses\n\n### 200 — Screenshot completed (sync mode).\n- `id`\n- `status`\n- `url`\n- `image_url`\n- `page_title`\n- `image_width`\n- `image_height`\n- `file_size_bytes`\n- `credits_charged`\n- `billing`\n- `error_code`\n- `error_message`\n- `created_at`\n- `completed_at`\n- `expires_at`\n- `poll_url`\n\n### 202 — Screenshot accepted (async mode or sync timeout).\n- `id`\n- `status`\n- `url`\n- `image_url`\n- `page_title`\n- `image_width`\n- `image_height`\n- `file_size_bytes`\n- `credits_charged`\n- `billing`\n- `error_code`\n- `error_message`\n- `created_at`\n- `completed_at`\n- `expires_at`\n- `poll_url`\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\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
|
|
180
|
+
"body": "# Capture a screenshot\n\nSync by default (holds up to 28s). Pass `?async=true` to return 202 immediately.\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**POST** `/v1/screenshots`\n\n## Parameters\n\n- `async` (query, boolean)\n\n## Request Body\n\n- `url` (required)\n- `device`\n- `viewport`\n- `full_page`\n- `format`\n- `quality`\n- `block_ads`\n- `block_cookie_banners`\n- `wait_until`\n- `wait_for_selector`\n- `delay_ms`\n- `scroll`\n- `clip`\n- `dark_mode`\n- `device_scale_factor`\n- `include_html`\n- `country`\n- `language`\n- `metadata`\n\n## Responses\n\n### 200 — Screenshot completed (sync mode).\n- `id`\n- `status`\n- `url`\n- `image_url`\n- `page_title`\n- `image_width`\n- `image_height`\n- `file_size_bytes`\n- `credits_charged`\n- `billing`\n- `error_code`\n- `error_message`\n- `created_at`\n- `completed_at`\n- `expires_at`\n- `poll_url`\n\n### 202 — Screenshot accepted (async mode or sync timeout).\n- `id`\n- `status`\n- `url`\n- `image_url`\n- `page_title`\n- `image_width`\n- `image_height`\n- `file_size_bytes`\n- `credits_charged`\n- `billing`\n- `error_code`\n- `error_message`\n- `created_at`\n- `completed_at`\n- `expires_at`\n- `poll_url`\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\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\n### 422 — Validation error, or a screenshot that failed inside the sync hold.\nThe two carry DIFFERENT bodies (issue #2679):\n\n- A request-validation failure returns the unified `Error` envelope\n with code `validation_error`.\n- A capture that reached a terminal `failed` state inside the sync\n hold returns the full `ScreenshotResponse` resource, whose\n `error_code`/`error_message` carry the real failure (`blocked`,\n `timeout`, …). This is the canonical shape for that case: the\n resource body is what carries the `ss_` handle, `poll_url` and\n `expires_at` a client needs to redeem the failed capture, none of\n which fit the `Error` envelope.\n\nDiscriminate on the shape of the top-level `error` key. The envelope\nform carries `error` as an OBJECT (`{ code, message, http_status,\nfailed_at }`); the resource form has no `error` key at all, and\ncarries the flat `error_code`/`error_message` pair plus `id` instead.\n\nDo NOT discriminate on `status`. Both forms carry\n`\"status\": \"failed\"` on this response — `Error.status` is a required\nproperty with `enum: [failed]` — so it separates nothing here.\n\n`X-Screenshot-ID` accompanies the resource form only: a\nrequest-validation failure is raised before a screenshot row exists,\nso no screenshot headers travel with it.\n- `status`\n- `error`\n- `id`\n- `url`\n- `image_url`\n- `page_title`\n- `image_width`\n- `image_height`\n- `file_size_bytes`\n- `credits_charged`\n- `billing`\n- `error_code`\n- `error_message`\n- `created_at`\n- `completed_at`\n- `expires_at`\n- `poll_url`\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`"
|
|
181
181
|
},
|
|
182
182
|
"api/screenshots/getscreenshot": {
|
|
183
183
|
"title": "Get screenshot status",
|
|
@@ -192,7 +192,7 @@
|
|
|
192
192
|
"api/search/createsearch": {
|
|
193
193
|
"title": "Search the web",
|
|
194
194
|
"section": "API Reference",
|
|
195
|
-
"body": "# Search the web\n\nRuns a web search for `query` and returns ranked organic results with\ncontiguous `position` values from 1.\n\nUse `limit` (1–100, default 10) to request more results in a single\ncall. Results are fetched in pages of 10, so a call consumes\n`ceil(limit / 10)` credits (capped at 10) from the account's monthly\ncredits bucket — for example `limit=10` costs 1 credit and `limit=35`\ncosts 4. Credits are charged for every page fetched regardless of how\nmany results a page returns. The credit count is reported as\n`credits_used` in the response.\n\n**POST** `/v1/search`\n\n## Request Body\n\n- `query` (required)\n- `type`\n- `limit`\n- `country`\n- `language`\n- `date_range`\n\n## Responses\n\n### 200 — Search completed.\n- `id`\n- `query`\n- `results`\n- `related_searches`\n- `credits_used`\n\n### 400 — Bad request (e.g. missing or empty `query`).\n- `status`\n- `error`\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
|
|
195
|
+
"body": "# Search the web\n\nRuns a web search for `query` and returns ranked organic results with\ncontiguous `position` values from 1.\n\nUse `limit` (1–100, default 10) to request more results in a single\ncall. Results are fetched in pages of 10, so a call consumes\n`ceil(limit / 10)` credits (capped at 10) from the account's monthly\ncredits bucket — for example `limit=10` costs 1 credit and `limit=35`\ncosts 4. Credits are charged for every page fetched regardless of how\nmany results a page returns. The credit count is reported as\n`credits_used` in the response.\n\n**POST** `/v1/search`\n\n## Request Body\n\n- `query` (required)\n- `type`\n- `limit`\n- `country`\n- `language`\n- `date_range`\n\n## Responses\n\n### 200 — Search completed.\n- `id`\n- `query`\n- `results`\n- `related_searches`\n- `credits_used`\n\n### 400 — Bad request (e.g. missing or empty `query`).\n- `status`\n- `error`\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\n### 429 — Rate limit exceeded (`rate_limited`). Carries the `X-RateLimit-Limit`/`X-RateLimit-Remaining`/`X-RateLimit-Reset` triplet and a `Retry-After` header. The window is per-second for a bearer API key, or the 60-request/60-second Clerk session window when authenticated via `resolveDualAuth` — `Retry-After` reflects whichever window applies to the request.\n- `status`\n- `error`\n\n### 500 — Internal error (code `internal_error`) — the search request could not\nbe recorded before the provider call. The pre-incremented credits are\nrefunded and no provider call is made.\n- `status`\n- `error`\n\n### 503 — Upstream search provider error, answered at `503` rather than `502` because\nCloudflare replaces an origin 502 body with its own page (#4891). The body is a fixed,\nvendor-masked shape — deliberately NOT the unified `Error`\nenvelope. The upstream provider's identity and message are\nnever surfaced, so the response carries only the constant\n`error` code `search_provider_error`.\n- `error`"
|
|
196
196
|
},
|
|
197
197
|
"api/sitemap": {
|
|
198
198
|
"title": "Sitemap",
|
|
@@ -202,7 +202,7 @@
|
|
|
202
202
|
"api/sitemap/createsitemap": {
|
|
203
203
|
"title": "Discover URLs on a domain",
|
|
204
204
|
"section": "API Reference",
|
|
205
|
-
"body": "# Discover URLs on a domain\n\nCrawls a domain to build a sitemap. Returns cached results if available\nwithin cache_ttl. Results delivered via webhook and downloadable from results_url.\nWebhook deliveries include `X-ByteKit-Event: sitemap.completed` or\n`X-ByteKit-Event: sitemap.failed` so receivers can dispatch on the\nheader without parsing the body shape.\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/sitemap`\n\n## Request Body\n\n- `url` (required)\n- `strategy`\n- `max_depth`\n- `max_urls`\n- `process`\n- `webhook_url`\n- `webhook_secret`\n- `cache_ttl`\n- `compact`\n- `metadata`\n\n## Responses\n\n### 202 — Sitemap job accepted (or cached result returned).\n- `id`\n- `url`\n- `strategy`\n- `max_depth`\n- `max_urls`\n- `status`\n- `total_urls`\n- `sources`\n- `total_bytes`\n- `results_url`\n- `cache`\n- `cache_age_s`\n- `billing`\n- `warnings`\n- `error_code`\n- `error_message`\n- `compact`\n- `process`\n- `metadata`\n- `created_at`\n- `completed_at`\n- `expires_at`\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\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
|
|
205
|
+
"body": "# Discover URLs on a domain\n\nCrawls a domain to build a sitemap. Returns cached results if available\nwithin cache_ttl. Results delivered via webhook and downloadable from results_url.\nWebhook deliveries include `X-ByteKit-Event: sitemap.completed` or\n`X-ByteKit-Event: sitemap.failed` so receivers can dispatch on the\nheader without parsing the body shape.\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/sitemap`\n\n## Request Body\n\n- `url` (required)\n- `strategy`\n- `max_depth`\n- `max_urls`\n- `process`\n- `webhook_url`\n- `webhook_secret`\n- `cache_ttl`\n- `compact`\n- `metadata`\n\n## Responses\n\n### 202 — Sitemap job accepted (or cached result returned).\n- `id`\n- `url`\n- `strategy`\n- `max_depth`\n- `max_urls`\n- `status`\n- `total_urls`\n- `sources`\n- `total_bytes`\n- `results_url`\n- `cache`\n- `cache_age_s`\n- `billing`\n- `warnings`\n- `error_code`\n- `error_message`\n- `compact`\n- `process`\n- `metadata`\n- `created_at`\n- `completed_at`\n- `expires_at`\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\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\n### 422 — Validation error.\n- `status`\n- `error`\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`"
|
|
206
206
|
},
|
|
207
207
|
"api/sitemap/getsitemap": {
|
|
208
208
|
"title": "Get sitemap job status",
|
|
@@ -272,7 +272,7 @@
|
|
|
272
272
|
"billing/top-ups": {
|
|
273
273
|
"title": "Top-ups and rollover",
|
|
274
274
|
"section": "General",
|
|
275
|
-
"body": "# Top-ups and rollover\n\nHow your USD balance is spent, why it never expires, and how plan allowance rolls over.\n\nTop-ups add dollars to your account's USD balance without changing your plan's included allowance. Value is spent in one order: your plan's included allowance, including any rollover from earlier periods, then the USD balance, then the one-time starter grant.\n\n## The USD balance\n\nYour USD balance never expires. It is not tied to the plan you were on when you added it: a cancellation or plan change does not freeze it, hold it, or reset its value. Usage beyond your included allowance draws from the balance at your current plan's top-up rate for the resource it uses — bandwidth or search credits — so the same dollars buy more on a plan with a lower rate. The bandwidth and credit amounts shown beside your balance are estimates at those current rates; the dollar figure is what you hold.\n\n## Billing-period rollover\n\nUnused bandwidth from your monthly plan allowance rolls over to the next billing period with no cap, for as long as the subscription stays on its plan or moves to a higher one. A downgrade or cancellation freezes it: the frozen balance stops being spendable, and resubscribing at the same tier or higher within 90 days restores it in full — after that it is permanently lost. The USD balance is separate from the billing period, so it is not reset when that period rolls over.\n\nCredits do not roll over — they reset every billing period. This does not affect your USD balance, which never expires.\n\nYour USD balance and rollover balances appear under **Dashboard → Settings → Billing**."
|
|
275
|
+
"body": "# Top-ups and rollover\n\nHow your USD balance is spent, why it never expires, and how plan allowance rolls over.\n\nTop-ups add dollars to your account's USD balance without changing your plan's included allowance. Value is spent in one order: your plan's included allowance, including any rollover from earlier periods, then the USD balance, then the one-time starter grant.\n\n## The USD balance\n\nYour USD balance never expires. It is not tied to the plan you were on when you added it: a cancellation or plan change does not freeze it, hold it, or reset its value. Usage beyond your included allowance draws from the balance at your current plan's top-up rate for the resource it uses — bandwidth or search credits — so the same dollars buy more on a plan with a lower rate. The bandwidth and credit amounts shown beside your balance are estimates at those current rates; the dollar figure is what you hold.\n\n## Bandwidth you owe\n\nA request is billed on the bandwidth it actually used, which can turn out larger than the amount set aside when it started. When that overage is more than your allowance, USD balance and starter grant can cover, the uncovered bandwidth is recorded as bandwidth you owe. It is not waived, and it does not make your USD balance negative. The amount you owe appears under **Dashboard → Settings → Billing**.\n\nYour next top-up, billing-period renewal or plan upgrade pays it off before anything else, oldest first, and only what is left over becomes spendable. A top-up first brings a USD balance that a refund or dispute took below zero back up to zero, then converts only as many of the remaining dollars as it needs to bandwidth at your current plan's top-up rate, and the rest stays in your USD balance. On a plan whose top-up rate is zero, only a renewal or plan upgrade can pay it off.\n\nWhile you owe anything, whether bandwidth or a USD balance below zero, new billable requests are refused with `402 quota_exceeded`, even if you still have allowance left. Requests already in progress finish and are billed as usual.\n\n## Billing-period rollover\n\nUnused bandwidth from your monthly plan allowance rolls over to the next billing period with no cap, for as long as the subscription stays on its plan or moves to a higher one. A downgrade or cancellation freezes it: the frozen balance stops being spendable, and resubscribing at the same tier or higher within 90 days restores it in full — after that it is permanently lost. The USD balance is separate from the billing period, so it is not reset when that period rolls over.\n\nCredits do not roll over — they reset every billing period. This does not affect your USD balance, which never expires.\n\nYour USD balance and rollover balances appear under **Dashboard → Settings → Billing**."
|
|
276
276
|
},
|
|
277
277
|
"cli": {
|
|
278
278
|
"title": "Install & Authenticate",
|
|
@@ -342,7 +342,7 @@
|
|
|
342
342
|
"guides/errors": {
|
|
343
343
|
"title": "Errors",
|
|
344
344
|
"section": "Guides",
|
|
345
|
-
"body": "# Errors\n\nByteKit error response shape, common error codes, and retry guidance.\n\nAll errors from the ByteKit API follow a consistent envelope shape so you can handle them\nprogrammatically.\n\n## Error response shape\n\nEvery `4xx`/`5xx` response across the API uses one unified envelope. `status` is\nalways the literal string `\"failed\"`, so you can branch on the response body alone.\n\n```json\n{\n \"status\": \"failed\",\n \"error\": {\n \"code\": \"rate_limited\",\n \"message\": \"Rate limit exceeded. Allowed 5 requests per second.\",\n \"http_status\": 429,\n \"failed_at\": \"2026-08-27T12:17:46.234Z\"\n }\n}\n```\n\nThe number in a `rate_limited` message is your own plan's per-second limit — the same value the `X-RateLimit-Limit` response header carries.\n\n| Field | Description |\n|-------|-------------|\n| `status` | Always `\"failed\"` on an error response — the top-level discriminator |\n| `error.code` | Machine-readable string identifier |\n| `error.message` | Human-readable explanation |\n| `error.http_status` | Mirrors the HTTP response status (useful for logged or replayed bodies) |\n| `error.failed_at` | ISO-8601 UTC timestamp of when the error was produced |\n| `error.details` | Optional object with additional context (e.g. which field failed validation). Absent — not `{}` — when the error carries no context |\n\n## Common error codes\n\n| HTTP status | Code | Meaning |\n|-------------|------|---------|\n| `400` | `invalid_url` | A supplied URL (including `webhook_url`) is malformed or uses an unsupported scheme |\n| `400` | `validation_error` | Field errors on `/v1/search`, `POST /v1/billing/checkout` and `PUT`/`DELETE /v1/billing/payment-methods/{id}`, plus rejections that run before schema validation on any endpoint: a removed field such as `cookies` or `headers` on a capture endpoint, or a `/v1/fetch` or `/v1/fetch/bulk` request asking for an option only `/v1/scrape` or `/v1/bulk` serves |\n| `401` | `unauthorized` | Missing or malformed `Authorization` header |\n| `401` | `invalid_api_key` | API key is present but not valid |\n| `402` | `quota_exceeded` |
|
|
345
|
+
"body": "# Errors\n\nByteKit error response shape, common error codes, and retry guidance.\n\nAll errors from the ByteKit API follow a consistent envelope shape so you can handle them\nprogrammatically.\n\n## Error response shape\n\nEvery `4xx`/`5xx` response across the API uses one unified envelope. `status` is\nalways the literal string `\"failed\"`, so you can branch on the response body alone.\n\n```json\n{\n \"status\": \"failed\",\n \"error\": {\n \"code\": \"rate_limited\",\n \"message\": \"Rate limit exceeded. Allowed 5 requests per second.\",\n \"http_status\": 429,\n \"failed_at\": \"2026-08-27T12:17:46.234Z\"\n }\n}\n```\n\nThe number in a `rate_limited` message is your own plan's per-second limit — the same value the `X-RateLimit-Limit` response header carries.\n\n| Field | Description |\n|-------|-------------|\n| `status` | Always `\"failed\"` on an error response — the top-level discriminator |\n| `error.code` | Machine-readable string identifier |\n| `error.message` | Human-readable explanation |\n| `error.http_status` | Mirrors the HTTP response status (useful for logged or replayed bodies) |\n| `error.failed_at` | ISO-8601 UTC timestamp of when the error was produced |\n| `error.details` | Optional object with additional context (e.g. which field failed validation). Absent — not `{}` — when the error carries no context |\n\n## Common error codes\n\n| HTTP status | Code | Meaning |\n|-------------|------|---------|\n| `400` | `invalid_url` | A supplied URL (including `webhook_url`) is malformed or uses an unsupported scheme |\n| `400` | `validation_error` | Field errors on `/v1/search`, `POST /v1/billing/checkout` and `PUT`/`DELETE /v1/billing/payment-methods/{id}`, plus rejections that run before schema validation on any endpoint: a removed field such as `cookies` or `headers` on a capture endpoint, or a `/v1/fetch` or `/v1/fetch/bulk` request asking for an option only `/v1/scrape` or `/v1/bulk` serves |\n| `401` | `unauthorized` | Missing or malformed `Authorization` header |\n| `401` | `invalid_api_key` | API key is present but not valid |\n| `402` | `quota_exceeded` | The balance cannot fund this request. Capture endpoints reject when it cannot fund the request's byte reservation, and `error.details.required_bytes` and `error.details.available_bytes` give the bytes the request reserves and the bytes available; `/v1/search` meters credits and rejects when its monthly credits are used up |\n| `402` | `spending_cap_reached` | A credit-metered request would push overage spend past the account's cap. Only reachable on a custom plan with an overage agreement — standard plans have no automatic overage and stop at `quota_exceeded` |\n| `402` | `billing_entitlement_impaired` | The paid subscription is in a payment impairment (e.g. `past_due`); `error.message` names the reason |\n| `402` | `billing_entitlement_expired` | The paid subscription's entitlement period has ended, or its dunning grace period has run out |\n| `403` | `forbidden` | Key is valid but lacks permission for this action |\n| `422` | `validation_error` | Malformed JSON, or a request field failed validation, everywhere the `400` row above does not name |\n| `422` | `blocked`, `upstream_error` | `/v1/fetch` only: the fetch ran and the target could not be read (bot protection refused every attempt, or another exhausted-retries failure such as an unresolvable host). This is a result about the URL, not an outage of this API, and it is charged nothing. `upstream_error` can also come from a relay fault on our side, so the code alone does not prove the target is at fault. The `X-Fetch-ID` response header, when present, names the failed request's row in Logs |\n| `429` | `rate_limited` | Too many requests per second; back off and retry |\n| `429` | `concurrency_limit` | Too many simultaneous in-flight requests; back off and retry |\n| `500` | `internal_error` | The upstream fetch or browser render failed |\n\n## Webhook URLs Must Use HTTPS\n\nAll webhook URLs submitted to the ByteKit API must use HTTPS. Plain HTTP URLs (e.g. `http://example.com/webhook`) are rejected with a `400` `invalid_url` error.\n\n**Why HTTPS only?** Webhook payloads may contain sensitive data (API keys, session tokens, scrape results). HTTPS encryption protects this data in transit.\n\n**Request with an invalid webhook URL:**\n\n```json\n{\n \"webhook_url\": \"http://example.com/webhook\"\n}\n```\n\n**Response (HTTP 400)** — the same unified envelope as every other error; `error.details` names the offending field and reason:\n\n```json\n{\n \"status\": \"failed\",\n \"error\": {\n \"code\": \"invalid_url\",\n \"message\": \"url is not a valid HTTP(S) URL: scheme_unsupported\",\n \"http_status\": 400,\n \"failed_at\": \"2026-08-27T12:16:29.033Z\",\n \"details\": {\n \"url\": \"http://example.com/webhook\",\n \"field\": \"webhook_url\",\n \"reason\": \"scheme_unsupported\"\n }\n }\n}\n```\n\n**Working example:**\n\n```json\n{\n \"webhook_url\": \"https://example.com/webhook\"\n}\n```\n\nThis applies to all endpoints that accept a `webhook_url` parameter: `/v1/scrape` (async), `/v1/scrape/bulk`, `/v1/fetch/bulk`, `/v1/bulk`, `/v1/monitors`, and `/v1/sitemap`.\n\n## Retry guidance\n\nNot all errors are retryable. Use this table to decide:\n\n| Code | Retry? | Guidance |\n|------|--------|---------|\n| `invalid_url` | No | Fix the URL before retrying |\n| `validation_error` | No | Fix the request body before retrying |\n| `unauthorized` / `invalid_api_key` | No | Check your API key |\n| `quota_exceeded` | No | Retrying the same request cannot succeed while the balance is short. Compare `error.details.required_bytes` with `error.details.available_bytes`: add balance (upgrade your plan or top up), or send a smaller request. On `/v1/search`, upgrade your plan or wait for the credit reset |\n| `spending_cap_reached` | No | The overage cap is account-level and has no self-service control — [contact support](https://bytekit.com/docs/billing/spending) to raise it, or upgrade the plan |\n| `billing_entitlement_impaired` | No | Settle the outstanding invoice — retrying cannot succeed while the subscription is impaired |\n| `billing_entitlement_expired` | No | Restore or renew the subscription; the entitlement period has ended |\n| `forbidden` | No | You do not have access to this resource |\n| `rate_limited` | Yes | Exponential backoff; honour the `Retry-After` header |\n| `concurrency_limit` | Yes | Honour the `Retry-After` header (a short fixed back-off — a slot frees on job completion, not a fixed window) |\n| `internal_error` | Yes | Exponential backoff; most resolve on retry |\n\nFor retriable errors, start with a 1-second delay and double on each subsequent failure, up to\na maximum of 60 seconds. Respect the `Retry-After` header value when it is present on `429`\nresponses.\n\n## Example: handling errors in curl\n\n```bash\nresponse=$(curl -s -w \"\\n%{http_code}\" -X POST https://api.bytekit.com/v1/scrape \\\n -H \"Authorization: Bearer sk_live_YOUR_KEY_HERE\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"url\": \"https://example.com\"}')\n\nhttp_code=$(echo \"$response\" | tail -1)\n# Body is everything except the trailing status-code line — drop only the last\n# line so multi-line JSON responses survive intact.\nbody=$(echo \"$response\" | sed '$d')\n\nif [ \"$http_code\" -ge 400 ]; then\n echo \"Error $http_code: $body\"\nfi\n```\n\n## Next steps\n\n- [Rate Limits](https://bytekit.com/docs/guides/rate-limits) — quota model, concurrency slots, rate limit headers\n- [Scraping](https://bytekit.com/docs/guides/scraping) — when `500 internal_error` occurs and how fallback works\n- [API Reference](https://bytekit.com/docs/api) — per-endpoint error codes"
|
|
346
346
|
},
|
|
347
347
|
"guides/monitors": {
|
|
348
348
|
"title": "Monitors",
|
|
@@ -367,12 +367,12 @@
|
|
|
367
367
|
"introduction": {
|
|
368
368
|
"title": "Introduction",
|
|
369
369
|
"section": "General",
|
|
370
|
-
"body": "# Introduction\n\nA REST API for screenshots, scraping, and page-change monitoring — one key, one base URL, every output.\n\n## What ByteKit is\n\nByteKit is a REST API for capturing what a webpage looks like and what it says —\nscreenshots, raw HTML or clean markdown, and page-change monitoring.\nOne API key, one base URL, every output you'd otherwise stitch together from a headless-browser\nfarm and a scraping proxy.\n\n## What you can do with it\n\n- **Scrape** — Fetch a URL as raw HTML, clean markdown, or structured content.\n- **Screenshot** — Capture full-page or viewport PNG/JPEG.\n- **Monitor** — Watch a URL on a schedule and webhook you when the rendered output changes.\n- **Bulk** — Fan out thousands of URLs in parallel and receive a webhook as each finishes.\n- **Sitemap** — Discover URLs from a domain's sitemap or by light crawling.\n\nScrape calls accept an `\"async\": true` body field, in which case the API returns `202` with a `sc_…`\nID that you poll or receive via webhook. Screenshots are synchronous by default (the call holds up to\n28s and returns `200`); pass the `?async=true` query parameter to get back `202` with an `ss_…` ID\nimmediately.\n\n## Authentication and accounts\n\nEvery request carries a Bearer API key, prefixed `sk_live_`. Manage keys from the dashboard —\nup to 50 active keys per account, with per-key billing attribution so you can split usage\ncleanly across services.\n\nFull details in the [Authentication guide](https://bytekit.com/docs/guides/authentication).\n\n## Where to go next\n\n- [Quickstart](https://bytekit.com/docs/quickstart) — first call in under five minutes, no SDK required.\n- [Client Libraries](https://bytekit.com/docs/libraries/typescript) — official TypeScript and Python SDKs.\n- [Scraping](https://bytekit.com/docs/guides/scraping) — formats, options, async polling.\n- [Rate Limits](https://bytekit.com/docs/guides/rate-limits) — quota model, concurrency slots, response headers.\n- [Monitors](https://bytekit.com/docs/guides/monitors) — schedule-based change detection with webhooks.\n- [API Reference](https://bytekit.com/docs/api) — every endpoint, request, and response."
|
|
370
|
+
"body": "# Introduction\n\nA REST API for screenshots, scraping, and page-change monitoring — one key, one base URL, every output.\n\n## What ByteKit is\n\nByteKit is a REST API for capturing what a webpage looks like and what it says —\nscreenshots, raw HTML or clean markdown, and page-change monitoring.\nOne API key, one base URL, every output you'd otherwise stitch together from a headless-browser\nfarm and a scraping proxy.\n\n## Integrate in 60 seconds\n\n- **Base URL:** `https://api.bytekit.com`\n- **Auth:** send `Authorization: Bearer $BYTEKIT_API_KEY` on every request. Create a key in the\n [ByteKit dashboard](https://app.bytekit.com) and export it as `BYTEKIT_API_KEY`.\n- **Install:** `npm install @hunt-labs/bytekit-sdk` for TypeScript, or `pip install bytekit-sdk`\n for Python (import name `bytekit`).\n\nThe npm package is `@hunt-labs/bytekit-sdk` — not `bytekit`, which is an unrelated package.\n\nOne call with curl:\n\n```bash\ncurl -X POST https://api.bytekit.com/v1/scrape \\\n -H \"Authorization: Bearer $BYTEKIT_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"url\":\"https://example.com\"}'\n```\n\nThe same call with the TypeScript SDK:\n\n```ts\nimport { ByteKit } from '@hunt-labs/bytekit-sdk';\n\nconst client = new ByteKit({ apiKey: process.env.BYTEKIT_API_KEY! });\nconst result = await client.scrape.create({ url: 'https://example.com' });\nconsole.log(result);\n```\n\nFull SDK guides: [TypeScript](https://bytekit.com/docs/libraries/typescript) and [Python](https://bytekit.com/docs/libraries/python).\n\n## What you can do with it\n\n- **Scrape** — Fetch a URL as raw HTML, clean markdown, or structured content.\n- **Screenshot** — Capture full-page or viewport PNG/JPEG.\n- **Monitor** — Watch a URL on a schedule and webhook you when the rendered output changes.\n- **Bulk** — Fan out thousands of URLs in parallel and receive a webhook as each finishes.\n- **Sitemap** — Discover URLs from a domain's sitemap or by light crawling.\n\nScrape calls accept an `\"async\": true` body field, in which case the API returns `202` with a `sc_…`\nID that you poll or receive via webhook. Screenshots are synchronous by default (the call holds up to\n28s and returns `200`); pass the `?async=true` query parameter to get back `202` with an `ss_…` ID\nimmediately.\n\n## Authentication and accounts\n\nEvery request carries a Bearer API key, prefixed `sk_live_`. Manage keys from the [dashboard](https://app.bytekit.com) —\nup to 50 active keys per account, with per-key billing attribution so you can split usage\ncleanly across services.\n\nFull details in the [Authentication guide](https://bytekit.com/docs/guides/authentication).\n\n## Where to go next\n\n- [Quickstart](https://bytekit.com/docs/quickstart) — first call in under five minutes, no SDK required.\n- [Client Libraries](https://bytekit.com/docs/libraries/typescript) — official TypeScript and Python SDKs.\n- [Scraping](https://bytekit.com/docs/guides/scraping) — formats, options, async polling.\n- [Rate Limits](https://bytekit.com/docs/guides/rate-limits) — quota model, concurrency slots, response headers.\n- [Monitors](https://bytekit.com/docs/guides/monitors) — schedule-based change detection with webhooks.\n- [API Reference](https://bytekit.com/docs/api) — every endpoint, request, and response."
|
|
371
371
|
},
|
|
372
372
|
"libraries": {
|
|
373
373
|
"title": "Client Libraries",
|
|
374
374
|
"section": "Libraries",
|
|
375
|
-
"body": "# Client Libraries\n\nThe official TypeScript and Python clients, and how to call ByteKit from Go.\n\nByteKit ships official SDKs for TypeScript and Python. Both are thin wrappers over the same\nREST endpoints, so nothing they do is out of reach from a language without an SDK — the Go page\nshows the plain standard-library equivalent. These pages cover installing and configuring each\nclient; the per-method reference is in the [SDK Reference](https://bytekit.com/docs/sdk).\n\n- [TypeScript SDK](https://bytekit.com/docs/libraries/typescript) — Type-safe ByteKit client for Node.js and modern JavaScript runtimes.\n- [Python SDK](https://bytekit.com/docs/libraries/python) — Official Python client for ByteKit, with sync and async support.\n- [Go](https://bytekit.com/docs/libraries/go) — Call the ByteKit REST API from Go with the standard library."
|
|
375
|
+
"body": "# Client Libraries\n\nThe official TypeScript and Python clients, and how to call ByteKit from Go.\n\nByteKit ships official SDKs for TypeScript and Python. Both are thin wrappers over the same\nREST endpoints, so nothing they do is out of reach from a language without an SDK — the Go page\nshows the plain standard-library equivalent. These pages cover installing and configuring each\nclient; the per-method reference is in the [SDK Reference](https://bytekit.com/docs/sdk).\n\nInstall `@hunt-labs/bytekit-sdk` (npm) / `bytekit-sdk` (PyPI). The npm package named `bytekit` is not ours.\n\n- [TypeScript SDK](https://bytekit.com/docs/libraries/typescript) — Type-safe ByteKit client for Node.js and modern JavaScript runtimes.\n- [Python SDK](https://bytekit.com/docs/libraries/python) — Official Python client for ByteKit, with sync and async support.\n- [Go](https://bytekit.com/docs/libraries/go) — Call the ByteKit REST API from Go with the standard library."
|
|
376
376
|
},
|
|
377
377
|
"libraries/go": {
|
|
378
378
|
"title": "Go",
|
|
@@ -382,12 +382,12 @@
|
|
|
382
382
|
"libraries/python": {
|
|
383
383
|
"title": "Python SDK",
|
|
384
384
|
"section": "Libraries",
|
|
385
|
-
"body": "# Python SDK\n\nOfficial Python client for ByteKit, with sync and async support.\n\nThe official Python SDK is generated from the ByteKit OpenAPI spec, so its models and\nmethods always match the API. Every operation ships in both synchronous and asynchronous form.\n\n## Install\n\n```bash\npip install bytekit-sdk\n```\n\nThe PyPI distribution is `bytekit-sdk`; the import name is `bytekit
|
|
385
|
+
"body": "# Python SDK\n\nOfficial Python client for ByteKit, with sync and async support.\n\nThe official Python SDK is generated from the ByteKit OpenAPI spec, so its models and\nmethods always match the API. Every operation ships in both synchronous and asynchronous form.\n\n## Install\n\n```bash\npip install bytekit-sdk\n```\n\nThe PyPI distribution is `bytekit-sdk`; the import name is `bytekit`. Install `@hunt-labs/bytekit-sdk` (npm) / `bytekit-sdk` (PyPI). The npm package named `bytekit` is not ours.\n\n## Your first scrape\n\n```python\nfrom bytekit import AuthenticatedClient\nfrom bytekit.api.scrape import create_scrape\nfrom bytekit.models.scrape_request import ScrapeRequest\nfrom bytekit.models.scrape_request_formats_item import ScrapeRequestFormatsItem\nfrom bytekit.models.scrape_success_envelope import ScrapeSuccessEnvelope\n\nclient = AuthenticatedClient(\n base_url=\"https://api.bytekit.com\",\n token=\"sk_live_your_api_key_here\",\n)\n\n# Request the markdown format explicitly — otherwise response.formats.markdown is UNSET.\nbody = ScrapeRequest(\n url=\"https://example.com\",\n formats=[ScrapeRequestFormatsItem.MARKDOWN],\n)\nresponse = create_scrape.sync(client=client, body=body)\n\n# .sync() returns None on a transport error, and a queued/error envelope on the\n# async or failure paths. Only a ScrapeSuccessEnvelope carries populated formats.\nif response is None:\n print(\"Request failed — no response returned.\")\nelif isinstance(response, ScrapeSuccessEnvelope) and isinstance(response.formats.markdown, str):\n print(response.formats.markdown)\nelse:\n # Queued (ScrapeQueuedEnvelope) or error (ScrapeErrorEnvelope) — inspect `response`.\n print(f\"Scrape not complete: {response}\")\n```\n\nEach operation exposes four call styles:\n\n- `create_scrape.sync(...)` — returns the parsed model (or `None`).\n- `create_scrape.sync_detailed(...)` — returns the full `Response` (status code, headers, body).\n- `create_scrape.asyncio(...)` — awaitable form of `sync`.\n- `create_scrape.asyncio_detailed(...)` — awaitable form of `sync_detailed`.\n\n## Async usage\n\n```python\nimport asyncio\nfrom bytekit import AuthenticatedClient\nfrom bytekit.api.screenshots import create_screenshot\nfrom bytekit.models.screenshot_request import ScreenshotRequest\n\nasync def main():\n client = AuthenticatedClient(\n base_url=\"https://api.bytekit.com\",\n token=\"sk_live_your_api_key_here\",\n )\n body = ScreenshotRequest(url=\"https://example.com\")\n response = await create_screenshot.asyncio(client=client, body=body)\n print(response)\n\nasyncio.run(main())\n```\n\n## What's available\n\nOperations are grouped by capability under `bytekit.api.*`: `scrape`, `scrape_bulk`,\n`screenshots`, `bulk`, `fetch`, `fetch_bulk`, `monitors`, `sitemap`, and\n`account`.\n\nSee the [Python SDK Reference](https://bytekit.com/docs/sdk/python/client) for every module, function, and model.\n\n## Next steps\n\n- [TypeScript SDK](https://bytekit.com/docs/libraries/typescript) — the same API surface in TypeScript.\n- [API Reference](https://bytekit.com/docs/api) — the underlying REST endpoints.\n- [Errors](https://bytekit.com/docs/guides/errors) — error codes and retry guidance."
|
|
386
386
|
},
|
|
387
387
|
"libraries/typescript": {
|
|
388
388
|
"title": "TypeScript SDK",
|
|
389
389
|
"section": "Libraries",
|
|
390
|
-
"body": "# TypeScript SDK\n\nType-safe ByteKit client for Node.js and modern JavaScript runtimes.\n\nThe official TypeScript SDK is a thin, type-safe wrapper over the ByteKit REST API. It works\nin Node.js and any runtime with a global `fetch` (Bun, Deno, Cloudflare Workers, modern\nbrowsers).\n\n## Install\n\n```bash\nnpm install @hunt-labs/bytekit-sdk\n```\n\n## Initialize\n\n```ts\nimport { ByteKit } from '@hunt-labs/bytekit-sdk';\n\nconst client = new ByteKit({\n apiKey: process.env.BYTEKIT_API_KEY!, // your sk_live_… key\n});\n```\n\n## Your first scrape\n\n```ts\nconst result = await client.scrape.create({\n url: 'https://example.com',\n formats: ['markdown'],\n});\n\nconsole.log(result);\n```\n\n## Capture a screenshot\n\n```ts\nconst shot = await client.screenshots.create({\n url: 'https://example.com',\n full_page: true,\n});\n\nconsole.log(shot);\n```\n\n## Handle errors\n\nAny 4xx/5xx response throws a `ByteKitError` carrying the HTTP `status` and the API\n`error.code`:\n\n```ts\nimport { ByteKit, ByteKitError } from '@hunt-labs/bytekit-sdk';\n\ntry {\n await client.scrape.create({ url: 'https://example.com' });\n} catch (err) {\n if (err instanceof ByteKitError) {\n console.error(`${err.status} ${err.code}: ${err.message}`);\n } else {\n throw err;\n }\n}\n```\n\n## Async scrapes\n\nPass `async: true` to enqueue the job and poll by ID:\n\n```ts\nconst queued = await client.scrape.create({ url: 'https://example.com', async: true });\n// later — poll with the returned sc_… id\nconst final = await client.scrape.get('sc_...');\n```\n\n## What's available\n\nThe client exposes one resource per capability: `scrape`, `screenshots`, `bulk`,\n`fetch`, `monitors`, `sitemap`, `search`, `account`, `usage`, and `webhooks` (each with\n`create` / `get` / `list` methods as applicable, plus nested resources like `scrape.bulk`\nand `monitors.captures`).\n\nSee the [TypeScript SDK Reference](https://bytekit.com/docs/sdk/typescript/client) for every method and option.\n\n## Next steps\n\n- [Python SDK](https://bytekit.com/docs/libraries/python) — the same API surface in Python.\n- [API Reference](https://bytekit.com/docs/api) — the underlying REST endpoints.\n- [Errors](https://bytekit.com/docs/guides/errors) — error codes and retry guidance."
|
|
390
|
+
"body": "# TypeScript SDK\n\nType-safe ByteKit client for Node.js and modern JavaScript runtimes.\n\nThe official TypeScript SDK is a thin, type-safe wrapper over the ByteKit REST API. It works\nin Node.js and any runtime with a global `fetch` (Bun, Deno, Cloudflare Workers, modern\nbrowsers).\n\n## Install\n\n```bash\nnpm install @hunt-labs/bytekit-sdk\n```\n\nInstall `@hunt-labs/bytekit-sdk` (npm) / `bytekit-sdk` (PyPI). The npm package named `bytekit` is not ours.\n\n## Initialize\n\n```ts\nimport { ByteKit } from '@hunt-labs/bytekit-sdk';\n\nconst client = new ByteKit({\n apiKey: process.env.BYTEKIT_API_KEY!, // your sk_live_… key\n});\n```\n\n## Your first scrape\n\n```ts\nconst result = await client.scrape.create({\n url: 'https://example.com',\n formats: ['markdown'],\n});\n\nconsole.log(result);\n```\n\n## Capture a screenshot\n\n```ts\nconst shot = await client.screenshots.create({\n url: 'https://example.com',\n full_page: true,\n});\n\nconsole.log(shot);\n```\n\n## Handle errors\n\nAny 4xx/5xx response throws a `ByteKitError` carrying the HTTP `status` and the API\n`error.code`:\n\n```ts\nimport { ByteKit, ByteKitError } from '@hunt-labs/bytekit-sdk';\n\ntry {\n await client.scrape.create({ url: 'https://example.com' });\n} catch (err) {\n if (err instanceof ByteKitError) {\n console.error(`${err.status} ${err.code}: ${err.message}`);\n } else {\n throw err;\n }\n}\n```\n\n## Async scrapes\n\nPass `async: true` to enqueue the job and poll by ID:\n\n```ts\nconst queued = await client.scrape.create({ url: 'https://example.com', async: true });\n// later — poll with the returned sc_… id\nconst final = await client.scrape.get('sc_...');\n```\n\n## What's available\n\nThe client exposes one resource per capability: `scrape`, `screenshots`, `bulk`,\n`fetch`, `monitors`, `sitemap`, `search`, `account`, `usage`, and `webhooks` (each with\n`create` / `get` / `list` methods as applicable, plus nested resources like `scrape.bulk`\nand `monitors.captures`).\n\nSee the [TypeScript SDK Reference](https://bytekit.com/docs/sdk/typescript/client) for every method and option.\n\n## Next steps\n\n- [Python SDK](https://bytekit.com/docs/libraries/python) — the same API surface in Python.\n- [API Reference](https://bytekit.com/docs/api) — the underlying REST endpoints.\n- [Errors](https://bytekit.com/docs/guides/errors) — error codes and retry guidance."
|
|
391
391
|
},
|
|
392
392
|
"mcp": {
|
|
393
393
|
"title": "MCP Server",
|
|
@@ -397,7 +397,7 @@
|
|
|
397
397
|
"quickstart": {
|
|
398
398
|
"title": "Quickstart",
|
|
399
399
|
"section": "General",
|
|
400
|
-
"body": "# Quickstart\n\nMake your first ByteKit API call in under 5 minutes — no SDK required.\n\nNothing to install. You only need `curl` and an API key.\n\n## Get an API key\n\nSign up at [app.bytekit.com](https://app.bytekit.com) and create an API key from the\ndashboard. Keys are prefixed `sk_live_`.\n\nSee [Authentication](https://bytekit.com/docs/guides/authentication) for details on key formats and management.\n\n## Make your first scrape\n\nSet your API key and run this — no file to save, no `chmod`:\n\n```bash\ncurl -X POST https://api.bytekit.com/v1/scrape \\\n -H \"Authorization: Bearer $BYTEKIT_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"url\":\"https://example.com\"}'\n```\n\nWant a full-featured script with error handling and `jq` formatting? Use this instead:\n\n```bash\n#!/usr/bin/env bash\n# POST /v1/scrape — scrape a URL and return its content as markdown.\n# Usage: BYTEKIT_API_KEY=sk_... bash examples/curl/scrape.sh\n\nset -euo pipefail\n\n: \"${BYTEKIT_API_KEY:?BYTEKIT_API_KEY is required}\"\nBASE_URL=\"${BYTEKIT_BASE_URL:-https://api.bytekit.com}\"\n\ncurl -sf -X POST \"$BASE_URL/v1/scrape\" \\\n -H \"Authorization: Bearer $BYTEKIT_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"url\": \"https://example.com\", \"formats\": [\"markdown\"]}' \\\n | jq .\n```\n\nA successful response looks like this — every envelope field is `snake_case`:\n\n```json\n{\n \"schema_version\": 1,\n \"status\": \"success\",\n \"id\": \"sc_84c14b1058184045b97ae360ad74888b\",\n \"url\": \"https://example.com\",\n \"final_url\": \"https://example.com\",\n \"content_type\": \"text/html\",\n \"content_length\": 318,\n \"status_code\": 200,\n \"retrieved_at\": \"2026-08-27T12:16:01.872Z\",\n \"formats\": {\n \"raw\": \"<!doctype html><html lang=\\\"en\\\"><head><title>Example Domain</title>…</html>\\n\"\n },\n \"metadata\": {\n \"title\": \"Example Domain\",\n \"description\": null,\n \"language\": \"en\",\n \"canonicalUrl\": null,\n \"ogTitle\": null,\n \"ogDescription\": null,\n \"ogImage\": null,\n \"ogUrl\": null,\n \"ogSiteName\": null,\n \"robots\": null,\n \"byline\": null,\n \"publishedAt\": null\n },\n \"cache\": \"miss\",\n \"billing\": {\n \"raw_bytes\": 318,\n \"factors\": [{ \"name\": \"endpoint\", \"value\": 1, \"reason\": \"scrape\" }],\n \"multiplier\": 1,\n \"billed_bytes\": 318\n }\n}\n```\n\n`content_length` is the compressed wire size in bytes (used for bandwidth billing), and\n`billing` breaks down what the request actually cost. `cache` is `\"miss\"` or `\"hit\"`, and a\nhit adds a `cache_age_s` field. The `id` field uses the `sc_` prefix — you can poll\n`GET /v1/scrape/{id}` if the scrape was queued asynchronously.\n\nThe keys inside `metadata` stay `camelCase` (`canonicalUrl`, `ogTitle`, …): they are the\npage's own metadata, not envelope fields.\n\n## Ask for markdown\n\nThe default format is `raw` — that is why the response above carries no\n`formats.markdown`. Request markdown explicitly:\n\n```bash\ncurl -X POST https://api.bytekit.com/v1/scrape \\\n -H \"Authorization: Bearer $BYTEKIT_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"url\":\"https://example.com\",\"formats\":[\"markdown\"]}'\n```\n\nMarkdown output is billed at **1.5×** the request's upstream wire bytes — the `endpoint`\nfactor in the `billing` node below is the rate your balance is charged, not a display\nweighting. See [Bandwidth billing](https://bytekit.com/docs/billing/bandwidth) for how the factors compose.\n\nThe response's `formats` object is keyed by what you asked for:\n\n```json\n{\n \"schema_version\": 1,\n \"status\": \"success\",\n \"id\": \"sc_f659fa67dfb244159767132c2aa50917\",\n \"url\": \"https://example.com\",\n \"final_url\": \"https://example.com\",\n \"content_type\": \"text/html\",\n \"content_length\": 318,\n \"status_code\": 200,\n \"retrieved_at\": \"2026-08-27T12:16:11.337Z\",\n \"formats\": {\n \"markdown\": \"---\\ntitle: \\\"Example Domain\\\"\\nurl: \\\"https://example.com\\\"\\ncaptured_at: \\\"2026-08-27T12:16:11.416Z\\\"\\n---\\nThis domain is for use in documentation examples without needing permission. Avoid use in operations.\\n\\n[Learn more](https://iana.org/domains/example)\"\n },\n \"metadata\": {\n \"title\": \"Example Domain\",\n \"description\": null,\n \"language\": \"en\",\n \"canonicalUrl\": null,\n \"ogTitle\": null,\n \"ogDescription\": null,\n \"ogImage\": null,\n \"ogUrl\": null,\n \"ogSiteName\": null,\n \"robots\": null,\n \"byline\": null,\n \"publishedAt\": null\n },\n \"cache\": \"hit\",\n \"cache_age_s\": 8,\n \"billing\": {\n \"raw_bytes\": 318,\n \"factors\": [\n { \"name\": \"endpoint\", \"value\": 1.5, \"reason\": \"scrape_md\" },\n { \"name\": \"cache_hit\", \"value\": 0.5, \"reason\": \"hit, age 8s\" }\n ],\n \"multiplier\": 0.75,\n \"billed_bytes\": 239\n }\n}\n```\n\nSee [Scraping](https://bytekit.com/docs/guides/scraping) for the other formats (`markdown`, `links`, `images`).\n\n## Prefer an SDK?\n\nSkip the raw HTTP and use an official client:\n\n- [TypeScript SDK](https://bytekit.com/docs/libraries/typescript) — `npm install @hunt-labs/bytekit-sdk`\n- [Python SDK](https://bytekit.com/docs/libraries/python) — `pip install bytekit-sdk`\n\n## Next steps\n\n- [Authentication](https://bytekit.com/docs/guides/authentication) — key formats, Bearer header, self-serve key management\n- [Scraping](https://bytekit.com/docs/guides/scraping) — formats, options, latency, and async polling\n- [Errors](https://bytekit.com/docs/guides/errors) — error shape, common codes, retry guidance\n- [Rate Limits](https://bytekit.com/docs/guides/rate-limits) — quota model, concurrency slots, rate limit headers\n- [Monitors](https://bytekit.com/docs/guides/monitors) — page-change detection (screenshot or scrape) with webhook notifications\n- [API Reference](https://bytekit.com/docs/api) — full endpoint documentation"
|
|
400
|
+
"body": "# Quickstart\n\nMake your first ByteKit API call in under 5 minutes — no SDK required.\n\nNothing to install. You only need `curl` and an API key.\n\n## Get an API key\n\nSign up at [app.bytekit.com](https://app.bytekit.com) and create an API key from the\ndashboard. Keys are prefixed `sk_live_`.\n\nSee [Authentication](https://bytekit.com/docs/guides/authentication) for details on key formats and management.\n\n## Make your first scrape\n\nSet your API key and run this — no file to save, no `chmod`:\n\n```bash\ncurl -X POST https://api.bytekit.com/v1/scrape \\\n -H \"Authorization: Bearer $BYTEKIT_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"url\":\"https://example.com\"}'\n```\n\nWant a full-featured script with error handling and `jq` formatting? Use this instead:\n\n```bash\n#!/usr/bin/env bash\n# POST /v1/scrape — scrape a URL and return its content as markdown.\n# Usage: BYTEKIT_API_KEY=sk_... bash examples/curl/scrape.sh\n\nset -euo pipefail\n\n: \"${BYTEKIT_API_KEY:?BYTEKIT_API_KEY is required}\"\nBASE_URL=\"${BYTEKIT_BASE_URL:-https://api.bytekit.com}\"\n\ncurl -sf -X POST \"$BASE_URL/v1/scrape\" \\\n -H \"Authorization: Bearer $BYTEKIT_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"url\": \"https://example.com\", \"formats\": [\"markdown\"]}' \\\n | jq .\n```\n\nA successful response looks like this — every envelope field is `snake_case`:\n\n```json\n{\n \"schema_version\": 1,\n \"status\": \"success\",\n \"id\": \"sc_84c14b1058184045b97ae360ad74888b\",\n \"url\": \"https://example.com\",\n \"final_url\": \"https://example.com\",\n \"content_type\": \"text/html\",\n \"content_length\": 318,\n \"status_code\": 200,\n \"retrieved_at\": \"2026-08-27T12:16:01.872Z\",\n \"formats\": {\n \"raw\": \"<!doctype html><html lang=\\\"en\\\"><head><title>Example Domain</title>…</html>\\n\"\n },\n \"metadata\": {\n \"title\": \"Example Domain\",\n \"description\": null,\n \"language\": \"en\",\n \"canonicalUrl\": null,\n \"ogTitle\": null,\n \"ogDescription\": null,\n \"ogImage\": null,\n \"ogUrl\": null,\n \"ogSiteName\": null,\n \"robots\": null,\n \"byline\": null,\n \"publishedAt\": null\n },\n \"cache\": \"miss\",\n \"billing\": {\n \"raw_bytes\": 318,\n \"factors\": [{ \"name\": \"endpoint\", \"value\": 1, \"reason\": \"scrape\" }],\n \"multiplier\": 1,\n \"billed_bytes\": 318\n }\n}\n```\n\n`content_length` is the compressed wire size in bytes (used for bandwidth billing), and\n`billing` breaks down what the request actually cost. `cache` is `\"miss\"` or `\"hit\"`, and a\nhit adds a `cache_age_s` field. The `id` field uses the `sc_` prefix — you can poll\n`GET /v1/scrape/{id}` if the scrape was queued asynchronously.\n\nThe keys inside `metadata` stay `camelCase` (`canonicalUrl`, `ogTitle`, …): they are the\npage's own metadata, not envelope fields.\n\n## Ask for markdown\n\nThe default format is `raw` — that is why the response above carries no\n`formats.markdown`. Request markdown explicitly:\n\n```bash\ncurl -X POST https://api.bytekit.com/v1/scrape \\\n -H \"Authorization: Bearer $BYTEKIT_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"url\":\"https://example.com\",\"formats\":[\"markdown\"]}'\n```\n\nMarkdown output is billed at **1.5×** the request's upstream wire bytes — the `endpoint`\nfactor in the `billing` node below is the rate your balance is charged, not a display\nweighting. See [Bandwidth billing](https://bytekit.com/docs/billing/bandwidth) for how the factors compose.\n\nThe response's `formats` object is keyed by what you asked for:\n\n```json\n{\n \"schema_version\": 1,\n \"status\": \"success\",\n \"id\": \"sc_f659fa67dfb244159767132c2aa50917\",\n \"url\": \"https://example.com\",\n \"final_url\": \"https://example.com\",\n \"content_type\": \"text/html\",\n \"content_length\": 318,\n \"status_code\": 200,\n \"retrieved_at\": \"2026-08-27T12:16:11.337Z\",\n \"formats\": {\n \"markdown\": \"---\\ntitle: \\\"Example Domain\\\"\\nurl: \\\"https://example.com\\\"\\ncaptured_at: \\\"2026-08-27T12:16:11.416Z\\\"\\n---\\nThis domain is for use in documentation examples without needing permission. Avoid use in operations.\\n\\n[Learn more](https://iana.org/domains/example)\"\n },\n \"metadata\": {\n \"title\": \"Example Domain\",\n \"description\": null,\n \"language\": \"en\",\n \"canonicalUrl\": null,\n \"ogTitle\": null,\n \"ogDescription\": null,\n \"ogImage\": null,\n \"ogUrl\": null,\n \"ogSiteName\": null,\n \"robots\": null,\n \"byline\": null,\n \"publishedAt\": null\n },\n \"cache\": \"hit\",\n \"cache_age_s\": 8,\n \"billing\": {\n \"raw_bytes\": 318,\n \"factors\": [\n { \"name\": \"endpoint\", \"value\": 1.5, \"reason\": \"scrape_md\" },\n { \"name\": \"cache_hit\", \"value\": 0.5, \"reason\": \"hit, age 8s\" }\n ],\n \"multiplier\": 0.75,\n \"billed_bytes\": 239\n }\n}\n```\n\nSee [Scraping](https://bytekit.com/docs/guides/scraping) for the other formats (`markdown`, `links`, `images`).\n\n## Prefer an SDK?\n\nSkip the raw HTTP and use an official client:\n\n- [TypeScript SDK](https://bytekit.com/docs/libraries/typescript) — `npm install @hunt-labs/bytekit-sdk`\n- [Python SDK](https://bytekit.com/docs/libraries/python) — `pip install bytekit-sdk`\n\nInstall `@hunt-labs/bytekit-sdk` (npm) / `bytekit-sdk` (PyPI). The npm package named `bytekit` is not ours.\n\n## Next steps\n\n- [Authentication](https://bytekit.com/docs/guides/authentication) — key formats, Bearer header, self-serve key management\n- [Scraping](https://bytekit.com/docs/guides/scraping) — formats, options, latency, and async polling\n- [Errors](https://bytekit.com/docs/guides/errors) — error shape, common codes, retry guidance\n- [Rate Limits](https://bytekit.com/docs/guides/rate-limits) — quota model, concurrency slots, rate limit headers\n- [Monitors](https://bytekit.com/docs/guides/monitors) — page-change detection (screenshot or scrape) with webhook notifications\n- [API Reference](https://bytekit.com/docs/api) — full endpoint documentation"
|
|
401
401
|
},
|
|
402
402
|
"sdk": {
|
|
403
403
|
"title": "SDK Reference",
|
|
@@ -60,27 +60,29 @@ export declare function slugToUrlPath(slug: string[]): string;
|
|
|
60
60
|
/**
|
|
61
61
|
* Parses the llms.txt response to extract page slugs.
|
|
62
62
|
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
* The link targets the HTML page (/docs/<slug>) with no description.
|
|
63
|
+
* Each entry line has the llms.txt link-convention shape (issues #2059, #5007):
|
|
64
|
+
* "- [<title>](https://bytekit.com/docs/api/md/<slug>): <description>"
|
|
65
|
+
* The link targets the raw-markdown route (/docs/api/md/<slug>); the
|
|
66
|
+
* ": <description>" suffix is omitted when the page has none. The docs index
|
|
67
|
+
* keeps its HTML URL ("- [<title>](https://bytekit.com/docs/)").
|
|
69
68
|
*
|
|
70
|
-
* The URL is
|
|
71
|
-
*
|
|
72
|
-
* which contain an http token). The slug
|
|
73
|
-
* route prefix (/docs/api/md/) when
|
|
69
|
+
* The URL is the FIRST http(s) token on the line, ended by whitespace or the
|
|
70
|
+
* ")" that closes the link (robust to colons and parentheses in the title and
|
|
71
|
+
* to a trailing description, neither of which contain an http token). The slug
|
|
72
|
+
* is derived by stripping the raw-markdown route prefix (/docs/api/md/) when
|
|
73
|
+
* present, else the /docs/ prefix.
|
|
74
74
|
*
|
|
75
|
-
* Lines without an http URL,
|
|
76
|
-
*
|
|
75
|
+
* Lines without an http URL, URLs outside /docs (the summary block's
|
|
76
|
+
* api.bytekit.com and app.bytekit.com), and the docs index (empty slug) are
|
|
77
|
+
* ignored.
|
|
77
78
|
*/
|
|
78
79
|
export declare function parseLlmsTxt(text: string): Array<string[]>;
|
|
79
80
|
/**
|
|
80
81
|
* Returns a new bundle object whose keys are sorted lexicographically.
|
|
81
82
|
*
|
|
82
|
-
* Page-slug discovery order comes from `/docs/llms.txt`, which
|
|
83
|
-
* fumadocs-mdx's file-discovery
|
|
83
|
+
* Page-slug discovery order comes from `/docs/llms.txt`, which follows the docs
|
|
84
|
+
* navigation tree (issue #5007); pages the tree leaves to fumadocs-mdx's file-discovery
|
|
85
|
+
* order in the generated `.source/index.ts` manifest are not pinned.
|
|
84
86
|
* That order is NOT guaranteed stable across independent `next build` invocations —
|
|
85
87
|
* two regenerations from byte-identical docs content can (and empirically do, issue
|
|
86
88
|
* #2590 DoD-2) produce a differently-ORDERED but content-identical bundle, because
|
|
@@ -84,20 +84,21 @@ export function slugToUrlPath(slug) {
|
|
|
84
84
|
/**
|
|
85
85
|
* Parses the llms.txt response to extract page slugs.
|
|
86
86
|
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
* The link targets the HTML page (/docs/<slug>) with no description.
|
|
87
|
+
* Each entry line has the llms.txt link-convention shape (issues #2059, #5007):
|
|
88
|
+
* "- [<title>](https://bytekit.com/docs/api/md/<slug>): <description>"
|
|
89
|
+
* The link targets the raw-markdown route (/docs/api/md/<slug>); the
|
|
90
|
+
* ": <description>" suffix is omitted when the page has none. The docs index
|
|
91
|
+
* keeps its HTML URL ("- [<title>](https://bytekit.com/docs/)").
|
|
93
92
|
*
|
|
94
|
-
* The URL is
|
|
95
|
-
*
|
|
96
|
-
* which contain an http token). The slug
|
|
97
|
-
* route prefix (/docs/api/md/) when
|
|
93
|
+
* The URL is the FIRST http(s) token on the line, ended by whitespace or the
|
|
94
|
+
* ")" that closes the link (robust to colons and parentheses in the title and
|
|
95
|
+
* to a trailing description, neither of which contain an http token). The slug
|
|
96
|
+
* is derived by stripping the raw-markdown route prefix (/docs/api/md/) when
|
|
97
|
+
* present, else the /docs/ prefix.
|
|
98
98
|
*
|
|
99
|
-
* Lines without an http URL,
|
|
100
|
-
*
|
|
99
|
+
* Lines without an http URL, URLs outside /docs (the summary block's
|
|
100
|
+
* api.bytekit.com and app.bytekit.com), and the docs index (empty slug) are
|
|
101
|
+
* ignored.
|
|
101
102
|
*/
|
|
102
103
|
export function parseLlmsTxt(text) {
|
|
103
104
|
const slugs = [];
|
|
@@ -105,18 +106,20 @@ export function parseLlmsTxt(text) {
|
|
|
105
106
|
const trimmed = line.trim();
|
|
106
107
|
if (!trimmed.startsWith('- '))
|
|
107
108
|
continue;
|
|
108
|
-
// Extract URL — the first
|
|
109
|
-
//
|
|
110
|
-
|
|
111
|
-
const urlMatch = trimmed.match(/https?:\/\/\S+/);
|
|
109
|
+
// Extract URL — the first http(s) token on the line, up to whitespace or the
|
|
110
|
+
// ")" closing the markdown link.
|
|
111
|
+
const urlMatch = trimmed.match(/https?:\/\/[^\s)]+/);
|
|
112
112
|
if (!urlMatch)
|
|
113
113
|
continue;
|
|
114
114
|
const url = urlMatch[0];
|
|
115
115
|
try {
|
|
116
116
|
const pathname = new URL(url).pathname; // e.g. /docs/api/md/guides/authentication
|
|
117
|
+
// Summary-block URLs (api.bytekit.com, app.bytekit.com) are not doc pages.
|
|
118
|
+
if (pathname !== '/docs' && !pathname.startsWith('/docs/'))
|
|
119
|
+
continue;
|
|
117
120
|
// Prefer the raw-markdown route prefix (/docs/api/md/) so the derived slug
|
|
118
121
|
// is the page slug, not the md-route path. Fall back to the /docs/ prefix
|
|
119
|
-
// for the
|
|
122
|
+
// for the docs-index line, which keeps its HTML URL.
|
|
120
123
|
const mdMatch = pathname.match(/^\/docs\/api\/md\/(.+)$/);
|
|
121
124
|
const afterDocs = mdMatch ? mdMatch[1] : pathname.replace(/^\/docs\/?/, '');
|
|
122
125
|
if (!afterDocs)
|
|
@@ -133,8 +136,9 @@ export function parseLlmsTxt(text) {
|
|
|
133
136
|
/**
|
|
134
137
|
* Returns a new bundle object whose keys are sorted lexicographically.
|
|
135
138
|
*
|
|
136
|
-
* Page-slug discovery order comes from `/docs/llms.txt`, which
|
|
137
|
-
* fumadocs-mdx's file-discovery
|
|
139
|
+
* Page-slug discovery order comes from `/docs/llms.txt`, which follows the docs
|
|
140
|
+
* navigation tree (issue #5007); pages the tree leaves to fumadocs-mdx's file-discovery
|
|
141
|
+
* order in the generated `.source/index.ts` manifest are not pinned.
|
|
138
142
|
* That order is NOT guaranteed stable across independent `next build` invocations —
|
|
139
143
|
* two regenerations from byte-identical docs content can (and empirically do, issue
|
|
140
144
|
* #2590 DoD-2) produce a differently-ORDERED but content-identical bundle, because
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hunt-labs/bytekit-mcp",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.15",
|
|
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",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"url": "https://bytekit.com/contact"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@modelcontextprotocol/sdk": "
|
|
57
|
+
"@modelcontextprotocol/sdk": "1.31.0",
|
|
58
58
|
"zod": "^3.23.6"
|
|
59
59
|
},
|
|
60
60
|
"scripts": {
|