@hunt-labs/bytekit-mcp 0.2.1 → 0.2.2

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.
@@ -1,138 +1,28 @@
1
1
  {
2
- "changelog": {
3
- "title": "Changelog",
4
- "section": "General",
5
- "body": "# Changelog\n\nRelease history for the ByteKit API and SDKs\n\n_No releases yet. Check back after the first version ships._"
6
- },
7
- "introduction": {
8
- "title": "Introduction",
9
- "section": "General",
10
- "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, scrolling recordings, 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- **Record** — Generate a scrolling video of a page.\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. Recordings are always async — they return `202` with a `rec_…` ID, with no `async` field\nto set.\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."
11
- },
12
- "mcp": {
13
- "title": "MCP Server",
14
- "section": "General",
15
- "body": "# MCP Server\n\nCall ByteKit web capture as a native tool from Claude, Cursor, and any MCP-compatible agent — hosted over HTTP or run locally over stdio.\n\nThe ByteKit **MCP server** exposes scraping, search, screenshots, and account\nlookups as [Model Context Protocol](https://modelcontextprotocol.io) tools. Your\nagent calls `scrape_url` or `screenshot_url` the same way it calls any other\ntool — no wrapper to write, no headless browser to manage.\n\nThere are two ways to connect: a **hosted HTTP endpoint** (nothing to install)\nand a **local stdio server** (`npx @hunt-labs/bytekit-mcp`).\n\n## Authentication\n\nBoth paths authenticate with a ByteKit API key. Sign up at\n[app.bytekit.com](https://app.bytekit.com) and create a key (prefixed\n`sk_live_`). The local server reads it from the `BYTEKIT_API_KEY` environment\nvariable (or the `--api-key` flag); the hosted endpoint takes it as a bearer\ntoken.\n\n## Option 1 — Hosted HTTP (no install)\n\nPoint any MCP client that speaks the Streamable HTTP transport at:\n\n```\nhttps://api.bytekit.com/mcp\n```\n\nSend your API key as a bearer token. Example client config (Claude Desktop,\nCursor, and most hosts accept this shape):\n\n```json\n{\n \"mcpServers\": {\n \"bytekit\": {\n \"url\": \"https://api.bytekit.com/mcp\",\n \"headers\": {\n \"Authorization\": \"Bearer $BYTEKIT_API_KEY\"\n }\n }\n }\n}\n```\n\n## Option 2 — Local stdio (`npx`)\n\nRun the server as a local subprocess over stdio. Nothing to install globally —\n`npx` fetches it on demand:\n\n```bash\nnpx @hunt-labs/bytekit-mcp --api-key $BYTEKIT_API_KEY\n```\n\nOr set the key in your environment and omit the flag:\n\n```bash\nexport BYTEKIT_API_KEY=sk_live_xxx\nnpx @hunt-labs/bytekit-mcp\n```\n\nClient config for a stdio server:\n\n```json\n{\n \"mcpServers\": {\n \"bytekit\": {\n \"command\": \"npx\",\n \"args\": [\"-y\", \"@hunt-labs/bytekit-mcp\"],\n \"env\": {\n \"BYTEKIT_API_KEY\": \"sk_live_xxx\"\n }\n }\n }\n}\n```\n\n### API-key resolution order\n\nThe local server resolves the key in this order:\n\n1. `--api-key <key>` flag\n2. `BYTEKIT_API_KEY` environment variable\n\n## Tool inventory\n\n| Tool | What it does |\n| --- | --- |\n| `scrape_url` | Fetch a URL and return HTML, clean markdown, links, or images. |\n| `web_search` | Run a web search and return ranked organic results. |\n| `screenshot_url` | Capture a screenshot of a page (desktop/mobile, PNG/JPEG). |\n| `get_result` | Fetch a previously created screenshot by id. |\n| `get_account` | Return account details, plan, and current usage/quota. |\n| `list_docs` | List every page in the bundled ByteKit documentation. |\n| `search_docs` | Search the bundled documentation. |\n| `get_doc` | Fetch the full markdown of one documentation page. |\n\nThe server also exposes **resources** (`bytekit://account`,\n`bytekit://screenshot/{id}`) and **prompts** (`summarize_webpage`,\n`extract_structured_data`, `research_topic`) that MCP hosts can surface directly.\n\n## Next steps\n\n- [Quickstart](https://bytekit.com/docs/quickstart) — make your first ByteKit API call.\n- [Authentication](https://bytekit.com/docs/guides/authentication) — key formats and management."
16
- },
17
- "quickstart": {
18
- "title": "Quickstart",
19
- "section": "General",
20
- "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<!-- example omitted: curl/scrape.sh (source unavailable) -->\n\nA successful response looks like this:\n\n```json\n{\n \"status\": \"success\",\n \"id\": \"sc_...\",\n \"url\": \"https://example.com\",\n \"finalUrl\": \"https://example.com/\",\n \"contentType\": \"text/html; charset=UTF-8\",\n \"contentLength\": 1256,\n \"statusCode\": 200,\n \"retrievedAt\": \"2025-01-15T12:00:00Z\",\n \"formats\": {\n \"markdown\": \"# Example Domain\\n\\nThis domain is for use in illustrative examples...\"\n },\n \"metadata\": {\n \"title\": \"Example Domain\"\n }\n}\n```\n\n`contentLength` is the compressed wire size in bytes (used for bandwidth billing). The `id`\nfield uses the `sc_` prefix — you can poll `GET /v1/scrape/{id}` if the scrape was queued\nasynchronously.\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"
21
- },
22
2
  "api": {
23
3
  "title": "API Reference",
24
4
  "section": "API Reference",
25
5
  "body": "# API Reference\n\nEvery ByteKit endpoint, request, and response.\n\nThe ByteKit REST API is organized by capability. Every endpoint shares one base\nURL and Bearer authentication — start with the [Quickstart](https://bytekit.com/docs/quickstart) and\n[Authentication](https://bytekit.com/docs/guides/authentication) guides.\n\n- [Scrape](https://bytekit.com/docs/api/scrape/createscrape) — Fetch any URL as raw HTML, clean markdown, or structured content.\n- [Screenshots](https://bytekit.com/docs/api/screenshots/createscreenshot) — Capture full-page or viewport PNG/JPEG.\n- [Recordings](https://bytekit.com/docs/api/recordings/createrecording) — Generate a scrolling video of a page.\n- [Bulk](https://bytekit.com/docs/api/bulk/createbulk) — Fan out many URLs in parallel with per-item webhooks.\n- [Monitors](https://bytekit.com/docs/api/monitors/createmonitor) — Watch a URL on a schedule and webhook on change.\n- [Sitemap](https://bytekit.com/docs/api/sitemap/createsitemap) — Discover URLs from a domain's sitemap or by crawling.\n- [Fetch](https://bytekit.com/docs/api/fetch/postfetch) — Low-latency raw HTTP fetch with optional conversion."
26
6
  },
27
- "cli/account": {
7
+ "api/account": {
28
8
  "title": "Account",
29
- "section": "CLI Reference",
30
- "body": "# Account\n\nAccount operations\n\nAccount operations\n\n### account › get\n\nGet the authenticated account\n\n| Option | Description |\n| --- | --- |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit account get\n```"
31
- },
32
- "cli/bulk": {
33
- "title": "Bulk",
34
- "section": "CLI Reference",
35
- "body": "# Bulk\n\nBulk screenshot operations\n\nBulk screenshot operations\n\n### bulk › screenshots\n\nBulk screenshot sub-resources\n\n| Option | Description |\n| --- | --- |\n| `-h, --help` | display help for command |\n\n#### bulk › screenshots › list\n\nList screenshots in a bulk job\n\n| Option | Description |\n| --- | --- |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit bulk screenshots list <id>\n```\n\n### bulk › create\n\nCreate a bulk screenshots job\n\n| Option | Description |\n| --- | --- |\n| `--file <path>` | Path to newline-delimited file of URLs (plain URL or \\{\"url\":\"...\"\\} per line) |\n| `--webhook-url <url>` | HTTPS webhook URL notified when the job completes |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit bulk create --file <path> --webhook-url <url>\n```\n\n### bulk › get\n\nGet a bulk job status\n\n| Option | Description |\n| --- | --- |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit bulk get <id>\n```\n\n### bulk › cancel\n\nCancel an in-flight bulk job\n\n| Option | Description |\n| --- | --- |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit bulk cancel <id>\n```"
36
- },
37
- "cli/fetch": {
38
- "title": "Fetch",
39
- "section": "CLI Reference",
40
- "body": "# Fetch\n\nFetch URL content operations\n\nFetch URL content operations\n\n### fetch › bulk\n\nBulk fetch operations\n\n| Option | Description |\n| --- | --- |\n| `-h, --help` | display help for command |\n\n#### fetch › bulk › create\n\nCreate a bulk fetch job\n\n| Option | Description |\n| --- | --- |\n| `--file <path>` | Path to newline-delimited file of URLs (plain URL or \\{\"url\":\"...\"\\} per line) |\n| `--webhook-url <url>` | HTTPS webhook URL notified when the job completes |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit fetch bulk create --file <path> --webhook-url <url>\n```\n\n#### fetch › bulk › get\n\nGet a bulk fetch job\n\n| Option | Description |\n| --- | --- |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit fetch bulk get <id>\n```\n\n### fetch › create\n\nFetch URL content (POST)\n\n| Option | Description |\n| --- | --- |\n| `--url <url>` | URL to fetch |\n| `--format <format>` | Response format (markdown or html) |\n| `--country <cc>` | Two-letter country code to route the request through (e.g. us, de) |\n| `--timeout-ms <n>` | Per-request timeout in milliseconds |\n| `--cache-ttl <ttl>` | Cache freshness: 0, Nh (hours), or Nd (days), e.g. 48h, 2d, 0 (omitted → server default) |\n| `--markdown-mode <mode>` | Markdown mode: article, raw, llm |\n| `-o, --output <file>` | Write the fetched body bytes to the given file path |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit fetch create --url <url> --format <format> --country <cc> --timeout-ms <n> --cache-ttl <ttl> --markdown-mode <mode>\n```\n\n### fetch › get\n\nFetch URL content (GET via query params)\n\n| Option | Description |\n| --- | --- |\n| `--url <url>` | URL to fetch |\n| `--format <format>` | Response format (markdown or html) |\n| `--country <cc>` | Two-letter country code to route the request through (e.g. us, de) |\n| `--timeout-ms <n>` | Per-request timeout in milliseconds |\n| `--cache-ttl <ttl>` | Cache freshness: 0, Nh (hours), or Nd (days), e.g. 48h, 2d, 0 (omitted → server default) |\n| `-o, --output <file>` | Write the fetched body bytes to the given file path |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit fetch get --url <url> --format <format> --country <cc> --timeout-ms <n> --cache-ttl <ttl>\n```"
41
- },
42
- "cli": {
43
- "title": "Install & Authenticate",
44
- "section": "CLI Reference",
45
- "body": "# Install & Authenticate\n\nInstall the ByteKit CLI, authenticate, and learn the global flags shared by every command.\n\nThe `bytekit` CLI wraps the ByteKit API as shell subcommands — scrape, screenshot,\nrecord, monitor, and more, straight from your terminal.\n\n## Install\n\nInstall globally from npm:\n\n```bash\nnpm install -g @hunt-labs/bytekit-cli\n```\n\nThis puts the `bytekit` binary on your `PATH`. Verify the install:\n\n```bash\nbytekit --version\n```\n\n## Authenticate\n\nEvery command needs an API key. You can provide it two ways:\n\n**1. Environment variable (recommended)**\n\nSet `BYTEKIT_API_KEY` once and every command picks it up automatically:\n\n```bash\nexport BYTEKIT_API_KEY=\"sk_live_your_api_key_here\"\nbytekit scrape create --url https://example.com\n```\n\n**2. The `--key` flag**\n\nPass the key inline for a single command (overrides the env var):\n\n```bash\nbytekit scrape create --url https://example.com --key sk_live_your_api_key_here\n```\n\nThe resolution order is: `--key` flag → `BYTEKIT_API_KEY` environment variable.\nIf neither is set, the command exits with `Error: API key required. Pass --key or set BYTEKIT_API_KEY.`\n\n## Global flags\n\nThese flags are available on every command:\n\n| Flag | Description |\n| --- | --- |\n| `--key <key>` | API key for this invocation. Overrides `BYTEKIT_API_KEY`. |\n| `--base-url <url>` | Override the API base URL (or set `BYTEKIT_BASE_URL`). Useful for self-hosted or staging endpoints. |\n| `--json` | Print the raw JSON response instead of the formatted, human-readable output. |\n| `-V, --version` | Print the CLI version and exit. |\n| `-h, --help` | Show help for the program or a subcommand. |\n\nFor example, to point at a staging endpoint and get raw JSON:\n\n```bash\nbytekit scrape create --url https://example.com --base-url https://api-stg.bytekit.com --json\n```\n\n## Next steps\n\n- [Scrape](https://bytekit.com/docs/cli/scrape) — capture URL content as markdown, HTML, or structured data.\n- [Screenshots](https://bytekit.com/docs/cli/screenshots) — render full-page or viewport screenshots.\n- [Monitors](https://bytekit.com/docs/cli/monitors) — track page changes on a schedule.\n- [API Reference](https://bytekit.com/docs/api) — the underlying REST endpoints."
46
- },
47
- "cli/monitors": {
48
- "title": "Monitors",
49
- "section": "CLI Reference",
50
- "body": "# Monitors\n\nPage-change monitor operations\n\nPage-change monitor operations\n\nFirst-capture behavior is the same for both monitor types: the first capture is a silent baseline (`has_change: false`, `change_pct: null`) with no `change_detected` webhook, whether the monitor is `scrape` or `screenshot`. From the second capture onward both types diff against the previous capture.\n\n### monitors › captures\n\nMonitor capture sub-resources\n\n| Option | Description |\n| --- | --- |\n| `-h, --help` | display help for command |\n\n#### monitors › captures › list\n\nList captures for a monitor\n\n| Option | Description |\n| --- | --- |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit monitors captures list <id>\n```\n\n### monitors › create\n\nCreate a page-change monitor\n\n| Option | Description |\n| --- | --- |\n| `--url <url>` | URL to monitor |\n| `--interval-type <type>` | Check interval: hourly, daily, weekly, or cron |\n| `--webhook-url <url>` | HTTPS webhook URL notified on change |\n| `--cron <expr>` | Cron expression (required when --interval-type is cron, e.g. \"0 * * * *\") |\n| `--type <type>` | Monitor type: screenshot, scrape (omitted → server default screenshot) |\n| `--change-threshold <pct>` | Change percentage that triggers a notification (float; omitted → server default 5) |\n| `--notify-on <event>` | When to notify: change, every (omitted → server default change) |\n| `--webhook-secret <secret>` | HMAC secret for webhook signature verification |\n| `--webhook-headers <json>` | Extra webhook headers as a JSON object, e.g. '\\{\"X-Sig\":\"abc\"\\}' (omitted → none) |\n| `--options <json>` | Screenshot-monitor options as a JSON object (omitted → server defaults) |\n| `--scrape-options <json>` | Scrape-monitor options as a JSON object (type=scrape only; omitted → server defaults) |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit monitors create --url <url> --interval-type <type> --webhook-url <url> --cron <expr> --type <type> --change-threshold <pct> --notify-on <event> --webhook-secret <secret> --webhook-headers <json> --options <json> --scrape-options <json>\n```\n\n### monitors › list\n\nList all monitors\n\n| Option | Description |\n| --- | --- |\n| `--limit <n>` | Maximum number of monitors to return |\n| `--cursor <cursor>` | Pagination cursor from a previous page |\n| `--status <status>` | Filter by status: active, processing, paused, cancelled, suspended (default active) |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit monitors list --limit <n> --cursor <cursor> --status <status>\n```\n\n### monitors › get\n\nGet a monitor by ID\n\n| Option | Description |\n| --- | --- |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit monitors get <id>\n```\n\n### monitors › update\n\nUpdate a monitor (including pause/resume via --status)\n\n| Option | Description |\n| --- | --- |\n| `--interval-type <type>` | New check interval: hourly, daily, weekly, or cron |\n| `--cron <expr>` | New cron expression (when interval-type is cron, e.g. \"0 * * * *\") |\n| `--webhook-url <url>` | New HTTPS webhook URL |\n| `--status <status>` | Pause or resume the monitor: active, paused |\n| `--change-threshold <pct>` | New change percentage that triggers a notification (float) |\n| `--notify-on <event>` | When to notify: change, every |\n| `--webhook-secret <secret>` | New HMAC secret for webhook signature verification |\n| `--webhook-headers <json>` | New webhook headers as a JSON object, e.g. '\\{\"X-Sig\":\"abc\"\\}' |\n| `--options <json>` | New screenshot-monitor options as a JSON object |\n| `--scrape-options <json>` | New scrape-monitor options as a JSON object |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit monitors update <id> --interval-type <type> --cron <expr> --webhook-url <url> --status <status> --change-threshold <pct> --notify-on <event> --webhook-secret <secret> --webhook-headers <json> --options <json> --scrape-options <json>\n```\n\n### monitors › delete\n\nDelete a monitor\n\n| Option | Description |\n| --- | --- |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit monitors delete <id>\n```"
51
- },
52
- "cli/scrape": {
53
- "title": "Scrape",
54
- "section": "CLI Reference",
55
- "body": "# Scrape\n\nScrape URL content\n\nScrape URL content\n\n### scrape › bulk\n\nBulk scrape operations\n\n| Option | Description |\n| --- | --- |\n| `-h, --help` | display help for command |\n\n#### scrape › bulk › create\n\nCreate a bulk scrape job\n\n| Option | Description |\n| --- | --- |\n| `--file <path>` | Path to newline-delimited file of URLs (plain URL or \\{\"url\":\"...\"\\} per line) |\n| `--webhook-url <url>` | HTTPS webhook URL notified when the job completes |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit scrape bulk create --file <path> --webhook-url <url>\n```\n\n#### scrape › bulk › get\n\nGet a bulk scrape job\n\n| Option | Description |\n| --- | --- |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit scrape bulk get <id>\n```\n\n### scrape › create\n\nCreate a scrape job\n\n| Option | Description |\n| --- | --- |\n| `--url <url>` | URL to scrape |\n| `--format <format>` | Output format; repeat or comma-separate for multiple (e.g. --format raw_html --format markdown, or --format raw_html,markdown). Sent as the formats array; omitted → server default. |\n| `--country <cc>` | Two-letter country code to route the request through (e.g. us, de) |\n| `--timeout-ms <n>` | Per-request timeout in milliseconds |\n| `--markdown-mode <mode>` | Markdown extraction mode: article, raw, llm |\n| `--markdown-query <q>` | BM25 query string for relevance-ranked markdown filtering (omitted → disabled) |\n| `--cache-ttl <ttl>` | Cache freshness: 0, Nh (hours), or Nd (days), e.g. 48h, 2d, 0 (omitted → server default) |\n| `--cookies <json>` | Cookies as a JSON array, e.g. '[\\{\"name\":\"a\",\"value\":\"b\"\\}]' (omitted → none) |\n| `--headers <json>` | Extra request headers as a JSON object, e.g. '\\{\"X-A\":\"b\"\\}' (omitted → none) |\n| `--delay-ms <n>` | Post-load delay in milliseconds before capture |\n| `--events <csv>` | Webhook events (comma-separated): queued, completed, failed (omitted → server default) |\n| `--token-encoding <enc>` | Tokenizer for --token-budget: cl100k_base, o200k_base (omitted → server default) |\n| `--custom <json>` | User payload echoed on the envelope as a JSON object, e.g. '\\{\"job\":\"1\"\\}' (omitted → none) |\n| `--remove-base64-images` | Strip base64 data: images before conversion (server default) |\n| `--no-remove-base64-images` | Preserve base64 data: images in the pipeline output |\n| `--markdown-links <mode>` | Link rendering: inline, references, none, text |\n| `--markdown-images <mode>` | Image retention: inline, references, none, text |\n| `--with-links-summary` | Append a Links footer to the markdown output |\n| `--with-images-summary` | Append an Images footer to the markdown output |\n| `--markdown-compact` | Collapse excessive whitespace in the markdown output |\n| `--markdown-filter-images` | Filter low-signal images from the markdown output |\n| `--markdown-include-media` | Return rich link/image objects and a tables array |\n| `--markdown-include-warnings` | Include markdown-pipeline and tag-filter warnings |\n| `--markdown-include-stats` | Include a top-level stats object (chars, tokens, blocks) |\n| `--async` | Queue the scrape and return a job envelope immediately (no wait) |\n| `--webhook-url <url>` | HTTPS webhook URL notified when an async scrape completes |\n| `--token-budget <n>` | Maximum tokens of markdown to return |\n| `--clean-markdown` | Post-process markdown with the LLM cleaner (billed 3x) |\n| `--include-tags <csv>` | Comma-separated HTML tags to keep (e.g. article,main) |\n| `--exclude-tags <csv>` | Comma-separated HTML tags to drop (e.g. nav,footer) |\n| `--mobile` | Render with a mobile viewport/user-agent |\n| `--raw` | Print the requested format body raw, with no JSON wrapper |\n| `-o, --output <file>` | Write the output to the given file path (implies --raw unless --json is set) |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit scrape create --url <url> --format <format> --country <cc> --timeout-ms <n> --markdown-mode <mode> --markdown-query <q> --cache-ttl <ttl> --cookies <json> --headers <json> --delay-ms <n> --events <csv> --token-encoding <enc> --custom <json> --remove-base64-images --no-remove-base64-images --markdown-links <mode> --markdown-images <mode> --with-links-summary --with-images-summary --markdown-compact --markdown-filter-images --markdown-include-media --markdown-include-warnings --markdown-include-stats --async --webhook-url <url> --token-budget <n> --clean-markdown --include-tags <csv> --exclude-tags <csv> --mobile --raw\n```\n\n### scrape › get\n\nGet a scrape job by ID (use --raw/-o/--format to retrieve a completed body)\n\n| Option | Description |\n| --- | --- |\n| `--raw` | Print the requested format body raw, with no JSON wrapper |\n| `-o, --output <file>` | Write the output to the given file path (implies --raw unless --json is set) |\n| `--format <format>` | Which persisted format to emit raw when several are present |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit scrape get <id> --raw --format <format>\n```"
56
- },
57
- "cli/screenshots": {
58
- "title": "Screenshots",
59
- "section": "CLI Reference",
60
- "body": "# Screenshots\n\nScreenshot operations\n\nScreenshot operations\n\n### screenshots › create\n\nCapture a screenshot\n\n| Option | Description |\n| --- | --- |\n| `--url <url>` | URL to screenshot |\n| `--full-page` | Capture the full page (default: viewport only) |\n| `--device <device>` | Device profile: desktop, mobile |\n| `--viewport <WxH>` | Viewport size WIDTHxHEIGHT (e.g. 1280x720) |\n| `--format <format>` | Image format: jpeg, png |\n| `--quality <n>` | JPEG quality (1-100) |\n| `--wait-until <event>` | Wait condition: load, domcontentloaded, networkidle |\n| `--clip <x,y,w,h>` | Clip region X,Y,WIDTH,HEIGHT (e.g. 0,0,800,600) |\n| `--block-ads` | Block ads before capture (server default) |\n| `--no-block-ads` | Do not block ads |\n| `--block-cookie-banners` | Block cookie-consent banners before capture (server default) |\n| `--no-block-cookie-banners` | Do not block cookie-consent banners |\n| `--scroll` | Scroll the page before capture to trigger lazy content (server default) |\n| `--no-scroll` | Do not scroll the page before capture |\n| `--wait-for-selector <sel>` | Wait until this CSS selector is present before capture |\n| `--delay-ms <n>` | Post-load delay in milliseconds before capture |\n| `--dark-mode` | Emulate prefers-color-scheme: dark |\n| `--device-scale-factor <n>` | Device pixel ratio: 1, 2 |\n| `--include-html` | Include the rendered HTML alongside the screenshot |\n| `--country <cc>` | Two-letter country code to route the request through (e.g. us, de) |\n| `--language <lang>` | Accept-Language override (e.g. en-US) |\n| `--async` | Queue the screenshot and return a job envelope immediately (no wait) |\n| `-o, --output <file>` | Download the captured image to this file path (use - for stdout). Not valid with --json. |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit screenshots create --url <url> --full-page --device <device> --viewport <WxH> --format <format> --quality <n> --wait-until <event> --clip <x,y,w,h> --block-ads --no-block-ads --block-cookie-banners --no-block-cookie-banners --scroll --no-scroll --wait-for-selector <sel> --delay-ms <n> --dark-mode --device-scale-factor <n> --include-html --country <cc> --language <lang> --async\n```\n\n### screenshots › get\n\nGet a screenshot by ID\n\n| Option | Description |\n| --- | --- |\n| `-o, --output <file>` | Download the captured image to this file path (use - for stdout). Not valid with --json. |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit screenshots get <id>\n```"
61
- },
62
- "cli/search": {
63
- "title": "Search",
64
- "section": "CLI Reference",
65
- "body": "# Search\n\nRun a web search and return ranked results\n\nRun a web search and return ranked results\n\n### search\n\nRun a web search and return ranked results\n\n| Option | Description |\n| --- | --- |\n| `--type <type>` | Search index to query: web (default), news, or images |\n| `--limit <n>` | Maximum number of results to return (1–100) |\n| `--country <code>` | Two-letter country code to localize results (e.g. us, de) |\n| `--language <code>` | Two-letter language code for results (e.g. en, fr) |\n| `--date-range <window>` | Restrict results to a recency window: any (default), hour, day, week, month, or year |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit search <query> --type <type> --limit <n> --country <code> --language <code> --date-range <window>\n```"
66
- },
67
- "cli/sitemap": {
68
- "title": "Sitemap",
69
- "section": "CLI Reference",
70
- "body": "# Sitemap\n\nSitemap crawl operations\n\nSitemap crawl operations\n\n### sitemap › create\n\nStart a sitemap crawl\n\n| Option | Description |\n| --- | --- |\n| `--url <url>` | Root URL to crawl |\n| `--strategy <strategy>` | Crawl strategy: quick, standard, deep (omitted → server default standard) |\n| `--max-depth <n>` | Maximum crawl depth 1-5 (omitted → server default 2) |\n| `--max-urls <n>` | Maximum URLs to collect (omitted → server default 5000) |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit sitemap create --url <url> --strategy <strategy> --max-depth <n> --max-urls <n>\n```\n\n### sitemap › get\n\nGet a sitemap job by ID\n\n| Option | Description |\n| --- | --- |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit sitemap get <id>\n```"
71
- },
72
- "cli/usage": {
73
- "title": "Usage",
74
- "section": "CLI Reference",
75
- "body": "# Usage\n\nAccount usage and billing-period reporting\n\nAccount usage and billing-period reporting\n\n### usage › get\n\nGet current billing-period usage summary\n\n| Option | Description |\n| --- | --- |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit usage get\n```\n\n### usage › daily\n\nGet daily usage breakdown (default last 30 days; max 366)\n\n| Option | Description |\n| --- | --- |\n| `--from <date>` | Start date YYYY-MM-DD (omitted → server default, 30 days ago) |\n| `--to <date>` | End date YYYY-MM-DD (omitted → server default, today) |\n| `--api-key <ak_id>` | Filter by API key prefixed ID (omitted → all keys) |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit usage daily --from <date> --to <date> --api-key <ak_id>\n```\n\n### usage › by-endpoint\n\nGet per-endpoint bandwidth breakdown (default last 30 days; max 366)\n\n| Option | Description |\n| --- | --- |\n| `--from <date>` | Start date YYYY-MM-DD (omitted → server default, 30 days ago) |\n| `--to <date>` | End date YYYY-MM-DD (omitted → server default, today) |\n| `--api-key <ak_id>` | Filter by API key prefixed ID (omitted → all keys) |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit usage by-endpoint --from <date> --to <date> --api-key <ak_id>\n```"
76
- },
77
- "cli/webhook-deliveries": {
78
- "title": "Webhook-deliveries",
79
- "section": "CLI Reference",
80
- "body": "# Webhook-deliveries\n\nWebhook delivery operations\n\nWebhook delivery operations\n\n### webhook-deliveries › list\n\nList webhook deliveries\n\n| Option | Description |\n| --- | --- |\n| `--limit <n>` | Maximum number of deliveries to return |\n| `--cursor <cursor>` | Pagination cursor from a previous page |\n| `--status <status>` | Filter by delivery status: pending, delivered, failed, exhausted |\n| `--since <iso>` | Only deliveries created after this ISO date-time |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit webhook-deliveries list --limit <n> --cursor <cursor> --status <status> --since <iso>\n```\n\n### webhook-deliveries › retry\n\nRequeue a failed or exhausted webhook delivery\n\n| Option | Description |\n| --- | --- |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit webhook-deliveries retry <id>\n```"
81
- },
82
- "guides/authentication": {
83
- "title": "Authentication",
84
- "section": "Guides",
85
- "body": "# Authentication\n\nHow to authenticate with the ByteKit API using API keys.\n\nByteKit authenticates requests with Bearer API keys. Every request to a capture or data\nendpoint must include an `Authorization` header.\n\n## API key format\n\nKeys are prefixed `sk_live_` so they are easy to identify in logs and config. Treat\nthe full value as a secret.\n\n## Sending the Bearer header\n\nInclude the key in every request:\n\n```bash\ncurl -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```\n\nThe key is stored as a SHA-256 hash on the server. The plaintext value is only ever visible\nonce — at creation time.\n\n## Managing API keys\n\nCreate, rename, and revoke API keys from the [dashboard](https://app.bytekit.com). Each account\ncan hold up to **50 active keys**, with per-key billing attribution so you can split usage cleanly\nacross services.\n\nThe plaintext key is shown **once**, at creation time — copy it immediately and store it as a\nsecret. Revoke a key from the dashboard to free a slot; revoked keys do not count toward the limit.\n\n## Next steps\n\n- [Quickstart](https://bytekit.com/docs/quickstart) — make your first API call\n- [API Reference: Account](https://bytekit.com/docs/api/account/getaccount) — read your account, plan, and usage"
86
- },
87
- "guides/errors": {
88
- "title": "Errors",
89
- "section": "Guides",
90
- "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\": \"Too many requests. Retry after 2 seconds.\",\n \"httpStatus\": 429,\n \"failedAt\": \"2026-06-16T19:38:02.084Z\",\n \"details\": {}\n }\n}\n```\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.httpStatus` | Mirrors the HTTP response status (useful for logged or replayed bodies) |\n| `error.failedAt` | ISO-8601 UTC timestamp of when the error was produced |\n| `error.details` | Optional object with additional context (e.g. which field failed validation) |\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| `401` | `unauthorized` | Missing or malformed `Authorization` header |\n| `401` | `invalid_api_key` | API key is present but not valid |\n| `402` | `quota_exceeded` | Account has exceeded its plan quota |\n| `403` | `forbidden` | Key is valid but lacks permission for this action |\n| `422` | `validation_error` | Malformed JSON or a request field failed validation |\n| `429` | `rate_limited` | Too many 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 \"httpStatus\": 400,\n \"failedAt\": \"2026-06-16T19:38:02.340Z\",\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 | Upgrade your plan or wait for quota reset |\n| `forbidden` | No | You do not have access to this resource |\n| `rate_limited` | Yes | Exponential backoff; honour the `Retry-After` header |\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"
91
- },
92
- "guides/monitors": {
93
- "title": "Monitors",
94
- "section": "Guides",
95
- "body": "# Monitors\n\nDetect page changes on any URL — by screenshot or scrape — and receive webhook notifications.\n\nMonitors periodically capture a URL and notify you when the page changes. Each monitor uses one\nof two capture types: `screenshot` (perceptual/visual change detection) or `scrape` (content and\nmarkdown change detection). Use them for price tracking, content alerts, uptime monitoring, or\ncompetitor surveillance.\n\n## Create a monitor\n\n```bash\ncurl -X POST https://api.bytekit.com/v1/monitors \\\n -H \"Authorization: Bearer sk_live_YOUR_KEY_HERE\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"url\": \"https://example.com/pricing\",\n \"interval_type\": \"hourly\",\n \"webhook_url\": \"https://your-server.example.com/webhooks/bytekit\"\n }'\n```\n\n| Field | Description |\n|-------|-------------|\n| `url` | The page to monitor (required) |\n| `interval_type` | Check frequency — one of `hourly`, `daily`, `weekly`, or `cron` (required) |\n| `webhook_url` | HTTPS webhook endpoint to receive notifications. `http://` is rejected with a 400 `invalid_url` (reason `scheme_unsupported`) (required) |\n| `cron_expression` | 5-field cron expression. Required when `interval_type` is `cron` |\n| `type` | Capture mode — `screenshot` (default) or `scrape` |\n| `change_threshold` | Percentage of change required to trigger a notification (0–100, default `5`). Screenshot monitors only |\n| `notify_on` | `change` (default — notify only when content changed) or `every` (notify on every capture) |\n| `webhook_secret` | Optional secret used to sign webhook deliveries |\n| `webhook_headers` | Optional custom headers (max 20) to include on each webhook delivery |\n\nA successful response returns the monitor object with an `id` prefixed `mon_`:\n\n```json\n{\n \"id\": \"mon_...\",\n \"type\": \"screenshot\",\n \"url\": \"https://example.com/pricing\",\n \"status\": \"active\",\n \"interval_type\": \"hourly\",\n \"cron_expression\": null,\n \"next_capture_at\": \"2026-01-01T01:00:00Z\",\n \"notify_on\": \"change\",\n \"webhook_url\": \"https://your-server.example.com/webhooks/bytekit\",\n \"captures_count\": 0,\n \"changes_count\": 0,\n \"created_at\": \"2026-01-01T00:00:00Z\"\n}\n```\n\nTo monitor on a schedule, set `interval_type` to `cron` and supply a 5-field `cron_expression`:\n\n```bash\ncurl -X POST https://api.bytekit.com/v1/monitors \\\n -H \"Authorization: Bearer sk_live_YOUR_KEY_HERE\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"url\": \"https://example.com/pricing\",\n \"interval_type\": \"cron\",\n \"cron_expression\": \"0 9 * * 1-5\",\n \"webhook_url\": \"https://your-server.example.com/webhooks/bytekit\"\n }'\n```\n\n## List monitors\n\n```bash\ncurl https://api.bytekit.com/v1/monitors \\\n -H \"Authorization: Bearer sk_live_YOUR_KEY_HERE\"\n```\n\n## Get a monitor\n\n```bash\ncurl https://api.bytekit.com/v1/monitors/mon_... \\\n -H \"Authorization: Bearer sk_live_YOUR_KEY_HERE\"\n```\n\n## Update a monitor\n\n```bash\ncurl -X PATCH https://api.bytekit.com/v1/monitors/mon_... \\\n -H \"Authorization: Bearer sk_live_YOUR_KEY_HERE\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"interval_type\": \"daily\"}'\n```\n\nYou can update any subset of the monitor's mutable fields — for example `interval_type`,\n`cron_expression`, `webhook_url`, `notify_on`, `change_threshold`, or `status`\n(`active` / `paused`). Switching to a `cron` schedule requires a `cron_expression`:\n\n```bash\ncurl -X PATCH https://api.bytekit.com/v1/monitors/mon_... \\\n -H \"Authorization: Bearer sk_live_YOUR_KEY_HERE\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"interval_type\": \"cron\", \"cron_expression\": \"*/30 * * * *\"}'\n```\n\n## Delete a monitor\n\n```bash\ncurl -X DELETE https://api.bytekit.com/v1/monitors/mon_... \\\n -H \"Authorization: Bearer sk_live_YOUR_KEY_HERE\"\n```\n\n## Monitor captures\n\nEach time a monitor fires it records a capture event — on **every** run, whether or not the\ncontent changed. Each capture carries a `has_change` flag marking whether the content differed\nfrom the previous capture. Webhook delivery is separate: the capture is always recorded, but\nwhether a webhook is *sent* depends on `has_change` and the monitor's `notify_on` setting (see\n[Webhook payload](#webhook-payload) below). Retrieve the capture history with:\n\n```bash\ncurl https://api.bytekit.com/v1/monitors/mon_.../captures \\\n -H \"Authorization: Bearer sk_live_YOUR_KEY_HERE\"\n```\n\nEach capture in the list represents one capture event and includes change metadata — the\ntimestamp, whether the content changed (`has_change`), the percentage of content that changed\n(`change_pct`), and the perceptual hash distance from the previous capture. Captures record\n*that* the content changed and by how much; they do not include a line-by-line textual diff.\n\n### First-capture behavior (silent baseline for both types)\n\nThe very first capture of a monitor has **no previous capture to compare against**. Both monitor\ntypes treat that first run as a **silent baseline** — one universal \"first capture\" behavior,\nno per-type divergence:\n\n| Monitor type | First capture | `has_change` | `change_pct` | Webhook on first capture |\n|--------------|---------------|--------------|--------------|--------------------------|\n| `scrape` | Silent baseline | `false` | `null` | **No** `monitor.change_detected`-equivalent webhook (the baseline is just recorded) |\n| `screenshot` | Silent baseline | `false` | `null` | **No** `monitor.change_detected` webhook (the baseline is just recorded) |\n\nNeither a **scrape** nor a **screenshot** monitor alerts you on its first run — both only alert\nonce a *subsequent* capture differs (scrape by exact content-hash inequality, screenshot by at\nleast `change_threshold`). A monitor with `notify_on: \"every\"` still sends a `monitor.captured`\nwebhook on the first capture — that is the per-capture notification, not a change alert, and it\nfires for both monitor types. From the second capture onward both types behave the same way each\nnew capture is compared against the previous one — scrape by exact SHA-256 content equality,\nscreenshot by perceptual-hash distance against `change_threshold`.\n\n**Existing scrape monitors:** if you created a scrape monitor before this change shipped, its\nfirst post-deploy capture will no longer fire a `monitor.change_detected`-equivalent webhook —\nthe first capture after the change is now the silent baseline, matching screenshot monitors.\nSteady-state alerting (second capture onward) is unaffected.\n\n## Webhook payload\n\nWhen a monitor fires, ByteKit sends a `POST` to your `webhook_url`. Every delivery carries an\n`X-ByteKit-Event` header naming the event type — dispatch on that header rather than inspecting\nthe body shape. The event type and payload depend on the monitor's `type`.\n\n### Screenshot monitors (`type: \"screenshot\"`, default)\n\nScreenshot captures send `monitor.change_detected` when the page changed (`X-ByteKit-Event:\nmonitor.change_detected`) and `monitor.captured` when there was no change but\n`notify_on: \"every\"` is set (`X-ByteKit-Event: monitor.captured`). The body carries the capture\nmetadata:\n\n```json\n{\n \"monitor_id\": \"mon_...\",\n \"screenshot_id\": \"ss_...\",\n \"has_change\": true,\n \"change_pct\": 42.0,\n \"hash_distance\": 18,\n \"url\": \"https://example.com/pricing\"\n}\n```\n\n| Field | Description |\n|-------|-------------|\n| `has_change` | `true` when the captured content differs from the previous capture |\n| `change_pct` | Percentage of content that changed (0–100) |\n| `hash_distance` | Perceptual-hash distance from the previous capture |\n| `screenshot_id` | The screenshot that triggered the notification |\n\n### Scrape monitors (`type: \"scrape\"`)\n\nScrape captures send `scrape.completed` (`X-ByteKit-Event: scrape.completed`) with the full\nscrape result envelope inline:\n\n```json\n{\n \"success\": true,\n \"type\": \"scrape.completed\",\n \"id\": \"mon_...\",\n \"scrape_id\": \"sc_...\",\n \"has_change\": true,\n \"change_pct\": 100.0,\n \"metadata\": {},\n \"scrape\": {\n \"status\": \"success\",\n \"id\": \"sc_...\",\n \"url\": \"https://example.com/pricing\",\n \"final_url\": \"https://example.com/pricing\",\n \"content_length\": 1256,\n \"status_code\": 200,\n \"formats\": {\n \"markdown\": \"...\"\n }\n }\n}\n```\n\n| Field | Description |\n|-------|-------------|\n| `has_change` | `true` when the captured content differs from the previous capture |\n| `change_pct` | Percentage of content that changed (0–100) |\n| `scrape` | Full scrape result envelope (same shape as `POST /v1/scrape` response) |\n\nYour endpoint must respond with `2xx` within 10 seconds. Failed deliveries are retried with\nexponential backoff.\n\n## Next steps\n\n- [API Reference: Monitors](https://bytekit.com/docs/api/monitors/createmonitor) — full endpoint schema\n- [Errors](https://bytekit.com/docs/guides/errors) — error codes returned by monitor endpoints"
96
- },
97
- "guides/rate-limits": {
98
- "title": "Rate Limits",
99
- "section": "Guides",
100
- "body": "# Rate Limits\n\nHow ByteKit enforces quotas, concurrency slots, and rate limits.\n\nByteKit enforces three independent limits: **rate limits** (requests per second),\n**concurrency slots** (simultaneous in-flight requests), and **quota** (monthly usage caps).\nAll three are enforced before any capture work begins.\n\n## Quota model\n\nQuota is pre-incremented on every request and corrected after the request completes:\n\n1. **Pre-increment** — your usage counter is incremented by an estimate before the capture\n starts. This prevents over-committing capacity even for concurrent requests.\n2. **Adjust** — once the response returns, the actual `contentLength` (compressed wire bytes)\n replaces the estimate for bandwidth accounting.\n3. **Compensating decrement** — if the request fails with a terminal error, the pre-incremented\n amount is rolled back so you are not charged for failed requests.\n\nThis means your dashboard usage counter may briefly read higher than actual consumption during\na burst of requests, then settle to the true value.\n\n## Concurrency slots\n\nEach account has a concurrency limit — the maximum number of in-flight requests at one time.\nSlots are released automatically a few minutes after a client disconnects, so a crashed client\ncannot permanently hold them.\n\nWhen you exceed your concurrency limit, you receive `429 rate_limited` with a `Retry-After`\nheader indicating how long to wait before retrying.\n\n## Rate limit headers\n\nEvery response includes headers that show your current position:\n\n| Header | Description |\n|--------|-------------|\n| `X-RateLimit-Limit` | Your account's request-per-second limit |\n| `X-RateLimit-Remaining` | Requests remaining in the current window |\n| `X-RateLimit-Reset` | Unix timestamp when the window resets |\n| `Retry-After` | Seconds to wait before retrying (present on `429` only) |\n\n## Bandwidth metering\n\nBandwidth usage is measured as `contentLength` — the compressed wire bytes returned by the\norigin server. If the origin sends gzip or Brotli-encoded content, the compressed size is what\ncounts, not the decompressed size. This matches what your client actually receives over the\nnetwork.\n\n## Handling 429 responses\n\nWhen you receive `429 rate_limited`:\n\n1. Read the `Retry-After` header value (in seconds).\n2. Wait at least that long before retrying.\n3. If no `Retry-After` is present, use exponential backoff starting at 1 second.\n\n```bash\n# Check rate limit headers\ncurl -I -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```\n\n## Next steps\n\n- [Errors](https://bytekit.com/docs/guides/errors) — full error code reference and retry guidance\n- [Scraping](https://bytekit.com/docs/guides/scraping) — formats, options, latency, and async polling"
101
- },
102
- "guides/scraping": {
103
- "title": "Scraping",
104
- "section": "Guides",
105
- "body": "# Scraping\n\nScrape any URL as HTML, markdown, or structured content — formats, options, latency, and async polling.\n\n`POST /v1/scrape` fetches a URL and returns its content in the format you ask for. The same\nrequest shape works for every site; the options you pass determine the output and how long the\ncall takes.\n\n## Rendering & latency\n\nMost scrapes return in well under a second. Some options require ByteKit to fully render the page\nbefore it can return content, which takes longer — typically a few seconds. Pass these only when\nyou need them:\n\n| Option | When it adds latency |\n|--------|----------------------|\n| `cookies` | Non-empty array |\n| `headers` | Non-empty object |\n| `delay_ms` | Greater than `0` |\n| `async` | `true` (request is queued and processed off the fast path) |\n\nThe `country` option routes the request through a geo-located proxy. On its own it does not add\nrendering latency; it only does so when combined with one of the options above.\n\nLooking for `wait_for_selector` or `wait_until`? Those are not `ScrapeRequest` options — they\nbelong to the [Screenshot](https://bytekit.com/docs/api/screenshots/createscreenshot) and\n[Recording](https://bytekit.com/docs/api/recordings/createrecording) endpoints. Sending them to `/v1/scrape` returns\n`422`.\n\n```bash\n# A simple, low-latency scrape\ncurl -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```\n\n```bash\n# Slower: delay_ms forces a full render and waits before returning\ncurl -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 '{\n \"url\": \"https://example.com\",\n \"delay_ms\": 2000\n }'\n```\n\n## Response fields\n\nThe default format is `raw_html` — pass `formats` to request others (`markdown`, `html`,\n`links`, `images`). The `formats` object in the response is keyed by the format you requested.\n\n| Field | Description |\n|-------|-------------|\n| `formats.raw_html` | Page content in the requested format (`raw_html` is the default when `formats` is omitted) |\n| `contentLength` | Compressed wire bytes — used for bandwidth billing |\n| `statusCode` | HTTP status code of the origin page |\n| `metadata.title` | Page `<title>` element |\n\nThe `X-Scrape-*` response headers describe how each request was handled (cache status, timing,\nand the final URL) — useful for debugging.\n\n## Async scrapes\n\nFor long-running pages, pass `\"async\": true` to get a `202 Accepted` response with a scrape\n`id` prefixed `sc_`. Poll the result with `GET /v1/scrape/{id}`.\n\n```bash\n# Start async scrape\ncurl -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\", \"async\": true}'\n\n# Poll for result\ncurl https://api.bytekit.com/v1/scrape/sc_... \\\n -H \"Authorization: Bearer sk_live_YOUR_KEY_HERE\"\n```\n\n## Webhook event header\n\nEvery outbound webhook POST includes an `X-ByteKit-Event` header with the event type:\n\n| Event type | Trigger |\n|---|---|\n| `bulk.completed` | A bulk job finishes (all items processed) |\n| `scrape.completed` | An async scrape succeeds |\n| `scrape.failed` | An async scrape fails terminally |\n| `monitor.change_detected` | A monitor fires and detects a change (screenshot or content) |\n| `monitor.captured` | A monitor fires with no change detected (notify_on: every) |\n| `sitemap.completed` | A sitemap job finishes |\n| `sitemap.failed` | A sitemap job fails terminally |\n\nUse this header to dispatch events without inspecting the body shape:\n\n```python\nfrom flask import Flask, request\n\napp = Flask(__name__)\n\n@app.route(\"/webhooks/bytekit\", methods=[\"POST\"])\ndef handle():\n event = request.headers.get(\"X-ByteKit-Event\")\n if event == \"bulk.completed\":\n handle_bulk(request.json)\n elif event == \"scrape.completed\":\n handle_scrape(request.json)\n return \"\", 200\n```\n\n`X-ByteKit-Event` is a reserved header — you cannot supply it via `webhook_headers` in\nmonitor or bulk configuration. Attempts to do so will be rejected with a `422` at request\ntime.\n\n## Next steps\n\n- [Rate Limits](https://bytekit.com/docs/guides/rate-limits) — quota model and concurrency slots\n- [Errors](https://bytekit.com/docs/guides/errors) — how to interpret and retry error responses\n- [API Reference: Scrape](https://bytekit.com/docs/api/scrape/createscrape) — full request/response schema"
106
- },
107
- "libraries/go": {
108
- "title": "Go",
109
- "section": "Libraries",
110
- "body": "# Go\n\nCall the ByteKit REST API from Go with the standard library.\n\nByteKit is a plain REST API. There is no Go SDK — and you do not need one. The\nTypeScript and Python SDKs are thin wrappers over the same HTTP endpoints, so\ncalling ByteKit from Go is just a standard `net/http` request.\n\n```go\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"io\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tbody := bytes.NewBufferString(`{\"url\":\"https://example.com\",\"formats\":[\"markdown\"]}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.bytekit.com/v1/scrape\", body)\n\treq.Header.Set(\"Authorization\", \"Bearer sk_live_your_api_key_here\")\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\n\tout, _ := io.ReadAll(resp.Body)\n\tfmt.Println(string(out))\n}\n```\n\n## Next steps\n\n- [API Reference](https://bytekit.com/docs/api) — every endpoint, request, and response.\n- [TypeScript SDK](https://bytekit.com/docs/libraries/typescript) and [Python SDK](https://bytekit.com/docs/libraries/python) — typed clients over the same REST API."
111
- },
112
- "libraries/python": {
113
- "title": "Python SDK",
114
- "section": "Libraries",
115
- "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`.\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`, `recordings`, `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."
116
- },
117
- "libraries/typescript": {
118
- "title": "TypeScript SDK",
119
- "section": "Libraries",
120
- "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`, and `account` (each with `create` / `get` / `list` methods as\napplicable, plus nested resources like `scrape.bulk` and `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."
9
+ "section": "API Reference",
10
+ "body": "# Account\n\nAccount API — endpoints, requests, and responses.\n\nThe **Account** API. 1 endpoint:\n\n- [Get account details](https://bytekit.com/docs/api/account/getaccount) — GET /v1/account"
121
11
  },
122
12
  "api/account/getaccount": {
123
13
  "title": "Get account details",
124
14
  "section": "API Reference",
125
15
  "body": "# Get account details\n\nReturns account, plan, and current API key details, including the\n`api_key` and `subscription` fields.\n"
126
16
  },
127
- "api/account": {
128
- "title": "Account",
17
+ "api/bulk": {
18
+ "title": "Bulk",
129
19
  "section": "API Reference",
130
- "body": "# Account\n\nAccount API — endpoints, requests, and responses.\n\nThe **Account** API. 1 endpoint:\n\n- [Get account details](https://bytekit.com/docs/api/account/getaccount) — GET /v1/account"
20
+ "body": "# Bulk\n\nBulk API — endpoints, requests, and responses.\n\nThe **Bulk** API. 5 endpoints:\n\n- [List in-flight bulk jobs](https://bytekit.com/docs/api/bulk/listbulk) — GET /v1/bulk\n- [Create mixed bulk job](https://bytekit.com/docs/api/bulk/createbulk) — POST /v1/bulk\n- [Get bulk job status](https://bytekit.com/docs/api/bulk/getbulk) — GET /v1/bulk/:id\n- [Cancel a bulk job](https://bytekit.com/docs/api/bulk/deletebulk) — DELETE /v1/bulk/:id\n- [List bulk job items](https://bytekit.com/docs/api/bulk/listbulkscreenshots) — GET /v1/bulk/:id/screenshots"
131
21
  },
132
22
  "api/bulk/createbulk": {
133
23
  "title": "Create mixed bulk job",
134
24
  "section": "API Reference",
135
- "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.\n"
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.\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"
136
26
  },
137
27
  "api/bulk/deletebulk": {
138
28
  "title": "Cancel a bulk job",
@@ -144,11 +34,6 @@
144
34
  "section": "API Reference",
145
35
  "body": "# Get bulk job status"
146
36
  },
147
- "api/bulk": {
148
- "title": "Bulk",
149
- "section": "API Reference",
150
- "body": "# Bulk\n\nBulk API — endpoints, requests, and responses.\n\nThe **Bulk** API. 5 endpoints:\n\n- [List in-flight bulk jobs](https://bytekit.com/docs/api/bulk/listbulk) — GET /v1/bulk\n- [Create mixed bulk job](https://bytekit.com/docs/api/bulk/createbulk) — POST /v1/bulk\n- [Get bulk job status](https://bytekit.com/docs/api/bulk/getbulk) — GET /v1/bulk/:id\n- [Cancel a bulk job](https://bytekit.com/docs/api/bulk/deletebulk) — DELETE /v1/bulk/:id\n- [List bulk job items](https://bytekit.com/docs/api/bulk/listbulkscreenshots) — GET /v1/bulk/:id/screenshots"
151
- },
152
37
  "api/bulk/listbulk": {
153
38
  "title": "List in-flight bulk jobs",
154
39
  "section": "API Reference",
@@ -159,25 +44,55 @@
159
44
  "section": "API Reference",
160
45
  "body": "# List bulk job items"
161
46
  },
162
- "api/fetch/getfetch": {
163
- "title": "Fetch a URL (GET)",
164
- "section": "API Reference",
165
- "body": "# Fetch a URL (GET)\n\nDirect HTTP fetch. The response body IS the content; metadata is returned in X-Fetch-* headers.\nOmit `format` for raw passthrough. Use `format=markdown` or `format=html` for conversion.\n"
166
- },
167
47
  "api/fetch": {
168
48
  "title": "Fetch",
169
49
  "section": "API Reference",
170
50
  "body": "# Fetch\n\nFetch API — endpoints, requests, and responses.\n\nThe **Fetch** API. 2 endpoints:\n\n- [Fetch a URL (GET)](https://bytekit.com/docs/api/fetch/getfetch) — GET /v1/fetch\n- [Fetch a URL (POST)](https://bytekit.com/docs/api/fetch/postfetch) — POST /v1/fetch"
171
51
  },
52
+ "api/fetch-bulk": {
53
+ "title": "Fetch Bulk",
54
+ "section": "API Reference",
55
+ "body": "# Fetch Bulk\n\nFetch Bulk API — endpoints, requests, and responses.\n\nThe **Fetch Bulk** API. 2 endpoints:\n\n- [Bulk fetch URLs](https://bytekit.com/docs/api/fetch-bulk/createfetchbulk) — POST /v1/fetch/bulk\n- [Get fetch bulk job status](https://bytekit.com/docs/api/fetch-bulk/getfetchbulk) — GET /v1/fetch/bulk/:id"
56
+ },
57
+ "api/fetch-bulk/createfetchbulk": {
58
+ "title": "Bulk fetch URLs",
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 (cookies, wait_for_selector, etc.).\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"
61
+ },
62
+ "api/fetch-bulk/getfetchbulk": {
63
+ "title": "Get fetch bulk job status",
64
+ "section": "API Reference",
65
+ "body": "# Get fetch bulk job status"
66
+ },
67
+ "api/fetch/getfetch": {
68
+ "title": "Fetch a URL (GET)",
69
+ "section": "API Reference",
70
+ "body": "# Fetch a URL (GET)\n\nDirect HTTP fetch. The response body IS the content; metadata is returned in X-Fetch-* headers.\nOmit `format` for raw passthrough. Use `format=markdown` or `format=html` for conversion.\n"
71
+ },
172
72
  "api/fetch/postfetch": {
173
73
  "title": "Fetch a URL (POST)",
174
74
  "section": "API Reference",
175
- "body": "# Fetch a URL (POST)\n\nSame as GET /v1/fetch but with a JSON request body."
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"
76
+ },
77
+ "api/health": {
78
+ "title": "Health",
79
+ "section": "API Reference",
80
+ "body": "# Health\n\nHealth API — endpoints, requests, and responses.\n\nThe **Health** API. 1 endpoint:\n\n- [Health check](https://bytekit.com/docs/api/health/healthcheck) — GET /health"
81
+ },
82
+ "api/health/healthcheck": {
83
+ "title": "Health check",
84
+ "section": "API Reference",
85
+ "body": "# Health check"
86
+ },
87
+ "api/monitors": {
88
+ "title": "Monitors",
89
+ "section": "API Reference",
90
+ "body": "# Monitors\n\nMonitors API — endpoints, requests, and responses.\n\nThe **Monitors** API. 6 endpoints:\n\n- [List monitors](https://bytekit.com/docs/api/monitors/listmonitors) — GET /v1/monitors\n- [Create a change-detection monitor](https://bytekit.com/docs/api/monitors/createmonitor) — POST /v1/monitors\n- [Get monitor](https://bytekit.com/docs/api/monitors/getmonitor) — GET /v1/monitors/:id\n- [Update monitor](https://bytekit.com/docs/api/monitors/updatemonitor) — PATCH /v1/monitors/:id\n- [Cancel monitor](https://bytekit.com/docs/api/monitors/deletemonitor) — DELETE /v1/monitors/:id\n- [List monitor captures](https://bytekit.com/docs/api/monitors/listmonitorcaptures) — GET /v1/monitors/:id/captures"
176
91
  },
177
92
  "api/monitors/createmonitor": {
178
93
  "title": "Create a change-detection monitor",
179
94
  "section": "API Reference",
180
- "body": "# Create a change-detection monitor\n\nCreates a recurring change-detection monitor for a URL, delivering results via webhook.\n"
95
+ "body": "# Create a change-detection monitor\n\nCreates a recurring change-detection monitor for a URL, delivering results via webhook.\n\n**Limits:** request bodies are capped at 512 KB. An oversized body\nreturns a `400` with error code `request_too_large`.\n"
181
96
  },
182
97
  "api/monitors/deletemonitor": {
183
98
  "title": "Cancel monitor",
@@ -189,11 +104,6 @@
189
104
  "section": "API Reference",
190
105
  "body": "# Get monitor"
191
106
  },
192
- "api/monitors": {
193
- "title": "Monitors",
194
- "section": "API Reference",
195
- "body": "# Monitors\n\nMonitors API — endpoints, requests, and responses.\n\nThe **Monitors** API. 6 endpoints:\n\n- [List monitors](https://bytekit.com/docs/api/monitors/listmonitors) — GET /v1/monitors\n- [Create a change-detection monitor](https://bytekit.com/docs/api/monitors/createmonitor) — POST /v1/monitors\n- [Get monitor](https://bytekit.com/docs/api/monitors/getmonitor) — GET /v1/monitors/:id\n- [Update monitor](https://bytekit.com/docs/api/monitors/updatemonitor) — PATCH /v1/monitors/:id\n- [Cancel monitor](https://bytekit.com/docs/api/monitors/deletemonitor) — DELETE /v1/monitors/:id\n- [List monitor captures](https://bytekit.com/docs/api/monitors/listmonitorcaptures) — GET /v1/monitors/:id/captures"
196
- },
197
107
  "api/monitors/listmonitorcaptures": {
198
108
  "title": "List monitor captures",
199
109
  "section": "API Reference",
@@ -209,31 +119,6 @@
209
119
  "section": "API Reference",
210
120
  "body": "# Update monitor"
211
121
  },
212
- "api/health/healthcheck": {
213
- "title": "Health check",
214
- "section": "API Reference",
215
- "body": "# Health check"
216
- },
217
- "api/health": {
218
- "title": "Health",
219
- "section": "API Reference",
220
- "body": "# Health\n\nHealth API — endpoints, requests, and responses.\n\nThe **Health** API. 1 endpoint:\n\n- [Health check](https://bytekit.com/docs/api/health/healthcheck) — GET /health"
221
- },
222
- "api/fetch-bulk/createfetchbulk": {
223
- "title": "Bulk fetch URLs",
224
- "section": "API Reference",
225
- "body": "# Bulk fetch URLs\n\nEnqueues multiple URLs for HTTP fetching. Results delivered via webhook.\nDoes not support options that require page rendering (cookies, wait_for_selector, etc.).\n"
226
- },
227
- "api/fetch-bulk/getfetchbulk": {
228
- "title": "Get fetch bulk job status",
229
- "section": "API Reference",
230
- "body": "# Get fetch bulk job status"
231
- },
232
- "api/fetch-bulk": {
233
- "title": "Fetch Bulk",
234
- "section": "API Reference",
235
- "body": "# Fetch Bulk\n\nFetch Bulk API — endpoints, requests, and responses.\n\nThe **Fetch Bulk** API. 2 endpoints:\n\n- [Bulk fetch URLs](https://bytekit.com/docs/api/fetch-bulk/createfetchbulk) — POST /v1/fetch/bulk\n- [Get fetch bulk job status](https://bytekit.com/docs/api/fetch-bulk/getfetchbulk) — GET /v1/fetch/bulk/:id"
236
- },
237
122
  "api/plans": {
238
123
  "title": "Plans",
239
124
  "section": "API Reference",
@@ -244,31 +129,26 @@
244
129
  "section": "API Reference",
245
130
  "body": "# List public plan catalog\n\nReturns the catalog of public plans (`is_custom = false`) as the\npricing source-of-truth for the dashboard and marketing site. Custom\ncontract plans are excluded. Unauthenticated — this is catalog data,\nnot per-account state (per-account plan lives on `GET /v1/account`).\n"
246
131
  },
247
- "api/schema/createschemaextraction": {
248
- "title": "Schema-driven structured extraction",
249
- "section": "API Reference",
250
- "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`, `cookies`, `delay_ms`,\ncustom `headers`, `wait_for_selector`) cause a `400 unsupported_url`.\n\nDual-axis billing: a fixed per-request credit charge **plus** the\nunderlying page's bandwidth, billed exactly like `/v1/scrape`. 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"
251
- },
252
132
  "api/schema": {
253
133
  "title": "Schema",
254
134
  "section": "API Reference",
255
135
  "body": "# Schema\n\nSchema API — endpoints, requests, and responses.\n\nThe **Schema** API. 1 endpoint:\n\n- [Schema-driven structured extraction](https://bytekit.com/docs/api/schema/createschemaextraction) — POST /v1/schema"
256
136
  },
257
- "api/scrape/createscrape": {
258
- "title": "Scrape a URL",
259
- "section": "API Reference",
260
- "body": "# Scrape a URL\n\nFetches and processes a URL, returning content in one or more formats wrapped in a ScrapeEnvelope. Most requests return synchronously in under a second; requests needing a full page render return HTTP 202 and complete asynchronously.\n"
261
- },
262
- "api/scrape/getscrape": {
263
- "title": "Get scrape result",
137
+ "api/schema/createschemaextraction": {
138
+ "title": "Schema-driven structured extraction",
264
139
  "section": "API Reference",
265
- "body": "# Get scrape result\n\nAlways returns 200. Check the `status` discriminator for the scrape state."
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`, `cookies`, `delay_ms`,\ncustom `headers`, `wait_for_selector`) cause a `400 unsupported_url`.\n\nDual-axis billing: a fixed per-request credit charge **plus** the\nunderlying page's bandwidth, billed exactly like `/v1/scrape`. 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"
266
141
  },
267
142
  "api/scrape": {
268
143
  "title": "Scrape",
269
144
  "section": "API Reference",
270
145
  "body": "# Scrape\n\nScrape API — endpoints, requests, and responses.\n\nThe **Scrape** API. 2 endpoints:\n\n- [Scrape a URL](https://bytekit.com/docs/api/scrape/createscrape) — POST /v1/scrape\n- [Get scrape result](https://bytekit.com/docs/api/scrape/getscrape) — GET /v1/scrape/:id"
271
146
  },
147
+ "api/scrape-bulk": {
148
+ "title": "Scrape Bulk",
149
+ "section": "API Reference",
150
+ "body": "# Scrape Bulk\n\nScrape Bulk API — endpoints, requests, and responses.\n\nThe **Scrape Bulk** API. 2 endpoints:\n\n- [Bulk scrape URLs](https://bytekit.com/docs/api/scrape-bulk/createscrapebulk) — POST /v1/scrape/bulk\n- [Get scrape bulk job status](https://bytekit.com/docs/api/scrape-bulk/getscrapebulk) — GET /v1/scrape/bulk/:id"
151
+ },
272
152
  "api/scrape-bulk/createscrapebulk": {
273
153
  "title": "Bulk scrape URLs",
274
154
  "section": "API Reference",
@@ -279,65 +159,60 @@
279
159
  "section": "API Reference",
280
160
  "body": "# Get scrape bulk job status"
281
161
  },
282
- "api/scrape-bulk": {
283
- "title": "Scrape Bulk",
162
+ "api/scrape/createscrape": {
163
+ "title": "Scrape a URL",
284
164
  "section": "API Reference",
285
- "body": "# Scrape Bulk\n\nScrape Bulk API — endpoints, requests, and responses.\n\nThe **Scrape Bulk** API. 2 endpoints:\n\n- [Bulk scrape URLs](https://bytekit.com/docs/api/scrape-bulk/createscrapebulk) — POST /v1/scrape/bulk\n- [Get scrape bulk job status](https://bytekit.com/docs/api/scrape-bulk/getscrapebulk) — GET /v1/scrape/bulk/:id"
165
+ "body": "# Scrape a URL\n\nFetches and processes a URL, returning content in one or more formats wrapped in a ScrapeEnvelope. Most requests return synchronously in under a second; requests needing a full page render return HTTP 202 and complete asynchronously.\n"
286
166
  },
287
- "api/search/createsearch": {
288
- "title": "Search the web",
167
+ "api/scrape/getscrape": {
168
+ "title": "Get scrape result",
289
169
  "section": "API Reference",
290
- "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"
170
+ "body": "# Get scrape result\n\nAlways returns 200. Check the `status` discriminator for the scrape state."
291
171
  },
292
- "api/search": {
293
- "title": "Search",
172
+ "api/screenshots": {
173
+ "title": "Screenshots",
294
174
  "section": "API Reference",
295
- "body": "# Search\n\nSearch API — endpoints, requests, and responses.\n\nThe **Search** API. 1 endpoint:\n\n- [Search the web](https://bytekit.com/docs/api/search/createsearch) — POST /v1/search"
175
+ "body": "# Screenshots\n\nScreenshots API — endpoints, requests, and responses.\n\nThe **Screenshots** API. 2 endpoints:\n\n- [Capture a screenshot](https://bytekit.com/docs/api/screenshots/createscreenshot) — POST /v1/screenshots\n- [Get screenshot status](https://bytekit.com/docs/api/screenshots/getscreenshot) — GET /v1/screenshots/:id"
296
176
  },
297
177
  "api/screenshots/createscreenshot": {
298
178
  "title": "Capture a screenshot",
299
179
  "section": "API Reference",
300
- "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"
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"
301
181
  },
302
182
  "api/screenshots/getscreenshot": {
303
183
  "title": "Get screenshot status",
304
184
  "section": "API Reference",
305
185
  "body": "# Get screenshot status"
306
186
  },
307
- "api/screenshots": {
308
- "title": "Screenshots",
309
- "section": "API Reference",
310
- "body": "# Screenshots\n\nScreenshots API — endpoints, requests, and responses.\n\nThe **Screenshots** API. 2 endpoints:\n\n- [Capture a screenshot](https://bytekit.com/docs/api/screenshots/createscreenshot) — POST /v1/screenshots\n- [Get screenshot status](https://bytekit.com/docs/api/screenshots/getscreenshot) — GET /v1/screenshots/:id"
311
- },
312
- "api/sitemap/createsitemap": {
313
- "title": "Discover URLs on a domain",
187
+ "api/search": {
188
+ "title": "Search",
314
189
  "section": "API Reference",
315
- "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"
190
+ "body": "# Search\n\nSearch API — endpoints, requests, and responses.\n\nThe **Search** API. 1 endpoint:\n\n- [Search the web](https://bytekit.com/docs/api/search/createsearch) — POST /v1/search"
316
191
  },
317
- "api/sitemap/getsitemap": {
318
- "title": "Get sitemap job status",
192
+ "api/search/createsearch": {
193
+ "title": "Search the web",
319
194
  "section": "API Reference",
320
- "body": "# Get sitemap job status"
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"
321
196
  },
322
197
  "api/sitemap": {
323
198
  "title": "Sitemap",
324
199
  "section": "API Reference",
325
200
  "body": "# Sitemap\n\nSitemap API — endpoints, requests, and responses.\n\nThe **Sitemap** API. 2 endpoints:\n\n- [Discover URLs on a domain](https://bytekit.com/docs/api/sitemap/createsitemap) — POST /v1/sitemap\n- [Get sitemap job status](https://bytekit.com/docs/api/sitemap/getsitemap) — GET /v1/sitemap/:id"
326
201
  },
327
- "api/webhooks": {
328
- "title": "Webhooks",
202
+ "api/sitemap/createsitemap": {
203
+ "title": "Discover URLs on a domain",
329
204
  "section": "API Reference",
330
- "body": "# Webhooks\n\nWebhooks API — endpoints, requests, and responses.\n\nThe **Webhooks** API. 2 endpoints:\n\n- [List webhook deliveries](https://bytekit.com/docs/api/webhooks/listwebhookdeliveries) — GET /v1/webhook-deliveries\n- [Retry a webhook delivery](https://bytekit.com/docs/api/webhooks/retrywebhookdelivery) — POST /v1/webhook-deliveries/:id/retry"
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"
331
206
  },
332
- "api/webhooks/listwebhookdeliveries": {
333
- "title": "List webhook deliveries",
207
+ "api/sitemap/getsitemap": {
208
+ "title": "Get sitemap job status",
334
209
  "section": "API Reference",
335
- "body": "# List webhook deliveries"
210
+ "body": "# Get sitemap job status"
336
211
  },
337
- "api/webhooks/retrywebhookdelivery": {
338
- "title": "Retry a webhook delivery",
212
+ "api/usage": {
213
+ "title": "Usage",
339
214
  "section": "API Reference",
340
- "body": "# Retry a webhook delivery\n\nRequeues a failed or exhausted webhook delivery for another attempt."
215
+ "body": "# Usage\n\nUsage API — endpoints, requests, and responses.\n\nThe **Usage** API. 3 endpoints:\n\n- [Get current billing period usage](https://bytekit.com/docs/api/usage/getusage) — GET /v1/usage\n- [Get daily usage breakdown](https://bytekit.com/docs/api/usage/getusagedaily) — GET /v1/usage/daily\n- [Get per-endpoint bandwidth breakdown](https://bytekit.com/docs/api/usage/getusagebyendpoint) — GET /v1/usage/by-endpoint"
341
216
  },
342
217
  "api/usage/getusage": {
343
218
  "title": "Get current billing period usage",
@@ -354,55 +229,180 @@
354
229
  "section": "API Reference",
355
230
  "body": "# Get daily usage breakdown\n\nDefault range is last 30 days. Max range is 366 days."
356
231
  },
357
- "api/usage": {
358
- "title": "Usage",
232
+ "api/webhooks": {
233
+ "title": "Webhooks",
359
234
  "section": "API Reference",
360
- "body": "# Usage\n\nUsage API — endpoints, requests, and responses.\n\nThe **Usage** API. 3 endpoints:\n\n- [Get current billing period usage](https://bytekit.com/docs/api/usage/getusage) — GET /v1/usage\n- [Get daily usage breakdown](https://bytekit.com/docs/api/usage/getusagedaily) — GET /v1/usage/daily\n- [Get per-endpoint bandwidth breakdown](https://bytekit.com/docs/api/usage/getusagebyendpoint) — GET /v1/usage/by-endpoint"
235
+ "body": "# Webhooks\n\nWebhooks API — endpoints, requests, and responses.\n\nThe **Webhooks** API. 2 endpoints:\n\n- [List webhook deliveries](https://bytekit.com/docs/api/webhooks/listwebhookdeliveries) — GET /v1/webhook-deliveries\n- [Retry a webhook delivery](https://bytekit.com/docs/api/webhooks/retrywebhookdelivery) — POST /v1/webhook-deliveries/:id/retry"
236
+ },
237
+ "api/webhooks/listwebhookdeliveries": {
238
+ "title": "List webhook deliveries",
239
+ "section": "API Reference",
240
+ "body": "# List webhook deliveries"
241
+ },
242
+ "api/webhooks/retrywebhookdelivery": {
243
+ "title": "Retry a webhook delivery",
244
+ "section": "API Reference",
245
+ "body": "# Retry a webhook delivery\n\nRequeues a failed or exhausted webhook delivery for another attempt.\n\n**Limits:** this endpoint takes no request body; any body sent is\ncapped at 64 KB. An oversized body returns a `400` with error code\n`request_too_large`.\n"
246
+ },
247
+ "changelog": {
248
+ "title": "Changelog",
249
+ "section": "General",
250
+ "body": "# Changelog\n\nRelease history for the ByteKit API and SDKs\n\n_No releases yet. Check back after the first version ships._"
251
+ },
252
+ "cli": {
253
+ "title": "Install & Authenticate",
254
+ "section": "CLI Reference",
255
+ "body": "# Install & Authenticate\n\nInstall the ByteKit CLI, authenticate, and learn the global flags shared by every command.\n\nThe `bytekit` CLI wraps the ByteKit API as shell subcommands — scrape, screenshot,\nrecord, monitor, and more, straight from your terminal.\n\n## Install\n\nInstall globally from npm:\n\n```bash\nnpm install -g @hunt-labs/bytekit-cli\n```\n\nThis puts the `bytekit` binary on your `PATH`. Verify the install:\n\n```bash\nbytekit --version\n```\n\n## Authenticate\n\nEvery command needs an API key. You can provide it two ways:\n\n**1. Environment variable (recommended)**\n\nSet `BYTEKIT_API_KEY` once and every command picks it up automatically:\n\n```bash\nexport BYTEKIT_API_KEY=\"sk_live_your_api_key_here\"\nbytekit scrape create --url https://example.com\n```\n\n**2. The `--key` flag**\n\nPass the key inline for a single command (overrides the env var):\n\n```bash\nbytekit scrape create --url https://example.com --key sk_live_your_api_key_here\n```\n\nThe resolution order is: `--key` flag → `BYTEKIT_API_KEY` environment variable.\nIf neither is set, the command exits with `Error: API key required. Pass --key or set BYTEKIT_API_KEY.`\n\n## Global flags\n\nThese flags are available on every command:\n\n| Flag | Description |\n| --- | --- |\n| `--key <key>` | API key for this invocation. Overrides `BYTEKIT_API_KEY`. |\n| `--base-url <url>` | Override the API base URL (or set `BYTEKIT_BASE_URL`). Useful for self-hosted or staging endpoints. |\n| `--json` | Print the raw JSON response instead of the formatted, human-readable output. |\n| `-V, --version` | Print the CLI version and exit. |\n| `-h, --help` | Show help for the program or a subcommand. |\n\nFor example, to point at a staging endpoint and get raw JSON:\n\n```bash\nbytekit scrape create --url https://example.com --base-url https://api-stg.bytekit.com --json\n```\n\n## Next steps\n\n- [Scrape](https://bytekit.com/docs/cli/scrape) — capture URL content as markdown, HTML, or structured data.\n- [Screenshots](https://bytekit.com/docs/cli/screenshots) — render full-page or viewport screenshots.\n- [Monitors](https://bytekit.com/docs/cli/monitors) — track page changes on a schedule.\n- [API Reference](https://bytekit.com/docs/api) — the underlying REST endpoints."
256
+ },
257
+ "cli/account": {
258
+ "title": "Account",
259
+ "section": "CLI Reference",
260
+ "body": "# Account\n\nAccount operations\n\nAccount operations\n\n### account › get\n\nGet the authenticated account\n\n| Option | Description |\n| --- | --- |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit account get\n```"
261
+ },
262
+ "cli/bulk": {
263
+ "title": "Bulk",
264
+ "section": "CLI Reference",
265
+ "body": "# Bulk\n\nBulk screenshot operations\n\nBulk screenshot operations\n\n### bulk › screenshots\n\nBulk screenshot sub-resources\n\n| Option | Description |\n| --- | --- |\n| `-h, --help` | display help for command |\n\n#### bulk › screenshots › list\n\nList screenshots in a bulk job\n\n| Option | Description |\n| --- | --- |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit bulk screenshots list <id>\n```\n\n### bulk › create\n\nCreate a bulk screenshots job\n\n| Option | Description |\n| --- | --- |\n| `--file <path>` | Path to a newline-delimited file. Each line is a plain URL, or a JSON object carrying \"url\" plus per-item config. A line whose only key is \"url\" behaves exactly as before (sent as a bare URL string); any line with additional keys switches the payload to the per-item shape. |\n| `--webhook-url <url>` | HTTPS webhook URL notified when the job completes |\n| `--webhook-secret <secret>` | HMAC secret used to sign the completion webhook (omitted → unsigned) |\n| `--defaults <json>` | Defaults applied to every entry, as a JSON object (omitted → none). Unknown keys are rejected by /v1/bulk (422) and ignored by scrape bulk / fetch bulk; fetch bulk additionally rejects browser-only keys (cookies, wait_until, wait_for_selector, delay_ms) with a 400. |\n| `--metadata <json>` | Arbitrary metadata echoed on the job envelope, as a JSON object, e.g. '\\{\"run\":\"7\"\\}' (omitted → none) |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit bulk create --file <path> --webhook-url <url> --webhook-secret <secret> --defaults <json> --metadata <json>\n```\n\n### bulk › get\n\nGet a bulk job status\n\n| Option | Description |\n| --- | --- |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit bulk get <id>\n```\n\n### bulk › cancel\n\nCancel an in-flight bulk job\n\n| Option | Description |\n| --- | --- |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit bulk cancel <id>\n```"
266
+ },
267
+ "cli/fetch": {
268
+ "title": "Fetch",
269
+ "section": "CLI Reference",
270
+ "body": "# Fetch\n\nFetch URL content operations\n\nFetch URL content operations\n\n### fetch › bulk\n\nBulk fetch operations\n\n| Option | Description |\n| --- | --- |\n| `-h, --help` | display help for command |\n\n#### fetch › bulk › create\n\nCreate a bulk fetch job\n\n| Option | Description |\n| --- | --- |\n| `--file <path>` | Path to a newline-delimited file. Each line is a plain URL, or a JSON object carrying \"url\" plus per-item config. A line whose only key is \"url\" behaves exactly as before (sent as a bare URL string); any line with additional keys switches the payload to the per-item shape. |\n| `--webhook-url <url>` | HTTPS webhook URL notified when the job completes |\n| `--webhook-secret <secret>` | HMAC secret used to sign the completion webhook (omitted → unsigned) |\n| `--defaults <json>` | Defaults applied to every entry, as a JSON object (omitted → none). Unknown keys are rejected by /v1/bulk (422) and ignored by scrape bulk / fetch bulk; fetch bulk additionally rejects browser-only keys (cookies, wait_until, wait_for_selector, delay_ms) with a 400. |\n| `--metadata <json>` | Arbitrary metadata echoed on the job envelope, as a JSON object, e.g. '\\{\"run\":\"7\"\\}' (omitted → none) |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit fetch bulk create --file <path> --webhook-url <url> --webhook-secret <secret> --defaults <json> --metadata <json>\n```\n\n#### fetch › bulk › get\n\nGet a bulk fetch job\n\n| Option | Description |\n| --- | --- |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit fetch bulk get <id>\n```\n\n### fetch › create\n\nFetch URL content (POST)\n\n| Option | Description |\n| --- | --- |\n| `--url <url>` | URL to fetch |\n| `--format <format>` | Response format (markdown or html) |\n| `--country <cc>` | Two-letter country code to route the request through (e.g. us, de) |\n| `--timeout-ms <n>` | Per-request timeout in milliseconds |\n| `--cache-ttl <ttl>` | Cache freshness: 0, Nh (hours), or Nd (days), e.g. 48h, 2d, 0 (omitted → server default) |\n| `--markdown-mode <mode>` | Markdown mode: article, raw, llm |\n| `--markdown-query <q>` | BM25 query string for relevance-ranked markdown filtering (omitted → disabled) |\n| `--markdown-links <mode>` | Link rendering: inline, references, none, text (omitted → server default) |\n| `--markdown-images <mode>` | Image retention: inline, references, none, text (omitted → server default) |\n| `--with-links-summary` | Append a Links footer to the markdown output (omitted → off) |\n| `--with-images-summary` | Append an Images footer to the markdown output (omitted → off) |\n| `--markdown-compact` | Collapse excessive whitespace in the markdown output (omitted → off) |\n| `--markdown-filter-images` | Filter low-signal images from the markdown output (omitted → off) |\n| `--markdown-include-media` | Return rich link/image objects and a tables array (omitted → off) |\n| `--markdown-include-warnings` | Include markdown-pipeline and tag-filter warnings (omitted → off) |\n| `--markdown-include-stats` | Include a top-level stats object (chars, tokens, blocks) (omitted → off) |\n| `--custom <json>` | User payload echoed on the envelope as a JSON object, e.g. '\\{\"job\":\"1\"\\}' (omitted → none) |\n| `-o, --output <file>` | Write the fetched body bytes to the given file path |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit fetch create --url <url> --format <format> --country <cc> --timeout-ms <n> --cache-ttl <ttl> --markdown-mode <mode> --markdown-query <q> --markdown-links <mode> --markdown-images <mode> --with-links-summary --with-images-summary --markdown-compact --markdown-filter-images --markdown-include-media --markdown-include-warnings --markdown-include-stats --custom <json>\n```\n\n### fetch › get\n\nFetch URL content (GET via query params)\n\n| Option | Description |\n| --- | --- |\n| `--url <url>` | URL to fetch |\n| `--format <format>` | Response format (markdown or html) |\n| `--country <cc>` | Two-letter country code to route the request through (e.g. us, de) |\n| `--timeout-ms <n>` | Per-request timeout in milliseconds |\n| `--cache-ttl <ttl>` | Cache freshness: 0, Nh (hours), or Nd (days), e.g. 48h, 2d, 0 (omitted → server default) |\n| `-o, --output <file>` | Write the fetched body bytes to the given file path |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit fetch get --url <url> --format <format> --country <cc> --timeout-ms <n> --cache-ttl <ttl>\n```"
271
+ },
272
+ "cli/monitors": {
273
+ "title": "Monitors",
274
+ "section": "CLI Reference",
275
+ "body": "# Monitors\n\nPage-change monitor operations\n\nPage-change monitor operations\n\nFirst-capture behavior is the same for both monitor types: the first capture is a silent baseline (`has_change: false`, `change_pct: null`) with no `change_detected` webhook, whether the monitor is `scrape` or `screenshot`. From the second capture onward both types diff against the previous capture.\n\n### monitors › captures\n\nMonitor capture sub-resources\n\n| Option | Description |\n| --- | --- |\n| `-h, --help` | display help for command |\n\n#### monitors › captures › list\n\nList captures for a monitor\n\n| Option | Description |\n| --- | --- |\n| `--limit <n>` | Maximum number of captures to return |\n| `--cursor <cursor>` | Pagination cursor from a previous page |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit monitors captures list <id> --limit <n> --cursor <cursor>\n```\n\n### monitors › create\n\nCreate a page-change monitor\n\n| Option | Description |\n| --- | --- |\n| `--url <url>` | URL to monitor |\n| `--interval-type <type>` | Check interval: hourly, daily, weekly, or cron |\n| `--webhook-url <url>` | HTTPS webhook URL notified on change |\n| `--cron <expr>` | Cron expression (required when --interval-type is cron, e.g. \"0 * * * *\") |\n| `--type <type>` | Monitor type: screenshot, scrape (omitted → server default screenshot) |\n| `--change-threshold <pct>` | Change percentage that triggers a notification (float; omitted → server default 5) |\n| `--notify-on <event>` | When to notify: change, every (omitted → server default change) |\n| `--webhook-secret <secret>` | HMAC secret for webhook signature verification |\n| `--webhook-headers <json>` | Extra webhook headers as a JSON object, e.g. '\\{\"X-Sig\":\"abc\"\\}' (omitted → none) |\n| `--options <json>` | Screenshot-monitor options as a JSON object (omitted → server defaults) |\n| `--scrape-options <json>` | Scrape-monitor options as a JSON object (type=scrape only; omitted → server defaults) |\n| `--metadata <json>` | Arbitrary metadata echoed on the monitor envelope, as a JSON object, e.g. '\\{\"run\":\"7\"\\}' (omitted → none) |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit monitors create --url <url> --interval-type <type> --webhook-url <url> --cron <expr> --type <type> --change-threshold <pct> --notify-on <event> --webhook-secret <secret> --webhook-headers <json> --options <json> --scrape-options <json> --metadata <json>\n```\n\n### monitors › list\n\nList all monitors\n\n| Option | Description |\n| --- | --- |\n| `--limit <n>` | Maximum number of monitors to return |\n| `--cursor <cursor>` | Pagination cursor from a previous page |\n| `--status <status>` | Filter by status: active, processing, paused, cancelled, suspended (default active) |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit monitors list --limit <n> --cursor <cursor> --status <status>\n```\n\n### monitors › get\n\nGet a monitor by ID\n\n| Option | Description |\n| --- | --- |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit monitors get <id>\n```\n\n### monitors › update\n\nUpdate a monitor (including pause/resume via --status)\n\n| Option | Description |\n| --- | --- |\n| `--url <url>` | New URL to monitor (omitted → unchanged) |\n| `--interval-type <type>` | New check interval: hourly, daily, weekly, or cron |\n| `--cron <expr>` | New cron expression (when interval-type is cron, e.g. \"0 * * * *\") |\n| `--webhook-url <url>` | New HTTPS webhook URL |\n| `--status <status>` | Pause or resume the monitor: active, paused |\n| `--change-threshold <pct>` | New change percentage that triggers a notification (float) |\n| `--notify-on <event>` | When to notify: change, every |\n| `--webhook-secret <secret>` | New HMAC secret for webhook signature verification |\n| `--webhook-headers <json>` | New webhook headers as a JSON object, e.g. '\\{\"X-Sig\":\"abc\"\\}' |\n| `--options <json>` | New screenshot-monitor options as a JSON object |\n| `--scrape-options <json>` | New scrape-monitor options as a JSON object |\n| `--metadata <json>` | New metadata as a JSON object, e.g. '\\{\"run\":\"7\"\\}' (omitted → unchanged) |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit monitors update <id> --url <url> --interval-type <type> --cron <expr> --webhook-url <url> --status <status> --change-threshold <pct> --notify-on <event> --webhook-secret <secret> --webhook-headers <json> --options <json> --scrape-options <json> --metadata <json>\n```\n\n### monitors › delete\n\nDelete a monitor\n\n| Option | Description |\n| --- | --- |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit monitors delete <id>\n```"
276
+ },
277
+ "cli/scrape": {
278
+ "title": "Scrape",
279
+ "section": "CLI Reference",
280
+ "body": "# Scrape\n\nScrape URL content\n\nScrape URL content\n\n### scrape › bulk\n\nBulk scrape operations\n\n| Option | Description |\n| --- | --- |\n| `-h, --help` | display help for command |\n\n#### scrape › bulk › create\n\nCreate a bulk scrape job\n\n| Option | Description |\n| --- | --- |\n| `--file <path>` | Path to a newline-delimited file. Each line is a plain URL, or a JSON object carrying \"url\" plus per-item config. A line whose only key is \"url\" behaves exactly as before (sent as a bare URL string); any line with additional keys switches the payload to the per-item shape. |\n| `--webhook-url <url>` | HTTPS webhook URL notified when the job completes |\n| `--webhook-secret <secret>` | HMAC secret used to sign the completion webhook (omitted → unsigned) |\n| `--defaults <json>` | Defaults applied to every entry, as a JSON object (omitted → none). Unknown keys are rejected by /v1/bulk (422) and ignored by scrape bulk / fetch bulk; fetch bulk additionally rejects browser-only keys (cookies, wait_until, wait_for_selector, delay_ms) with a 400. |\n| `--metadata <json>` | Arbitrary metadata echoed on the job envelope, as a JSON object, e.g. '\\{\"run\":\"7\"\\}' (omitted → none) |\n| `--custom <json>` | User payload echoed on every scrape entry, as a JSON object, e.g. '\\{\"job\":\"1\"\\}' (omitted → none; a per-entry value in --file wins) |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit scrape bulk create --file <path> --webhook-url <url> --webhook-secret <secret> --defaults <json> --metadata <json> --custom <json>\n```\n\n#### scrape › bulk › get\n\nGet a bulk scrape job\n\n| Option | Description |\n| --- | --- |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit scrape bulk get <id>\n```\n\n### scrape › create\n\nCreate a scrape job\n\n| Option | Description |\n| --- | --- |\n| `--url <url>` | URL to scrape |\n| `--format <format>` | Output format; repeat or comma-separate for multiple (e.g. --format raw_html --format markdown, or --format raw_html,markdown). Sent as the formats array; omitted → server default. |\n| `--country <cc>` | Two-letter country code to route the request through (e.g. us, de) |\n| `--timeout-ms <n>` | Per-request timeout in milliseconds |\n| `--markdown-mode <mode>` | Markdown extraction mode: article, raw, llm |\n| `--markdown-query <q>` | BM25 query string for relevance-ranked markdown filtering (omitted → disabled) |\n| `--cache-ttl <ttl>` | Cache freshness: 0, Nh (hours), or Nd (days), e.g. 48h, 2d, 0 (omitted → server default) |\n| `--cookies <json>` | Cookies as a JSON array, e.g. '[\\{\"name\":\"a\",\"value\":\"b\"\\}]' (omitted → none) |\n| `--headers <json>` | Extra request headers as a JSON object, e.g. '\\{\"X-A\":\"b\"\\}' (omitted → none) |\n| `--delay-ms <n>` | Post-load delay in milliseconds before capture |\n| `--events <csv>` | Webhook events (comma-separated): queued, completed, failed (omitted → server default) |\n| `--token-encoding <enc>` | Tokenizer for --token-budget: cl100k_base, o200k_base (omitted → server default) |\n| `--custom <json>` | User payload echoed on the envelope as a JSON object, e.g. '\\{\"job\":\"1\"\\}' (omitted → none) |\n| `--remove-base64-images` | Strip base64 data: images before conversion (server default) |\n| `--no-remove-base64-images` | Preserve base64 data: images in the pipeline output |\n| `--markdown-links <mode>` | Link rendering: inline, references, none, text |\n| `--markdown-images <mode>` | Image retention: inline, references, none, text |\n| `--with-links-summary` | Append a Links footer to the markdown output |\n| `--with-images-summary` | Append an Images footer to the markdown output |\n| `--markdown-compact` | Collapse excessive whitespace in the markdown output |\n| `--markdown-filter-images` | Filter low-signal images from the markdown output |\n| `--markdown-include-media` | Return rich link/image objects and a tables array |\n| `--markdown-include-warnings` | Include markdown-pipeline and tag-filter warnings |\n| `--markdown-include-stats` | Include a top-level stats object (chars, tokens, blocks) |\n| `--async` | Queue the scrape and return a job envelope immediately (no wait) |\n| `--webhook-url <url>` | HTTPS webhook URL notified when an async scrape completes |\n| `--token-budget <n>` | Maximum tokens of markdown to return |\n| `--clean-markdown` | Post-process markdown with the LLM cleaner (billed 3x) |\n| `--include-tags <csv>` | Comma-separated HTML tags to keep (e.g. article,main) |\n| `--exclude-tags <csv>` | Comma-separated HTML tags to drop (e.g. nav,footer) |\n| `--mobile` | Render with a mobile viewport/user-agent |\n| `--raw` | Print the requested format body raw, with no JSON wrapper |\n| `-o, --output <file>` | Write the output to the given file path (implies --raw unless --json is set) |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit scrape create --url <url> --format <format> --country <cc> --timeout-ms <n> --markdown-mode <mode> --markdown-query <q> --cache-ttl <ttl> --cookies <json> --headers <json> --delay-ms <n> --events <csv> --token-encoding <enc> --custom <json> --remove-base64-images --no-remove-base64-images --markdown-links <mode> --markdown-images <mode> --with-links-summary --with-images-summary --markdown-compact --markdown-filter-images --markdown-include-media --markdown-include-warnings --markdown-include-stats --async --webhook-url <url> --token-budget <n> --clean-markdown --include-tags <csv> --exclude-tags <csv> --mobile --raw\n```\n\n### scrape › get\n\nGet a scrape job by ID (use --raw/-o/--format to retrieve a completed body)\n\n| Option | Description |\n| --- | --- |\n| `--raw` | Print the requested format body raw, with no JSON wrapper |\n| `-o, --output <file>` | Write the output to the given file path (implies --raw unless --json is set) |\n| `--format <format>` | Which persisted format to emit — only takes effect with --raw/-o; ignored otherwise |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit scrape get <id> --raw --format <format>\n```"
281
+ },
282
+ "cli/screenshots": {
283
+ "title": "Screenshots",
284
+ "section": "CLI Reference",
285
+ "body": "# Screenshots\n\nScreenshot operations\n\nScreenshot operations\n\n### screenshots › create\n\nCapture a screenshot\n\n| Option | Description |\n| --- | --- |\n| `--url <url>` | URL to screenshot |\n| `--full-page` | Capture the full page (default: viewport only) |\n| `--device <device>` | Device profile: desktop, mobile |\n| `--viewport <WxH>` | Viewport size WIDTHxHEIGHT (e.g. 1280x720) |\n| `--format <format>` | Image format: jpeg, png |\n| `--quality <n>` | JPEG quality (1-100) |\n| `--wait-until <event>` | Wait condition: load, domcontentloaded, networkidle |\n| `--clip <x,y,w,h>` | Clip region X,Y,WIDTH,HEIGHT (e.g. 0,0,800,600) |\n| `--block-ads` | Block ads before capture (server default) |\n| `--no-block-ads` | Do not block ads |\n| `--block-cookie-banners` | Block cookie-consent banners before capture (server default) |\n| `--no-block-cookie-banners` | Do not block cookie-consent banners |\n| `--scroll` | Scroll the page before capture to trigger lazy content (server default) |\n| `--no-scroll` | Do not scroll the page before capture |\n| `--wait-for-selector <sel>` | Wait until this CSS selector is present before capture |\n| `--delay-ms <n>` | Post-load delay in milliseconds before capture |\n| `--dark-mode` | Emulate prefers-color-scheme: dark |\n| `--device-scale-factor <n>` | Device pixel ratio: 1, 2 |\n| `--include-html` | Include the rendered HTML alongside the screenshot |\n| `--country <cc>` | Two-letter country code to route the request through (e.g. us, de) |\n| `--language <lang>` | Accept-Language override (e.g. en-US) |\n| `--headers <json>` | Extra request headers as a JSON object, e.g. '\\{\"X-A\":\"b\"\\}' (omitted → none) |\n| `--cookies <json>` | Cookies as a JSON array of \\{name,value,domain\\}, e.g. '[\\{\"name\":\"a\",\"value\":\"b\",\"domain\":\"example.com\"\\}]' (omitted → none) |\n| `--metadata <json>` | Arbitrary metadata echoed on the screenshot envelope, as a JSON object, e.g. '\\{\"run\":\"7\"\\}' (omitted → none) |\n| `--async` | Queue the screenshot and return a job envelope immediately (no wait) |\n| `-o, --output <file>` | Download the captured image to this file path (use - for stdout). Not valid with --json. |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit screenshots create --url <url> --full-page --device <device> --viewport <WxH> --format <format> --quality <n> --wait-until <event> --clip <x,y,w,h> --block-ads --no-block-ads --block-cookie-banners --no-block-cookie-banners --scroll --no-scroll --wait-for-selector <sel> --delay-ms <n> --dark-mode --device-scale-factor <n> --include-html --country <cc> --language <lang> --headers <json> --cookies <json> --metadata <json> --async\n```\n\n### screenshots › get\n\nGet a screenshot by ID\n\n| Option | Description |\n| --- | --- |\n| `-o, --output <file>` | Download the captured image to this file path (use - for stdout). Not valid with --json. |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit screenshots get <id>\n```"
286
+ },
287
+ "cli/search": {
288
+ "title": "Search",
289
+ "section": "CLI Reference",
290
+ "body": "# Search\n\nRun a web search and return ranked results\n\nRun a web search and return ranked results\n\n### search\n\nRun a web search and return ranked results\n\n| Option | Description |\n| --- | --- |\n| `--type <type>` | Search index to query: web (default), news, or images |\n| `--limit <n>` | Maximum number of results to return (1–100) |\n| `--country <code>` | Two-letter country code to localize results (e.g. us, de) |\n| `--language <code>` | Two-letter language code for results (e.g. en, fr) |\n| `--date-range <window>` | Restrict results to a recency window: any (default), hour, day, week, month, or year |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit search <query> --type <type> --limit <n> --country <code> --language <code> --date-range <window>\n```"
291
+ },
292
+ "cli/sitemap": {
293
+ "title": "Sitemap",
294
+ "section": "CLI Reference",
295
+ "body": "# Sitemap\n\nSitemap crawl operations\n\nSitemap crawl operations\n\n### sitemap › create\n\nStart a sitemap crawl\n\n| Option | Description |\n| --- | --- |\n| `--url <url>` | Root URL to crawl |\n| `--strategy <strategy>` | Crawl strategy: quick, standard, deep (omitted → server default standard) |\n| `--max-depth <n>` | Maximum crawl depth 1-5 (omitted → server default 2) |\n| `--max-urls <n>` | Maximum URLs to collect (omitted → server default 5000) |\n| `--webhook-url <url>` | HTTPS webhook URL notified when the crawl completes (omitted → poll-only, no delivery) |\n| `--webhook-secret <secret>` | HMAC secret used to sign the completion webhook (omitted → unsigned) |\n| `--cache-ttl <ttl>` | Cache freshness: 0, Nh (hours), or Nd (days), e.g. 48h, 30d, 0 (omitted → server default 30d; max 90d, enforced server-side) |\n| `--compact` | Return a compact result payload (omitted → server default off) |\n| `--process <json>` | Post-crawl processing directive as a JSON object, e.g. '\\{\"action\":\"summarize\"\\}' (omitted → none) |\n| `--metadata <json>` | Arbitrary metadata echoed on the job envelope, as a JSON object, e.g. '\\{\"run\":\"7\"\\}' (omitted → none) |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit sitemap create --url <url> --strategy <strategy> --max-depth <n> --max-urls <n> --webhook-url <url> --webhook-secret <secret> --cache-ttl <ttl> --compact --process <json> --metadata <json>\n```\n\n### sitemap › get\n\nGet a sitemap job by ID\n\n| Option | Description |\n| --- | --- |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit sitemap get <id>\n```"
296
+ },
297
+ "cli/usage": {
298
+ "title": "Usage",
299
+ "section": "CLI Reference",
300
+ "body": "# Usage\n\nAccount usage and billing-period reporting\n\nAccount usage and billing-period reporting\n\n### usage › get\n\nGet current billing-period usage summary\n\n| Option | Description |\n| --- | --- |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit usage get\n```\n\n### usage › daily\n\nGet daily usage breakdown (default last 30 days; max 366)\n\n| Option | Description |\n| --- | --- |\n| `--from <date>` | Start date YYYY-MM-DD (omitted → server default, 30 days ago) |\n| `--to <date>` | End date YYYY-MM-DD (omitted → server default, today) |\n| `--api-key <ak_id>` | Filter by API key prefixed ID (omitted → all keys) |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit usage daily --from <date> --to <date> --api-key <ak_id>\n```\n\n### usage › by-endpoint\n\nGet per-endpoint bandwidth breakdown (default last 30 days; max 366)\n\n| Option | Description |\n| --- | --- |\n| `--from <date>` | Start date YYYY-MM-DD (omitted → server default, 30 days ago) |\n| `--to <date>` | End date YYYY-MM-DD (omitted → server default, today) |\n| `--api-key <ak_id>` | Filter by API key prefixed ID (omitted → all keys) |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit usage by-endpoint --from <date> --to <date> --api-key <ak_id>\n```"
301
+ },
302
+ "cli/webhook-deliveries": {
303
+ "title": "Webhook-deliveries",
304
+ "section": "CLI Reference",
305
+ "body": "# Webhook-deliveries\n\nWebhook delivery operations\n\nWebhook delivery operations\n\n### webhook-deliveries › list\n\nList webhook deliveries\n\n| Option | Description |\n| --- | --- |\n| `--limit <n>` | Maximum number of deliveries to return |\n| `--cursor <cursor>` | Pagination cursor from a previous page |\n| `--status <status>` | Filter by delivery status: pending, delivered, failed, exhausted |\n| `--since <iso>` | Only deliveries created after this ISO date-time |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit webhook-deliveries list --limit <n> --cursor <cursor> --status <status> --since <iso>\n```\n\n### webhook-deliveries › retry\n\nRequeue a failed or exhausted webhook delivery\n\n| Option | Description |\n| --- | --- |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit webhook-deliveries retry <id>\n```"
306
+ },
307
+ "guides/authentication": {
308
+ "title": "Authentication",
309
+ "section": "Guides",
310
+ "body": "# Authentication\n\nHow to authenticate with the ByteKit API using API keys.\n\nByteKit authenticates requests with Bearer API keys. Every request to a capture or data\nendpoint must include an `Authorization` header.\n\n## API key format\n\nKeys are prefixed `sk_live_` so they are easy to identify in logs and config. Treat\nthe full value as a secret.\n\n## Sending the Bearer header\n\nInclude the key in every request:\n\n```bash\ncurl -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```\n\nThe key is stored as a SHA-256 hash on the server. The plaintext value is only ever visible\nonce — at creation time.\n\n## Managing API keys\n\nCreate, rename, and revoke API keys from the [dashboard](https://app.bytekit.com). Each account\ncan hold up to **50 active keys**, with per-key billing attribution so you can split usage cleanly\nacross services.\n\nThe plaintext key is shown **once**, at creation time — copy it immediately and store it as a\nsecret. Revoke a key from the dashboard to free a slot; revoked keys do not count toward the limit.\n\n## Next steps\n\n- [Quickstart](https://bytekit.com/docs/quickstart) — make your first API call\n- [API Reference: Account](https://bytekit.com/docs/api/account/getaccount) — read your account, plan, and usage"
311
+ },
312
+ "guides/errors": {
313
+ "title": "Errors",
314
+ "section": "Guides",
315
+ "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\": \"Too many requests. Retry after 2 seconds.\",\n \"httpStatus\": 429,\n \"failedAt\": \"2026-06-16T19:38:02.084Z\",\n \"details\": {}\n }\n}\n```\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.httpStatus` | Mirrors the HTTP response status (useful for logged or replayed bodies) |\n| `error.failedAt` | ISO-8601 UTC timestamp of when the error was produced |\n| `error.details` | Optional object with additional context (e.g. which field failed validation) |\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| `401` | `unauthorized` | Missing or malformed `Authorization` header |\n| `401` | `invalid_api_key` | API key is present but not valid |\n| `402` | `quota_exceeded` | Account has exceeded its plan quota |\n| `403` | `forbidden` | Key is valid but lacks permission for this action |\n| `422` | `validation_error` | Malformed JSON or a request field failed validation |\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 \"httpStatus\": 400,\n \"failedAt\": \"2026-06-16T19:38:02.340Z\",\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 | Upgrade your plan or wait for quota reset |\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"
316
+ },
317
+ "guides/monitors": {
318
+ "title": "Monitors",
319
+ "section": "Guides",
320
+ "body": "# Monitors\n\nDetect page changes on any URL — by screenshot or scrape — and receive webhook notifications.\n\nMonitors periodically capture a URL and notify you when the page changes. Each monitor uses one\nof two capture types: `screenshot` (perceptual/visual change detection) or `scrape` (content and\nmarkdown change detection). Use them for price tracking, content alerts, uptime monitoring, or\ncompetitor surveillance.\n\n## Create a monitor\n\n```bash\ncurl -X POST https://api.bytekit.com/v1/monitors \\\n -H \"Authorization: Bearer sk_live_YOUR_KEY_HERE\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"url\": \"https://example.com/pricing\",\n \"interval_type\": \"hourly\",\n \"webhook_url\": \"https://your-server.example.com/webhooks/bytekit\"\n }'\n```\n\n| Field | Description |\n|-------|-------------|\n| `url` | The page to monitor (required) |\n| `interval_type` | Check frequency — one of `hourly`, `daily`, `weekly`, or `cron` (required) |\n| `webhook_url` | HTTPS webhook endpoint to receive notifications. `http://` is rejected with a 400 `invalid_url` (reason `scheme_unsupported`) (required) |\n| `cron_expression` | 5-field cron expression. Required when `interval_type` is `cron` |\n| `type` | Capture mode — `screenshot` (default) or `scrape` |\n| `change_threshold` | Percentage of change required to trigger a notification (0–100, default `5`). Screenshot monitors only |\n| `notify_on` | `change` (default — notify only when content changed) or `every` (notify on every capture) |\n| `webhook_secret` | Optional secret used to sign webhook deliveries |\n| `webhook_headers` | Optional custom headers (max 20) to include on each webhook delivery |\n\nA successful response returns the monitor object with an `id` prefixed `mon_`:\n\n```json\n{\n \"id\": \"mon_...\",\n \"type\": \"screenshot\",\n \"url\": \"https://example.com/pricing\",\n \"status\": \"active\",\n \"interval_type\": \"hourly\",\n \"cron_expression\": null,\n \"next_capture_at\": \"2026-01-01T01:00:00Z\",\n \"notify_on\": \"change\",\n \"webhook_url\": \"https://your-server.example.com/webhooks/bytekit\",\n \"captures_count\": 0,\n \"changes_count\": 0,\n \"created_at\": \"2026-01-01T00:00:00Z\"\n}\n```\n\nTo monitor on a schedule, set `interval_type` to `cron` and supply a 5-field `cron_expression`:\n\n```bash\ncurl -X POST https://api.bytekit.com/v1/monitors \\\n -H \"Authorization: Bearer sk_live_YOUR_KEY_HERE\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"url\": \"https://example.com/pricing\",\n \"interval_type\": \"cron\",\n \"cron_expression\": \"0 9 * * 1-5\",\n \"webhook_url\": \"https://your-server.example.com/webhooks/bytekit\"\n }'\n```\n\n## List monitors\n\n```bash\ncurl https://api.bytekit.com/v1/monitors \\\n -H \"Authorization: Bearer sk_live_YOUR_KEY_HERE\"\n```\n\n## Get a monitor\n\n```bash\ncurl https://api.bytekit.com/v1/monitors/mon_... \\\n -H \"Authorization: Bearer sk_live_YOUR_KEY_HERE\"\n```\n\n## Update a monitor\n\n```bash\ncurl -X PATCH https://api.bytekit.com/v1/monitors/mon_... \\\n -H \"Authorization: Bearer sk_live_YOUR_KEY_HERE\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"interval_type\": \"daily\"}'\n```\n\nYou can update any subset of the monitor's mutable fields — for example `interval_type`,\n`cron_expression`, `webhook_url`, `notify_on`, `change_threshold`, or `status`\n(`active` / `paused`). Switching to a `cron` schedule requires a `cron_expression`:\n\n```bash\ncurl -X PATCH https://api.bytekit.com/v1/monitors/mon_... \\\n -H \"Authorization: Bearer sk_live_YOUR_KEY_HERE\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"interval_type\": \"cron\", \"cron_expression\": \"*/30 * * * *\"}'\n```\n\n## Delete a monitor\n\n```bash\ncurl -X DELETE https://api.bytekit.com/v1/monitors/mon_... \\\n -H \"Authorization: Bearer sk_live_YOUR_KEY_HERE\"\n```\n\n## Monitor captures\n\nEach time a monitor fires it records a capture event — on **every** run, whether or not the\ncontent changed. Each capture carries a `has_change` flag marking whether the content differed\nfrom the previous capture. Webhook delivery is separate: the capture is always recorded, but\nwhether a webhook is *sent* depends on `has_change` and the monitor's `notify_on` setting (see\n[Webhook payload](#webhook-payload) below). Retrieve the capture history with:\n\n```bash\ncurl https://api.bytekit.com/v1/monitors/mon_.../captures \\\n -H \"Authorization: Bearer sk_live_YOUR_KEY_HERE\"\n```\n\nEach capture in the list represents one capture event and includes change metadata — the\ntimestamp, whether the content changed (`has_change`), the percentage of content that changed\n(`change_pct`), and the perceptual hash distance from the previous capture. Captures record\n*that* the content changed and by how much; they do not include a line-by-line textual diff.\n\n### First-capture behavior (silent baseline for both types)\n\nThe very first capture of a monitor has **no previous capture to compare against**. Both monitor\ntypes treat that first run as a **silent baseline** — one universal \"first capture\" behavior,\nno per-type divergence:\n\n| Monitor type | First capture | `has_change` | `change_pct` | Webhook on first capture |\n|--------------|---------------|--------------|--------------|--------------------------|\n| `scrape` | Silent baseline | `false` | `null` | **No** `monitor.change_detected`-equivalent webhook (the baseline is just recorded) |\n| `screenshot` | Silent baseline | `false` | `null` | **No** `monitor.change_detected` webhook (the baseline is just recorded) |\n\nNeither a **scrape** nor a **screenshot** monitor alerts you on its first run — both only alert\nonce a *subsequent* capture differs (scrape by exact content-hash inequality, screenshot by at\nleast `change_threshold`). A monitor with `notify_on: \"every\"` still sends a `monitor.captured`\nwebhook on the first capture — that is the per-capture notification, not a change alert, and it\nfires for both monitor types. From the second capture onward both types behave the same way each\nnew capture is compared against the previous one — scrape by exact SHA-256 content equality,\nscreenshot by perceptual-hash distance against `change_threshold`.\n\n**Existing scrape monitors:** if you created a scrape monitor before this change shipped, its\nfirst post-deploy capture will no longer fire a `monitor.change_detected`-equivalent webhook —\nthe first capture after the change is now the silent baseline, matching screenshot monitors.\nSteady-state alerting (second capture onward) is unaffected.\n\n**Repointing a monitor's `url`:** `PATCH`-ing a monitor's `url` to a different address re-enters\nthis same silent-baseline behavior — the capture immediately after a repoint is treated as a\nfresh first capture (`has_change: false`, `change_pct: null`, no `monitor.change_detected`-equivalent\nwebhook for `scrape` monitors, no `monitor.change_detected` webhook for `screenshot` monitors),\nsince the stored comparison baseline for the old URL no longer applies to the new one.\nSteady-state alerting resumes from the *second* capture after the repoint.\n\nThis silence isn't guaranteed if a capture was already in flight against the old URL when the\n`PATCH` landed: that capture can still complete and write its result back as the new baseline,\nso the repoint's silent-baseline behavior is deferred to the *next* capture rather than applying\nto the in-flight one.\n\n## Webhook payload\n\nWhen a monitor fires, ByteKit sends a `POST` to your `webhook_url`. Every delivery carries an\n`X-ByteKit-Event` header naming the event type — dispatch on that header rather than inspecting\nthe body shape. The event type and payload depend on the monitor's `type`.\n\n### Screenshot monitors (`type: \"screenshot\"`, default)\n\nScreenshot captures send `monitor.change_detected` when the page changed (`X-ByteKit-Event:\nmonitor.change_detected`) and `monitor.captured` when there was no change but\n`notify_on: \"every\"` is set (`X-ByteKit-Event: monitor.captured`). The body carries the capture\nmetadata:\n\n```json\n{\n \"monitor_id\": \"mon_...\",\n \"screenshot_id\": \"ss_...\",\n \"has_change\": true,\n \"change_pct\": 42.0,\n \"hash_distance\": 18,\n \"url\": \"https://example.com/pricing\"\n}\n```\n\n| Field | Description |\n|-------|-------------|\n| `has_change` | `true` when the captured content differs from the previous capture |\n| `change_pct` | Percentage of content that changed (0–100) |\n| `hash_distance` | Perceptual-hash distance from the previous capture |\n| `screenshot_id` | The screenshot that triggered the notification |\n\n### Scrape monitors (`type: \"scrape\"`)\n\nScrape captures send `scrape.completed` (`X-ByteKit-Event: scrape.completed`) with the full\nscrape result envelope inline:\n\n```json\n{\n \"success\": true,\n \"type\": \"scrape.completed\",\n \"id\": \"mon_...\",\n \"scrape_id\": \"sc_...\",\n \"has_change\": true,\n \"change_pct\": 100.0,\n \"metadata\": {},\n \"scrape\": {\n \"status\": \"success\",\n \"id\": \"sc_...\",\n \"url\": \"https://example.com/pricing\",\n \"final_url\": \"https://example.com/pricing\",\n \"content_length\": 1256,\n \"status_code\": 200,\n \"formats\": {\n \"markdown\": \"...\"\n }\n }\n}\n```\n\n| Field | Description |\n|-------|-------------|\n| `has_change` | `true` when the captured content differs from the previous capture |\n| `change_pct` | Percentage of content that changed (0–100) |\n| `scrape` | Full scrape result envelope (same shape as `POST /v1/scrape` response) |\n\nYour endpoint must respond with `2xx` within 10 seconds. Failed deliveries are retried with\nexponential backoff.\n\n## Next steps\n\n- [API Reference: Monitors](https://bytekit.com/docs/api/monitors/createmonitor) — full endpoint schema\n- [Errors](https://bytekit.com/docs/guides/errors) — error codes returned by monitor endpoints"
321
+ },
322
+ "guides/rate-limits": {
323
+ "title": "Rate Limits",
324
+ "section": "Guides",
325
+ "body": "# Rate Limits\n\nHow ByteKit enforces quotas, concurrency slots, and rate limits.\n\nByteKit enforces three independent limits: **rate limits** (requests per second),\n**concurrency slots** (simultaneous in-flight requests), and **quota** (monthly usage caps).\nAll three are enforced before any capture work begins.\n\n## Quota model\n\nQuota is pre-incremented on every request and corrected after the request completes:\n\n1. **Pre-increment** — your usage counter is incremented by an estimate before the capture\n starts. This prevents over-committing capacity even for concurrent requests.\n2. **Adjust** — once the response returns, the actual `contentLength` (compressed wire bytes)\n replaces the estimate for bandwidth accounting.\n3. **Compensating decrement** — if the request fails with a terminal error, the pre-incremented\n amount is rolled back so you are not charged for failed requests.\n\nThis means your dashboard usage counter may briefly read higher than actual consumption during\na burst of requests, then settle to the true value.\n\n## Concurrency slots\n\nEach account has a concurrency limit — the maximum number of in-flight requests at one time.\nSlots are released automatically a few minutes after a client disconnects, so a crashed client\ncannot permanently hold them.\n\nWhen you exceed your concurrency limit, you receive `429 concurrency_limit` (not\n`rate_limited` — a distinct error code) with a `Retry-After` header indicating how long to\nwait before retrying.\n\n## Rate limit headers\n\nEvery response includes headers that show your current position:\n\n| Header | Description |\n|--------|-------------|\n| `X-RateLimit-Limit` | Your account's request-per-second limit |\n| `X-RateLimit-Remaining` | Requests remaining in the current window |\n| `X-RateLimit-Reset` | Unix timestamp when the window resets |\n| `Retry-After` | Seconds to wait before retrying (present on `429` only) |\n\n## Bandwidth metering\n\nBandwidth usage is measured as `contentLength` — the compressed wire bytes returned by the\norigin server. If the origin sends gzip or Brotli-encoded content, the compressed size is what\ncounts, not the decompressed size. This matches what your client actually receives over the\nnetwork.\n\n## Handling 429 responses\n\nWhen you receive `429 rate_limited` or `429 concurrency_limit`:\n\n1. Read the `Retry-After` header value (in seconds).\n2. Wait at least that long before retrying.\n3. If no `Retry-After` is present, use exponential backoff starting at 1 second.\n\n```bash\n# Check rate limit headers\ncurl -I -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```\n\n## Next steps\n\n- [Errors](https://bytekit.com/docs/guides/errors) — full error code reference and retry guidance\n- [Scraping](https://bytekit.com/docs/guides/scraping) — formats, options, latency, and async polling"
326
+ },
327
+ "guides/scraping": {
328
+ "title": "Scraping",
329
+ "section": "Guides",
330
+ "body": "# Scraping\n\nScrape any URL as HTML, markdown, or structured content — formats, options, latency, and async polling.\n\n`POST /v1/scrape` fetches a URL and returns its content in the format you ask for. The same\nrequest shape works for every site; the options you pass determine the output and how long the\ncall takes.\n\n## Rendering & latency\n\nMost scrapes return in well under a second. Some options require ByteKit to fully render the page\nbefore it can return content, which takes longer — typically a few seconds. Pass these only when\nyou need them:\n\n| Option | When it adds latency |\n|--------|----------------------|\n| `cookies` | Non-empty array |\n| `headers` | Non-empty object |\n| `delay_ms` | Greater than `0` |\n| `async` | `true` (request is queued and processed off the fast path) |\n\nThe `country` option routes the request through a geo-located proxy. On its own it does not add\nrendering latency; it only does so when combined with one of the options above.\n\nLooking for `wait_for_selector` or `wait_until`? Those are not `ScrapeRequest` options — they\nbelong to the [Screenshot](https://bytekit.com/docs/api/screenshots/createscreenshot) and\n[Recording](https://bytekit.com/docs/api/recordings/createrecording) endpoints. Sending them to `/v1/scrape` returns\n`422`.\n\n```bash\n# A simple, low-latency scrape\ncurl -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```\n\n```bash\n# Slower: delay_ms forces a full render and waits before returning\ncurl -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 '{\n \"url\": \"https://example.com\",\n \"delay_ms\": 2000\n }'\n```\n\n## Response fields\n\nThe default format is `raw_html` — pass `formats` to request others (`markdown`, `html`,\n`links`, `images`). The `formats` object in the response is keyed by the format you requested.\n\n| Field | Description |\n|-------|-------------|\n| `formats.raw_html` | Page content in the requested format (`raw_html` is the default when `formats` is omitted) |\n| `contentLength` | Compressed wire bytes — used for bandwidth billing |\n| `statusCode` | HTTP status code of the origin page |\n| `metadata.title` | Page `<title>` element |\n\nThe `X-Scrape-*` response headers describe how each request was handled (cache status, timing,\nand the final URL) — useful for debugging.\n\n## Async scrapes\n\nFor long-running pages, pass `\"async\": true` to get a `202 Accepted` response with a scrape\n`id` prefixed `sc_`. Poll the result with `GET /v1/scrape/{id}`.\n\n```bash\n# Start async scrape\ncurl -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\", \"async\": true}'\n\n# Poll for result\ncurl https://api.bytekit.com/v1/scrape/sc_... \\\n -H \"Authorization: Bearer sk_live_YOUR_KEY_HERE\"\n```\n\n## Webhook event header\n\nEvery outbound webhook POST includes an `X-ByteKit-Event` header with the event type:\n\n| Event type | Trigger |\n|---|---|\n| `bulk.completed` | A bulk job finishes (all items processed) |\n| `scrape.completed` | An async scrape succeeds |\n| `scrape.failed` | An async scrape fails terminally |\n| `monitor.change_detected` | A monitor fires and detects a change (screenshot or content) |\n| `monitor.captured` | A monitor fires with no change detected (notify_on: every) |\n| `sitemap.completed` | A sitemap job finishes |\n| `sitemap.failed` | A sitemap job fails terminally |\n\nUse this header to dispatch events without inspecting the body shape:\n\n```python\nfrom flask import Flask, request\n\napp = Flask(__name__)\n\n@app.route(\"/webhooks/bytekit\", methods=[\"POST\"])\ndef handle():\n event = request.headers.get(\"X-ByteKit-Event\")\n if event == \"bulk.completed\":\n handle_bulk(request.json)\n elif event == \"scrape.completed\":\n handle_scrape(request.json)\n return \"\", 200\n```\n\n`X-ByteKit-Event` is a reserved header — you cannot supply it via `webhook_headers` in\nmonitor or bulk configuration. Attempts to do so will be rejected with a `422` at request\ntime.\n\n## Next steps\n\n- [Rate Limits](https://bytekit.com/docs/guides/rate-limits) — quota model and concurrency slots\n- [Errors](https://bytekit.com/docs/guides/errors) — how to interpret and retry error responses\n- [API Reference: Scrape](https://bytekit.com/docs/api/scrape/createscrape) — full request/response schema"
331
+ },
332
+ "introduction": {
333
+ "title": "Introduction",
334
+ "section": "General",
335
+ "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, scrolling recordings, 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- **Record** — Generate a scrolling video of a page.\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. Recordings are always async — they return `202` with a `rec_…` ID, with no `async` field\nto set.\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."
336
+ },
337
+ "libraries/go": {
338
+ "title": "Go",
339
+ "section": "Libraries",
340
+ "body": "# Go\n\nCall the ByteKit REST API from Go with the standard library.\n\nByteKit is a plain REST API. There is no Go SDK — and you do not need one. The\nTypeScript and Python SDKs are thin wrappers over the same HTTP endpoints, so\ncalling ByteKit from Go is just a standard `net/http` request.\n\n```go\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"io\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tbody := bytes.NewBufferString(`{\"url\":\"https://example.com\",\"formats\":[\"markdown\"]}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.bytekit.com/v1/scrape\", body)\n\treq.Header.Set(\"Authorization\", \"Bearer sk_live_your_api_key_here\")\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\n\tout, _ := io.ReadAll(resp.Body)\n\tfmt.Println(string(out))\n}\n```\n\n## Next steps\n\n- [API Reference](https://bytekit.com/docs/api) — every endpoint, request, and response.\n- [TypeScript SDK](https://bytekit.com/docs/libraries/typescript) and [Python SDK](https://bytekit.com/docs/libraries/python) — typed clients over the same REST API."
341
+ },
342
+ "libraries/python": {
343
+ "title": "Python SDK",
344
+ "section": "Libraries",
345
+ "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`.\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`, `recordings`, `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."
346
+ },
347
+ "libraries/typescript": {
348
+ "title": "TypeScript SDK",
349
+ "section": "Libraries",
350
+ "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`, and `account` (each with `create` / `get` / `list` methods as\napplicable, plus nested resources like `scrape.bulk` and `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."
351
+ },
352
+ "mcp": {
353
+ "title": "MCP Server",
354
+ "section": "General",
355
+ "body": "# MCP Server\n\nCall ByteKit web capture as a native tool from Claude, Cursor, and any MCP-compatible agent — hosted over HTTP or run locally over stdio.\n\nThe ByteKit **MCP server** exposes scraping, search, screenshots, and account\nlookups as [Model Context Protocol](https://modelcontextprotocol.io) tools. Your\nagent calls `scrape_url` or `screenshot_url` the same way it calls any other\ntool — no wrapper to write, no headless browser to manage.\n\nThere are two ways to connect: a **hosted HTTP endpoint** (nothing to install)\nand a **local stdio server** (`npx @hunt-labs/bytekit-mcp`).\n\n## Authentication\n\nBoth paths authenticate with a ByteKit API key. Sign up at\n[app.bytekit.com](https://app.bytekit.com) and create a key (prefixed\n`sk_live_`). The local server reads it from the `BYTEKIT_API_KEY` environment\nvariable (or the `--api-key` flag); the hosted endpoint takes it as a bearer\ntoken.\n\n## Option 1 — Hosted HTTP (no install)\n\nPoint any MCP client that speaks the Streamable HTTP transport at:\n\n```\nhttps://api.bytekit.com/mcp\n```\n\nSend your API key as a bearer token. Example client config (Claude Desktop,\nCursor, and most hosts accept this shape):\n\n```json\n{\n \"mcpServers\": {\n \"bytekit\": {\n \"url\": \"https://api.bytekit.com/mcp\",\n \"headers\": {\n \"Authorization\": \"Bearer $BYTEKIT_API_KEY\"\n }\n }\n }\n}\n```\n\n## Option 2 — Local stdio (`npx`)\n\nRun the server as a local subprocess over stdio. Nothing to install globally —\n`npx` fetches it on demand:\n\n```bash\nnpx @hunt-labs/bytekit-mcp --api-key $BYTEKIT_API_KEY\n```\n\nOr set the key in your environment and omit the flag:\n\n```bash\nexport BYTEKIT_API_KEY=sk_live_xxx\nnpx @hunt-labs/bytekit-mcp\n```\n\nClient config for a stdio server:\n\n```json\n{\n \"mcpServers\": {\n \"bytekit\": {\n \"command\": \"npx\",\n \"args\": [\"-y\", \"@hunt-labs/bytekit-mcp\"],\n \"env\": {\n \"BYTEKIT_API_KEY\": \"sk_live_xxx\"\n }\n }\n }\n}\n```\n\n### API-key resolution order\n\nThe local server resolves the key in this order:\n\n1. `--api-key <key>` flag\n2. `BYTEKIT_API_KEY` environment variable\n\n## Tool inventory\n\n| Tool | What it does |\n| --- | --- |\n| `scrape_url` | Fetch a URL and return HTML, clean markdown, links, or images. |\n| `web_search` | Run a web search and return ranked organic results. |\n| `screenshot_url` | Capture a screenshot of a page (desktop/mobile, PNG/JPEG). |\n| `get_result` | Fetch a previously created screenshot by id. |\n| `get_account` | Return account details, plan, and current usage/quota. |\n| `list_docs` | List every page in the bundled ByteKit documentation. |\n| `search_docs` | Search the bundled documentation. |\n| `get_doc` | Fetch the full markdown of one documentation page. |\n\nThe server also exposes **resources** (`bytekit://account`,\n`bytekit://screenshot/{id}`) and **prompts** (`summarize_webpage`,\n`extract_structured_data`, `research_topic`) that MCP hosts can surface directly.\n\n## Limits\n\nThe hosted `POST /mcp` endpoint caps request bodies at **1 MB**. MCP tool\narguments are small (a URL plus a few options), so this comfortably covers\nevery tool and prompt in the matrix above — including `research_topic`, the\nlargest legitimate call, which carries a list of URLs. An oversized request\ngets a `413` with a JSON-RPC-shaped error body rather than a dropped\nconnection.\n\nEvery route in the table below carries its own body-size limit, sized to\nthat route's shape rather than reused from `/mcp` (a bulk endpoint's\nrealistic payload is far larger than an MCP tool call). This covers both the\ncapture/data create endpoints and the unauthenticated webhook-ingress\nreceivers, which need a guard for the same reason — their handlers read the\nfull body before any check runs:\n\n| Endpoint | Limit | Error |\n|---|---|---|\n| `POST /v1/scrape`, `/v1/search`, `/v1/scrape/bulk`, `/v1/schema` | 512 KB | `400 request_too_large` |\n| `POST /v1/fetch` | 512 KB | `400 request_too_large` |\n| `POST /v1/screenshots` | 512 KB | `400 request_too_large` |\n| `POST /v1/monitors` | 512 KB | `400 request_too_large` |\n| `POST /v1/sitemap` | 512 KB | `400 request_too_large` |\n| `POST /v1/bulk` | 4 MB pre-auth (chunked) / 32 MB fail-safe (declared length) / per-plan up to 28.7 MB | `400 request_too_large` |\n| `POST /v1/fetch/bulk` | 2 MB pre-auth (chunked) / 20 MB fail-safe (declared length) / per-plan up to 16.8 MB | `400 request_too_large` |\n| `POST /v1/webhook-deliveries/{id}/retry` | 64 KB | `400 request_too_large` |\n| `POST /v1/webhooks/stripe` (internal, Stripe ingress) | 256 KB | `400` (bespoke `{ error }` body) |\n| `POST /webhooks/clerk` (internal, Clerk ingress) | 256 KB | `400 request_too_large` (bespoke `{ error }` body) |\n| `POST /mcp` | 1 MB | `413` (JSON-RPC error) |\n\nThe two bulk endpoints are guarded in a two-tier shape, not by a single\nceiling. A streamed body with no `Content-Length` header is capped at the\nsmall pre-auth limit (4 MB / 2 MB) before your API key is checked; a body\nthat declares `Content-Length` is instead bounded there by a larger fail-safe\n(32 MB / 20 MB) rather than the real limit, since that branch reads nothing\nuntil your key is verified. Once your key is verified, a second check\nre-gates the body against your account's own `max_bulk_size` — sized off the\ndocumented custom production account's real `max_bulk_size` of 50,000 URLs\nor per-item configs (root CLAUDE.md: \"50k bulk\") — which reaches 28.7 MB /\n16.8 MB for that account. A standard-plan account's effective ceiling is\nexactly the pre-auth limit; either tier's overrun returns\n`400 request_too_large`.\n\n## Next steps\n\n- [Quickstart](https://bytekit.com/docs/quickstart) — make your first ByteKit API call.\n- [Authentication](https://bytekit.com/docs/guides/authentication) — key formats and management."
356
+ },
357
+ "quickstart": {
358
+ "title": "Quickstart",
359
+ "section": "General",
360
+ "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<!-- example omitted: curl/scrape.sh (source unavailable) -->\n\nA successful response looks like this:\n\n```json\n{\n \"status\": \"success\",\n \"id\": \"sc_...\",\n \"url\": \"https://example.com\",\n \"finalUrl\": \"https://example.com/\",\n \"contentType\": \"text/html; charset=UTF-8\",\n \"contentLength\": 1256,\n \"statusCode\": 200,\n \"retrievedAt\": \"2025-01-15T12:00:00Z\",\n \"formats\": {\n \"markdown\": \"# Example Domain\\n\\nThis domain is for use in illustrative examples...\"\n },\n \"metadata\": {\n \"title\": \"Example Domain\"\n }\n}\n```\n\n`contentLength` is the compressed wire size in bytes (used for bandwidth billing). The `id`\nfield uses the `sc_` prefix — you can poll `GET /v1/scrape/{id}` if the scrape was queued\nasynchronously.\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"
361
361
  },
362
362
  "sdk/python/account": {
363
363
  "title": "Account",
364
364
  "section": "SDK Reference",
365
- "body": "# Account\n\nAPI functions for the Account resource.\n\n# Account\n\nFunctions for interacting with the `account` API resource. Each operation ships in four forms — `sync` / `sync_detailed` and their `async` counterparts.\n\n## Get Account\n\nGet account details\n\nReturns account, plan, and current API key details, including the\n`api_key` and `subscription` fields.\n\n**Call styles**\n\n```python\nsync_detailed(client=client) -> Response[Union['AccountBearerResponse', 'AccountSessionResponse']]\nsync(client=client) -> Optional[Union['AccountBearerResponse', 'AccountSessionResponse']]\nawait asyncio_detailed(client=client) -> Response[Union['AccountBearerResponse', 'AccountSessionResponse']]\nawait asyncio(client=client) -> Optional[Union['AccountBearerResponse', 'AccountSessionResponse']]\n```"
365
+ "body": "# Account\n\nAPI functions for the Account resource.\n\n# Account\n\nFunctions for interacting with the `account` API resource. Each operation ships in four forms — `sync` / `sync_detailed` and their `async` counterparts.\n\n## Get Account\n\nGet account details\n\nReturns account, plan, and current API key details, including the\n`api_key` and `subscription` fields.\n\n**Call styles**\n\n```python\nsync_detailed(client=client) -> Response[Union[Error, Union['AccountBearerResponse', 'AccountSessionResponse']]]\nsync(client=client) -> Optional[Union[Error, Union['AccountBearerResponse', 'AccountSessionResponse']]]\nawait asyncio_detailed(client=client) -> Response[Union[Error, Union['AccountBearerResponse', 'AccountSessionResponse']]]\nawait asyncio(client=client) -> Optional[Union[Error, Union['AccountBearerResponse', 'AccountSessionResponse']]]\n```"
366
366
  },
367
367
  "sdk/python/bulk": {
368
368
  "title": "Bulk",
369
369
  "section": "SDK Reference",
370
- "body": "# Bulk\n\nAPI functions for the Bulk resource.\n\n# Bulk\n\nFunctions for interacting with the `bulk` API resource. Each operation ships in four forms — `sync` / `sync_detailed` and their `async` counterparts.\n\n## Create Bulk\n\nCreate 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.\n\n**Parameters**\n\n- `body (CreateBulkBody): Provide `urls` (simple list) OR `items` (per-item config), not`\n- `both. `type` selects the capture kind per entry — only`\n- ``screenshot` and `scrape` are accepted (`recording` is`\n- `deactivated). Behaviour fields may be set per item or via`\n- ``defaults`; a per-item value overrides the matching default.`\n\n**Call styles**\n\n```python\nsync_detailed(client=client, body=body) -> Response[Union[CreateBulkResponse202, Error]]\nsync(client=client, body=body) -> Optional[Union[CreateBulkResponse202, Error]]\nawait asyncio_detailed(client=client, body=body) -> Response[Union[CreateBulkResponse202, Error]]\nawait asyncio(client=client, body=body) -> Optional[Union[CreateBulkResponse202, Error]]\n```\n\n## Delete Bulk\n\nCancel a bulk job\n\nCancels an in-flight bulk job: drains its still-queued (pending) child jobs and refunds the quota\nheld for exactly those drained children. Children already completed, failed, or in progress are\nuntouched and keep their charge. Idempotent — cancelling an already-terminal job (completed, failed,\nor cancelled) is a no-op that returns 200 with the job's real, unchanged status and refunds nothing.\n\n**Parameters**\n\n- `id (str)`\n\n**Call styles**\n\n```python\nsync_detailed(id=id, client=client) -> Response[Union[DeleteBulkResponse200, Error]]\nsync(id=id, client=client) -> Optional[Union[DeleteBulkResponse200, Error]]\nawait asyncio_detailed(id=id, client=client) -> Response[Union[DeleteBulkResponse200, Error]]\nawait asyncio(id=id, client=client) -> Optional[Union[DeleteBulkResponse200, Error]]\n```\n\n## Get Bulk\n\nGet bulk job status\n\n**Parameters**\n\n- `id (str)`\n\n**Call styles**\n\n```python\nsync_detailed(id=id, client=client) -> Response[Union[Error, GetBulkResponse200]]\nsync(id=id, client=client) -> Optional[Union[Error, GetBulkResponse200]]\nawait asyncio_detailed(id=id, client=client) -> Response[Union[Error, GetBulkResponse200]]\nawait asyncio(id=id, client=client) -> Optional[Union[Error, GetBulkResponse200]]\n```\n\n## List Bulk Screenshots\n\nList bulk job items\n\n**Parameters**\n\n- `id (str)`\n\n**Call styles**\n\n```python\nsync_detailed(id=id, client=client) -> Response[ListBulkScreenshotsResponse200]\nsync(id=id, client=client) -> Optional[ListBulkScreenshotsResponse200]\nawait asyncio_detailed(id=id, client=client) -> Response[ListBulkScreenshotsResponse200]\nawait asyncio(id=id, client=client) -> Optional[ListBulkScreenshotsResponse200]\n```"
370
+ "body": "# Bulk\n\nAPI functions for the Bulk resource.\n\n# Bulk\n\nFunctions for interacting with the `bulk` API resource. Each operation ships in four forms — `sync` / `sync_detailed` and their `async` counterparts.\n\n## Create Bulk\n\nCreate 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.\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**Parameters**\n\n- `body (CreateBulkBody): Provide `urls` (simple list) OR `items` (per-item config), not`\n- `both. `type` selects the capture kind per entry — only`\n- ``screenshot` and `scrape` are accepted (`recording` is`\n- `deactivated). Behaviour fields may be set per item or via`\n- ``defaults`; a per-item value overrides the matching default.`\n- `This includes `type`: an entry with no `type` of its own`\n- `inherits `defaults.type`, falling back to `screenshot` only`\n- `when neither is set.`\n- `The top-level object, each `items[]` entry, and `defaults``\n- `each reject unrecognized keys with a 422 `validation_error``\n- `(the offending key name appears in the error's `details``\n- `message text) rather than silently discarding them.`\n- ``items[]` and `defaults` do not share one field set`\n- ``device_scale_factor` is accepted only under `defaults` (a`\n- `per-item value 422s), and `duration`/`scenario` are accepted`\n- `only per item (a `defaults` value 422s). `metadata` is`\n- `different from those three: it is valid both at the top`\n- `level of the body and per item, but rejected with a 422 if`\n- `placed under `defaults`. See the `422` response below.`\n\n**Call styles**\n\n```python\nsync_detailed(client=client, body=body) -> Response[Union[CreateBulkResponse202, Error]]\nsync(client=client, body=body) -> Optional[Union[CreateBulkResponse202, Error]]\nawait asyncio_detailed(client=client, body=body) -> Response[Union[CreateBulkResponse202, Error]]\nawait asyncio(client=client, body=body) -> Optional[Union[CreateBulkResponse202, Error]]\n```\n\n## Delete Bulk\n\nCancel a bulk job\n\nCancels an in-flight bulk job: drains its still-queued (pending) child jobs and refunds the quota\nheld for exactly those drained children. Children already completed, failed, or in progress are\nuntouched and keep their charge. Idempotent — cancelling an already-terminal job (completed, failed,\nor cancelled) is a no-op that returns 200 with the job's real, unchanged status and refunds nothing.\n\n**Parameters**\n\n- `id (str)`\n\n**Call styles**\n\n```python\nsync_detailed(id=id, client=client) -> Response[Union[DeleteBulkResponse200, Error]]\nsync(id=id, client=client) -> Optional[Union[DeleteBulkResponse200, Error]]\nawait asyncio_detailed(id=id, client=client) -> Response[Union[DeleteBulkResponse200, Error]]\nawait asyncio(id=id, client=client) -> Optional[Union[DeleteBulkResponse200, Error]]\n```\n\n## Get Bulk\n\nGet bulk job status\n\n**Parameters**\n\n- `id (str)`\n\n**Call styles**\n\n```python\nsync_detailed(id=id, client=client) -> Response[Union[Error, GetBulkResponse200]]\nsync(id=id, client=client) -> Optional[Union[Error, GetBulkResponse200]]\nawait asyncio_detailed(id=id, client=client) -> Response[Union[Error, GetBulkResponse200]]\nawait asyncio(id=id, client=client) -> Optional[Union[Error, GetBulkResponse200]]\n```\n\n## List Bulk Screenshots\n\nList bulk job items\n\n**Parameters**\n\n- `id (str)`\n\n**Call styles**\n\n```python\nsync_detailed(id=id, client=client) -> Response[ListBulkScreenshotsResponse200]\nsync(id=id, client=client) -> Optional[ListBulkScreenshotsResponse200]\nawait asyncio_detailed(id=id, client=client) -> Response[ListBulkScreenshotsResponse200]\nawait asyncio(id=id, client=client) -> Optional[ListBulkScreenshotsResponse200]\n```"
371
371
  },
372
372
  "sdk/python/client": {
373
373
  "title": "Client",
374
374
  "section": "SDK Reference",
375
- "body": "# Client\n\nHTTP client classes for the ByteKit Python SDK.\n\n# Client Reference\n\nThe ByteKit Python SDK provides two client classes for making API requests.\n\n## Client\n\nA class for keeping track of data related to the API\n\nThe following are accepted as keyword arguments and will be used to construct httpx Clients internally:\n\n``base_url``: The base URL for the API, all requests are made to a relative path to this URL\n\n``cookies``: A dictionary of cookies to be sent with every request\n\n``headers``: A dictionary of headers to be sent with every request\n\n``timeout``: The maximum amount of a time a request can take. API functions will raise\nhttpx.TimeoutException if this is exceeded.\n\n``verify_ssl``: Whether or not to verify the SSL certificate of the API server. This should be True in production,\nbut can be set to False for testing purposes.\n\n``follow_redirects``: Whether or not to follow redirects. Default value is False.\n\n``httpx_args``: A dictionary of additional arguments to be passed to the ``httpx.Client`` and ``httpx.AsyncClient`` constructor.\n\nAttributes:\nraise_on_unexpected_status: Whether or not to raise an errors.UnexpectedStatus if the API returns a\nstatus code that was not documented in the source OpenAPI document. Can also be provided as a keyword\nargument to the constructor.\nExplicit constructor arguments always win over these defaults (explicit arg > default).\n\n### with_headers\n\n```python\nwith_headers(headers: dict[str, str]) -> 'Client'\n```\n\nGet a new client matching this one with additional headers\n\n### with_cookies\n\n```python\nwith_cookies(cookies: dict[str, str]) -> 'Client'\n```\n\nGet a new client matching this one with additional cookies\n\n### with_timeout\n\n```python\nwith_timeout(timeout: httpx.Timeout) -> 'Client'\n```\n\nGet a new client matching this one with a new timeout (in seconds)\n\n### set_httpx_client\n\n```python\nset_httpx_client(client: httpx.Client) -> 'Client'\n```\n\nManually set the underlying httpx.Client\n\n**NOTE**: This will override any other settings on the client, including cookies, headers, and timeout.\n\n### get_httpx_client\n\n```python\nget_httpx_client() -> httpx.Client\n```\n\nGet the underlying httpx.Client, constructing a new one if not previously set\n\n### set_async_httpx_client\n\n```python\nset_async_httpx_client(async_client: httpx.AsyncClient) -> 'Client'\n```\n\nManually the underlying httpx.AsyncClient\n\n**NOTE**: This will override any other settings on the client, including cookies, headers, and timeout.\n\n### get_async_httpx_client\n\n```python\nget_async_httpx_client() -> httpx.AsyncClient\n```\n\nGet the underlying httpx.AsyncClient, constructing a new one if not previously set\n\n## AuthenticatedClient\n\nA Client which has been authenticated for use on secured endpoints\n\nThe following are accepted as keyword arguments and will be used to construct httpx Clients internally:\n\n``base_url``: The base URL for the API, all requests are made to a relative path to this URL\n\n``cookies``: A dictionary of cookies to be sent with every request\n\n``headers``: A dictionary of headers to be sent with every request\n\n``timeout``: The maximum amount of a time a request can take. API functions will raise\nhttpx.TimeoutException if this is exceeded.\n\n``verify_ssl``: Whether or not to verify the SSL certificate of the API server. This should be True in production,\nbut can be set to False for testing purposes.\n\n``follow_redirects``: Whether or not to follow redirects. Default value is False.\n\n``httpx_args``: A dictionary of additional arguments to be passed to the ``httpx.Client`` and ``httpx.AsyncClient`` constructor.\n\nAttributes:\nraise_on_unexpected_status: Whether or not to raise an errors.UnexpectedStatus if the API returns a\nstatus code that was not documented in the source OpenAPI document. Can also be provided as a keyword\nargument to the constructor.\nExplicit constructor arguments always win over these defaults (explicit arg > default).\ntoken: The token to use for authentication\nprefix: The prefix to use for the Authorization header\nauth_header_name: The name of the Authorization header\n\n### search\n\n```python\nsearch(query: str, type: Optional[str] = None, limit: Optional[int] = None, country: Optional[str] = None, language: Optional[str] = None, date_range: Optional[str] = None) -> 'CreateSearchResponse200'\n```\n\nRun a web search and return ranked organic results.\n\nThin, statically-declared delegate to the hand-written ``_search`` appended at the\nbottom of this module; the full contract (argument semantics, the\n``errors.UnexpectedStatus`` guarantee) is documented there.\n\n### with_headers\n\n```python\nwith_headers(headers: dict[str, str]) -> 'AuthenticatedClient'\n```\n\nGet a new client matching this one with additional headers\n\n### with_cookies\n\n```python\nwith_cookies(cookies: dict[str, str]) -> 'AuthenticatedClient'\n```\n\nGet a new client matching this one with additional cookies\n\n### with_timeout\n\n```python\nwith_timeout(timeout: httpx.Timeout) -> 'AuthenticatedClient'\n```\n\nGet a new client matching this one with a new timeout (in seconds)\n\n### set_httpx_client\n\n```python\nset_httpx_client(client: httpx.Client) -> 'AuthenticatedClient'\n```\n\nManually set the underlying httpx.Client\n\n**NOTE**: This will override any other settings on the client, including cookies, headers, and timeout.\n\n### get_httpx_client\n\n```python\nget_httpx_client() -> httpx.Client\n```\n\nGet the underlying httpx.Client, constructing a new one if not previously set\n\n### set_async_httpx_client\n\n```python\nset_async_httpx_client(async_client: httpx.AsyncClient) -> 'AuthenticatedClient'\n```\n\nManually the underlying httpx.AsyncClient\n\n**NOTE**: This will override any other settings on the client, including cookies, headers, and timeout.\n\n### get_async_httpx_client\n\n```python\nget_async_httpx_client() -> httpx.AsyncClient\n```\n\nGet the underlying httpx.AsyncClient, constructing a new one if not previously set"
376
- },
377
- "sdk/python/fetch-bulk": {
378
- "title": "Fetch Bulk",
379
- "section": "SDK Reference",
380
- "body": "# Fetch Bulk\n\nAPI functions for the Fetch Bulk resource.\n\n# Fetch Bulk\n\nFunctions for interacting with the `fetch_bulk` API resource. Each operation ships in four forms — `sync` / `sync_detailed` and their `async` counterparts.\n\n## Create Fetch Bulk\n\nBulk fetch URLs\n\nEnqueues multiple URLs for HTTP fetching. Results delivered via webhook.\nDoes not support options that require page rendering (cookies, wait_for_selector, etc.).\n\n**Parameters**\n\n- `body (CreateFetchBulkBody)`\n\n**Call styles**\n\n```python\nsync_detailed(client=client, body=body) -> Response[Union[CreateFetchBulkResponse202, Error]]\nsync(client=client, body=body) -> Optional[Union[CreateFetchBulkResponse202, Error]]\nawait asyncio_detailed(client=client, body=body) -> Response[Union[CreateFetchBulkResponse202, Error]]\nawait asyncio(client=client, body=body) -> Optional[Union[CreateFetchBulkResponse202, Error]]\n```\n\n## Get Fetch Bulk\n\nGet fetch bulk job status\n\n**Parameters**\n\n- `id (str)`\n\n**Call styles**\n\n```python\nsync_detailed(id=id, client=client) -> Response[Union[Error, GetFetchBulkResponse200]]\nsync(id=id, client=client) -> Optional[Union[Error, GetFetchBulkResponse200]]\nawait asyncio_detailed(id=id, client=client) -> Response[Union[Error, GetFetchBulkResponse200]]\nawait asyncio(id=id, client=client) -> Optional[Union[Error, GetFetchBulkResponse200]]\n```"
375
+ "body": "# Client\n\nHTTP client classes for the ByteKit Python SDK.\n\n# Client Reference\n\nThe ByteKit Python SDK provides two client classes for making API requests.\n\n## Client\n\nA class for keeping track of data related to the API\n\nThe following are accepted as keyword arguments and will be used to construct httpx Clients internally:\n\n``base_url``: The base URL for the API, all requests are made to a relative path to this URL\n\n``cookies``: A dictionary of cookies to be sent with every request\n\n``headers``: A dictionary of headers to be sent with every request\n\n``timeout``: The maximum amount of a time a request can take. API functions will raise\nhttpx.TimeoutException if this is exceeded.\n\n``verify_ssl``: Whether or not to verify the SSL certificate of the API server. This should be True in production,\nbut can be set to False for testing purposes.\n\n``follow_redirects``: Whether or not to follow redirects. Default value is False.\n\n``httpx_args``: A dictionary of additional arguments to be passed to the ``httpx.Client`` and ``httpx.AsyncClient`` constructor.\n\nAttributes:\nraise_on_unexpected_status: Whether or not to raise an errors.UnexpectedStatus if the API returns a\nstatus code that was not documented in the source OpenAPI document. Can also be provided as a keyword\nargument to the constructor.\nExplicit constructor arguments always win over these defaults (explicit arg > default).\n\n### with_headers\n\n```python\nwith_headers(headers: dict[str, str]) -> 'Client'\n```\n\nGet a new client matching this one with additional headers\n\n### with_cookies\n\n```python\nwith_cookies(cookies: dict[str, str]) -> 'Client'\n```\n\nGet a new client matching this one with additional cookies\n\n### with_timeout\n\n```python\nwith_timeout(timeout: httpx.Timeout) -> 'Client'\n```\n\nGet a new client matching this one with a new timeout (in seconds)\n\n### set_httpx_client\n\n```python\nset_httpx_client(client: httpx.Client) -> 'Client'\n```\n\nManually set the underlying httpx.Client\n\n**NOTE**: This will override any other settings on the client, including cookies, headers, and timeout.\n\n### get_httpx_client\n\n```python\nget_httpx_client() -> httpx.Client\n```\n\nGet the underlying httpx.Client, constructing a new one if not previously set\n\n### set_async_httpx_client\n\n```python\nset_async_httpx_client(async_client: httpx.AsyncClient) -> 'Client'\n```\n\nManually the underlying httpx.AsyncClient\n\n**NOTE**: This will override any other settings on the client, including cookies, headers, and timeout.\n\nA client set here is YOURS to manage: the SDK never rebuilds or closes it, even if\nit is later used from a different event loop. Clients the SDK constructs itself are\nrebuilt automatically when the running event loop changes.\n\n### get_async_httpx_client\n\n```python\nget_async_httpx_client() -> httpx.AsyncClient\n```\n\nGet the underlying httpx.AsyncClient, constructing a new one if not previously set\n\n## AuthenticatedClient\n\nA Client which has been authenticated for use on secured endpoints\n\nThe following are accepted as keyword arguments and will be used to construct httpx Clients internally:\n\n``base_url``: The base URL for the API, all requests are made to a relative path to this URL\n\n``cookies``: A dictionary of cookies to be sent with every request\n\n``headers``: A dictionary of headers to be sent with every request\n\n``timeout``: The maximum amount of a time a request can take. API functions will raise\nhttpx.TimeoutException if this is exceeded.\n\n``verify_ssl``: Whether or not to verify the SSL certificate of the API server. This should be True in production,\nbut can be set to False for testing purposes.\n\n``follow_redirects``: Whether or not to follow redirects. Default value is False.\n\n``httpx_args``: A dictionary of additional arguments to be passed to the ``httpx.Client`` and ``httpx.AsyncClient`` constructor.\n\nAttributes:\nraise_on_unexpected_status: Whether or not to raise an errors.UnexpectedStatus if the API returns a\nstatus code that was not documented in the source OpenAPI document. Can also be provided as a keyword\nargument to the constructor.\nExplicit constructor arguments always win over these defaults (explicit arg > default).\ntoken: The token to use for authentication\nprefix: The prefix to use for the Authorization header\nauth_header_name: The name of the Authorization header\n\n### search\n\n```python\nsearch(query: str, type: Optional[str] = None, limit: Optional[int] = None, country: Optional[str] = None, language: Optional[str] = None, date_range: Optional[str] = None) -> 'CreateSearchResponse200'\n```\n\nRun a web search and return ranked organic results.\n\nThin, statically-declared delegate to the hand-written ``_search`` appended at the\nbottom of this module; the full contract (argument semantics, the\n``errors.UnexpectedStatus`` guarantee) is documented there.\n\n### with_headers\n\n```python\nwith_headers(headers: dict[str, str]) -> 'AuthenticatedClient'\n```\n\nGet a new client matching this one with additional headers\n\n### with_cookies\n\n```python\nwith_cookies(cookies: dict[str, str]) -> 'AuthenticatedClient'\n```\n\nGet a new client matching this one with additional cookies\n\n### with_timeout\n\n```python\nwith_timeout(timeout: httpx.Timeout) -> 'AuthenticatedClient'\n```\n\nGet a new client matching this one with a new timeout (in seconds)\n\n### set_httpx_client\n\n```python\nset_httpx_client(client: httpx.Client) -> 'AuthenticatedClient'\n```\n\nManually set the underlying httpx.Client\n\n**NOTE**: This will override any other settings on the client, including cookies, headers, and timeout.\n\n### get_httpx_client\n\n```python\nget_httpx_client() -> httpx.Client\n```\n\nGet the underlying httpx.Client, constructing a new one if not previously set\n\n### set_async_httpx_client\n\n```python\nset_async_httpx_client(async_client: httpx.AsyncClient) -> 'AuthenticatedClient'\n```\n\nManually the underlying httpx.AsyncClient\n\n**NOTE**: This will override any other settings on the client, including cookies, headers, and timeout.\n\nA client set here is YOURS to manage: the SDK never rebuilds or closes it, even if\nit is later used from a different event loop. Clients the SDK constructs itself are\nrebuilt automatically when the running event loop changes.\n\n### get_async_httpx_client\n\n```python\nget_async_httpx_client() -> httpx.AsyncClient\n```\n\nGet the underlying httpx.AsyncClient, constructing a new one if not previously set"
381
376
  },
382
377
  "sdk/python/fetch": {
383
378
  "title": "Fetch",
384
379
  "section": "SDK Reference",
385
- "body": "# Fetch\n\nAPI functions for the Fetch resource.\n\n# Fetch\n\nFunctions for interacting with the `fetch` API resource. Each operation ships in four forms — `sync` / `sync_detailed` and their `async` counterparts.\n\n## Get Fetch\n\nFetch a URL (GET)\n\nDirect HTTP fetch. The response body IS the content; metadata is returned in X-Fetch-* headers.\nOmit `format` for raw passthrough. Use `format=markdown` or `format=html` for conversion.\n\n**Parameters**\n\n- `url_query (str)`\n- `format_ (Union[Unset, GetFetchFormat])`\n- `country (Union[Unset, str]): Default: 'US'.`\n- `timeout_ms (Union[Unset, int]): Default: 60000.`\n- `cache_ttl (Union[GetFetchCacheTtlType1, Unset, str]): Default: '48h'.`\n\n**Call styles**\n\n```python\nsync_detailed(client=client, url_query=url_query, format_=format_, country=country, timeout_ms=timeout_ms, cache_ttl=cache_ttl) -> Response[Union[Error, str]]\nsync(client=client, url_query=url_query, format_=format_, country=country, timeout_ms=timeout_ms, cache_ttl=cache_ttl) -> Optional[Union[Error, str]]\nawait asyncio_detailed(client=client, url_query=url_query, format_=format_, country=country, timeout_ms=timeout_ms, cache_ttl=cache_ttl) -> Response[Union[Error, str]]\nawait asyncio(client=client, url_query=url_query, format_=format_, country=country, timeout_ms=timeout_ms, cache_ttl=cache_ttl) -> Optional[Union[Error, str]]\n```\n\n## Post Fetch\n\nFetch a URL (POST)\n\nSame as GET /v1/fetch but with a JSON request body.\n\n**Parameters**\n\n- `body (FetchRequest)`\n\n**Call styles**\n\n```python\nsync_detailed(client=client, body=body) -> Response[Union[Error, str]]\nsync(client=client, body=body) -> Optional[Union[Error, str]]\nawait asyncio_detailed(client=client, body=body) -> Response[Union[Error, str]]\nawait asyncio(client=client, body=body) -> Optional[Union[Error, str]]\n```"
380
+ "body": "# Fetch\n\nAPI functions for the Fetch resource.\n\n# Fetch\n\nFunctions for interacting with the `fetch` API resource. Each operation ships in four forms — `sync` / `sync_detailed` and their `async` counterparts.\n\n## Get Fetch\n\nFetch a URL (GET)\n\nDirect HTTP fetch. The response body IS the content; metadata is returned in X-Fetch-* headers.\nOmit `format` for raw passthrough. Use `format=markdown` or `format=html` for conversion.\n\n**Parameters**\n\n- `url_query (str)`\n- `format_ (Union[Unset, GetFetchFormat])`\n- `country (Union[Unset, str])`\n- `timeout_ms (Union[Unset, int])`\n- `cache_ttl (Union[GetFetchCacheTtlType1, Unset, str])`\n\n**Call styles**\n\n```python\nsync_detailed(client=client, url_query=url_query, format_=format_, country=country, timeout_ms=timeout_ms, cache_ttl=cache_ttl) -> Response[Union[Error, str]]\nsync(client=client, url_query=url_query, format_=format_, country=country, timeout_ms=timeout_ms, cache_ttl=cache_ttl) -> Optional[Union[Error, str]]\nawait asyncio_detailed(client=client, url_query=url_query, format_=format_, country=country, timeout_ms=timeout_ms, cache_ttl=cache_ttl) -> Response[Union[Error, str]]\nawait asyncio(client=client, url_query=url_query, format_=format_, country=country, timeout_ms=timeout_ms, cache_ttl=cache_ttl) -> Optional[Union[Error, str]]\n```\n\n## Post Fetch\n\nFetch 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**Parameters**\n\n- `body (FetchRequest)`\n\n**Call styles**\n\n```python\nsync_detailed(client=client, body=body) -> Response[Union[Error, str]]\nsync(client=client, body=body) -> Optional[Union[Error, str]]\nawait asyncio_detailed(client=client, body=body) -> Response[Union[Error, str]]\nawait asyncio(client=client, body=body) -> Optional[Union[Error, str]]\n```"
386
381
  },
387
- "sdk/python/monitors": {
388
- "title": "Monitors",
382
+ "sdk/python/fetch-bulk": {
383
+ "title": "Fetch Bulk",
389
384
  "section": "SDK Reference",
390
- "body": "# Monitors\n\nAPI functions for the Monitors resource.\n\n# Monitors\n\nFunctions for interacting with the `monitors` API resource. Each operation ships in four forms — `sync` / `sync_detailed` and their `async` counterparts.\n\nFirst-capture behavior is the same for both monitor types: the first capture is a silent baseline (`has_change=False`, `change_pct=None`) with no `change_detected` webhook, whether the monitor is `scrape` or `screenshot`. From the second capture onward both types diff against the previous capture.\n\n## Create Monitor\n\nCreate a change-detection monitor\n\nCreates a recurring change-detection monitor for a URL, delivering results via webhook.\n\n**Parameters**\n\n- `body (MonitorCreateRequest)`\n\n**Call styles**\n\n```python\nsync_detailed(client=client, body=body) -> Response[Union[Error, MonitorCreateResponse]]\nsync(client=client, body=body) -> Optional[Union[Error, MonitorCreateResponse]]\nawait asyncio_detailed(client=client, body=body) -> Response[Union[Error, MonitorCreateResponse]]\nawait asyncio(client=client, body=body) -> Optional[Union[Error, MonitorCreateResponse]]\n```\n\n## Delete Monitor\n\nCancel monitor\n\n**Parameters**\n\n- `id (str)`\n\n**Call styles**\n\n```python\nsync_detailed(id=id, client=client) -> Response[Union[Any, Error]]\nsync(id=id, client=client) -> Optional[Union[Any, Error]]\nawait asyncio_detailed(id=id, client=client) -> Response[Union[Any, Error]]\nawait asyncio(id=id, client=client) -> Optional[Union[Any, Error]]\n```\n\n## Get Monitor\n\nGet monitor\n\n**Parameters**\n\n- `id (str)`\n\n**Call styles**\n\n```python\nsync_detailed(id=id, client=client) -> Response[Union[Error, MonitorResponse]]\nsync(id=id, client=client) -> Optional[Union[Error, MonitorResponse]]\nawait asyncio_detailed(id=id, client=client) -> Response[Union[Error, MonitorResponse]]\nawait asyncio(id=id, client=client) -> Optional[Union[Error, MonitorResponse]]\n```\n\n## List Monitor Captures\n\nList monitor captures\n\n**Parameters**\n\n- `id (str)`\n- `limit (Union[Unset, int]): Default: 25.`\n- `cursor (Union[Unset, str])`\n\n**Call styles**\n\n```python\nsync_detailed(id=id, client=client, limit=limit, cursor=cursor) -> Response[ListMonitorCapturesResponse200]\nsync(id=id, client=client, limit=limit, cursor=cursor) -> Optional[ListMonitorCapturesResponse200]\nawait asyncio_detailed(id=id, client=client, limit=limit, cursor=cursor) -> Response[ListMonitorCapturesResponse200]\nawait asyncio(id=id, client=client, limit=limit, cursor=cursor) -> Optional[ListMonitorCapturesResponse200]\n```\n\n## List Monitors\n\nList monitors\n\n**Parameters**\n\n- `limit (Union[Unset, int]): Default: 25.`\n- `cursor (Union[Unset, str])`\n- `status (Union[Unset, ListMonitorsStatus]): Default: ListMonitorsStatus.ACTIVE.`\n\n**Call styles**\n\n```python\nsync_detailed(client=client, limit=limit, cursor=cursor, status=status) -> Response[ListMonitorsResponse200]\nsync(client=client, limit=limit, cursor=cursor, status=status) -> Optional[ListMonitorsResponse200]\nawait asyncio_detailed(client=client, limit=limit, cursor=cursor, status=status) -> Response[ListMonitorsResponse200]\nawait asyncio(client=client, limit=limit, cursor=cursor, status=status) -> Optional[ListMonitorsResponse200]\n```\n\n## Update Monitor\n\nUpdate monitor\n\n**Parameters**\n\n- `id (str)`\n- `body (MonitorUpdateRequest)`\n\n**Call styles**\n\n```python\nsync_detailed(id=id, client=client, body=body) -> Response[Union[Error, MonitorResponse]]\nsync(id=id, client=client, body=body) -> Optional[Union[Error, MonitorResponse]]\nawait asyncio_detailed(id=id, client=client, body=body) -> Response[Union[Error, MonitorResponse]]\nawait asyncio(id=id, client=client, body=body) -> Optional[Union[Error, MonitorResponse]]\n```"
385
+ "body": "# Fetch Bulk\n\nAPI functions for the Fetch Bulk resource.\n\n# Fetch Bulk\n\nFunctions for interacting with the `fetch_bulk` API resource. Each operation ships in four forms — `sync` / `sync_detailed` and their `async` counterparts.\n\n## Create Fetch Bulk\n\nBulk fetch URLs\n\nEnqueues multiple URLs for HTTP fetching. Results delivered via webhook.\nDoes not support options that require page rendering (cookies, wait_for_selector, etc.).\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**Parameters**\n\n- `body (CreateFetchBulkBody)`\n\n**Call styles**\n\n```python\nsync_detailed(client=client, body=body) -> Response[Union[CreateFetchBulkResponse202, Error]]\nsync(client=client, body=body) -> Optional[Union[CreateFetchBulkResponse202, Error]]\nawait asyncio_detailed(client=client, body=body) -> Response[Union[CreateFetchBulkResponse202, Error]]\nawait asyncio(client=client, body=body) -> Optional[Union[CreateFetchBulkResponse202, Error]]\n```\n\n## Get Fetch Bulk\n\nGet fetch bulk job status\n\n**Parameters**\n\n- `id (str)`\n\n**Call styles**\n\n```python\nsync_detailed(id=id, client=client) -> Response[Union[Error, GetFetchBulkResponse200]]\nsync(id=id, client=client) -> Optional[Union[Error, GetFetchBulkResponse200]]\nawait asyncio_detailed(id=id, client=client) -> Response[Union[Error, GetFetchBulkResponse200]]\nawait asyncio(id=id, client=client) -> Optional[Union[Error, GetFetchBulkResponse200]]\n```"
391
386
  },
392
- "sdk/python/scrape-bulk": {
393
- "title": "Scrape Bulk",
387
+ "sdk/python/monitors": {
388
+ "title": "Monitors",
394
389
  "section": "SDK Reference",
395
- "body": "# Scrape Bulk\n\nAPI functions for the Scrape Bulk resource.\n\n# Scrape Bulk\n\nFunctions for interacting with the `scrape_bulk` API resource. Each operation ships in four forms — `sync` / `sync_detailed` and their `async` counterparts.\n\n## Create Scrape Bulk\n\nBulk scrape URLs\n\nEnqueues multiple URLs for scraping. Results delivered via webhook.\nWebhook deliveries include `X-ByteKit-Event: scrape.completed` or\n`X-ByteKit-Event: scrape.failed` so receivers can dispatch on the\nheader without parsing the body shape.\n\n**Parameters**\n\n- `body (CreateScrapeBulkBody)`\n\n**Call styles**\n\n```python\nsync_detailed(client=client, body=body) -> Response[Union[CreateScrapeBulkResponse202, Error]]\nsync(client=client, body=body) -> Optional[Union[CreateScrapeBulkResponse202, Error]]\nawait asyncio_detailed(client=client, body=body) -> Response[Union[CreateScrapeBulkResponse202, Error]]\nawait asyncio(client=client, body=body) -> Optional[Union[CreateScrapeBulkResponse202, Error]]\n```\n\n## Get Scrape Bulk\n\nGet scrape bulk job status\n\n**Parameters**\n\n- `id (str)`\n\n**Call styles**\n\n```python\nsync_detailed(id=id, client=client) -> Response[Union[Error, GetScrapeBulkResponse200]]\nsync(id=id, client=client) -> Optional[Union[Error, GetScrapeBulkResponse200]]\nawait asyncio_detailed(id=id, client=client) -> Response[Union[Error, GetScrapeBulkResponse200]]\nawait asyncio(id=id, client=client) -> Optional[Union[Error, GetScrapeBulkResponse200]]\n```"
390
+ "body": "# Monitors\n\nAPI functions for the Monitors resource.\n\n# Monitors\n\nFunctions for interacting with the `monitors` API resource. Each operation ships in four forms — `sync` / `sync_detailed` and their `async` counterparts.\n\nFirst-capture behavior is the same for both monitor types: the first capture is a silent baseline (`has_change=False`, `change_pct=None`) with no `change_detected` webhook, whether the monitor is `scrape` or `screenshot`. From the second capture onward both types diff against the previous capture.\n\n## Create Monitor\n\nCreate a change-detection monitor\n\nCreates a recurring change-detection monitor for a URL, delivering results via webhook.\n\n**Limits:** request bodies are capped at 512 KB. An oversized body\nreturns a `400` with error code `request_too_large`.\n\n**Parameters**\n\n- `body (MonitorCreateRequest)`\n\n**Call styles**\n\n```python\nsync_detailed(client=client, body=body) -> Response[Union[Error, MonitorCreateResponse]]\nsync(client=client, body=body) -> Optional[Union[Error, MonitorCreateResponse]]\nawait asyncio_detailed(client=client, body=body) -> Response[Union[Error, MonitorCreateResponse]]\nawait asyncio(client=client, body=body) -> Optional[Union[Error, MonitorCreateResponse]]\n```\n\n## Delete Monitor\n\nCancel monitor\n\n**Parameters**\n\n- `id (str)`\n\n**Call styles**\n\n```python\nsync_detailed(id=id, client=client) -> Response[Union[Any, Error]]\nsync(id=id, client=client) -> Optional[Union[Any, Error]]\nawait asyncio_detailed(id=id, client=client) -> Response[Union[Any, Error]]\nawait asyncio(id=id, client=client) -> Optional[Union[Any, Error]]\n```\n\n## Get Monitor\n\nGet monitor\n\n**Parameters**\n\n- `id (str)`\n\n**Call styles**\n\n```python\nsync_detailed(id=id, client=client) -> Response[Union[Error, MonitorResponse]]\nsync(id=id, client=client) -> Optional[Union[Error, MonitorResponse]]\nawait asyncio_detailed(id=id, client=client) -> Response[Union[Error, MonitorResponse]]\nawait asyncio(id=id, client=client) -> Optional[Union[Error, MonitorResponse]]\n```\n\n## List Monitor Captures\n\nList monitor captures\n\n**Parameters**\n\n- `id (str)`\n- `limit (Union[Unset, int])`\n- `cursor (Union[Unset, str])`\n\n**Call styles**\n\n```python\nsync_detailed(id=id, client=client, limit=limit, cursor=cursor) -> Response[ListMonitorCapturesResponse200]\nsync(id=id, client=client, limit=limit, cursor=cursor) -> Optional[ListMonitorCapturesResponse200]\nawait asyncio_detailed(id=id, client=client, limit=limit, cursor=cursor) -> Response[ListMonitorCapturesResponse200]\nawait asyncio(id=id, client=client, limit=limit, cursor=cursor) -> Optional[ListMonitorCapturesResponse200]\n```\n\n## List Monitors\n\nList monitors\n\n**Parameters**\n\n- `limit (Union[Unset, int])`\n- `cursor (Union[Unset, str])`\n- `status (Union[Unset, ListMonitorsStatus])`\n\n**Call styles**\n\n```python\nsync_detailed(client=client, limit=limit, cursor=cursor, status=status) -> Response[ListMonitorsResponse200]\nsync(client=client, limit=limit, cursor=cursor, status=status) -> Optional[ListMonitorsResponse200]\nawait asyncio_detailed(client=client, limit=limit, cursor=cursor, status=status) -> Response[ListMonitorsResponse200]\nawait asyncio(client=client, limit=limit, cursor=cursor, status=status) -> Optional[ListMonitorsResponse200]\n```\n\n## Update Monitor\n\nUpdate monitor\n\n**Parameters**\n\n- `id (str)`\n- `body (MonitorUpdateRequest)`\n\n**Call styles**\n\n```python\nsync_detailed(id=id, client=client, body=body) -> Response[Union[Error, MonitorResponse]]\nsync(id=id, client=client, body=body) -> Optional[Union[Error, MonitorResponse]]\nawait asyncio_detailed(id=id, client=client, body=body) -> Response[Union[Error, MonitorResponse]]\nawait asyncio(id=id, client=client, body=body) -> Optional[Union[Error, MonitorResponse]]\n```"
396
391
  },
397
392
  "sdk/python/scrape": {
398
393
  "title": "Scrape",
399
394
  "section": "SDK Reference",
400
395
  "body": "# Scrape\n\nAPI functions for the Scrape resource.\n\n# Scrape\n\nFunctions for interacting with the `scrape` API resource. Each operation ships in four forms — `sync` / `sync_detailed` and their `async` counterparts.\n\n## Create Scrape\n\nScrape a URL\n\nFetches and processes a URL, returning content in one or more formats wrapped in a ScrapeEnvelope.\nMost requests return synchronously in under a second; requests needing a full page render return\nHTTP 202 and complete asynchronously.\n\n**Parameters**\n\n- `body (ScrapeRequest)`\n\n**Call styles**\n\n```python\nsync_detailed(client=client, body=body) -> Response[Union[Error, ScrapeQueuedEnvelope, ScrapeSuccessEnvelope]]\nsync(client=client, body=body) -> Optional[Union[Error, ScrapeQueuedEnvelope, ScrapeSuccessEnvelope]]\nawait asyncio_detailed(client=client, body=body) -> Response[Union[Error, ScrapeQueuedEnvelope, ScrapeSuccessEnvelope]]\nawait asyncio(client=client, body=body) -> Optional[Union[Error, ScrapeQueuedEnvelope, ScrapeSuccessEnvelope]]\n```\n\n## Get Scrape\n\nGet scrape result\n\nAlways returns 200. Check the `status` discriminator for the scrape state.\n\n**Parameters**\n\n- `id (str)`\n\n**Call styles**\n\n```python\nsync_detailed(id=id, client=client) -> Response[Union[Error, Union['ScrapeErrorEnvelope', 'ScrapeQueuedEnvelope', 'ScrapeSuccessEnvelope']]]\nsync(id=id, client=client) -> Optional[Union[Error, Union['ScrapeErrorEnvelope', 'ScrapeQueuedEnvelope', 'ScrapeSuccessEnvelope']]]\nawait asyncio_detailed(id=id, client=client) -> Response[Union[Error, Union['ScrapeErrorEnvelope', 'ScrapeQueuedEnvelope', 'ScrapeSuccessEnvelope']]]\nawait asyncio(id=id, client=client) -> Optional[Union[Error, Union['ScrapeErrorEnvelope', 'ScrapeQueuedEnvelope', 'ScrapeSuccessEnvelope']]]\n```"
401
396
  },
397
+ "sdk/python/scrape-bulk": {
398
+ "title": "Scrape Bulk",
399
+ "section": "SDK Reference",
400
+ "body": "# Scrape Bulk\n\nAPI functions for the Scrape Bulk resource.\n\n# Scrape Bulk\n\nFunctions for interacting with the `scrape_bulk` API resource. Each operation ships in four forms — `sync` / `sync_detailed` and their `async` counterparts.\n\n## Create Scrape Bulk\n\nBulk scrape URLs\n\nEnqueues multiple URLs for scraping. Results delivered via webhook.\nWebhook deliveries include `X-ByteKit-Event: scrape.completed` or\n`X-ByteKit-Event: scrape.failed` so receivers can dispatch on the\nheader without parsing the body shape.\n\n**Parameters**\n\n- `body (CreateScrapeBulkBody)`\n\n**Call styles**\n\n```python\nsync_detailed(client=client, body=body) -> Response[Union[CreateScrapeBulkResponse202, Error]]\nsync(client=client, body=body) -> Optional[Union[CreateScrapeBulkResponse202, Error]]\nawait asyncio_detailed(client=client, body=body) -> Response[Union[CreateScrapeBulkResponse202, Error]]\nawait asyncio(client=client, body=body) -> Optional[Union[CreateScrapeBulkResponse202, Error]]\n```\n\n## Get Scrape Bulk\n\nGet scrape bulk job status\n\n**Parameters**\n\n- `id (str)`\n\n**Call styles**\n\n```python\nsync_detailed(id=id, client=client) -> Response[Union[Error, GetScrapeBulkResponse200]]\nsync(id=id, client=client) -> Optional[Union[Error, GetScrapeBulkResponse200]]\nawait asyncio_detailed(id=id, client=client) -> Response[Union[Error, GetScrapeBulkResponse200]]\nawait asyncio(id=id, client=client) -> Optional[Union[Error, GetScrapeBulkResponse200]]\n```"
401
+ },
402
402
  "sdk/python/screenshots": {
403
403
  "title": "Screenshots",
404
404
  "section": "SDK Reference",
405
- "body": "# Screenshots\n\nAPI functions for the Screenshots resource.\n\n# Screenshots\n\nFunctions for interacting with the `screenshots` API resource. Each operation ships in four forms — `sync` / `sync_detailed` and their `async` counterparts.\n\n## Create Screenshot\n\nCapture a screenshot\n\nSync by default (holds up to 28s). Pass `?async=true` to return 202 immediately.\nPoll via GET /v1/screenshots/\\{id\\}.\n\n**Parameters**\n\n- `async_ (Union[Unset, bool]): Default: False.`\n- `body (ScreenshotRequest)`\n\n**Call styles**\n\n```python\nsync_detailed(client=client, body=body, async_=async_) -> Response[Union[Error, ScreenshotResponse]]\nsync(client=client, body=body, async_=async_) -> Optional[Union[Error, ScreenshotResponse]]\nawait asyncio_detailed(client=client, body=body, async_=async_) -> Response[Union[Error, ScreenshotResponse]]\nawait asyncio(client=client, body=body, async_=async_) -> Optional[Union[Error, ScreenshotResponse]]\n```\n\n## Get Screenshot\n\nGet screenshot status\n\n**Parameters**\n\n- `id (str)`\n\n**Call styles**\n\n```python\nsync_detailed(id=id, client=client) -> Response[Union[Error, ScreenshotResponse, Union['Error', 'ScreenshotResponse']]]\nsync(id=id, client=client) -> Optional[Union[Error, ScreenshotResponse, Union['Error', 'ScreenshotResponse']]]\nawait asyncio_detailed(id=id, client=client) -> Response[Union[Error, ScreenshotResponse, Union['Error', 'ScreenshotResponse']]]\nawait asyncio(id=id, client=client) -> Optional[Union[Error, ScreenshotResponse, Union['Error', 'ScreenshotResponse']]]\n```"
405
+ "body": "# Screenshots\n\nAPI functions for the Screenshots resource.\n\n# Screenshots\n\nFunctions for interacting with the `screenshots` API resource. Each operation ships in four forms — `sync` / `sync_detailed` and their `async` counterparts.\n\n## Create Screenshot\n\nCapture a screenshot\n\nSync by default (holds up to 28s). Pass `?async=true` 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**Parameters**\n\n- `async_ (Union[Unset, bool])`\n- `body (ScreenshotRequest)`\n\n**Call styles**\n\n```python\nsync_detailed(client=client, body=body, async_=async_) -> Response[Union[Error, ScreenshotResponse]]\nsync(client=client, body=body, async_=async_) -> Optional[Union[Error, ScreenshotResponse]]\nawait asyncio_detailed(client=client, body=body, async_=async_) -> Response[Union[Error, ScreenshotResponse]]\nawait asyncio(client=client, body=body, async_=async_) -> Optional[Union[Error, ScreenshotResponse]]\n```\n\n## Get Screenshot\n\nGet screenshot status\n\n**Parameters**\n\n- `id (str)`\n\n**Call styles**\n\n```python\nsync_detailed(id=id, client=client) -> Response[Union[Error, ScreenshotResponse, Union['Error', 'ScreenshotResponse']]]\nsync(id=id, client=client) -> Optional[Union[Error, ScreenshotResponse, Union['Error', 'ScreenshotResponse']]]\nawait asyncio_detailed(id=id, client=client) -> Response[Union[Error, ScreenshotResponse, Union['Error', 'ScreenshotResponse']]]\nawait asyncio(id=id, client=client) -> Optional[Union[Error, ScreenshotResponse, Union['Error', 'ScreenshotResponse']]]\n```"
406
406
  },
407
407
  "sdk/python/search": {
408
408
  "title": "Search",
@@ -412,7 +412,7 @@
412
412
  "sdk/python/sitemap": {
413
413
  "title": "Sitemap",
414
414
  "section": "SDK Reference",
415
- "body": "# Sitemap\n\nAPI functions for the Sitemap resource.\n\n# Sitemap\n\nFunctions for interacting with the `sitemap` API resource. Each operation ships in four forms — `sync` / `sync_detailed` and their `async` counterparts.\n\n## Create Sitemap\n\nDiscover 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**Parameters**\n\n- `body (SitemapRequest)`\n\n**Call styles**\n\n```python\nsync_detailed(client=client, body=body) -> Response[Union[Error, SitemapResponse]]\nsync(client=client, body=body) -> Optional[Union[Error, SitemapResponse]]\nawait asyncio_detailed(client=client, body=body) -> Response[Union[Error, SitemapResponse]]\nawait asyncio(client=client, body=body) -> Optional[Union[Error, SitemapResponse]]\n```\n\n## Get Sitemap\n\nGet sitemap job status\n\n**Parameters**\n\n- `id (str)`\n\n**Call styles**\n\n```python\nsync_detailed(id=id, client=client) -> Response[Union[Error, SitemapResponse]]\nsync(id=id, client=client) -> Optional[Union[Error, SitemapResponse]]\nawait asyncio_detailed(id=id, client=client) -> Response[Union[Error, SitemapResponse]]\nawait asyncio(id=id, client=client) -> Optional[Union[Error, SitemapResponse]]\n```"
415
+ "body": "# Sitemap\n\nAPI functions for the Sitemap resource.\n\n# Sitemap\n\nFunctions for interacting with the `sitemap` API resource. Each operation ships in four forms — `sync` / `sync_detailed` and their `async` counterparts.\n\n## Create Sitemap\n\nDiscover 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**Parameters**\n\n- `body (SitemapRequest)`\n\n**Call styles**\n\n```python\nsync_detailed(client=client, body=body) -> Response[Union[Error, SitemapResponse]]\nsync(client=client, body=body) -> Optional[Union[Error, SitemapResponse]]\nawait asyncio_detailed(client=client, body=body) -> Response[Union[Error, SitemapResponse]]\nawait asyncio(client=client, body=body) -> Optional[Union[Error, SitemapResponse]]\n```\n\n## Get Sitemap\n\nGet sitemap job status\n\n**Parameters**\n\n- `id (str)`\n\n**Call styles**\n\n```python\nsync_detailed(id=id, client=client) -> Response[Union[Error, SitemapResponse]]\nsync(id=id, client=client) -> Optional[Union[Error, SitemapResponse]]\nawait asyncio_detailed(id=id, client=client) -> Response[Union[Error, SitemapResponse]]\nawait asyncio(id=id, client=client) -> Optional[Union[Error, SitemapResponse]]\n```"
416
416
  },
417
417
  "sdk/python/usage": {
418
418
  "title": "Usage",
@@ -422,7 +422,7 @@
422
422
  "sdk/python/webhooks": {
423
423
  "title": "Webhooks",
424
424
  "section": "SDK Reference",
425
- "body": "# Webhooks\n\nAPI functions for the Webhooks resource.\n\n# Webhooks\n\nFunctions for interacting with the `webhooks` API resource. Each operation ships in four forms — `sync` / `sync_detailed` and their `async` counterparts.\n\n## List Webhook Deliveries\n\nList webhook deliveries\n\n**Parameters**\n\n- `limit (Union[Unset, int]): Default: 25.`\n- `cursor (Union[Unset, str])`\n- `status (Union[Unset, ListWebhookDeliveriesStatus])`\n- `since (Union[Unset, datetime.datetime])`\n\n**Call styles**\n\n```python\nsync_detailed(client=client, limit=limit, cursor=cursor, status=status, since=since) -> Response[ListWebhookDeliveriesResponse200]\nsync(client=client, limit=limit, cursor=cursor, status=status, since=since) -> Optional[ListWebhookDeliveriesResponse200]\nawait asyncio_detailed(client=client, limit=limit, cursor=cursor, status=status, since=since) -> Response[ListWebhookDeliveriesResponse200]\nawait asyncio(client=client, limit=limit, cursor=cursor, status=status, since=since) -> Optional[ListWebhookDeliveriesResponse200]\n```\n\n## Retry Webhook Delivery\n\nRetry a webhook delivery\n\nRequeues a failed or exhausted webhook delivery for another attempt.\n\n**Parameters**\n\n- `id (str)`\n\n**Call styles**\n\n```python\nsync_detailed(id=id, client=client) -> Response[Union[Error, WebhookDeliveryResponse]]\nsync(id=id, client=client) -> Optional[Union[Error, WebhookDeliveryResponse]]\nawait asyncio_detailed(id=id, client=client) -> Response[Union[Error, WebhookDeliveryResponse]]\nawait asyncio(id=id, client=client) -> Optional[Union[Error, WebhookDeliveryResponse]]\n```"
425
+ "body": "# Webhooks\n\nAPI functions for the Webhooks resource.\n\n# Webhooks\n\nFunctions for interacting with the `webhooks` API resource. Each operation ships in four forms — `sync` / `sync_detailed` and their `async` counterparts.\n\n## List Webhook Deliveries\n\nList webhook deliveries\n\n**Parameters**\n\n- `limit (Union[Unset, int])`\n- `cursor (Union[Unset, str])`\n- `status (Union[Unset, ListWebhookDeliveriesStatus])`\n- `since (Union[Unset, datetime.datetime])`\n\n**Call styles**\n\n```python\nsync_detailed(client=client, limit=limit, cursor=cursor, status=status, since=since) -> Response[ListWebhookDeliveriesResponse200]\nsync(client=client, limit=limit, cursor=cursor, status=status, since=since) -> Optional[ListWebhookDeliveriesResponse200]\nawait asyncio_detailed(client=client, limit=limit, cursor=cursor, status=status, since=since) -> Response[ListWebhookDeliveriesResponse200]\nawait asyncio(client=client, limit=limit, cursor=cursor, status=status, since=since) -> Optional[ListWebhookDeliveriesResponse200]\n```\n\n## Retry Webhook Delivery\n\nRetry a webhook delivery\n\nRequeues a failed or exhausted webhook delivery for another attempt.\n\n**Limits:** this endpoint takes no request body; any body sent is\ncapped at 64 KB. An oversized body returns a `400` with error code\n`request_too_large`.\n\n**Parameters**\n\n- `id (str)`\n\n**Call styles**\n\n```python\nsync_detailed(id=id, client=client) -> Response[Union[Error, WebhookDeliveryResponse]]\nsync(id=id, client=client) -> Optional[Union[Error, WebhookDeliveryResponse]]\nawait asyncio_detailed(id=id, client=client) -> Response[Union[Error, WebhookDeliveryResponse]]\nawait asyncio(id=id, client=client) -> Optional[Union[Error, WebhookDeliveryResponse]]\n```"
426
426
  },
427
427
  "sdk/typescript/account": {
428
428
  "title": "Account",
@@ -439,31 +439,31 @@
439
439
  "section": "SDK Reference",
440
440
  "body": "# Client\n\nInstantiate and configure the ByteKit TypeScript client.\n\n# Client\n\nThe ByteKit TypeScript SDK is a thin, type-safe wrapper over the REST API. Create a\n client with your API key, then call resource methods.\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## Options (`ByteKitOptions`)\n\n- `apiKey` (required) — `string`\n- `baseUrl` — `string` Defaults to `https://api.bytekit.com`.\n- `timeoutMs` — `number` — Default CLIENT-SIDE request timeout in ms — the abort budget for the whole HTTP\nround-trip made by this SDK, covering time-to-headers **and** the response body\nread (so a large legitimate body counts against it too). `0` disables the SDK-side\ntimeout. Default 120000.\n\nNOT the same thing as `ScrapeOpts.timeout_ms`, which is the SERVER-side budget the\ngateway applies to the scrape itself. Override per call with\n`RequestOptions.requestTimeoutMs`.\n\n## Resources\n\nThe client exposes one property per resource:\n\n- [`client.scrape`](https://bytekit.com/docs/sdk/typescript/scrape) — Fetch a URL as raw HTML, clean markdown, or structured content.\n- [`client.screenshots`](https://bytekit.com/docs/sdk/typescript/screenshots) — Capture full-page or viewport screenshots.\n- [`client.bulk`](https://bytekit.com/docs/sdk/typescript/bulk) — Fan out many URLs in parallel with per-item webhooks.\n- [`client.fetch`](https://bytekit.com/docs/sdk/typescript/fetch) — Low-latency raw HTTP fetch with optional conversion.\n- [`client.monitors`](https://bytekit.com/docs/sdk/typescript/monitors) — Watch a URL on a schedule and webhook on change.\n- [`client.sitemap`](https://bytekit.com/docs/sdk/typescript/sitemap) — Discover URLs from a domain's sitemap or by crawling.\n- [`client.search`](https://bytekit.com/docs/sdk/typescript/search) — Run a web search and return ranked organic results.\n- [`client.account`](https://bytekit.com/docs/sdk/typescript/account) — Account info and API key management.\n- [`client.usage`](https://bytekit.com/docs/sdk/typescript/usage) — Billing-period and daily usage breakdowns.\n- [`client.webhooks`](https://bytekit.com/docs/sdk/typescript/webhooks) — List and retry webhook deliveries.\n\n## Errors\n\nAny non-2xx response throws a `ByteKitError` carrying the HTTP `status` and the API `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 }\n}\n```"
441
441
  },
442
- "sdk/typescript/fetch-bulk": {
443
- "title": "Fetch Bulk",
444
- "section": "SDK Reference",
445
- "body": "# Fetch Bulk\n\nCreate and poll bulk fetch jobs.\n\n# Fetch Bulk\n\nCreate and poll bulk fetch jobs. Accessed via `client.fetch.bulk`.\n\n## create\n\n```ts\nclient.fetch.bulk.create(opts: FetchBulkCreateRequest, requestOptions?: RequestOptions): Promise<FetchBulkCreateResponse>\n```\n\nPOST /v1/fetch/bulk — create a bulk fetch job\n\n## get\n\n```ts\nclient.fetch.bulk.get(id: BulkId, requestOptions?: RequestOptions): Promise<FetchBulkGetResponse>\n```\n\nGET /v1/fetch/bulk/\\{id\\} — get a bulk fetch job"
446
- },
447
442
  "sdk/typescript/fetch": {
448
443
  "title": "Fetch",
449
444
  "section": "SDK Reference",
450
445
  "body": "# Fetch\n\nLow-latency raw HTTP fetch with optional conversion.\n\n# Fetch\n\nLow-latency raw HTTP fetch with optional conversion. Accessed via `client.fetch`.\n\n## create\n\n```ts\nclient.fetch.create(opts: FetchOpts, requestOptions?: RequestOptions): Promise<FetchResult>\n```\n\nPOST /v1/fetch — fetch URL content via POST body.\n\nResolves a `FetchResult` — the raw content body plus `X-Fetch-*` metadata.\nThe body is returned verbatim — a JSON-serving upstream comes back as the\nraw JSON string, not a parsed object.\n\n`requestOptions` carries the CLIENT-side abort budget (`requestTimeoutMs`) and an\noptional caller `signal`. It matters most here: the gateway's own ceiling for a\nfetch is 60 s, so without a per-call budget a slow upstream holds the caller for\nthe constructor default (2 minutes) rather than a duration the caller chose.\n\n## get\n\n```ts\nclient.fetch.get(opts: FetchGetOpts, requestOptions?: RequestOptions): Promise<FetchResult>\n```\n\nGET /v1/fetch — fetch URL content via query params.\n\nResolves a `FetchResult` — the raw content body plus `X-Fetch-*` metadata.\n\nAccepts only the five params the spec declares for this endpoint. `custom`\n(#2481) and the `markdown_*` / `with_*` tuning fields (#2539) are POST-body\noptions with no GET query param — they were silently dropped by this builder,\nso they are now compile errors instead. Use `create()` (POST) for those.\n\nThe query string is built by iterating `FETCH_GET_QUERY_KEYS`, the same list\n`FetchGetOpts` is derived from, so every accepted option is necessarily\nserialized.\n\n`requestOptions` carries the CLIENT-side abort budget (`requestTimeoutMs`) and an\noptional caller `signal`. As on `create`, the gateway's own ceiling for a fetch is\n60 s, so a per-call budget is what keeps a slow upstream from holding the caller\nfor the constructor default.\n\n## Options (`FetchOpts`)\n\n- `url` (required) — `string`\n- `format` — `'markdown' | 'html'` — Output format. `'markdown'` runs the HTML→markdown pipeline; `'html'` returns raw HTML. Narrowed to the spec union — off-spec values (e.g. `'pdf'`) are rejected at compile time.\n- `country` — `string`\n- `timeout_ms` — `number`\n- `markdown_mode` — `'article' | 'raw' | 'llm'` — Markdown processing mode. Only used when `format=markdown`. article/raw/llm.\n- `markdown_query` — `string` — BM25 query string for relevance-ranked filtering. Only used when `format=markdown`.\n- `markdown_links` — `'inline' | 'references' | 'none' | 'text'` — Link rendering style. Only used when `format=markdown`.\n- `markdown_images` — `'inline' | 'references' | 'none' | 'text'` — Image retention mode. Only used when `format=markdown`.\n- `with_links_summary` — `boolean` — Append a `Links:` footer to the markdown output. Only used when `format=markdown`.\n- `with_images_summary` — `boolean` — Append an `Images:` footer to the markdown output. Only used when `format=markdown`.\n- `markdown_compact` — `boolean` — Compact whitespace output. Only used when `format=markdown`.\n- `markdown_filter_images` — `boolean` — Filter low-signal images. Only used when `format=markdown`.\n- `markdown_include_media` — `boolean` — When true, `formats.links`/`formats.images` return rich objects and a top-level `tables` array is included. Only used when `format=markdown`.\n- `markdown_include_warnings` — `boolean` — When true, enables markdown-pipeline and tag-filter warnings for affected html/markdown requests.\n- `markdown_include_stats` — `boolean` — When true, includes a top-level `stats` object (chars, tokens, blocks). Only used when `format=markdown`.\n- `cache_ttl` — `string | 0` — How long a freshly fetched URL may be served from cache. Matches the\nOpenAPI `FetchRequest.cache_ttl` schema: a duration string (`\"48h\"`,\n`\"2d\"`, up to `168h` / `7d`) or the integer `0` to disable caching.\nDefaults to `\"48h\"` server-side when omitted.\n- `custom` — `Record<string, unknown>` — User-supplied JSON payload, base64-encoded into the `X-Fetch-Custom`\nresponse header so callers can correlate the response to caller-side\nstate. Capped at 4096 UTF-8 bytes after JSON serialization. Does NOT\naffect cache-key inputs."
451
446
  },
452
- "sdk/typescript/monitors": {
453
- "title": "Monitors",
447
+ "sdk/typescript/fetch-bulk": {
448
+ "title": "Fetch Bulk",
454
449
  "section": "SDK Reference",
455
- "body": "# Monitors\n\nWatch a URL on a schedule and webhook on change.\n\n# Monitors\n\nWatch a URL on a schedule and webhook on change. Accessed via `client.monitors`.\n\n## create\n\n```ts\nclient.monitors.create(opts: MonitorCreateRequest, requestOptions?: RequestOptions): Promise<MonitorCreateResponse>\n```\n\nPOST /v1/monitors — create a page-change monitor (screenshot or scrape capture).\nFirst-capture behavior is the same for both types: the first capture is a silent baseline (has_change=false, change_pct=null) with no change_detected webhook, whether the monitor is `scrape` or `screenshot`. From the second capture onward both types diff against the previous capture.\n\n## list\n\n```ts\nclient.monitors.list(params?: ListMonitorsParams, requestOptions?: RequestOptions): Promise<ListMonitorsResponse>\n```\n\nGET /v1/monitors — list monitors for the account.\n\n`params` is optional and each key is omitted-when-absent, so `list()` with no argument\nserializes the bare `/v1/monitors` URL unchanged — existing zero-arg callers are unaffected.\n\n## get\n\n```ts\nclient.monitors.get(id: MonitorId, requestOptions?: RequestOptions): Promise<MonitorResponse>\n```\n\nGET /v1/monitors/\\{id\\} — get a monitor by ID\n\n## update\n\n```ts\nclient.monitors.update(id: MonitorId, opts: MonitorUpdateRequest, requestOptions?: RequestOptions): Promise<UpdateMonitorResponse>\n```\n\nPATCH /v1/monitors/\\{id\\} — update a monitor\n\n## delete\n\n```ts\nclient.monitors.delete(id: MonitorId, requestOptions?: RequestOptions): Promise<void>\n```\n\nDELETE /v1/monitors/\\{id\\} — delete a monitor.\n\nReturns 204 No Content (`operations['deleteMonitor']['responses'][204]`\ndeclares `content?: never`), so there is no JSON arm to derive a payload\nfrom — hence `Promise<void>`. `client.request()` short-circuits the empty\nbody to `undefined` before it would parse as JSON (#2450).\n\n## captures\n\n### list\n\n```ts\nclient.monitors.captures.list(id: MonitorId, requestOptions?: RequestOptions): Promise<ListMonitorCapturesResponse>\n```\n\nGET /v1/monitors/\\{id\\}/captures — list captures for a monitor"
450
+ "body": "# Fetch Bulk\n\nCreate and poll bulk fetch jobs.\n\n# Fetch Bulk\n\nCreate and poll bulk fetch jobs. Accessed via `client.fetch.bulk`.\n\n## create\n\n```ts\nclient.fetch.bulk.create(opts: FetchBulkCreateRequest, requestOptions?: RequestOptions): Promise<FetchBulkCreateResponse>\n```\n\nPOST /v1/fetch/bulk — create a bulk fetch job\n\n## get\n\n```ts\nclient.fetch.bulk.get(id: BulkId, requestOptions?: RequestOptions): Promise<FetchBulkGetResponse>\n```\n\nGET /v1/fetch/bulk/\\{id\\} — get a bulk fetch job"
456
451
  },
457
- "sdk/typescript/scrape-bulk": {
458
- "title": "Scrape Bulk",
452
+ "sdk/typescript/monitors": {
453
+ "title": "Monitors",
459
454
  "section": "SDK Reference",
460
- "body": "# Scrape Bulk\n\nCreate and poll bulk scrape jobs.\n\n# Scrape Bulk\n\nCreate and poll bulk scrape jobs. Accessed via `client.scrape.bulk`.\n\n## create\n\n```ts\nclient.scrape.bulk.create(opts: ScrapeBulkCreateRequest, requestOptions?: RequestOptions): Promise<ScrapeBulkCreateResponse>\n```\n\nPOST /v1/scrape/bulk — create a bulk scrape job.\n\n`requestOptions` carries the CLIENT-side abort budget (`requestTimeoutMs`) and an\noptional caller `signal`; both override the constructor's `timeoutMs` default.\n\n## get\n\n```ts\nclient.scrape.bulk.get(id: BulkId, requestOptions?: RequestOptions): Promise<ScrapeBulkGetResponse>\n```\n\nGET /v1/scrape/bulk/\\{id\\} — get a bulk scrape job"
455
+ "body": "# Monitors\n\nWatch a URL on a schedule and webhook on change.\n\n# Monitors\n\nWatch a URL on a schedule and webhook on change. Accessed via `client.monitors`.\n\n## create\n\n```ts\nclient.monitors.create(opts: MonitorCreateRequest, requestOptions?: RequestOptions): Promise<MonitorCreateResponse>\n```\n\nPOST /v1/monitors — create a page-change monitor (screenshot or scrape capture).\nFirst-capture behavior is the same for both types: the first capture is a silent baseline (has_change=false, change_pct=null) with no change_detected webhook, whether the monitor is `scrape` or `screenshot`. From the second capture onward both types diff against the previous capture.\n\n## list\n\n```ts\nclient.monitors.list(params?: ListMonitorsParams, requestOptions?: RequestOptions): Promise<ListMonitorsResponse>\n```\n\nGET /v1/monitors — list monitors for the account.\n\n`params` is optional and each key is omitted-when-absent, so `list()` with no argument\nserializes the bare `/v1/monitors` URL unchanged — existing zero-arg callers are unaffected.\n\n## get\n\n```ts\nclient.monitors.get(id: MonitorId, requestOptions?: RequestOptions): Promise<MonitorResponse>\n```\n\nGET /v1/monitors/\\{id\\} — get a monitor by ID\n\n## update\n\n```ts\nclient.monitors.update(id: MonitorId, opts: MonitorUpdateRequest, requestOptions?: RequestOptions): Promise<UpdateMonitorResponse>\n```\n\nPATCH /v1/monitors/\\{id\\} — update a monitor\n\n## delete\n\n```ts\nclient.monitors.delete(id: MonitorId, requestOptions?: RequestOptions): Promise<void>\n```\n\nDELETE /v1/monitors/\\{id\\} — delete a monitor.\n\nReturns 204 No Content (`operations['deleteMonitor']['responses'][204]`\ndeclares `content?: never`), so there is no JSON arm to derive a payload\nfrom — hence `Promise<void>`. `client.request()` short-circuits the empty\nbody to `undefined` before it would parse as JSON (#2450).\n\n## captures\n\n### list\n\n```ts\nclient.monitors.captures.list(id: MonitorId, params?: ListMonitorCapturesParams, requestOptions?: RequestOptions): Promise<ListMonitorCapturesResponse>\n```\n\nGET /v1/monitors/\\{id\\}/captures — list captures for a monitor.\n\n`params` is optional and each key is omitted-when-absent (#2594), so `list(id)` with no\nsecond argument serializes the bare `/v1/monitors/\\{id\\}/captures` URL unchanged — existing\nzero-arg callers are unaffected (inverse case)."
461
456
  },
462
457
  "sdk/typescript/scrape": {
463
458
  "title": "Scrape",
464
459
  "section": "SDK Reference",
465
460
  "body": "# Scrape\n\nFetch a URL as raw HTML, clean markdown, or structured content.\n\n# Scrape\n\nFetch a URL as raw HTML, clean markdown, or structured content. Accessed via `client.scrape`.\n\n## create\n\n```ts\nclient.scrape.create(opts: ScrapeOpts, requestOptions?: RequestOptions): Promise<ScrapeCreateResponse>\n```\n\nPOST /v1/scrape — create a scrape job.\n\nResolves to the 200 success envelope, or the 202 queued envelope when\n`async: true`. Narrow on `status` before reading the result.\n\n`requestOptions` carries the CLIENT-side abort budget (`requestTimeoutMs`) and an\noptional caller `signal`; both override the constructor's `timeoutMs` default. They\nare a different axis from `opts.timeout_ms`, which is the SERVER-side scrape budget.\n\n## get\n\n```ts\nclient.scrape.get(id: ScrapeId, requestOptions?: RequestOptions): Promise<ScrapeGetResponse>\n```\n\nGET /v1/scrape/\\{id\\} — poll a scrape by ID\n\nKNOWN DRIFT (#2426): live staging spot-checks (two independent fetches)\nfound the gateway serializes `billing_multiplier` as a JSON **string**\n(e.g. `\"0.50\"`) on this GET path, while the OpenAPI spec — and this\nderived `ScrapeGetResponse` type — declare it `number`. `POST /v1/scrape`'s\nsuccess envelope for the same job serializes the identical field as a\nproper number, so the drift is specific to the GET path (likely a Postgres\nNUMERIC column round-tripping as a string on this query path). A consumer\ndoing arithmetic on `billing_multiplier` after `get()` (e.g.\n`content_length * billing_multiplier`) should coerce with `Number(...)`\ndefensively rather than trust the static type. This is a gateway/worker\nserialization bug, not a client bug — the fix belongs upstream in the\ngateway and is out of this ticket's scope.\n\n## Options (`ScrapeOpts`)\n\n- `url` (required) — `string`\n- `formats` — `Array<'raw_html' | 'html' | 'markdown' | 'links' | 'images'>`\n- `country` — `string`\n- `cookies` — `ScrapeCookie[]` — Cookies to set before loading the page. `name` and `value` are required (spec `Cookie` schema).\n- `headers` — `Record<string, string>`\n- `delay_ms` — `number`\n- `timeout_ms` — `number` — SERVER-side scrape budget in ms — how long the gateway may spend on the scrape itself. For the CLIENT-side abort budget (when this SDK gives up on the wire), see `RequestOptions.requestTimeoutMs`.\n- `async` — `boolean`\n- `webhook_url` — `string`\n- `events` — `Array<'queued' | 'completed' | 'failed'>`\n- `markdown_mode` — `MarkdownMode` — Markdown processing mode. article=article extraction (default), raw=minimal cleanup, llm=compact LLM-optimised output.\n- `markdown_query` — `string` — BM25 query string for relevance-ranked content filtering. Omit or leave empty to disable.\n- `markdown_links` — `MarkdownLinks` — Link rendering style in the markdown output.\n- `markdown_images` — `MarkdownImages` — Image retention mode in the markdown output. Distinct from `markdown_filter_images` (which drops low-signal images before conversion).\n- `with_links_summary` — `boolean` — When true, appends a `Links:` footer to the markdown output. Automatically enabled when `markdown_links` is `'references'`.\n- `with_images_summary` — `boolean` — When true, appends an `Images:` footer to the markdown output.\n- `markdown_compact` — `boolean` — Collapse excessive whitespace for a more compact output.\n- `markdown_filter_images` — `boolean` — Filter low-signal images from the markdown output.\n- `markdown_include_media` — `boolean` — When true, `formats.links` and `formats.images` return `ScrapeScoredLink[]` / `ScrapeScoredImage[]` (rich objects) instead of `string[]`, and a top-level `tables` array is included. Only effective when `markdown` is in `formats`.\n- `markdown_include_warnings` — `boolean` — When true, the response includes markdown-pipeline and tag-filter warnings. `artifact_unavailable` may appear independently when a requested persisted format cannot be rehydrated.\n- `markdown_include_stats` — `boolean` — When true, the response includes a top-level `stats` object with `ScrapeStats` (chars, tokens, blocks). Only effective when `markdown` is in `formats`.\n- `token_budget` — `number` — Maximum token count for the markdown output. Truncates at the last paragraph → sentence → token boundary under the limit. Absent → no truncation.\n- `token_encoding` — `TokenEncoding` — Tokenizer encoding hint for `token_budget`. `cl100k_base` (default) matches GPT-4/4o; `o200k_base` matches GPT-4o-mini / o-series.\n- `mobile` — `boolean` — When true, emulate a mobile device (mobile UA + viewport). Default false (desktop). Part of the cache key, so mobile and desktop responses cache independently.\n- `remove_base64_images` — `boolean` — When true (default), base64-encoded `data:` image sources are stripped before markdown conversion and from `html` output. Set false to preserve them. Does not affect `raw_html`.\n- `include_tags` — `string[]` — HTML element names (not CSS selectors) to keep. When non-empty, only content within these elements is included in `html`/`markdown` output. Applied before `exclude_tags`. Does not affect `raw_html`.\n- `exclude_tags` — `string[]` — HTML element names (not CSS selectors) to strip from `html`/`markdown` output. Applied after `include_tags`. Does not affect `raw_html`.\n- `clean_markdown` — `boolean` — When true and `markdown` is in `formats`, the converted markdown is sent to Groq for cleaning before return. Graceful degradation on any Groq failure. Billing: 3× credits and bytes applied only when cleaning succeeds.\n- `cache_ttl` — `string | 0` — How long a freshly fetched URL may be served from cache. `'0'`/`0` skips the\ncache read (the result is still written), `'Nh'`/`'Nd'` set a TTL (capped at\n168h / 7d). Default `'48h'`. Honoured on both the synchronous and asynchronous\npaths; the async success envelope reports the outcome via the `cache` field.\n- `custom` — `Record<string, unknown>` — User-supplied JSON payload, echoed back on the success envelope so callers\ncan correlate the response to caller-side state (job IDs, batch metadata).\nCapped at 4096 UTF-8 bytes after JSON serialization. Does NOT affect\ncache-key inputs — two requests differing only in `custom` share the same\ncache slot."
466
461
  },
462
+ "sdk/typescript/scrape-bulk": {
463
+ "title": "Scrape Bulk",
464
+ "section": "SDK Reference",
465
+ "body": "# Scrape Bulk\n\nCreate and poll bulk scrape jobs.\n\n# Scrape Bulk\n\nCreate and poll bulk scrape jobs. Accessed via `client.scrape.bulk`.\n\n## create\n\n```ts\nclient.scrape.bulk.create(opts: ScrapeBulkCreateRequest, requestOptions?: RequestOptions): Promise<ScrapeBulkCreateResponse>\n```\n\nPOST /v1/scrape/bulk — create a bulk scrape job.\n\n`requestOptions` carries the CLIENT-side abort budget (`requestTimeoutMs`) and an\noptional caller `signal`; both override the constructor's `timeoutMs` default.\n\n## get\n\n```ts\nclient.scrape.bulk.get(id: BulkId, requestOptions?: RequestOptions): Promise<ScrapeBulkGetResponse>\n```\n\nGET /v1/scrape/bulk/\\{id\\} — get a bulk scrape job"
466
+ },
467
467
  "sdk/typescript/screenshots": {
468
468
  "title": "Screenshots",
469
469
  "section": "SDK Reference",