@hunt-labs/bytekit-mcp 0.1.0

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.
Files changed (123) hide show
  1. package/dist/__tests__/build-docs-bundle.test.d.ts +2 -0
  2. package/dist/__tests__/build-docs-bundle.test.d.ts.map +1 -0
  3. package/dist/__tests__/build-docs-bundle.test.js +133 -0
  4. package/dist/__tests__/build-docs-bundle.test.js.map +1 -0
  5. package/dist/__tests__/cli.test.d.ts +2 -0
  6. package/dist/__tests__/cli.test.d.ts.map +1 -0
  7. package/dist/__tests__/cli.test.js +41 -0
  8. package/dist/__tests__/cli.test.js.map +1 -0
  9. package/dist/__tests__/client.test.d.ts +2 -0
  10. package/dist/__tests__/client.test.d.ts.map +1 -0
  11. package/dist/__tests__/client.test.js +248 -0
  12. package/dist/__tests__/client.test.js.map +1 -0
  13. package/dist/__tests__/integration.test.d.ts +2 -0
  14. package/dist/__tests__/integration.test.d.ts.map +1 -0
  15. package/dist/__tests__/integration.test.js +116 -0
  16. package/dist/__tests__/integration.test.js.map +1 -0
  17. package/dist/__tests__/package-manifest.test.d.ts +2 -0
  18. package/dist/__tests__/package-manifest.test.d.ts.map +1 -0
  19. package/dist/__tests__/package-manifest.test.js +71 -0
  20. package/dist/__tests__/package-manifest.test.js.map +1 -0
  21. package/dist/__tests__/prompts.test.d.ts +2 -0
  22. package/dist/__tests__/prompts.test.d.ts.map +1 -0
  23. package/dist/__tests__/prompts.test.js +92 -0
  24. package/dist/__tests__/prompts.test.js.map +1 -0
  25. package/dist/__tests__/resources.test.d.ts +2 -0
  26. package/dist/__tests__/resources.test.d.ts.map +1 -0
  27. package/dist/__tests__/resources.test.js +67 -0
  28. package/dist/__tests__/resources.test.js.map +1 -0
  29. package/dist/__tests__/server-info.test.d.ts +2 -0
  30. package/dist/__tests__/server-info.test.d.ts.map +1 -0
  31. package/dist/__tests__/server-info.test.js +14 -0
  32. package/dist/__tests__/server-info.test.js.map +1 -0
  33. package/dist/__tests__/tools.test.d.ts +2 -0
  34. package/dist/__tests__/tools.test.d.ts.map +1 -0
  35. package/dist/__tests__/tools.test.js +452 -0
  36. package/dist/__tests__/tools.test.js.map +1 -0
  37. package/dist/cli.d.ts +28 -0
  38. package/dist/cli.d.ts.map +1 -0
  39. package/dist/cli.js +85 -0
  40. package/dist/cli.js.map +1 -0
  41. package/dist/client.d.ts +159 -0
  42. package/dist/client.d.ts.map +1 -0
  43. package/dist/client.js +167 -0
  44. package/dist/client.js.map +1 -0
  45. package/dist/docs-bundle/docs-bundle.json +472 -0
  46. package/dist/docs-bundle/helpers.d.ts +55 -0
  47. package/dist/docs-bundle/helpers.d.ts.map +1 -0
  48. package/dist/docs-bundle/helpers.js +104 -0
  49. package/dist/docs-bundle/helpers.js.map +1 -0
  50. package/dist/docs-bundle/load-bundle.d.ts +16 -0
  51. package/dist/docs-bundle/load-bundle.d.ts.map +1 -0
  52. package/dist/docs-bundle/load-bundle.js +26 -0
  53. package/dist/docs-bundle/load-bundle.js.map +1 -0
  54. package/dist/http.d.ts +27 -0
  55. package/dist/http.d.ts.map +1 -0
  56. package/dist/http.js +51 -0
  57. package/dist/http.js.map +1 -0
  58. package/dist/index.d.ts +21 -0
  59. package/dist/index.d.ts.map +1 -0
  60. package/dist/index.js +58 -0
  61. package/dist/index.js.map +1 -0
  62. package/dist/lib/truncate.d.ts +9 -0
  63. package/dist/lib/truncate.d.ts.map +1 -0
  64. package/dist/lib/truncate.js +27 -0
  65. package/dist/lib/truncate.js.map +1 -0
  66. package/dist/prompts/extract-structured-data.d.ts +3 -0
  67. package/dist/prompts/extract-structured-data.d.ts.map +1 -0
  68. package/dist/prompts/extract-structured-data.js +31 -0
  69. package/dist/prompts/extract-structured-data.js.map +1 -0
  70. package/dist/prompts/research-topic.d.ts +3 -0
  71. package/dist/prompts/research-topic.d.ts.map +1 -0
  72. package/dist/prompts/research-topic.js +40 -0
  73. package/dist/prompts/research-topic.js.map +1 -0
  74. package/dist/prompts/summarize-webpage.d.ts +3 -0
  75. package/dist/prompts/summarize-webpage.d.ts.map +1 -0
  76. package/dist/prompts/summarize-webpage.js +28 -0
  77. package/dist/prompts/summarize-webpage.js.map +1 -0
  78. package/dist/resources/account.d.ts +4 -0
  79. package/dist/resources/account.d.ts.map +1 -0
  80. package/dist/resources/account.js +16 -0
  81. package/dist/resources/account.js.map +1 -0
  82. package/dist/resources/screenshot.d.ts +4 -0
  83. package/dist/resources/screenshot.d.ts.map +1 -0
  84. package/dist/resources/screenshot.js +18 -0
  85. package/dist/resources/screenshot.js.map +1 -0
  86. package/dist/tools/__tests__/docs-tools.test.d.ts +8 -0
  87. package/dist/tools/__tests__/docs-tools.test.d.ts.map +1 -0
  88. package/dist/tools/__tests__/docs-tools.test.js +194 -0
  89. package/dist/tools/__tests__/docs-tools.test.js.map +1 -0
  90. package/dist/tools/__tests__/fixture-bundle.json +27 -0
  91. package/dist/tools/get-account.d.ts +4 -0
  92. package/dist/tools/get-account.d.ts.map +1 -0
  93. package/dist/tools/get-account.js +45 -0
  94. package/dist/tools/get-account.js.map +1 -0
  95. package/dist/tools/get-doc.d.ts +3 -0
  96. package/dist/tools/get-doc.d.ts.map +1 -0
  97. package/dist/tools/get-doc.js +71 -0
  98. package/dist/tools/get-doc.js.map +1 -0
  99. package/dist/tools/get-result.d.ts +4 -0
  100. package/dist/tools/get-result.d.ts.map +1 -0
  101. package/dist/tools/get-result.js +44 -0
  102. package/dist/tools/get-result.js.map +1 -0
  103. package/dist/tools/list-docs.d.ts +3 -0
  104. package/dist/tools/list-docs.d.ts.map +1 -0
  105. package/dist/tools/list-docs.js +33 -0
  106. package/dist/tools/list-docs.js.map +1 -0
  107. package/dist/tools/scrape-url.d.ts +4 -0
  108. package/dist/tools/scrape-url.d.ts.map +1 -0
  109. package/dist/tools/scrape-url.js +57 -0
  110. package/dist/tools/scrape-url.js.map +1 -0
  111. package/dist/tools/screenshot-url.d.ts +4 -0
  112. package/dist/tools/screenshot-url.d.ts.map +1 -0
  113. package/dist/tools/screenshot-url.js +59 -0
  114. package/dist/tools/screenshot-url.js.map +1 -0
  115. package/dist/tools/search-docs.d.ts +3 -0
  116. package/dist/tools/search-docs.d.ts.map +1 -0
  117. package/dist/tools/search-docs.js +96 -0
  118. package/dist/tools/search-docs.js.map +1 -0
  119. package/dist/tools/web-search.d.ts +11 -0
  120. package/dist/tools/web-search.d.ts.map +1 -0
  121. package/dist/tools/web-search.js +76 -0
  122. package/dist/tools/web-search.js.map +1 -0
  123. package/package.json +49 -0
@@ -0,0 +1,472 @@
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, so a legacy setup keeps\nworking:\n\n1. `--api-key <key>` flag\n2. `BYTEKIT_API_KEY` environment variable\n3. `RAPIDCRAWL_API_KEY` environment variable (legacy fallback)\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 @bytekit/sdk`\n- [Python SDK](https://bytekit.com/docs/libraries/python) — `pip install bytekit`\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
+ "api": {
23
+ "title": "API Reference",
24
+ "section": "API Reference",
25
+ "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
+ },
27
+ "guides/authentication": {
28
+ "title": "Authentication",
29
+ "section": "Guides",
30
+ "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"
31
+ },
32
+ "guides/errors": {
33
+ "title": "Errors",
34
+ "section": "Guides",
35
+ "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"
36
+ },
37
+ "guides/monitors": {
38
+ "title": "Monitors",
39
+ "section": "Guides",
40
+ "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"
41
+ },
42
+ "guides/rate-limits": {
43
+ "title": "Rate Limits",
44
+ "section": "Guides",
45
+ "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"
46
+ },
47
+ "guides/scraping": {
48
+ "title": "Scraping",
49
+ "section": "Guides",
50
+ "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"
51
+ },
52
+ "cli/account": {
53
+ "title": "Account",
54
+ "section": "General",
55
+ "body": "# Account\n\nAccount and API key operations\n\nAccount and API key operations\n\n### account › api-keys\n\nAPI key management\n\n| Option | Description |\n| --- | --- |\n| `-h, --help` | display help for command |\n\n#### account › api-keys › create\n\nCreate a new API key\n\n| Option | Description |\n| --- | --- |\n| `--name <name>` | Display name for the key |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit account api-keys create --name <name>\n```\n\n#### account › api-keys › list\n\nList all API keys\n\n| Option | Description |\n| --- | --- |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit account api-keys list\n```\n\n#### account › api-keys › get\n\nGet an API key by ID\n\n| Option | Description |\n| --- | --- |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit account api-keys get <id>\n```\n\n#### account › api-keys › update\n\nUpdate an API key\n\n| Option | Description |\n| --- | --- |\n| `--name <name>` | New display name |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit account api-keys update <id> --name <name>\n```\n\n#### account › api-keys › revoke\n\nRevoke an API key (idempotent)\n\n| Option | Description |\n| --- | --- |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit account api-keys revoke <id>\n```\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```"
56
+ },
57
+ "cli/bulk": {
58
+ "title": "Bulk",
59
+ "section": "General",
60
+ "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 |\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```"
61
+ },
62
+ "cli/fetch": {
63
+ "title": "Fetch",
64
+ "section": "General",
65
+ "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 |\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 |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit fetch create --url <url> --format <format>\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 |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit fetch get --url <url> --format <format>\n```"
66
+ },
67
+ "cli": {
68
+ "title": "Install & Authenticate",
69
+ "section": "General",
70
+ "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 @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 `RAPIDCRAWL_API_KEY` once and every command picks it up automatically:\n\n```bash\nexport RAPIDCRAWL_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 → `RAPIDCRAWL_API_KEY` environment variable.\nIf neither is set, the command exits with `Error: API key required. Pass --key or set RAPIDCRAWL_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 `RAPIDCRAWL_API_KEY`. |\n| `--base-url <url>` | Override the API base URL (or set `RAPIDCRAWL_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."
71
+ },
72
+ "cli/monitors": {
73
+ "title": "Monitors",
74
+ "section": "General",
75
+ "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 |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit monitors create --url <url> --interval-type <type> --webhook-url <url> --cron <expr>\n```\n\n### monitors › list\n\nList all monitors\n\n| Option | Description |\n| --- | --- |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit monitors list\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\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. |\n| `--webhook-url <url>` | New HTTPS webhook URL |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit monitors update <id> --interval-type <type> --cron <expr> --webhook-url <url>\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```"
76
+ },
77
+ "cli/recordings": {
78
+ "title": "Recordings",
79
+ "section": "General",
80
+ "body": "# Recordings\n\nRecording operations\n\nRecording operations\n\n### recordings › create\n\nStart a page recording\n\n| Option | Description |\n| --- | --- |\n| `--url <url>` | URL to record |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit recordings create --url <url>\n```\n\n### recordings › get\n\nGet a recording by ID\n\n| Option | Description |\n| --- | --- |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit recordings get <id>\n```"
81
+ },
82
+ "cli/scrape": {
83
+ "title": "Scrape",
84
+ "section": "General",
85
+ "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 |\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 (e.g. markdown, html); sent as the formats |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit scrape create --url <url> --format <format>\n```\n\n### scrape › get\n\nGet a scrape job by ID\n\n| Option | Description |\n| --- | --- |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit scrape get <id>\n```"
86
+ },
87
+ "cli/screenshots": {
88
+ "title": "Screenshots",
89
+ "section": "General",
90
+ "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| `-h, --help` | display help for command |\n\n```bash\n$ bytekit screenshots create --url <url> --full-page\n```\n\n### screenshots › get\n\nGet a screenshot by ID\n\n| Option | Description |\n| --- | --- |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit screenshots get <id>\n```"
91
+ },
92
+ "cli/sitemap": {
93
+ "title": "Sitemap",
94
+ "section": "General",
95
+ "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| `-h, --help` | display help for command |\n\n```bash\n$ bytekit sitemap create --url <url>\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```"
96
+ },
97
+ "libraries/go": {
98
+ "title": "Go",
99
+ "section": "General",
100
+ "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."
101
+ },
102
+ "libraries/python": {
103
+ "title": "Python SDK",
104
+ "section": "General",
105
+ "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\n```\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."
106
+ },
107
+ "libraries/typescript": {
108
+ "title": "TypeScript SDK",
109
+ "section": "General",
110
+ "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 @bytekit/sdk\n```\n\n## Initialize\n\n```ts\nimport { RapidCrawl } from '@bytekit/sdk';\n\nconst client = new RapidCrawl({\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 `RapidCrawlError` carrying the HTTP `status` and the API\n`error.code`:\n\n```ts\nimport { RapidCrawl, RapidCrawlError } from '@bytekit/sdk';\n\ntry {\n await client.scrape.create({ url: 'https://example.com' });\n} catch (err) {\n if (err instanceof RapidCrawlError) {\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`, `recordings`, `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."
111
+ },
112
+ "api/account/getaccount": {
113
+ "title": "Get account details",
114
+ "section": "API Reference",
115
+ "body": "# Get account details\n\nReturns account, plan, and current API key details, including the\n`api_key` and `subscription` fields.\n"
116
+ },
117
+ "api/account": {
118
+ "title": "Account",
119
+ "section": "API Reference",
120
+ "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
+ },
122
+ "api/fetch-bulk/createfetchbulk": {
123
+ "title": "Bulk fetch URLs",
124
+ "section": "API Reference",
125
+ "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"
126
+ },
127
+ "api/fetch-bulk/getfetchbulk": {
128
+ "title": "Get fetch bulk job status",
129
+ "section": "API Reference",
130
+ "body": "# Get fetch bulk job status"
131
+ },
132
+ "api/fetch-bulk": {
133
+ "title": "Fetch Bulk",
134
+ "section": "API Reference",
135
+ "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"
136
+ },
137
+ "api/fetch/getfetch": {
138
+ "title": "Fetch a URL (GET)",
139
+ "section": "API Reference",
140
+ "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"
141
+ },
142
+ "api/fetch": {
143
+ "title": "Fetch",
144
+ "section": "API Reference",
145
+ "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"
146
+ },
147
+ "api/fetch/postfetch": {
148
+ "title": "Fetch a URL (POST)",
149
+ "section": "API Reference",
150
+ "body": "# Fetch a URL (POST)\n\nSame as GET /v1/fetch but with a JSON request body."
151
+ },
152
+ "api/bulk/createbulk": {
153
+ "title": "Create mixed bulk job",
154
+ "section": "API Reference",
155
+ "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"
156
+ },
157
+ "api/bulk/deletebulk": {
158
+ "title": "Cancel a bulk job",
159
+ "section": "API Reference",
160
+ "body": "# Cancel a bulk job\n\nCancels an in-flight bulk job: drains its still-queued (pending) child jobs and refunds the quota held for exactly those drained children. Children already completed, failed, or in progress are untouched and keep their charge. Idempotent — cancelling an already-terminal job (completed, failed, or cancelled) is a no-op that returns 200 with the job's real, unchanged status and refunds nothing."
161
+ },
162
+ "api/bulk/getbulk": {
163
+ "title": "Get bulk job status",
164
+ "section": "API Reference",
165
+ "body": "# Get bulk job status"
166
+ },
167
+ "api/bulk": {
168
+ "title": "Bulk",
169
+ "section": "API Reference",
170
+ "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"
171
+ },
172
+ "api/bulk/listbulk": {
173
+ "title": "List in-flight bulk jobs",
174
+ "section": "API Reference",
175
+ "body": "# List in-flight bulk jobs\n\nReturns the caller's bulk jobs, most recent first. Optionally filter\nto a single status; when omitted, jobs of every status are returned.\n"
176
+ },
177
+ "api/bulk/listbulkscreenshots": {
178
+ "title": "List bulk job items",
179
+ "section": "API Reference",
180
+ "body": "# List bulk job items"
181
+ },
182
+ "api/health/healthcheck": {
183
+ "title": "Health check",
184
+ "section": "API Reference",
185
+ "body": "# Health check"
186
+ },
187
+ "api/health": {
188
+ "title": "Health",
189
+ "section": "API Reference",
190
+ "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"
191
+ },
192
+ "api/monitors/createmonitor": {
193
+ "title": "Create a change-detection monitor",
194
+ "section": "API Reference",
195
+ "body": "# Create a change-detection monitor\n\nCreates a recurring change-detection monitor for a URL, delivering results via webhook.\n"
196
+ },
197
+ "api/monitors/deletemonitor": {
198
+ "title": "Cancel monitor",
199
+ "section": "API Reference",
200
+ "body": "# Cancel monitor"
201
+ },
202
+ "api/monitors/getmonitor": {
203
+ "title": "Get monitor",
204
+ "section": "API Reference",
205
+ "body": "# Get monitor"
206
+ },
207
+ "api/monitors": {
208
+ "title": "Monitors",
209
+ "section": "API Reference",
210
+ "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"
211
+ },
212
+ "api/monitors/listmonitorcaptures": {
213
+ "title": "List monitor captures",
214
+ "section": "API Reference",
215
+ "body": "# List monitor captures"
216
+ },
217
+ "api/monitors/listmonitors": {
218
+ "title": "List monitors",
219
+ "section": "API Reference",
220
+ "body": "# List monitors"
221
+ },
222
+ "api/monitors/updatemonitor": {
223
+ "title": "Update monitor",
224
+ "section": "API Reference",
225
+ "body": "# Update monitor"
226
+ },
227
+ "api/schema/createschemaextraction": {
228
+ "title": "Schema-driven structured extraction",
229
+ "section": "API Reference",
230
+ "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"
231
+ },
232
+ "api/schema": {
233
+ "title": "Schema",
234
+ "section": "API Reference",
235
+ "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"
236
+ },
237
+ "api/plans": {
238
+ "title": "Plans",
239
+ "section": "API Reference",
240
+ "body": "# Plans\n\nPlans API — endpoints, requests, and responses.\n\nThe **Plans** API. 1 endpoint:\n\n- [List public plan catalog](https://bytekit.com/docs/api/plans/listplans) — GET /v1/plans"
241
+ },
242
+ "api/plans/listplans": {
243
+ "title": "List public plan catalog",
244
+ "section": "API Reference",
245
+ "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
+ },
247
+ "api/scrape/createscrape": {
248
+ "title": "Scrape a URL",
249
+ "section": "API Reference",
250
+ "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"
251
+ },
252
+ "api/scrape/getscrape": {
253
+ "title": "Get scrape result",
254
+ "section": "API Reference",
255
+ "body": "# Get scrape result\n\nAlways returns 200. Check the `status` discriminator for the scrape state."
256
+ },
257
+ "api/scrape": {
258
+ "title": "Scrape",
259
+ "section": "API Reference",
260
+ "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"
261
+ },
262
+ "api/scrape-bulk/createscrapebulk": {
263
+ "title": "Bulk scrape URLs",
264
+ "section": "API Reference",
265
+ "body": "# Bulk 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"
266
+ },
267
+ "api/scrape-bulk/getscrapebulk": {
268
+ "title": "Get scrape bulk job status",
269
+ "section": "API Reference",
270
+ "body": "# Get scrape bulk job status"
271
+ },
272
+ "api/scrape-bulk": {
273
+ "title": "Scrape Bulk",
274
+ "section": "API Reference",
275
+ "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"
276
+ },
277
+ "api/screenshots/createscreenshot": {
278
+ "title": "Capture a screenshot",
279
+ "section": "API Reference",
280
+ "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"
281
+ },
282
+ "api/screenshots/getscreenshot": {
283
+ "title": "Get screenshot status",
284
+ "section": "API Reference",
285
+ "body": "# Get screenshot status"
286
+ },
287
+ "api/screenshots": {
288
+ "title": "Screenshots",
289
+ "section": "API Reference",
290
+ "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"
291
+ },
292
+ "api/search/createsearch": {
293
+ "title": "Search the web",
294
+ "section": "API Reference",
295
+ "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"
296
+ },
297
+ "api/search": {
298
+ "title": "Search",
299
+ "section": "API Reference",
300
+ "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"
301
+ },
302
+ "api/sitemap/createsitemap": {
303
+ "title": "Discover URLs on a domain",
304
+ "section": "API Reference",
305
+ "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"
306
+ },
307
+ "api/sitemap/getsitemap": {
308
+ "title": "Get sitemap job status",
309
+ "section": "API Reference",
310
+ "body": "# Get sitemap job status"
311
+ },
312
+ "api/sitemap": {
313
+ "title": "Sitemap",
314
+ "section": "API Reference",
315
+ "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"
316
+ },
317
+ "api/usage/getusage": {
318
+ "title": "Get current billing period usage",
319
+ "section": "API Reference",
320
+ "body": "# Get current billing period usage"
321
+ },
322
+ "api/usage/getusagebyendpoint": {
323
+ "title": "Get per-endpoint bandwidth breakdown",
324
+ "section": "API Reference",
325
+ "body": "# Get per-endpoint bandwidth breakdown\n\nReturns bandwidth usage broken down by endpoint (screenshots, recordings, scrape, scrape_md, fetch, fetch_md, crawl, crawl_links, sitemap, monitors) for a date range. Each row carries raw bytes, the billing multiplier, and billable bytes. Endpoints with zero raw bytes for the range are omitted from `rows`; `totals` is always present. Default range is the last 30 days; max 366 days.\n"
326
+ },
327
+ "api/usage/getusagedaily": {
328
+ "title": "Get daily usage breakdown",
329
+ "section": "API Reference",
330
+ "body": "# Get daily usage breakdown\n\nDefault range is last 30 days. Max range is 366 days."
331
+ },
332
+ "api/usage": {
333
+ "title": "Usage",
334
+ "section": "API Reference",
335
+ "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"
336
+ },
337
+ "api/webhooks": {
338
+ "title": "Webhooks",
339
+ "section": "API Reference",
340
+ "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"
341
+ },
342
+ "api/webhooks/listwebhookdeliveries": {
343
+ "title": "List webhook deliveries",
344
+ "section": "API Reference",
345
+ "body": "# List webhook deliveries"
346
+ },
347
+ "api/webhooks/retrywebhookdelivery": {
348
+ "title": "Retry a webhook delivery",
349
+ "section": "API Reference",
350
+ "body": "# Retry a webhook delivery\n\nRequeues a failed or exhausted webhook delivery for another attempt."
351
+ },
352
+ "sdk/python/account": {
353
+ "title": "Account",
354
+ "section": "SDK Reference",
355
+ "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## Create API Key\n\nCreate API key\n\nReturns the plaintext key exactly once. Max 50 active keys per account.\n\n**Parameters**\n\n- `body (CreateApiKeyBody | Unset)`\n\n**Call styles**\n\n```python\nsync_detailed(client=client, body=body) -> Response[ApiKeyCreatedResponse | Error]\nsync(client=client, body=body) -> ApiKeyCreatedResponse | Error | None\nawait asyncio_detailed(client=client, body=body) -> Response[ApiKeyCreatedResponse | Error]\nawait asyncio(client=client, body=body) -> ApiKeyCreatedResponse | Error | None\n```\n\n## Get Account\n\nGet account details\n\nReturns account, plan, and current API key details, including the `api_key` and `subscription`\nfields.\n\n**Call styles**\n\n```python\nsync_detailed(client=client) -> Response[GetAccountResponse200]\nsync(client=client) -> GetAccountResponse200 | None\nawait asyncio_detailed(client=client) -> Response[GetAccountResponse200]\nawait asyncio(client=client) -> GetAccountResponse200 | None\n```\n\n## Get API Key\n\nGet API key\n\n**Parameters**\n\n- `id (str)`\n\n**Call styles**\n\n```python\nsync_detailed(id=id, client=client) -> Response[ApiKeyResponse | Error]\nsync(id=id, client=client) -> ApiKeyResponse | Error | None\nawait asyncio_detailed(id=id, client=client) -> Response[ApiKeyResponse | Error]\nawait asyncio(id=id, client=client) -> ApiKeyResponse | Error | None\n```\n\n## List API Keys\n\nList API keys\n\n**Parameters**\n\n- `include_revoked (bool | Unset): Default: False.`\n\n**Call styles**\n\n```python\nsync_detailed(client=client, include_revoked=include_revoked) -> Response[ListApiKeysResponse200]\nsync(client=client, include_revoked=include_revoked) -> ListApiKeysResponse200 | None\nawait asyncio_detailed(client=client, include_revoked=include_revoked) -> Response[ListApiKeysResponse200]\nawait asyncio(client=client, include_revoked=include_revoked) -> ListApiKeysResponse200 | None\n```\n\n## Reveal API Key\n\nReveal API key\n\nDecrypts and returns the plaintext API key. Only available when reveal_available is true.\n\n**Parameters**\n\n- `id (str)`\n\n**Call styles**\n\n```python\nsync_detailed(id=id, client=client) -> Response[ApiKeyRevealResponse | Error]\nsync(id=id, client=client) -> ApiKeyRevealResponse | Error | None\nawait asyncio_detailed(id=id, client=client) -> Response[ApiKeyRevealResponse | Error]\nawait asyncio(id=id, client=client) -> ApiKeyRevealResponse | Error | None\n```\n\n## Revoke API Key\n\nRevoke API key\n\nIdempotent — returns 204 even if already revoked.\n\n**Parameters**\n\n- `id (str)`\n\n**Call styles**\n\n```python\nsync_detailed(id=id, client=client) -> Response[Any | Error]\nsync(id=id, client=client) -> Any | Error | None\nawait asyncio_detailed(id=id, client=client) -> Response[Any | Error]\nawait asyncio(id=id, client=client) -> Any | Error | None\n```\n\n## Update API Key\n\nRename API key\n\n**Parameters**\n\n- `id (str)`\n- `body (UpdateApiKeyBody)`\n\n**Call styles**\n\n```python\nsync_detailed(id=id, client=client, body=body) -> Response[ApiKeyResponse | Error]\nsync(id=id, client=client, body=body) -> ApiKeyResponse | Error | None\nawait asyncio_detailed(id=id, client=client, body=body) -> Response[ApiKeyResponse | Error]\nawait asyncio(id=id, client=client, body=body) -> ApiKeyResponse | Error | None\n```"
356
+ },
357
+ "sdk/python/bulk": {
358
+ "title": "Bulk",
359
+ "section": "SDK Reference",
360
+ "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, recordings, or scrapes in a single batch.\nProvide `urls` (simple list) or `items` (per-item config), not both.\n\n**Parameters**\n\n- `body (CreateBulkBody)`\n\n**Call styles**\n\n```python\nsync_detailed(client=client, body=body) -> Response[CreateBulkResponse202]\nsync(client=client, body=body) -> CreateBulkResponse202 | None\nawait asyncio_detailed(client=client, body=body) -> Response[CreateBulkResponse202]\nawait asyncio(client=client, body=body) -> CreateBulkResponse202 | None\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[Error | GetBulkResponse200]\nsync(id=id, client=client) -> Error | GetBulkResponse200 | None\nawait asyncio_detailed(id=id, client=client) -> Response[Error | GetBulkResponse200]\nawait asyncio(id=id, client=client) -> Error | GetBulkResponse200 | None\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) -> ListBulkScreenshotsResponse200 | None\nawait asyncio_detailed(id=id, client=client) -> Response[ListBulkScreenshotsResponse200]\nawait asyncio(id=id, client=client) -> ListBulkScreenshotsResponse200 | None\n```"
361
+ },
362
+ "sdk/python/client": {
363
+ "title": "Client",
364
+ "section": "SDK Reference",
365
+ "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.\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 configuration\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 set 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.\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### 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 configuration\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 set 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### search\n\n```python\nsearch(query: str, type: str | None = None, limit: int | None = None, country: str | None = None, language: str | None = None, date_range: str | None = None) -> 'CreateSearchResponse200'\n```\n\nRun a web search and return ranked organic results.\n\nThin convenience wrapper over the generated ``create_search`` operation:\nit builds the request body and delegates the HTTP work. All auth, URL\nconstruction, and error mapping live in the generated operation."
366
+ },
367
+ "sdk/python/fetch-bulk": {
368
+ "title": "Fetch Bulk",
369
+ "section": "SDK Reference",
370
+ "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[CreateFetchBulkResponse202]\nsync(client=client, body=body) -> CreateFetchBulkResponse202 | None\nawait asyncio_detailed(client=client, body=body) -> Response[CreateFetchBulkResponse202]\nawait asyncio(client=client, body=body) -> CreateFetchBulkResponse202 | None\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[Error | GetFetchBulkResponse200]\nsync(id=id, client=client) -> Error | GetFetchBulkResponse200 | None\nawait asyncio_detailed(id=id, client=client) -> Response[Error | GetFetchBulkResponse200]\nawait asyncio(id=id, client=client) -> Error | GetFetchBulkResponse200 | None\n```"
371
+ },
372
+ "sdk/python/fetch": {
373
+ "title": "Fetch",
374
+ "section": "SDK Reference",
375
+ "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. Response body IS the content; metadata 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_ (GetFetchFormat | Unset)`\n- `country (str | Unset): Default: 'US'.`\n- `timeout_ms (int | Unset): Default: 60000.`\n- `cache_ttl (GetFetchCacheTtlType1 | str | Unset): 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[str]\nsync(client=client, url_query=url_query, format_=format_, country=country, timeout_ms=timeout_ms, cache_ttl=cache_ttl) -> str | None\nawait asyncio_detailed(client=client, url_query=url_query, format_=format_, country=country, timeout_ms=timeout_ms, cache_ttl=cache_ttl) -> Response[str]\nawait asyncio(client=client, url_query=url_query, format_=format_, country=country, timeout_ms=timeout_ms, cache_ttl=cache_ttl) -> str | None\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[str]\nsync(client=client, body=body) -> str | None\nawait asyncio_detailed(client=client, body=body) -> Response[str]\nawait asyncio(client=client, body=body) -> str | None\n```"
376
+ },
377
+ "sdk/python/monitors": {
378
+ "title": "Monitors",
379
+ "section": "SDK Reference",
380
+ "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\n**Parameters**\n\n- `body (MonitorCreateRequest)`\n\n**Call styles**\n\n```python\nsync_detailed(client=client, body=body) -> Response[Error | MonitorResponse]\nsync(client=client, body=body) -> Error | MonitorResponse | None\nawait asyncio_detailed(client=client, body=body) -> Response[Error | MonitorResponse]\nawait asyncio(client=client, body=body) -> Error | MonitorResponse | None\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[Any | Error]\nsync(id=id, client=client) -> Any | Error | None\nawait asyncio_detailed(id=id, client=client) -> Response[Any | Error]\nawait asyncio(id=id, client=client) -> Any | Error | None\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[Error | MonitorResponse]\nsync(id=id, client=client) -> Error | MonitorResponse | None\nawait asyncio_detailed(id=id, client=client) -> Response[Error | MonitorResponse]\nawait asyncio(id=id, client=client) -> Error | MonitorResponse | None\n```\n\n## List Monitor Captures\n\nList monitor captures\n\n**Parameters**\n\n- `id (str)`\n- `limit (int | Unset): Default: 25.`\n- `cursor (str | Unset)`\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) -> ListMonitorCapturesResponse200 | None\nawait asyncio_detailed(id=id, client=client, limit=limit, cursor=cursor) -> Response[ListMonitorCapturesResponse200]\nawait asyncio(id=id, client=client, limit=limit, cursor=cursor) -> ListMonitorCapturesResponse200 | None\n```\n\n## List Monitors\n\nList monitors\n\n**Parameters**\n\n- `limit (int | Unset): Default: 25.`\n- `cursor (str | Unset)`\n- `status (ListMonitorsStatus | Unset): 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) -> ListMonitorsResponse200 | None\nawait asyncio_detailed(client=client, limit=limit, cursor=cursor, status=status) -> Response[ListMonitorsResponse200]\nawait asyncio(client=client, limit=limit, cursor=cursor, status=status) -> ListMonitorsResponse200 | None\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[Error | MonitorResponse]\nsync(id=id, client=client, body=body) -> Error | MonitorResponse | None\nawait asyncio_detailed(id=id, client=client, body=body) -> Response[Error | MonitorResponse]\nawait asyncio(id=id, client=client, body=body) -> Error | MonitorResponse | None\n```"
381
+ },
382
+ "sdk/python/recordings": {
383
+ "title": "Recordings",
384
+ "section": "SDK Reference",
385
+ "body": "# Recordings\n\nAPI functions for the Recordings resource.\n\n# Recordings\n\nFunctions for interacting with the `recordings` API resource. Each operation ships in four forms — `sync` / `sync_detailed` and their `async` counterparts.\n\n## Create Recording\n\nCreate a scrolling recording\n\nAlways async — returns 202. Poll via GET /v1/recordings/\\{id\\}.\n\n**Parameters**\n\n- `body (RecordingRequest)`\n\n**Call styles**\n\n```python\nsync_detailed(client=client, body=body) -> Response[Error | RecordingResponse]\nsync(client=client, body=body) -> Error | RecordingResponse | None\nawait asyncio_detailed(client=client, body=body) -> Response[Error | RecordingResponse]\nawait asyncio(client=client, body=body) -> Error | RecordingResponse | None\n```\n\n## Get Recording\n\nGet recording status\n\n**Parameters**\n\n- `id (str)`\n\n**Call styles**\n\n```python\nsync_detailed(id=id, client=client) -> Response[Error | RecordingResponse]\nsync(id=id, client=client) -> Error | RecordingResponse | None\nawait asyncio_detailed(id=id, client=client) -> Response[Error | RecordingResponse]\nawait asyncio(id=id, client=client) -> Error | RecordingResponse | None\n```"
386
+ },
387
+ "sdk/python/scrape-bulk": {
388
+ "title": "Scrape Bulk",
389
+ "section": "SDK Reference",
390
+ "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.\n\n**Parameters**\n\n- `body (CreateScrapeBulkBody)`\n\n**Call styles**\n\n```python\nsync_detailed(client=client, body=body) -> Response[CreateScrapeBulkResponse202]\nsync(client=client, body=body) -> CreateScrapeBulkResponse202 | None\nawait asyncio_detailed(client=client, body=body) -> Response[CreateScrapeBulkResponse202]\nawait asyncio(client=client, body=body) -> CreateScrapeBulkResponse202 | None\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[Error | GetScrapeBulkResponse200]\nsync(id=id, client=client) -> Error | GetScrapeBulkResponse200 | None\nawait asyncio_detailed(id=id, client=client) -> Response[Error | GetScrapeBulkResponse200]\nawait asyncio(id=id, client=client) -> Error | GetScrapeBulkResponse200 | None\n```"
391
+ },
392
+ "sdk/python/scrape": {
393
+ "title": "Scrape",
394
+ "section": "SDK Reference",
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\nwrapped in a ScrapeEnvelope. Most requests return synchronously in under a second;\nrequests that need a full page render (cookies, wait conditions) return\nasynchronously, typically within a few seconds.\n\n**Parameters**\n\n- `body (ScrapeRequest)`\n\n**Call styles**\n\n```python\nsync_detailed(client=client, body=body) -> Response[ScrapeErrorEnvelope | ScrapeQueuedEnvelope | ScrapeSuccessEnvelope]\nsync(client=client, body=body) -> ScrapeErrorEnvelope | ScrapeQueuedEnvelope | ScrapeSuccessEnvelope | None\nawait asyncio_detailed(client=client, body=body) -> Response[ScrapeErrorEnvelope | ScrapeQueuedEnvelope | ScrapeSuccessEnvelope]\nawait asyncio(client=client, body=body) -> ScrapeErrorEnvelope | ScrapeQueuedEnvelope | ScrapeSuccessEnvelope | None\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[Error | ScrapeErrorEnvelope | ScrapeQueuedEnvelope | ScrapeSuccessEnvelope]\nsync(id=id, client=client) -> Error | ScrapeErrorEnvelope | ScrapeQueuedEnvelope | ScrapeSuccessEnvelope | None\nawait asyncio_detailed(id=id, client=client) -> Response[Error | ScrapeErrorEnvelope | ScrapeQueuedEnvelope | ScrapeSuccessEnvelope]\nawait asyncio(id=id, client=client) -> Error | ScrapeErrorEnvelope | ScrapeQueuedEnvelope | ScrapeSuccessEnvelope | None\n```"
396
+ },
397
+ "sdk/python/screenshots": {
398
+ "title": "Screenshots",
399
+ "section": "SDK Reference",
400
+ "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_ (bool | Unset): Default: False.`\n- `body (ScreenshotRequest)`\n\n**Call styles**\n\n```python\nsync_detailed(client=client, body=body, async_=async_) -> Response[Error | ScreenshotResponse]\nsync(client=client, body=body, async_=async_) -> Error | ScreenshotResponse | None\nawait asyncio_detailed(client=client, body=body, async_=async_) -> Response[Error | ScreenshotResponse]\nawait asyncio(client=client, body=body, async_=async_) -> Error | ScreenshotResponse | None\n```\n\n## Get Screenshot\n\nGet screenshot status\n\n**Parameters**\n\n- `id (str)`\n\n**Call styles**\n\n```python\nsync_detailed(id=id, client=client) -> Response[Error | ScreenshotResponse]\nsync(id=id, client=client) -> Error | ScreenshotResponse | None\nawait asyncio_detailed(id=id, client=client) -> Response[Error | ScreenshotResponse]\nawait asyncio(id=id, client=client) -> Error | ScreenshotResponse | None\n```"
401
+ },
402
+ "sdk/python/search": {
403
+ "title": "Search",
404
+ "section": "SDK Reference",
405
+ "body": "# Search\n\nAPI functions for the Search resource.\n\n# Search\n\nFunctions for interacting with the `search` API resource. Each operation ships in four forms — `sync` / `sync_detailed` and their `async` counterparts.\n\n## Create Search\n\nSearch the web\n\nRuns a web search for `query` and returns ranked organic results with\ncontiguous `position` values from 1.\n\nUse `limit` (1–100, default 10) to request more results in a single\ncall. Results are fetched in pages of 10, so a call consumes\n`ceil(limit / 10)` credits (capped at 10) from the account's monthly\ncredits bucket — for example `limit=10` costs 1 credit and `limit=35`\ncosts 4. Credits are charged for every page fetched regardless of how\nmany results a page returns. The credit count is reported as\n`credits_used` in the response.\n\n**Parameters**\n\n- `body (CreateSearchBody)`\n\n**Call styles**\n\n```python\nsync_detailed(client=client, body=body) -> Response[CreateSearchResponse200 | Error]\nsync(client=client, body=body) -> CreateSearchResponse200 | Error | None\nawait asyncio_detailed(client=client, body=body) -> Response[CreateSearchResponse200 | Error]\nawait asyncio(client=client, body=body) -> CreateSearchResponse200 | Error | None\n```"
406
+ },
407
+ "sdk/python/sitemap": {
408
+ "title": "Sitemap",
409
+ "section": "SDK Reference",
410
+ "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.\n\n**Parameters**\n\n- `body (SitemapRequest)`\n\n**Call styles**\n\n```python\nsync_detailed(client=client, body=body) -> Response[SitemapResponse]\nsync(client=client, body=body) -> SitemapResponse | None\nawait asyncio_detailed(client=client, body=body) -> Response[SitemapResponse]\nawait asyncio(client=client, body=body) -> SitemapResponse | None\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[Error | SitemapResponse]\nsync(id=id, client=client) -> Error | SitemapResponse | None\nawait asyncio_detailed(id=id, client=client) -> Response[Error | SitemapResponse]\nawait asyncio(id=id, client=client) -> Error | SitemapResponse | None\n```"
411
+ },
412
+ "sdk/typescript/account": {
413
+ "title": "Account",
414
+ "section": "SDK Reference",
415
+ "body": "# Account\n\nAccount info and API key management.\n\n# Account\n\nAccount info and API key management. Accessed via `client.account`.\n\n## get\n\n```ts\nclient.account.get(): Promise<unknown>\n```\n\nGET /v1/account — get the authenticated account\n\n## apiKeys\n\n### create\n\n```ts\nclient.account.apiKeys.create(opts: Record<string, unknown>): Promise<unknown>\n```\n\nPOST /v1/account/api-keys — create a new API key\n\n### list\n\n```ts\nclient.account.apiKeys.list(): Promise<unknown>\n```\n\nGET /v1/account/api-keys — list all API keys for the account\n\n### get\n\n```ts\nclient.account.apiKeys.get(id: ApiKeyId): Promise<unknown>\n```\n\nGET /v1/account/api-keys/\\{id\\} — get an API key by ID\n\n### update\n\n```ts\nclient.account.apiKeys.update(id: ApiKeyId, opts: Record<string, unknown>): Promise<unknown>\n```\n\nPATCH /v1/account/api-keys/\\{id\\} — update an API key\n\n### revoke\n\n```ts\nclient.account.apiKeys.revoke(id: ApiKeyId): Promise<unknown>\n```\n\nDELETE /v1/account/api-keys/\\{id\\} — revoke an API key (idempotent)\n\n### reveal\n\n```ts\nclient.account.apiKeys.reveal(id: ApiKeyId): Promise<RevealApiKeyResponse>\n```\n\nPOST /v1/account/api-keys/\\{id\\}/reveal — reveal the plaintext API key value"
416
+ },
417
+ "sdk/typescript/bulk": {
418
+ "title": "Bulk",
419
+ "section": "SDK Reference",
420
+ "body": "# Bulk\n\nFan out many URLs in parallel with per-item webhooks.\n\n# Bulk\n\nFan out many URLs in parallel with per-item webhooks. Accessed via `client.bulk`.\n\n## create\n\n```ts\nclient.bulk.create(opts: Record<string, unknown>): Promise<unknown>\n```\n\nPOST /v1/bulk — create a bulk screenshots job\n\n## get\n\n```ts\nclient.bulk.get(id: BulkId): Promise<unknown>\n```\n\nGET /v1/bulk/\\{id\\} — get a bulk job status\n\n## cancel\n\n```ts\nclient.bulk.cancel(id: BulkId): Promise<unknown>\n```\n\nDELETE /v1/bulk/\\{id\\} — cancel an in-flight bulk job\n\n## screenshots\n\n### list\n\n```ts\nclient.bulk.screenshots.list(id: BulkId): Promise<unknown>\n```\n\nGET /v1/bulk/\\{id\\}/screenshots — list screenshots in a bulk job"
421
+ },
422
+ "sdk/typescript/client": {
423
+ "title": "Client",
424
+ "section": "SDK Reference",
425
+ "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 { RapidCrawl } from '@bytekit/sdk';\n\nconst client = new RapidCrawl({\n apiKey: process.env.BYTEKIT_API_KEY!, // your sk_live_… key\n});\n```\n\n## Options (`RapidCrawlOptions`)\n\n- `apiKey` (required) — `string`\n- `baseUrl` — `string` Defaults to `https://api.bytekit.com`.\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.recordings`](https://bytekit.com/docs/sdk/typescript/recordings) — Generate a scrolling video of a page.\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\n## Errors\n\nAny non-2xx response throws a `RapidCrawlError` carrying the HTTP `status` and the API `code`.\n\n```ts\nimport { RapidCrawl, RapidCrawlError } from '@bytekit/sdk';\n\ntry {\n await client.scrape.create({ url: 'https://example.com' });\n} catch (err) {\n if (err instanceof RapidCrawlError) {\n console.error(`${err.status} ${err.code}: ${err.message}`);\n }\n}\n```"
426
+ },
427
+ "sdk/typescript/fetch-bulk": {
428
+ "title": "Fetch Bulk",
429
+ "section": "SDK Reference",
430
+ "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: Record<string, unknown>): Promise<unknown>\n```\n\nPOST /v1/fetch/bulk — create a bulk fetch job\n\n## get\n\n```ts\nclient.fetch.bulk.get(id: BulkId): Promise<unknown>\n```\n\nGET /v1/fetch/bulk/\\{id\\} — get a bulk fetch job"
431
+ },
432
+ "sdk/typescript/fetch": {
433
+ "title": "Fetch",
434
+ "section": "SDK Reference",
435
+ "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): Promise<unknown>\n```\n\nPOST /v1/fetch — fetch URL content via POST body.\n\nReturns content directly (not ID-based).\n\n## get\n\n```ts\nclient.fetch.get(opts: FetchOpts): Promise<unknown>\n```\n\nGET /v1/fetch — fetch URL content via query params.\n\nReturns content directly (not ID-based).\n\n## Options (`FetchOpts`)\n\n- `url` (required) — `string`\n- `format` — `string`\n- `country` — `string`\n- `timeout_ms` — `number`\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."
436
+ },
437
+ "sdk/typescript/monitors": {
438
+ "title": "Monitors",
439
+ "section": "SDK Reference",
440
+ "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: Record<string, unknown>): Promise<unknown>\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(): Promise<unknown>\n```\n\nGET /v1/monitors — list all monitors for the account\n\n## get\n\n```ts\nclient.monitors.get(id: MonitorId): Promise<unknown>\n```\n\nGET /v1/monitors/\\{id\\} — get a monitor by ID\n\n## update\n\n```ts\nclient.monitors.update(id: MonitorId, opts: Record<string, unknown>): Promise<unknown>\n```\n\nPATCH /v1/monitors/\\{id\\} — update a monitor\n\n## delete\n\n```ts\nclient.monitors.delete(id: MonitorId): Promise<unknown>\n```\n\nDELETE /v1/monitors/\\{id\\} — delete a monitor\n\n## captures\n\n### list\n\n```ts\nclient.monitors.captures.list(id: MonitorId): Promise<unknown>\n```\n\nGET /v1/monitors/\\{id\\}/captures — list captures for a monitor"
441
+ },
442
+ "sdk/typescript/recordings": {
443
+ "title": "Recordings",
444
+ "section": "SDK Reference",
445
+ "body": "# Recordings\n\nGenerate a scrolling video of a page.\n\n# Recordings\n\nGenerate a scrolling video of a page. Accessed via `client.recordings`.\n\n## create\n\n```ts\nclient.recordings.create(opts: Record<string, unknown>): Promise<unknown>\n```\n\nPOST /v1/recordings — start a recording\n\n## get\n\n```ts\nclient.recordings.get(id: RecordingId): Promise<unknown>\n```\n\nGET /v1/recordings/\\{id\\} — poll a recording by ID"
446
+ },
447
+ "sdk/typescript/scrape-bulk": {
448
+ "title": "Scrape Bulk",
449
+ "section": "SDK Reference",
450
+ "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: Record<string, unknown>): Promise<unknown>\n```\n\nPOST /v1/scrape/bulk — create a bulk scrape job\n\n## get\n\n```ts\nclient.scrape.bulk.get(id: BulkId): Promise<unknown>\n```\n\nGET /v1/scrape/bulk/\\{id\\} — get a bulk scrape job"
451
+ },
452
+ "sdk/typescript/scrape": {
453
+ "title": "Scrape",
454
+ "section": "SDK Reference",
455
+ "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): Promise<unknown>\n```\n\nPOST /v1/scrape — create a scrape job\n\n## get\n\n```ts\nclient.scrape.get(id: ScrapeId): Promise<unknown>\n```\n\nGET /v1/scrape/\\{id\\} — poll a scrape by ID\n\n## Options (`ScrapeOpts`)\n\n- `url` (required) — `string`\n- `formats` — `Array<'raw_html' | 'html' | 'markdown' | 'links' | 'images'>`\n- `country` — `string`\n- `cookies` — `Array<Record<string, unknown>>`\n- `headers` — `Record<string, string>`\n- `delay_ms` — `number`\n- `timeout_ms` — `number`\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_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 a top-level `warnings` array of `ScrapeWarning` objects. Only effective when `markdown` is in `formats`.\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- `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."
456
+ },
457
+ "sdk/typescript/screenshots": {
458
+ "title": "Screenshots",
459
+ "section": "SDK Reference",
460
+ "body": "# Screenshots\n\nCapture full-page or viewport screenshots.\n\n# Screenshots\n\nCapture full-page or viewport screenshots. Accessed via `client.screenshots`.\n\n## create\n\n```ts\nclient.screenshots.create(opts: Record<string, unknown>): Promise<unknown>\n```\n\nPOST /v1/screenshots — capture a screenshot\n\n## get\n\n```ts\nclient.screenshots.get(id: ScreenshotId): Promise<unknown>\n```\n\nGET /v1/screenshots/\\{id\\} — poll a screenshot by ID"
461
+ },
462
+ "sdk/typescript/search": {
463
+ "title": "Search",
464
+ "section": "SDK Reference",
465
+ "body": "# Search\n\nRun a web search and return ranked organic results.\n\n# Search\n\nRun a web search and return ranked organic results. Accessed via `client.search`.\n\n## query\n\n```ts\nclient.search.query(opts: SearchOpts): Promise<SearchResponse>\n```\n\nPOST /v1/search — run a web search and return ranked organic results."
466
+ },
467
+ "sdk/typescript/sitemap": {
468
+ "title": "Sitemap",
469
+ "section": "SDK Reference",
470
+ "body": "# Sitemap\n\nDiscover URLs from a domain's sitemap or by crawling.\n\n# Sitemap\n\nDiscover URLs from a domain's sitemap or by crawling. Accessed via `client.sitemap`.\n\n## create\n\n```ts\nclient.sitemap.create(opts: Record<string, unknown>): Promise<unknown>\n```\n\nPOST /v1/sitemap — start a sitemap crawl\n\n## get\n\n```ts\nclient.sitemap.get(id: SitemapId): Promise<unknown>\n```\n\nGET /v1/sitemap/\\{id\\} — get a sitemap job by ID"
471
+ }
472
+ }