@hunt-labs/bytekit-mcp 0.1.2 → 0.2.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.
- package/CHANGELOG.md +100 -0
- package/README.md +1 -3
- package/dist/cli.d.ts +19 -4
- package/dist/cli.js +24 -8
- package/dist/client.d.ts +34 -12
- package/dist/client.js +112 -17
- package/dist/docs-bundle/docs-bundle.json +80 -70
- package/dist/docs-bundle/load-bundle.d.ts +7 -4
- package/dist/docs-bundle/load-bundle.js +10 -5
- package/dist/docs-bundle/load-bundle.test.d.ts +9 -0
- package/dist/docs-bundle/load-bundle.test.js +50 -0
- package/dist/lib/render-screenshot.d.ts +18 -0
- package/dist/lib/render-screenshot.js +38 -0
- package/dist/tools/get-account.js +3 -1
- package/dist/tools/get-doc.js +1 -1
- package/dist/tools/get-result.js +4 -12
- package/dist/tools/screenshot-url.js +5 -17
- package/dist/tools/web-search.d.ts +1 -1
- package/dist/tools/web-search.js +2 -2
- package/package.json +5 -10
|
@@ -12,17 +12,12 @@
|
|
|
12
12
|
"mcp": {
|
|
13
13
|
"title": "MCP Server",
|
|
14
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
|
|
15
|
+
"body": "# MCP Server\n\nCall ByteKit web capture as a native tool from Claude, Cursor, and any MCP-compatible agent — hosted over HTTP or run locally over stdio.\n\nThe ByteKit **MCP server** exposes scraping, search, screenshots, and account\nlookups as [Model Context Protocol](https://modelcontextprotocol.io) tools. Your\nagent calls `scrape_url` or `screenshot_url` the same way it calls any other\ntool — no wrapper to write, no headless browser to manage.\n\nThere are two ways to connect: a **hosted HTTP endpoint** (nothing to install)\nand a **local stdio server** (`npx @hunt-labs/bytekit-mcp`).\n\n## Authentication\n\nBoth paths authenticate with a ByteKit API key. Sign up at\n[app.bytekit.com](https://app.bytekit.com) and create a key (prefixed\n`sk_live_`). The local server reads it from the `BYTEKIT_API_KEY` environment\nvariable (or the `--api-key` flag); the hosted endpoint takes it as a bearer\ntoken.\n\n## Option 1 — Hosted HTTP (no install)\n\nPoint any MCP client that speaks the Streamable HTTP transport at:\n\n```\nhttps://api.bytekit.com/mcp\n```\n\nSend your API key as a bearer token. Example client config (Claude Desktop,\nCursor, and most hosts accept this shape):\n\n```json\n{\n \"mcpServers\": {\n \"bytekit\": {\n \"url\": \"https://api.bytekit.com/mcp\",\n \"headers\": {\n \"Authorization\": \"Bearer $BYTEKIT_API_KEY\"\n }\n }\n }\n}\n```\n\n## Option 2 — Local stdio (`npx`)\n\nRun the server as a local subprocess over stdio. Nothing to install globally —\n`npx` fetches it on demand:\n\n```bash\nnpx @hunt-labs/bytekit-mcp --api-key $BYTEKIT_API_KEY\n```\n\nOr set the key in your environment and omit the flag:\n\n```bash\nexport BYTEKIT_API_KEY=sk_live_xxx\nnpx @hunt-labs/bytekit-mcp\n```\n\nClient config for a stdio server:\n\n```json\n{\n \"mcpServers\": {\n \"bytekit\": {\n \"command\": \"npx\",\n \"args\": [\"-y\", \"@hunt-labs/bytekit-mcp\"],\n \"env\": {\n \"BYTEKIT_API_KEY\": \"sk_live_xxx\"\n }\n }\n }\n}\n```\n\n### API-key resolution order\n\nThe local server resolves the key in this order:\n\n1. `--api-key <key>` flag\n2. `BYTEKIT_API_KEY` environment variable\n\n## Tool inventory\n\n| Tool | What it does |\n| --- | --- |\n| `scrape_url` | Fetch a URL and return HTML, clean markdown, links, or images. |\n| `web_search` | Run a web search and return ranked organic results. |\n| `screenshot_url` | Capture a screenshot of a page (desktop/mobile, PNG/JPEG). |\n| `get_result` | Fetch a previously created screenshot by id. |\n| `get_account` | Return account details, plan, and current usage/quota. |\n| `list_docs` | List every page in the bundled ByteKit documentation. |\n| `search_docs` | Search the bundled documentation. |\n| `get_doc` | Fetch the full markdown of one documentation page. |\n\nThe server also exposes **resources** (`bytekit://account`,\n`bytekit://screenshot/{id}`) and **prompts** (`summarize_webpage`,\n`extract_structured_data`, `research_topic`) that MCP hosts can surface directly.\n\n## Next steps\n\n- [Quickstart](https://bytekit.com/docs/quickstart) — make your first ByteKit API call.\n- [Authentication](https://bytekit.com/docs/guides/authentication) — key formats and management."
|
|
16
16
|
},
|
|
17
17
|
"quickstart": {
|
|
18
18
|
"title": "Quickstart",
|
|
19
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
|
|
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."
|
|
20
|
+
"body": "# Quickstart\n\nMake your first ByteKit API call in under 5 minutes — no SDK required.\n\nNothing to install. You only need `curl` and an API key.\n\n## Get an API key\n\nSign up at [app.bytekit.com](https://app.bytekit.com) and create an API key from the\ndashboard. Keys are prefixed `sk_live_`.\n\nSee [Authentication](https://bytekit.com/docs/guides/authentication) for details on key formats and management.\n\n## Make your first scrape\n\nSet your API key and run this — no file to save, no `chmod`:\n\n```bash\ncurl -X POST https://api.bytekit.com/v1/scrape \\\n -H \"Authorization: Bearer $BYTEKIT_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"url\":\"https://example.com\"}'\n```\n\nWant a full-featured script with error handling and `jq` formatting? Use this instead:\n\n<!-- example omitted: curl/scrape.sh (source unavailable) -->\n\nA successful response looks like this:\n\n```json\n{\n \"status\": \"success\",\n \"id\": \"sc_...\",\n \"url\": \"https://example.com\",\n \"finalUrl\": \"https://example.com/\",\n \"contentType\": \"text/html; charset=UTF-8\",\n \"contentLength\": 1256,\n \"statusCode\": 200,\n \"retrievedAt\": \"2025-01-15T12:00:00Z\",\n \"formats\": {\n \"markdown\": \"# Example Domain\\n\\nThis domain is for use in illustrative examples...\"\n },\n \"metadata\": {\n \"title\": \"Example Domain\"\n }\n}\n```\n\n`contentLength` is the compressed wire size in bytes (used for bandwidth billing). The `id`\nfield uses the `sc_` prefix — you can poll `GET /v1/scrape/{id}` if the scrape was queued\nasynchronously.\n\n## Prefer an SDK?\n\nSkip the raw HTTP and use an official client:\n\n- [TypeScript SDK](https://bytekit.com/docs/libraries/typescript) — `npm install @hunt-labs/bytekit-sdk`\n- [Python SDK](https://bytekit.com/docs/libraries/python) — `pip install bytekit`\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"
|
|
26
21
|
},
|
|
27
22
|
"guides/authentication": {
|
|
28
23
|
"title": "Authentication",
|
|
@@ -52,48 +47,53 @@
|
|
|
52
47
|
"cli/account": {
|
|
53
48
|
"title": "Account",
|
|
54
49
|
"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```"
|
|
50
|
+
"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 › reveal\n\nReveal an API key value (masked by default; use --show for plaintext)\n\n| Option | Description |\n| --- | --- |\n| `--show` | Print the full plaintext key instead of the masked form |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit account api-keys reveal <id> --show\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
51
|
},
|
|
57
52
|
"cli/bulk": {
|
|
58
53
|
"title": "Bulk",
|
|
59
54
|
"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```"
|
|
55
|
+
"body": "# Bulk\n\nBulk screenshot operations\n\nBulk screenshot operations\n\n### bulk › screenshots\n\nBulk screenshot sub-resources\n\n| Option | Description |\n| --- | --- |\n| `-h, --help` | display help for command |\n\n#### bulk › screenshots › list\n\nList screenshots in a bulk job\n\n| Option | Description |\n| --- | --- |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit bulk screenshots list <id>\n```\n\n### bulk › create\n\nCreate a bulk screenshots job\n\n| Option | Description |\n| --- | --- |\n| `--file <path>` | Path to newline-delimited file of URLs (plain URL or \\{\"url\":\"...\"\\} per line) |\n| `--webhook-url <url>` | HTTPS webhook URL notified when the job completes |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit bulk create --file <path> --webhook-url <url>\n```\n\n### bulk › get\n\nGet a bulk job status\n\n| Option | Description |\n| --- | --- |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit bulk get <id>\n```"
|
|
61
56
|
},
|
|
62
57
|
"cli/fetch": {
|
|
63
58
|
"title": "Fetch",
|
|
64
59
|
"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```"
|
|
60
|
+
"body": "# Fetch\n\nFetch URL content operations\n\nFetch URL content operations\n\n### fetch › bulk\n\nBulk fetch operations\n\n| Option | Description |\n| --- | --- |\n| `-h, --help` | display help for command |\n\n#### fetch › bulk › create\n\nCreate a bulk fetch job\n\n| Option | Description |\n| --- | --- |\n| `--file <path>` | Path to newline-delimited file of URLs (plain URL or \\{\"url\":\"...\"\\} per line) |\n| `--webhook-url <url>` | HTTPS webhook URL notified when the job completes |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit fetch bulk create --file <path> --webhook-url <url>\n```\n\n#### fetch › bulk › get\n\nGet a bulk fetch job\n\n| Option | Description |\n| --- | --- |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit fetch bulk get <id>\n```\n\n### fetch › create\n\nFetch URL content (POST)\n\n| Option | Description |\n| --- | --- |\n| `--url <url>` | URL to fetch |\n| `--format <format>` | Response format (markdown or html) |\n| `-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 (markdown or html) |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit fetch get --url <url> --format <format>\n```"
|
|
66
61
|
},
|
|
67
62
|
"cli": {
|
|
68
63
|
"title": "Install & Authenticate",
|
|
69
64
|
"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
|
|
65
|
+
"body": "# Install & Authenticate\n\nInstall the ByteKit CLI, authenticate, and learn the global flags shared by every command.\n\nThe `bytekit` CLI wraps the ByteKit API as shell subcommands — scrape, screenshot,\nrecord, monitor, and more, straight from your terminal.\n\n## Install\n\nInstall globally from npm:\n\n```bash\nnpm install -g @hunt-labs/bytekit-cli\n```\n\nThis puts the `bytekit` binary on your `PATH`. Verify the install:\n\n```bash\nbytekit --version\n```\n\n## Authenticate\n\nEvery command needs an API key. You can provide it two ways:\n\n**1. Environment variable (recommended)**\n\nSet `BYTEKIT_API_KEY` once and every command picks it up automatically:\n\n```bash\nexport BYTEKIT_API_KEY=\"sk_live_your_api_key_here\"\nbytekit scrape create --url https://example.com\n```\n\n**2. The `--key` flag**\n\nPass the key inline for a single command (overrides the env var):\n\n```bash\nbytekit scrape create --url https://example.com --key sk_live_your_api_key_here\n```\n\nThe resolution order is: `--key` flag → `BYTEKIT_API_KEY` environment variable.\nIf neither is set, the command exits with `Error: API key required. Pass --key or set BYTEKIT_API_KEY.`\n\n## Global flags\n\nThese flags are available on every command:\n\n| Flag | Description |\n| --- | --- |\n| `--key <key>` | API key for this invocation. Overrides `BYTEKIT_API_KEY`. |\n| `--base-url <url>` | Override the API base URL (or set `BYTEKIT_BASE_URL`). Useful for self-hosted or staging endpoints. |\n| `--json` | Print the raw JSON response instead of the formatted, human-readable output. |\n| `-V, --version` | Print the CLI version and exit. |\n| `-h, --help` | Show help for the program or a subcommand. |\n\nFor example, to point at a staging endpoint and get raw JSON:\n\n```bash\nbytekit scrape create --url https://example.com --base-url https://api-stg.bytekit.com --json\n```\n\n## Next steps\n\n- [Scrape](https://bytekit.com/docs/cli/scrape) — capture URL content as markdown, HTML, or structured data.\n- [Screenshots](https://bytekit.com/docs/cli/screenshots) — render full-page or viewport screenshots.\n- [Monitors](https://bytekit.com/docs/cli/monitors) — track page changes on a schedule.\n- [API Reference](https://bytekit.com/docs/api) — the underlying REST endpoints."
|
|
71
66
|
},
|
|
72
67
|
"cli/monitors": {
|
|
73
68
|
"title": "Monitors",
|
|
74
69
|
"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
|
|
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```"
|
|
70
|
+
"body": "# Monitors\n\nPage-change monitor operations\n\nPage-change monitor operations\n\nFirst-capture behavior is the same for both monitor types: the first capture is a silent baseline (`has_change: false`, `change_pct: null`) with no `change_detected` webhook, whether the monitor is `scrape` or `screenshot`. From the second capture onward both types diff against the previous capture.\n\n### monitors › captures\n\nMonitor capture sub-resources\n\n| Option | Description |\n| --- | --- |\n| `-h, --help` | display help for command |\n\n#### monitors › captures › list\n\nList captures for a monitor\n\n| Option | Description |\n| --- | --- |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit monitors captures list <id>\n```\n\n### monitors › create\n\nCreate a page-change monitor\n\n| Option | Description |\n| --- | --- |\n| `--url <url>` | URL to monitor |\n| `--interval-type <type>` | Check interval: hourly, daily, weekly, or cron |\n| `--webhook-url <url>` | HTTPS webhook URL notified on change |\n| `--cron <expr>` | Cron expression (required when --interval-type is cron, e.g. \"0 * * * *\") |\n| `-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| `--limit <n>` | Maximum number of monitors to return |\n| `--cursor <cursor>` | Pagination cursor from a previous page |\n| `--status <status>` | Filter by status: active, processing, paused, cancelled, suspended (default active) |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit monitors list --limit <n> --cursor <cursor> --status <status>\n```\n\n### monitors › get\n\nGet a monitor by ID\n\n| Option | Description |\n| --- | --- |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit monitors get <id>\n```\n\n### monitors › update\n\nUpdate a monitor\n\n| Option | Description |\n| --- | --- |\n| `--interval-type <type>` | New check interval: hourly, daily, weekly, or cron |\n| `--cron <expr>` | New cron expression (when interval-type is cron, e.g. \"0 * * * *\") |\n| `--webhook-url <url>` | New HTTPS webhook URL |\n| `-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```"
|
|
81
71
|
},
|
|
82
72
|
"cli/scrape": {
|
|
83
73
|
"title": "Scrape",
|
|
84
74
|
"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| `--raw` | Print the requested format body raw, with no JSON |\n| `-o, --output <file>` | Write the output to the given file path (implies --raw |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit scrape create --url <url> --format <format> --raw\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```"
|
|
75
|
+
"body": "# Scrape\n\nScrape URL content\n\nScrape URL content\n\n### scrape › bulk\n\nBulk scrape operations\n\n| Option | Description |\n| --- | --- |\n| `-h, --help` | display help for command |\n\n#### scrape › bulk › create\n\nCreate a bulk scrape job\n\n| Option | Description |\n| --- | --- |\n| `--file <path>` | Path to newline-delimited file of URLs (plain URL or \\{\"url\":\"...\"\\} per line) |\n| `--webhook-url <url>` | HTTPS webhook URL notified when the job completes |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit scrape bulk create --file <path> --webhook-url <url>\n```\n\n#### scrape › bulk › get\n\nGet a bulk scrape job\n\n| Option | Description |\n| --- | --- |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit scrape bulk get <id>\n```\n\n### scrape › create\n\nCreate a scrape job\n\n| Option | Description |\n| --- | --- |\n| `--url <url>` | URL to scrape |\n| `--format <format>` | Output format (e.g. markdown, html); sent as the formats array |\n| `--country <cc>` | Two-letter country code to route the request through (e.g. us, de) |\n| `--timeout-ms <n>` | Per-request timeout in milliseconds |\n| `--markdown-mode <mode>` | Markdown extraction mode: article, raw, llm |\n| `--async` | Queue the scrape and return a job envelope immediately (no wait) |\n| `--webhook-url <url>` | HTTPS webhook URL notified when an async scrape completes |\n| `--token-budget <n>` | Maximum tokens of markdown to return |\n| `--clean-markdown` | Post-process markdown with the LLM cleaner (billed 3x) |\n| `--include-tags <csv>` | Comma-separated HTML tags to keep (e.g. article,main) |\n| `--exclude-tags <csv>` | Comma-separated HTML tags to drop (e.g. nav,footer) |\n| `--mobile` | Render with a mobile viewport/user-agent |\n| `--raw` | Print the requested format body raw, with no JSON wrapper |\n| `-o, --output <file>` | Write the output to the given file path (implies --raw unless --json is set) |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit scrape create --url <url> --format <format> --country <cc> --timeout-ms <n> --markdown-mode <mode> --async --webhook-url <url> --token-budget <n> --clean-markdown --include-tags <csv> --exclude-tags <csv> --mobile --raw\n```\n\n### scrape › get\n\nGet a scrape job by ID\n\n| Option | Description |\n| --- | --- |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit scrape get <id>\n```"
|
|
86
76
|
},
|
|
87
77
|
"cli/screenshots": {
|
|
88
78
|
"title": "Screenshots",
|
|
89
79
|
"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```"
|
|
80
|
+
"body": "# Screenshots\n\nScreenshot operations\n\nScreenshot operations\n\n### screenshots › create\n\nCapture a screenshot\n\n| Option | Description |\n| --- | --- |\n| `--url <url>` | URL to screenshot |\n| `--full-page` | Capture the full page (default: viewport only) |\n| `--device <device>` | Device profile: desktop, mobile |\n| `--viewport <WxH>` | Viewport size WIDTHxHEIGHT (e.g. 1280x720) |\n| `--format <format>` | Image format: jpeg, png |\n| `--quality <n>` | JPEG quality (1-100) |\n| `--wait-until <event>` | Wait condition: load, domcontentloaded, networkidle |\n| `--clip <x,y,w,h>` | Clip region X,Y,WIDTH,HEIGHT (e.g. 0,0,800,600) |\n| `--async` | Queue the screenshot and return a job envelope immediately (no wait) |\n| `-o, --output <file>` | Download the captured image to this file path (use - for stdout). Not valid with --json. |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit screenshots create --url <url> --full-page --device <device> --viewport <WxH> --format <format> --quality <n> --wait-until <event> --clip <x,y,w,h> --async\n```\n\n### screenshots › get\n\nGet a screenshot by ID\n\n| Option | Description |\n| --- | --- |\n| `-o, --output <file>` | Download the captured image to this file path (use - for stdout). Not valid with --json. |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit screenshots get <id>\n```"
|
|
81
|
+
},
|
|
82
|
+
"cli/search": {
|
|
83
|
+
"title": "Search",
|
|
84
|
+
"section": "General",
|
|
85
|
+
"body": "# Search\n\nRun a web search and return ranked results\n\nRun a web search and return ranked results\n\n### search\n\nRun a web search and return ranked results\n\n| Option | Description |\n| --- | --- |\n| `--type <type>` | Search index to query: web (default), news, or images |\n| `--limit <n>` | Maximum number of results to return (1–100) |\n| `--country <code>` | Two-letter country code to localize results (e.g. us, de) |\n| `--language <code>` | Two-letter language code for results (e.g. en, fr) |\n| `--date-range <window>` | Restrict results to a recency window: any (default), hour, day, week, month, or year |\n| `-h, --help` | display help for command |\n\n```bash\n$ bytekit search <query> --type <type> --limit <n> --country <code> --language <code> --date-range <window>\n```"
|
|
91
86
|
},
|
|
92
87
|
"cli/sitemap": {
|
|
93
88
|
"title": "Sitemap",
|
|
94
89
|
"section": "General",
|
|
95
90
|
"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
91
|
},
|
|
92
|
+
"api": {
|
|
93
|
+
"title": "API Reference",
|
|
94
|
+
"section": "API Reference",
|
|
95
|
+
"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."
|
|
96
|
+
},
|
|
97
97
|
"libraries/go": {
|
|
98
98
|
"title": "Go",
|
|
99
99
|
"section": "General",
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
"libraries/typescript": {
|
|
108
108
|
"title": "TypeScript SDK",
|
|
109
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
|
|
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 @hunt-labs/bytekit-sdk\n```\n\n## Initialize\n\n```ts\nimport { ByteKit } from '@hunt-labs/bytekit-sdk';\n\nconst client = new ByteKit({\n apiKey: process.env.BYTEKIT_API_KEY!, // your sk_live_… key\n});\n```\n\n## Your first scrape\n\n```ts\nconst result = await client.scrape.create({\n url: 'https://example.com',\n formats: ['markdown'],\n});\n\nconsole.log(result);\n```\n\n## Capture a screenshot\n\n```ts\nconst shot = await client.screenshots.create({\n url: 'https://example.com',\n full_page: true,\n});\n\nconsole.log(shot);\n```\n\n## Handle errors\n\nAny 4xx/5xx response throws a `ByteKitError` carrying the HTTP `status` and the API\n`error.code`:\n\n```ts\nimport { ByteKit, ByteKitError } from '@hunt-labs/bytekit-sdk';\n\ntry {\n await client.scrape.create({ url: 'https://example.com' });\n} catch (err) {\n if (err instanceof ByteKitError) {\n console.error(`${err.status} ${err.code}: ${err.message}`);\n } else {\n throw err;\n }\n}\n```\n\n## Async scrapes\n\nPass `async: true` to enqueue the job and poll by ID:\n\n```ts\nconst queued = await client.scrape.create({ url: 'https://example.com', async: true });\n// later — poll with the returned sc_… id\nconst final = await client.scrape.get('sc_...');\n```\n\n## What's available\n\nThe client exposes one resource per capability: `scrape`, `screenshots`, `bulk`,\n`fetch`, `monitors`, `sitemap`, and `account` (each with `create` / `get` / `list` methods as\napplicable, plus nested resources like `scrape.bulk` and `monitors.captures`).\n\nSee the [TypeScript SDK Reference](https://bytekit.com/docs/sdk/typescript/client) for every method and option.\n\n## Next steps\n\n- [Python SDK](https://bytekit.com/docs/libraries/python) — the same API surface in Python.\n- [API Reference](https://bytekit.com/docs/api) — the underlying REST endpoints.\n- [Errors](https://bytekit.com/docs/guides/errors) — error codes and retry guidance."
|
|
111
111
|
},
|
|
112
112
|
"api/account/getaccount": {
|
|
113
113
|
"title": "Get account details",
|
|
@@ -164,16 +164,6 @@
|
|
|
164
164
|
"section": "API Reference",
|
|
165
165
|
"body": "# Fetch a URL (POST)\n\nSame as GET /v1/fetch but with a JSON request body."
|
|
166
166
|
},
|
|
167
|
-
"api/health/healthcheck": {
|
|
168
|
-
"title": "Health check",
|
|
169
|
-
"section": "API Reference",
|
|
170
|
-
"body": "# Health check"
|
|
171
|
-
},
|
|
172
|
-
"api/health": {
|
|
173
|
-
"title": "Health",
|
|
174
|
-
"section": "API Reference",
|
|
175
|
-
"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"
|
|
176
|
-
},
|
|
177
167
|
"api/fetch-bulk/createfetchbulk": {
|
|
178
168
|
"title": "Bulk fetch URLs",
|
|
179
169
|
"section": "API Reference",
|
|
@@ -189,6 +179,26 @@
|
|
|
189
179
|
"section": "API Reference",
|
|
190
180
|
"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"
|
|
191
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/plans": {
|
|
193
|
+
"title": "Plans",
|
|
194
|
+
"section": "API Reference",
|
|
195
|
+
"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"
|
|
196
|
+
},
|
|
197
|
+
"api/plans/listplans": {
|
|
198
|
+
"title": "List public plan catalog",
|
|
199
|
+
"section": "API Reference",
|
|
200
|
+
"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"
|
|
201
|
+
},
|
|
192
202
|
"api/monitors/createmonitor": {
|
|
193
203
|
"title": "Create a change-detection monitor",
|
|
194
204
|
"section": "API Reference",
|
|
@@ -224,16 +234,6 @@
|
|
|
224
234
|
"section": "API Reference",
|
|
225
235
|
"body": "# Update monitor"
|
|
226
236
|
},
|
|
227
|
-
"api/plans": {
|
|
228
|
-
"title": "Plans",
|
|
229
|
-
"section": "API Reference",
|
|
230
|
-
"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"
|
|
231
|
-
},
|
|
232
|
-
"api/plans/listplans": {
|
|
233
|
-
"title": "List public plan catalog",
|
|
234
|
-
"section": "API Reference",
|
|
235
|
-
"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"
|
|
236
|
-
},
|
|
237
237
|
"api/schema/createschemaextraction": {
|
|
238
238
|
"title": "Schema-driven structured extraction",
|
|
239
239
|
"section": "API Reference",
|
|
@@ -352,97 +352,97 @@
|
|
|
352
352
|
"sdk/python/account": {
|
|
353
353
|
"title": "Account",
|
|
354
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##
|
|
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## Get Account\n\nGet account details\n\nReturns account, plan, and current API key details, including the\n`api_key` and `subscription` fields.\n\n**Call styles**\n\n```python\nsync_detailed(client=client) -> Response[Union['AccountBearerResponse', 'AccountSessionResponse']]\nsync(client=client) -> Optional[Union['AccountBearerResponse', 'AccountSessionResponse']]\nawait asyncio_detailed(client=client) -> Response[Union['AccountBearerResponse', 'AccountSessionResponse']]\nawait asyncio(client=client) -> Optional[Union['AccountBearerResponse', 'AccountSessionResponse']]\n```"
|
|
356
356
|
},
|
|
357
357
|
"sdk/python/bulk": {
|
|
358
358
|
"title": "Bulk",
|
|
359
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
|
|
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 or scrapes in a single batch.\nProvide `urls` (simple list) or `items` (per-item config), not both.\nWebhook deliveries include `X-ByteKit-Event: bulk.completed` so\nreceivers can dispatch on the header without parsing the body shape.\n\n**Parameters**\n\n- `body (CreateBulkBody): Provide `urls` (simple list) OR `items` (per-item config), not`\n- `both. `type` selects the capture kind per entry — only`\n- ``screenshot` and `scrape` are accepted (`recording` is`\n- `deactivated). Behaviour fields may be set per item or via`\n- ``defaults`; a per-item value overrides the matching default.`\n\n**Call styles**\n\n```python\nsync_detailed(client=client, body=body) -> Response[Union[CreateBulkResponse202, Error]]\nsync(client=client, body=body) -> Optional[Union[CreateBulkResponse202, Error]]\nawait asyncio_detailed(client=client, body=body) -> Response[Union[CreateBulkResponse202, Error]]\nawait asyncio(client=client, body=body) -> Optional[Union[CreateBulkResponse202, Error]]\n```\n\n## Delete Bulk\n\nCancel a bulk job\n\nCancels an in-flight bulk job: drains its still-queued (pending) child jobs and refunds the quota\nheld for exactly those drained children. Children already completed, failed, or in progress are\nuntouched and keep their charge. Idempotent — cancelling an already-terminal job (completed, failed,\nor cancelled) is a no-op that returns 200 with the job's real, unchanged status and refunds nothing.\n\n**Parameters**\n\n- `id (str)`\n\n**Call styles**\n\n```python\nsync_detailed(id=id, client=client) -> Response[Union[DeleteBulkResponse200, Error]]\nsync(id=id, client=client) -> Optional[Union[DeleteBulkResponse200, Error]]\nawait asyncio_detailed(id=id, client=client) -> Response[Union[DeleteBulkResponse200, Error]]\nawait asyncio(id=id, client=client) -> Optional[Union[DeleteBulkResponse200, Error]]\n```\n\n## Get Bulk\n\nGet bulk job status\n\n**Parameters**\n\n- `id (str)`\n\n**Call styles**\n\n```python\nsync_detailed(id=id, client=client) -> Response[Union[Error, GetBulkResponse200]]\nsync(id=id, client=client) -> Optional[Union[Error, GetBulkResponse200]]\nawait asyncio_detailed(id=id, client=client) -> Response[Union[Error, GetBulkResponse200]]\nawait asyncio(id=id, client=client) -> Optional[Union[Error, GetBulkResponse200]]\n```\n\n## List Bulk Screenshots\n\nList bulk job items\n\n**Parameters**\n\n- `id (str)`\n\n**Call styles**\n\n```python\nsync_detailed(id=id, client=client) -> Response[ListBulkScreenshotsResponse200]\nsync(id=id, client=client) -> Optional[ListBulkScreenshotsResponse200]\nawait asyncio_detailed(id=id, client=client) -> Response[ListBulkScreenshotsResponse200]\nawait asyncio(id=id, client=client) -> Optional[ListBulkScreenshotsResponse200]\n```"
|
|
361
361
|
},
|
|
362
362
|
"sdk/python/client": {
|
|
363
363
|
"title": "Client",
|
|
364
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
|
|
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.\nExplicit constructor arguments always win over these defaults (explicit arg > default).\n\n### with_headers\n\n```python\nwith_headers(headers: dict[str, str]) -> 'Client'\n```\n\nGet a new client matching this one with additional headers\n\n### with_cookies\n\n```python\nwith_cookies(cookies: dict[str, str]) -> 'Client'\n```\n\nGet a new client matching this one with additional cookies\n\n### with_timeout\n\n```python\nwith_timeout(timeout: httpx.Timeout) -> 'Client'\n```\n\nGet a new client matching this one with a new timeout (in seconds)\n\n### set_httpx_client\n\n```python\nset_httpx_client(client: httpx.Client) -> 'Client'\n```\n\nManually set the underlying httpx.Client\n\n**NOTE**: This will override any other settings on the client, including cookies, headers, and timeout.\n\n### get_httpx_client\n\n```python\nget_httpx_client() -> httpx.Client\n```\n\nGet the underlying httpx.Client, constructing a new one if not previously set\n\n### set_async_httpx_client\n\n```python\nset_async_httpx_client(async_client: httpx.AsyncClient) -> 'Client'\n```\n\nManually the underlying httpx.AsyncClient\n\n**NOTE**: This will override any other settings on the client, including cookies, headers, and timeout.\n\n### get_async_httpx_client\n\n```python\nget_async_httpx_client() -> httpx.AsyncClient\n```\n\nGet the underlying httpx.AsyncClient, constructing a new one if not previously set\n\n## AuthenticatedClient\n\nA Client which has been authenticated for use on secured endpoints\n\nThe following are accepted as keyword arguments and will be used to construct httpx Clients internally:\n\n``base_url``: The base URL for the API, all requests are made to a relative path to this URL\n\n``cookies``: A dictionary of cookies to be sent with every request\n\n``headers``: A dictionary of headers to be sent with every request\n\n``timeout``: The maximum amount of a time a request can take. API functions will raise\nhttpx.TimeoutException if this is exceeded.\n\n``verify_ssl``: Whether or not to verify the SSL certificate of the API server. This should be True in production,\nbut can be set to False for testing purposes.\n\n``follow_redirects``: Whether or not to follow redirects. Default value is False.\n\n``httpx_args``: A dictionary of additional arguments to be passed to the ``httpx.Client`` and ``httpx.AsyncClient`` constructor.\n\nAttributes:\nraise_on_unexpected_status: Whether or not to raise an errors.UnexpectedStatus if the API returns a\nstatus code that was not documented in the source OpenAPI document. Can also be provided as a keyword\nargument to the constructor.\nExplicit constructor arguments always win over these defaults (explicit arg > default).\ntoken: The token to use for authentication\nprefix: The prefix to use for the Authorization header\nauth_header_name: The name of the Authorization header\n\n### with_headers\n\n```python\nwith_headers(headers: dict[str, str]) -> 'AuthenticatedClient'\n```\n\nGet a new client matching this one with additional headers\n\n### with_cookies\n\n```python\nwith_cookies(cookies: dict[str, str]) -> 'AuthenticatedClient'\n```\n\nGet a new client matching this one with additional cookies\n\n### with_timeout\n\n```python\nwith_timeout(timeout: httpx.Timeout) -> 'AuthenticatedClient'\n```\n\nGet a new client matching this one with a new timeout (in seconds)\n\n### set_httpx_client\n\n```python\nset_httpx_client(client: httpx.Client) -> 'AuthenticatedClient'\n```\n\nManually set the underlying httpx.Client\n\n**NOTE**: This will override any other settings on the client, including cookies, headers, and timeout.\n\n### get_httpx_client\n\n```python\nget_httpx_client() -> httpx.Client\n```\n\nGet the underlying httpx.Client, constructing a new one if not previously set\n\n### set_async_httpx_client\n\n```python\nset_async_httpx_client(async_client: httpx.AsyncClient) -> 'AuthenticatedClient'\n```\n\nManually the underlying httpx.AsyncClient\n\n**NOTE**: This will override any other settings on the client, including cookies, headers, and timeout.\n\n### get_async_httpx_client\n\n```python\nget_async_httpx_client() -> httpx.AsyncClient\n```\n\nGet the underlying httpx.AsyncClient, constructing a new one if not previously set"
|
|
366
366
|
},
|
|
367
367
|
"sdk/python/fetch-bulk": {
|
|
368
368
|
"title": "Fetch Bulk",
|
|
369
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
|
|
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[Union[CreateFetchBulkResponse202, Error]]\nsync(client=client, body=body) -> Optional[Union[CreateFetchBulkResponse202, Error]]\nawait asyncio_detailed(client=client, body=body) -> Response[Union[CreateFetchBulkResponse202, Error]]\nawait asyncio(client=client, body=body) -> Optional[Union[CreateFetchBulkResponse202, Error]]\n```\n\n## Get Fetch Bulk\n\nGet fetch bulk job status\n\n**Parameters**\n\n- `id (str)`\n\n**Call styles**\n\n```python\nsync_detailed(id=id, client=client) -> Response[Union[Error, GetFetchBulkResponse200]]\nsync(id=id, client=client) -> Optional[Union[Error, GetFetchBulkResponse200]]\nawait asyncio_detailed(id=id, client=client) -> Response[Union[Error, GetFetchBulkResponse200]]\nawait asyncio(id=id, client=client) -> Optional[Union[Error, GetFetchBulkResponse200]]\n```"
|
|
371
371
|
},
|
|
372
372
|
"sdk/python/fetch": {
|
|
373
373
|
"title": "Fetch",
|
|
374
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.
|
|
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. The response body IS the content; metadata is returned in X-Fetch-* headers.\nOmit `format` for raw passthrough. Use `format=markdown` or `format=html` for conversion.\n\n**Parameters**\n\n- `url_query (str)`\n- `format_ (Union[Unset, GetFetchFormat])`\n- `country (Union[Unset, str]): Default: 'US'.`\n- `timeout_ms (Union[Unset, int]): Default: 60000.`\n- `cache_ttl (Union[GetFetchCacheTtlType1, Unset, str]): Default: '48h'.`\n\n**Call styles**\n\n```python\nsync_detailed(client=client, url_query=url_query, format_=format_, country=country, timeout_ms=timeout_ms, cache_ttl=cache_ttl) -> Response[Union[Error, str]]\nsync(client=client, url_query=url_query, format_=format_, country=country, timeout_ms=timeout_ms, cache_ttl=cache_ttl) -> Optional[Union[Error, str]]\nawait asyncio_detailed(client=client, url_query=url_query, format_=format_, country=country, timeout_ms=timeout_ms, cache_ttl=cache_ttl) -> Response[Union[Error, str]]\nawait asyncio(client=client, url_query=url_query, format_=format_, country=country, timeout_ms=timeout_ms, cache_ttl=cache_ttl) -> Optional[Union[Error, str]]\n```\n\n## Post Fetch\n\nFetch a URL (POST)\n\nSame as GET /v1/fetch but with a JSON request body.\n\n**Parameters**\n\n- `body (FetchRequest)`\n\n**Call styles**\n\n```python\nsync_detailed(client=client, body=body) -> Response[Union[Error, str]]\nsync(client=client, body=body) -> Optional[Union[Error, str]]\nawait asyncio_detailed(client=client, body=body) -> Response[Union[Error, str]]\nawait asyncio(client=client, body=body) -> Optional[Union[Error, str]]\n```"
|
|
376
376
|
},
|
|
377
377
|
"sdk/python/monitors": {
|
|
378
378
|
"title": "Monitors",
|
|
379
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
|
|
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```"
|
|
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\nCreates a recurring change-detection monitor for a URL, delivering results via webhook.\n\n**Parameters**\n\n- `body (MonitorCreateRequest)`\n\n**Call styles**\n\n```python\nsync_detailed(client=client, body=body) -> Response[Union[Error, MonitorCreateResponse]]\nsync(client=client, body=body) -> Optional[Union[Error, MonitorCreateResponse]]\nawait asyncio_detailed(client=client, body=body) -> Response[Union[Error, MonitorCreateResponse]]\nawait asyncio(client=client, body=body) -> Optional[Union[Error, MonitorCreateResponse]]\n```\n\n## Delete Monitor\n\nCancel monitor\n\n**Parameters**\n\n- `id (str)`\n\n**Call styles**\n\n```python\nsync_detailed(id=id, client=client) -> Response[Union[Any, Error]]\nsync(id=id, client=client) -> Optional[Union[Any, Error]]\nawait asyncio_detailed(id=id, client=client) -> Response[Union[Any, Error]]\nawait asyncio(id=id, client=client) -> Optional[Union[Any, Error]]\n```\n\n## Get Monitor\n\nGet monitor\n\n**Parameters**\n\n- `id (str)`\n\n**Call styles**\n\n```python\nsync_detailed(id=id, client=client) -> Response[Union[Error, MonitorResponse]]\nsync(id=id, client=client) -> Optional[Union[Error, MonitorResponse]]\nawait asyncio_detailed(id=id, client=client) -> Response[Union[Error, MonitorResponse]]\nawait asyncio(id=id, client=client) -> Optional[Union[Error, MonitorResponse]]\n```\n\n## List Monitor Captures\n\nList monitor captures\n\n**Parameters**\n\n- `id (str)`\n- `limit (Union[Unset, int]): Default: 25.`\n- `cursor (Union[Unset, str])`\n\n**Call styles**\n\n```python\nsync_detailed(id=id, client=client, limit=limit, cursor=cursor) -> Response[ListMonitorCapturesResponse200]\nsync(id=id, client=client, limit=limit, cursor=cursor) -> Optional[ListMonitorCapturesResponse200]\nawait asyncio_detailed(id=id, client=client, limit=limit, cursor=cursor) -> Response[ListMonitorCapturesResponse200]\nawait asyncio(id=id, client=client, limit=limit, cursor=cursor) -> Optional[ListMonitorCapturesResponse200]\n```\n\n## List Monitors\n\nList monitors\n\n**Parameters**\n\n- `limit (Union[Unset, int]): Default: 25.`\n- `cursor (Union[Unset, str])`\n- `status (Union[Unset, ListMonitorsStatus]): Default: ListMonitorsStatus.ACTIVE.`\n\n**Call styles**\n\n```python\nsync_detailed(client=client, limit=limit, cursor=cursor, status=status) -> Response[ListMonitorsResponse200]\nsync(client=client, limit=limit, cursor=cursor, status=status) -> Optional[ListMonitorsResponse200]\nawait asyncio_detailed(client=client, limit=limit, cursor=cursor, status=status) -> Response[ListMonitorsResponse200]\nawait asyncio(client=client, limit=limit, cursor=cursor, status=status) -> Optional[ListMonitorsResponse200]\n```\n\n## Update Monitor\n\nUpdate monitor\n\n**Parameters**\n\n- `id (str)`\n- `body (MonitorUpdateRequest)`\n\n**Call styles**\n\n```python\nsync_detailed(id=id, client=client, body=body) -> Response[Union[Error, MonitorResponse]]\nsync(id=id, client=client, body=body) -> Optional[Union[Error, MonitorResponse]]\nawait asyncio_detailed(id=id, client=client, body=body) -> Response[Union[Error, MonitorResponse]]\nawait asyncio(id=id, client=client, body=body) -> Optional[Union[Error, MonitorResponse]]\n```"
|
|
386
381
|
},
|
|
387
382
|
"sdk/python/scrape-bulk": {
|
|
388
383
|
"title": "Scrape Bulk",
|
|
389
384
|
"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
|
|
385
|
+
"body": "# Scrape Bulk\n\nAPI functions for the Scrape Bulk resource.\n\n# Scrape Bulk\n\nFunctions for interacting with the `scrape_bulk` API resource. Each operation ships in four forms — `sync` / `sync_detailed` and their `async` counterparts.\n\n## Create Scrape Bulk\n\nBulk scrape URLs\n\nEnqueues multiple URLs for scraping. Results delivered via webhook.\nWebhook deliveries include `X-ByteKit-Event: scrape.completed` or\n`X-ByteKit-Event: scrape.failed` so receivers can dispatch on the\nheader without parsing the body shape.\n\n**Parameters**\n\n- `body (CreateScrapeBulkBody)`\n\n**Call styles**\n\n```python\nsync_detailed(client=client, body=body) -> Response[Union[CreateScrapeBulkResponse202, Error]]\nsync(client=client, body=body) -> Optional[Union[CreateScrapeBulkResponse202, Error]]\nawait asyncio_detailed(client=client, body=body) -> Response[Union[CreateScrapeBulkResponse202, Error]]\nawait asyncio(client=client, body=body) -> Optional[Union[CreateScrapeBulkResponse202, Error]]\n```\n\n## Get Scrape Bulk\n\nGet scrape bulk job status\n\n**Parameters**\n\n- `id (str)`\n\n**Call styles**\n\n```python\nsync_detailed(id=id, client=client) -> Response[Union[Error, GetScrapeBulkResponse200]]\nsync(id=id, client=client) -> Optional[Union[Error, GetScrapeBulkResponse200]]\nawait asyncio_detailed(id=id, client=client) -> Response[Union[Error, GetScrapeBulkResponse200]]\nawait asyncio(id=id, client=client) -> Optional[Union[Error, GetScrapeBulkResponse200]]\n```"
|
|
391
386
|
},
|
|
392
387
|
"sdk/python/scrape": {
|
|
393
388
|
"title": "Scrape",
|
|
394
389
|
"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
|
|
390
|
+
"body": "# Scrape\n\nAPI functions for the Scrape resource.\n\n# Scrape\n\nFunctions for interacting with the `scrape` API resource. Each operation ships in four forms — `sync` / `sync_detailed` and their `async` counterparts.\n\n## Create Scrape\n\nScrape a URL\n\nFetches and processes a URL, returning content in one or more formats wrapped in a ScrapeEnvelope.\nMost requests return synchronously in under a second; requests needing a full page render return\nHTTP 202 and complete asynchronously.\n\n**Parameters**\n\n- `body (ScrapeRequest)`\n\n**Call styles**\n\n```python\nsync_detailed(client=client, body=body) -> Response[Union[Error, ScrapeQueuedEnvelope, ScrapeSuccessEnvelope]]\nsync(client=client, body=body) -> Optional[Union[Error, ScrapeQueuedEnvelope, ScrapeSuccessEnvelope]]\nawait asyncio_detailed(client=client, body=body) -> Response[Union[Error, ScrapeQueuedEnvelope, ScrapeSuccessEnvelope]]\nawait asyncio(client=client, body=body) -> Optional[Union[Error, ScrapeQueuedEnvelope, ScrapeSuccessEnvelope]]\n```\n\n## Get Scrape\n\nGet scrape result\n\nAlways returns 200. Check the `status` discriminator for the scrape state.\n\n**Parameters**\n\n- `id (str)`\n\n**Call styles**\n\n```python\nsync_detailed(id=id, client=client) -> Response[Union[Error, Union['ScrapeErrorEnvelope', 'ScrapeQueuedEnvelope', 'ScrapeSuccessEnvelope']]]\nsync(id=id, client=client) -> Optional[Union[Error, Union['ScrapeErrorEnvelope', 'ScrapeQueuedEnvelope', 'ScrapeSuccessEnvelope']]]\nawait asyncio_detailed(id=id, client=client) -> Response[Union[Error, Union['ScrapeErrorEnvelope', 'ScrapeQueuedEnvelope', 'ScrapeSuccessEnvelope']]]\nawait asyncio(id=id, client=client) -> Optional[Union[Error, Union['ScrapeErrorEnvelope', 'ScrapeQueuedEnvelope', 'ScrapeSuccessEnvelope']]]\n```"
|
|
396
391
|
},
|
|
397
392
|
"sdk/python/screenshots": {
|
|
398
393
|
"title": "Screenshots",
|
|
399
394
|
"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
|
|
395
|
+
"body": "# Screenshots\n\nAPI functions for the Screenshots resource.\n\n# Screenshots\n\nFunctions for interacting with the `screenshots` API resource. Each operation ships in four forms — `sync` / `sync_detailed` and their `async` counterparts.\n\n## Create Screenshot\n\nCapture a screenshot\n\nSync by default (holds up to 28s). Pass `?async=true` to return 202 immediately.\nPoll via GET /v1/screenshots/\\{id\\}.\n\n**Parameters**\n\n- `async_ (Union[Unset, bool]): Default: False.`\n- `body (ScreenshotRequest)`\n\n**Call styles**\n\n```python\nsync_detailed(client=client, body=body, async_=async_) -> Response[Union[Error, ScreenshotResponse]]\nsync(client=client, body=body, async_=async_) -> Optional[Union[Error, ScreenshotResponse]]\nawait asyncio_detailed(client=client, body=body, async_=async_) -> Response[Union[Error, ScreenshotResponse]]\nawait asyncio(client=client, body=body, async_=async_) -> Optional[Union[Error, ScreenshotResponse]]\n```\n\n## Get Screenshot\n\nGet screenshot status\n\n**Parameters**\n\n- `id (str)`\n\n**Call styles**\n\n```python\nsync_detailed(id=id, client=client) -> Response[Union[Error, ScreenshotResponse, Union['Error', 'ScreenshotResponse']]]\nsync(id=id, client=client) -> Optional[Union[Error, ScreenshotResponse, Union['Error', 'ScreenshotResponse']]]\nawait asyncio_detailed(id=id, client=client) -> Response[Union[Error, ScreenshotResponse, Union['Error', 'ScreenshotResponse']]]\nawait asyncio(id=id, client=client) -> Optional[Union[Error, ScreenshotResponse, Union['Error', 'ScreenshotResponse']]]\n```"
|
|
401
396
|
},
|
|
402
397
|
"sdk/python/search": {
|
|
403
398
|
"title": "Search",
|
|
404
399
|
"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
|
|
400
|
+
"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[Union[CreateSearchResponse200, CreateSearchResponse502, Error]]\nsync(client=client, body=body) -> Optional[Union[CreateSearchResponse200, CreateSearchResponse502, Error]]\nawait asyncio_detailed(client=client, body=body) -> Response[Union[CreateSearchResponse200, CreateSearchResponse502, Error]]\nawait asyncio(client=client, body=body) -> Optional[Union[CreateSearchResponse200, CreateSearchResponse502, Error]]\n```"
|
|
406
401
|
},
|
|
407
402
|
"sdk/python/sitemap": {
|
|
408
403
|
"title": "Sitemap",
|
|
409
404
|
"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
|
|
405
|
+
"body": "# Sitemap\n\nAPI functions for the Sitemap resource.\n\n# Sitemap\n\nFunctions for interacting with the `sitemap` API resource. Each operation ships in four forms — `sync` / `sync_detailed` and their `async` counterparts.\n\n## Create Sitemap\n\nDiscover URLs on a domain\n\nCrawls a domain to build a sitemap. Returns cached results if available\nwithin cache_ttl. Results delivered via webhook and downloadable from results_url.\nWebhook deliveries include `X-ByteKit-Event: sitemap.completed` or\n`X-ByteKit-Event: sitemap.failed` so receivers can dispatch on the\nheader without parsing the body shape.\n\n**Parameters**\n\n- `body (SitemapRequest)`\n\n**Call styles**\n\n```python\nsync_detailed(client=client, body=body) -> Response[Union[Error, SitemapResponse]]\nsync(client=client, body=body) -> Optional[Union[Error, SitemapResponse]]\nawait asyncio_detailed(client=client, body=body) -> Response[Union[Error, SitemapResponse]]\nawait asyncio(client=client, body=body) -> Optional[Union[Error, SitemapResponse]]\n```\n\n## Get Sitemap\n\nGet sitemap job status\n\n**Parameters**\n\n- `id (str)`\n\n**Call styles**\n\n```python\nsync_detailed(id=id, client=client) -> Response[Union[Error, SitemapResponse]]\nsync(id=id, client=client) -> Optional[Union[Error, SitemapResponse]]\nawait asyncio_detailed(id=id, client=client) -> Response[Union[Error, SitemapResponse]]\nawait asyncio(id=id, client=client) -> Optional[Union[Error, SitemapResponse]]\n```"
|
|
406
|
+
},
|
|
407
|
+
"sdk/python/usage": {
|
|
408
|
+
"title": "Usage",
|
|
409
|
+
"section": "SDK Reference",
|
|
410
|
+
"body": "# Usage\n\nAPI functions for the Usage resource.\n\n# Usage\n\nFunctions for interacting with the `usage` API resource. Each operation ships in four forms — `sync` / `sync_detailed` and their `async` counterparts.\n\n## Get Usage\n\nGet current billing period usage\n\n**Call styles**\n\n```python\nsync_detailed(client=client) -> Response[GetUsageResponse200]\nsync(client=client) -> Optional[GetUsageResponse200]\nawait asyncio_detailed(client=client) -> Response[GetUsageResponse200]\nawait asyncio(client=client) -> Optional[GetUsageResponse200]\n```\n\n## Get Usage By Endpoint\n\nGet per-endpoint bandwidth breakdown\n\nReturns bandwidth usage broken down by endpoint (screenshots, recordings, scrape, scrape_md, fetch,\nfetch_md, crawl, crawl_links, sitemap, monitors) for a date range. Each row carries raw bytes, the\nbilling multiplier, and billable bytes. Endpoints with zero raw bytes for the range are omitted from\n`rows`; `totals` is always present. Default range is the last 30 days; max 366 days.\n\n**Parameters**\n\n- `from_ (Union[Unset, datetime.date])`\n- `to (Union[Unset, datetime.date])`\n- `api_key (Union[Unset, str])`\n\n**Call styles**\n\n```python\nsync_detailed(client=client, from_=from_, to=to, api_key=api_key) -> Response[GetUsageByEndpointResponse200]\nsync(client=client, from_=from_, to=to, api_key=api_key) -> Optional[GetUsageByEndpointResponse200]\nawait asyncio_detailed(client=client, from_=from_, to=to, api_key=api_key) -> Response[GetUsageByEndpointResponse200]\nawait asyncio(client=client, from_=from_, to=to, api_key=api_key) -> Optional[GetUsageByEndpointResponse200]\n```\n\n## Get Usage Daily\n\nGet daily usage breakdown\n\nDefault range is last 30 days. Max range is 366 days.\n\n**Parameters**\n\n- `from_ (Union[Unset, datetime.date])`\n- `to (Union[Unset, datetime.date])`\n- `api_key (Union[Unset, str])`\n\n**Call styles**\n\n```python\nsync_detailed(client=client, from_=from_, to=to, api_key=api_key) -> Response[GetUsageDailyResponse200]\nsync(client=client, from_=from_, to=to, api_key=api_key) -> Optional[GetUsageDailyResponse200]\nawait asyncio_detailed(client=client, from_=from_, to=to, api_key=api_key) -> Response[GetUsageDailyResponse200]\nawait asyncio(client=client, from_=from_, to=to, api_key=api_key) -> Optional[GetUsageDailyResponse200]\n```"
|
|
411
|
+
},
|
|
412
|
+
"sdk/python/webhooks": {
|
|
413
|
+
"title": "Webhooks",
|
|
414
|
+
"section": "SDK Reference",
|
|
415
|
+
"body": "# Webhooks\n\nAPI functions for the Webhooks resource.\n\n# Webhooks\n\nFunctions for interacting with the `webhooks` API resource. Each operation ships in four forms — `sync` / `sync_detailed` and their `async` counterparts.\n\n## List Webhook Deliveries\n\nList webhook deliveries\n\n**Parameters**\n\n- `limit (Union[Unset, int]): Default: 25.`\n- `cursor (Union[Unset, str])`\n- `status (Union[Unset, ListWebhookDeliveriesStatus])`\n- `since (Union[Unset, datetime.datetime])`\n\n**Call styles**\n\n```python\nsync_detailed(client=client, limit=limit, cursor=cursor, status=status, since=since) -> Response[ListWebhookDeliveriesResponse200]\nsync(client=client, limit=limit, cursor=cursor, status=status, since=since) -> Optional[ListWebhookDeliveriesResponse200]\nawait asyncio_detailed(client=client, limit=limit, cursor=cursor, status=status, since=since) -> Response[ListWebhookDeliveriesResponse200]\nawait asyncio(client=client, limit=limit, cursor=cursor, status=status, since=since) -> Optional[ListWebhookDeliveriesResponse200]\n```\n\n## Retry Webhook Delivery\n\nRetry a webhook delivery\n\nRequeues a failed or exhausted webhook delivery for another attempt.\n\n**Parameters**\n\n- `id (str)`\n\n**Call styles**\n\n```python\nsync_detailed(id=id, client=client) -> Response[Union[Error, WebhookDeliveryResponse]]\nsync(id=id, client=client) -> Optional[Union[Error, WebhookDeliveryResponse]]\nawait asyncio_detailed(id=id, client=client) -> Response[Union[Error, WebhookDeliveryResponse]]\nawait asyncio(id=id, client=client) -> Optional[Union[Error, WebhookDeliveryResponse]]\n```"
|
|
411
416
|
},
|
|
412
417
|
"sdk/typescript/account": {
|
|
413
418
|
"title": "Account",
|
|
414
419
|
"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<GetAccountResponse>\n```\n\nGET /v1/account — get the authenticated account\n\n## apiKeys\n\n### create\n\n```ts\nclient.account.apiKeys.create(opts?: CreateApiKeyRequest): Promise<CreateApiKeyResponse>\n```\n\nPOST /v1/account/api-keys — create a new API key.\n\n`opts` is optional: the spec declares the request body itself as optional,\nso `create()` with no arguments is valid and sends no body.\n\n### list\n\n```ts\nclient.account.apiKeys.list(): Promise<ListApiKeysResponse>\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<GetApiKeyResponse>\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: UpdateApiKeyRequest): Promise<UpdateApiKeyResponse>\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<void>\n```\n\nDELETE /v1/account/api-keys/\\{id\\} — revoke an API key (idempotent).\n\nReturns 204 No Content: `operations['revokeApiKey']['responses'][204]`\ndeclares `content?: never`, so there is no JSON arm to derive a payload\nfrom — hence `Promise<void>`.\n\
|
|
420
|
+
"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<GetAccountResponse>\n```\n\nGET /v1/account — get the authenticated account\n\n## apiKeys\n\n### create\n\n```ts\nclient.account.apiKeys.create(opts?: CreateApiKeyRequest): Promise<CreateApiKeyResponse>\n```\n\nPOST /v1/account/api-keys — create a new API key.\n\n`opts` is optional: the spec declares the request body itself as optional,\nso `create()` with no arguments is valid and sends no body.\n\n### list\n\n```ts\nclient.account.apiKeys.list(): Promise<ListApiKeysResponse>\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<GetApiKeyResponse>\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: UpdateApiKeyRequest): Promise<UpdateApiKeyResponse>\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<void>\n```\n\nDELETE /v1/account/api-keys/\\{id\\} — revoke an API key (idempotent).\n\nReturns 204 No Content: `operations['revokeApiKey']['responses'][204]`\ndeclares `content?: never`, so there is no JSON arm to derive a payload\nfrom — hence `Promise<void>`.\n\n`client.request()` short-circuits an empty body (204 or any empty response)\nto `undefined` before it would parse the body as JSON (#2450), so this\nmethod resolves cleanly on the gateway's empty 204 body.\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
421
|
},
|
|
417
422
|
"sdk/typescript/bulk": {
|
|
418
423
|
"title": "Bulk",
|
|
419
424
|
"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:
|
|
425
|
+
"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: BulkCreateRequest): Promise<BulkCreateResponse>\n```\n\nPOST /v1/bulk — create a bulk screenshots job\n\n## get\n\n```ts\nclient.bulk.get(id: BulkId): Promise<BulkGetResponse>\n```\n\nGET /v1/bulk/\\{id\\} — get a bulk job status\n\n## cancel\n\n```ts\nclient.bulk.cancel(id: BulkId): Promise<BulkCancelResponse>\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<ListBulkScreenshotsResponse>\n```\n\nGET /v1/bulk/\\{id\\}/screenshots — list screenshots in a bulk job"
|
|
421
426
|
},
|
|
422
427
|
"sdk/typescript/client": {
|
|
423
428
|
"title": "Client",
|
|
424
429
|
"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 {
|
|
430
|
+
"body": "# Client\n\nInstantiate and configure the ByteKit TypeScript client.\n\n# Client\n\nThe ByteKit TypeScript SDK is a thin, type-safe wrapper over the REST API. Create a\n client with your API key, then call resource methods.\n\n```ts\nimport { ByteKit } from '@hunt-labs/bytekit-sdk';\n\nconst client = new ByteKit({\n apiKey: process.env.BYTEKIT_API_KEY!, // your sk_live_… key\n});\n```\n\n## Options (`ByteKitOptions`)\n\n- `apiKey` (required) — `string`\n- `baseUrl` — `string` Defaults to `https://api.bytekit.com`.\n- `timeoutMs` — `number` — Default CLIENT-SIDE request timeout in ms — the abort budget for the whole HTTP\nround-trip made by this SDK. `0` disables the SDK-side timeout. Default 120000.\n\nNOT the same thing as `ScrapeOpts.timeout_ms`, which is the SERVER-side budget the\ngateway applies to the scrape itself. Override per call with\n`RequestOptions.requestTimeoutMs`.\n\n## Resources\n\nThe client exposes one property per resource:\n\n- [`client.scrape`](https://bytekit.com/docs/sdk/typescript/scrape) — Fetch a URL as raw HTML, clean markdown, or structured content.\n- [`client.screenshots`](https://bytekit.com/docs/sdk/typescript/screenshots) — Capture full-page or viewport screenshots.\n- [`client.bulk`](https://bytekit.com/docs/sdk/typescript/bulk) — Fan out many URLs in parallel with per-item webhooks.\n- [`client.fetch`](https://bytekit.com/docs/sdk/typescript/fetch) — Low-latency raw HTTP fetch with optional conversion.\n- [`client.monitors`](https://bytekit.com/docs/sdk/typescript/monitors) — Watch a URL on a schedule and webhook on change.\n- [`client.sitemap`](https://bytekit.com/docs/sdk/typescript/sitemap) — Discover URLs from a domain's sitemap or by crawling.\n- [`client.search`](https://bytekit.com/docs/sdk/typescript/search) — Run a web search and return ranked organic results.\n- [`client.account`](https://bytekit.com/docs/sdk/typescript/account) — Account info and API key management.\n- [`client.usage`](https://bytekit.com/docs/sdk/typescript/usage) — Billing-period and daily usage breakdowns.\n- [`client.webhooks`](https://bytekit.com/docs/sdk/typescript/webhooks) — List and retry webhook deliveries.\n\n## Errors\n\nAny non-2xx response throws a `ByteKitError` carrying the HTTP `status` and the API `code`.\n\n```ts\nimport { ByteKit, ByteKitError } from '@hunt-labs/bytekit-sdk';\n\ntry {\n await client.scrape.create({ url: 'https://example.com' });\n} catch (err) {\n if (err instanceof ByteKitError) {\n console.error(`${err.status} ${err.code}: ${err.message}`);\n }\n}\n```"
|
|
426
431
|
},
|
|
427
432
|
"sdk/typescript/fetch-bulk": {
|
|
428
433
|
"title": "Fetch Bulk",
|
|
429
434
|
"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:
|
|
435
|
+
"body": "# Fetch Bulk\n\nCreate and poll bulk fetch jobs.\n\n# Fetch Bulk\n\nCreate and poll bulk fetch jobs. Accessed via `client.fetch.bulk`.\n\n## create\n\n```ts\nclient.fetch.bulk.create(opts: FetchBulkCreateRequest): Promise<FetchBulkCreateResponse>\n```\n\nPOST /v1/fetch/bulk — create a bulk fetch job\n\n## get\n\n```ts\nclient.fetch.bulk.get(id: BulkId): Promise<FetchBulkGetResponse>\n```\n\nGET /v1/fetch/bulk/\\{id\\} — get a bulk fetch job"
|
|
431
436
|
},
|
|
432
437
|
"sdk/typescript/fetch": {
|
|
433
438
|
"title": "Fetch",
|
|
434
439
|
"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<
|
|
440
|
+
"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<FetchResult>\n```\n\nPOST /v1/fetch — fetch URL content via POST body.\n\nResolves a `FetchResult` — the raw content body plus `X-Fetch-*` metadata.\nThe body is returned verbatim — a JSON-serving upstream comes back as the\nraw JSON string, not a parsed object.\n\n## get\n\n```ts\nclient.fetch.get(opts: FetchGetOpts): Promise<FetchResult>\n```\n\nGET /v1/fetch — fetch URL content via query params.\n\nResolves a `FetchResult` — the raw content body plus `X-Fetch-*` metadata.\n\n`custom` is intentionally absent from the accepted opts: the spec's\n`GET /v1/fetch` has no `custom` query param and the value was never\nserialized, so passing it is a compile error rather than a silent drop\n(#2481). Use `create()` (POST) when you need to echo a `custom` payload.\n\n## Options (`FetchOpts`)\n\n- `url` (required) — `string`\n- `format` — `'markdown' | 'html'` — Output format. `'markdown'` runs the HTML→markdown pipeline; `'html'` returns raw HTML. Narrowed to the spec union — off-spec values (e.g. `'pdf'`) are rejected at compile time.\n- `country` — `string`\n- `timeout_ms` — `number`\n- `markdown_mode` — `'article' | 'raw' | 'llm'` — Markdown processing mode. Only used when `format=markdown`. article/raw/llm.\n- `markdown_query` — `string` — BM25 query string for relevance-ranked filtering. Only used when `format=markdown`.\n- `markdown_links` — `'inline' | 'references' | 'none' | 'text'` — Link rendering style. Only used when `format=markdown`.\n- `markdown_images` — `'inline' | 'references' | 'none' | 'text'` — Image retention mode. Only used when `format=markdown`.\n- `with_links_summary` — `boolean` — Append a `Links:` footer to the markdown output. Only used when `format=markdown`.\n- `with_images_summary` — `boolean` — Append an `Images:` footer to the markdown output. Only used when `format=markdown`.\n- `markdown_compact` — `boolean` — Compact whitespace output. Only used when `format=markdown`.\n- `markdown_filter_images` — `boolean` — Filter low-signal images. Only used when `format=markdown`.\n- `markdown_include_media` — `boolean` — When true, `formats.links`/`formats.images` return rich objects and a top-level `tables` array is included. Only used when `format=markdown`.\n- `markdown_include_warnings` — `boolean` — When true, enables markdown-pipeline and tag-filter warnings for affected html/markdown requests.\n- `markdown_include_stats` — `boolean` — When true, includes a top-level `stats` object (chars, tokens, blocks). Only used when `format=markdown`.\n- `cache_ttl` — `string | 0` — How long a freshly fetched URL may be served from cache. Matches the\nOpenAPI `FetchRequest.cache_ttl` schema: a duration string (`\"48h\"`,\n`\"2d\"`, up to `168h` / `7d`) or the integer `0` to disable caching.\nDefaults to `\"48h\"` server-side when omitted.\n- `custom` — `Record<string, unknown>` — User-supplied JSON payload, base64-encoded into the `X-Fetch-Custom`\nresponse header so callers can correlate the response to caller-side\nstate. Capped at 4096 UTF-8 bytes after JSON serialization. Does NOT\naffect cache-key inputs."
|
|
436
441
|
},
|
|
437
442
|
"sdk/typescript/monitors": {
|
|
438
443
|
"title": "Monitors",
|
|
439
444
|
"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:
|
|
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"
|
|
445
|
+
"body": "# Monitors\n\nWatch a URL on a schedule and webhook on change.\n\n# Monitors\n\nWatch a URL on a schedule and webhook on change. Accessed via `client.monitors`.\n\n## create\n\n```ts\nclient.monitors.create(opts: MonitorCreateRequest): Promise<MonitorCreateResponse>\n```\n\nPOST /v1/monitors — create a page-change monitor (screenshot or scrape capture).\nFirst-capture behavior is the same for both types: the first capture is a silent baseline (has_change=false, change_pct=null) with no change_detected webhook, whether the monitor is `scrape` or `screenshot`. From the second capture onward both types diff against the previous capture.\n\n## list\n\n```ts\nclient.monitors.list(params?: ListMonitorsParams): Promise<ListMonitorsResponse>\n```\n\nGET /v1/monitors — list monitors for the account.\n\n`params` is optional and each key is omitted-when-absent, so `list()` with no argument\nserializes the bare `/v1/monitors` URL unchanged — existing zero-arg callers are unaffected.\n\n## get\n\n```ts\nclient.monitors.get(id: MonitorId): Promise<MonitorResponse>\n```\n\nGET /v1/monitors/\\{id\\} — get a monitor by ID\n\n## update\n\n```ts\nclient.monitors.update(id: MonitorId, opts: MonitorUpdateRequest): Promise<UpdateMonitorResponse>\n```\n\nPATCH /v1/monitors/\\{id\\} — update a monitor\n\n## delete\n\n```ts\nclient.monitors.delete(id: MonitorId): Promise<void>\n```\n\nDELETE /v1/monitors/\\{id\\} — delete a monitor.\n\nReturns 204 No Content (`operations['deleteMonitor']['responses'][204]`\ndeclares `content?: never`), so there is no JSON arm to derive a payload\nfrom — hence `Promise<void>`. `client.request()` short-circuits the empty\nbody to `undefined` before it would parse as JSON (#2450).\n\n## captures\n\n### list\n\n```ts\nclient.monitors.captures.list(id: MonitorId): Promise<ListMonitorCapturesResponse>\n```\n\nGET /v1/monitors/\\{id\\}/captures — list captures for a monitor"
|
|
446
446
|
},
|
|
447
447
|
"sdk/typescript/scrape-bulk": {
|
|
448
448
|
"title": "Scrape Bulk",
|
|
@@ -452,12 +452,12 @@
|
|
|
452
452
|
"sdk/typescript/scrape": {
|
|
453
453
|
"title": "Scrape",
|
|
454
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, requestOptions?: RequestOptions): Promise<ScrapeCreateResponse>\n```\n\nPOST /v1/scrape — create a scrape job.\n\nResolves to the 200 success envelope, or the 202 queued envelope when\n`async: true`. Narrow on `status` before reading the result.\n\n`requestOptions` carries the CLIENT-side abort budget (`requestTimeoutMs`) and an\noptional caller `signal`; both override the constructor's `timeoutMs` default. They\nare a different axis from `opts.timeout_ms`, which is the SERVER-side scrape budget.\n\n## get\n\n```ts\nclient.scrape.get(id: ScrapeId, requestOptions?: RequestOptions): Promise<ScrapeGetResponse>\n```\n\nGET /v1/scrape/\\{id\\} — poll a scrape by ID\n\nKNOWN DRIFT (#2426): live staging spot-checks (two independent fetches)\nfound the gateway serializes `billing_multiplier` as a JSON **string**\n(e.g. `\"0.50\"`) on this GET path, while the OpenAPI spec — and this\nderived `ScrapeGetResponse` type — declare it `number`. `POST /v1/scrape`'s\nsuccess envelope for the same job serializes the identical field as a\nproper number, so the drift is specific to the GET path (likely a Postgres\nNUMERIC column round-tripping as a string on this query path). A consumer\ndoing arithmetic on `billing_multiplier` after `get()` (e.g.\n`content_length * billing_multiplier`) should coerce with `Number(...)`\ndefensively rather than trust the static type. This is a gateway/worker\nserialization bug, not a client bug — the fix belongs upstream in the\ngateway and is out of this ticket's scope.\n\n## Options (`ScrapeOpts`)\n\n- `url` (required) — `string`\n- `formats` — `Array<'raw_html' | 'html' | 'markdown' | 'links' | 'images'>`\n- `country` — `string`\n- `cookies` — `Array<Record<string, unknown>>`\n- `headers` — `Record<string, string>`\n- `delay_ms` — `number`\n- `timeout_ms` — `number` — SERVER-side scrape budget in ms — how long the gateway may spend on the scrape itself. For the CLIENT-side abort budget (when this SDK gives up on the wire), see `RequestOptions.requestTimeoutMs`.\n- `async` — `boolean`\n- `webhook_url` — `string`\n- `events` — `Array<'queued' | 'completed' | 'failed'>`\n- `markdown_mode` — `MarkdownMode` — Markdown processing mode. article=article extraction (default), raw=minimal cleanup, llm=compact LLM-optimised output.\n- `markdown_query` — `string` — BM25 query string for relevance-ranked content filtering. Omit or leave empty to disable.\n- `markdown_links` — `MarkdownLinks` — Link rendering style in the markdown output.\n- `markdown_compact` — `boolean` — Collapse excessive whitespace for a more compact output.\n- `markdown_filter_images` — `boolean` — Filter low-signal images from the markdown output.\n- `markdown_include_media` — `boolean` — When true, `formats.links` and `formats.images` return `ScrapeScoredLink[]` / `ScrapeScoredImage[]` (rich objects) instead of `string[]`, and a top-level `tables` array is included. Only effective when `markdown` is in `formats`.\n- `markdown_include_warnings` — `boolean` — When true, the response includes markdown-pipeline and tag-filter warnings. `artifact_unavailable` may appear independently when a requested persisted format cannot be rehydrated.\n- `markdown_include_stats` — `boolean` — When true, the response includes a top-level `stats` object with `ScrapeStats` (chars, tokens, blocks). Only effective when `markdown` is in `formats`.\n- `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."
|
|
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, requestOptions?: RequestOptions): Promise<ScrapeCreateResponse>\n```\n\nPOST /v1/scrape — create a scrape job.\n\nResolves to the 200 success envelope, or the 202 queued envelope when\n`async: true`. Narrow on `status` before reading the result.\n\n`requestOptions` carries the CLIENT-side abort budget (`requestTimeoutMs`) and an\noptional caller `signal`; both override the constructor's `timeoutMs` default. They\nare a different axis from `opts.timeout_ms`, which is the SERVER-side scrape budget.\n\n## get\n\n```ts\nclient.scrape.get(id: ScrapeId, requestOptions?: RequestOptions): Promise<ScrapeGetResponse>\n```\n\nGET /v1/scrape/\\{id\\} — poll a scrape by ID\n\nKNOWN DRIFT (#2426): live staging spot-checks (two independent fetches)\nfound the gateway serializes `billing_multiplier` as a JSON **string**\n(e.g. `\"0.50\"`) on this GET path, while the OpenAPI spec — and this\nderived `ScrapeGetResponse` type — declare it `number`. `POST /v1/scrape`'s\nsuccess envelope for the same job serializes the identical field as a\nproper number, so the drift is specific to the GET path (likely a Postgres\nNUMERIC column round-tripping as a string on this query path). A consumer\ndoing arithmetic on `billing_multiplier` after `get()` (e.g.\n`content_length * billing_multiplier`) should coerce with `Number(...)`\ndefensively rather than trust the static type. This is a gateway/worker\nserialization bug, not a client bug — the fix belongs upstream in the\ngateway and is out of this ticket's scope.\n\n## Options (`ScrapeOpts`)\n\n- `url` (required) — `string`\n- `formats` — `Array<'raw_html' | 'html' | 'markdown' | 'links' | 'images'>`\n- `country` — `string`\n- `cookies` — `Array<Record<string, unknown>>`\n- `headers` — `Record<string, string>`\n- `delay_ms` — `number`\n- `timeout_ms` — `number` — SERVER-side scrape budget in ms — how long the gateway may spend on the scrape itself. For the CLIENT-side abort budget (when this SDK gives up on the wire), see `RequestOptions.requestTimeoutMs`.\n- `async` — `boolean`\n- `webhook_url` — `string`\n- `events` — `Array<'queued' | 'completed' | 'failed'>`\n- `markdown_mode` — `MarkdownMode` — Markdown processing mode. article=article extraction (default), raw=minimal cleanup, llm=compact LLM-optimised output.\n- `markdown_query` — `string` — BM25 query string for relevance-ranked content filtering. Omit or leave empty to disable.\n- `markdown_links` — `MarkdownLinks` — Link rendering style in the markdown output.\n- `markdown_images` — `MarkdownImages` — Image retention mode in the markdown output. Distinct from `markdown_filter_images` (which drops low-signal images before conversion).\n- `with_links_summary` — `boolean` — When true, appends a `Links:` footer to the markdown output. Automatically enabled when `markdown_links` is `'references'`.\n- `with_images_summary` — `boolean` — When true, appends an `Images:` footer to the markdown output.\n- `markdown_compact` — `boolean` — Collapse excessive whitespace for a more compact output.\n- `markdown_filter_images` — `boolean` — Filter low-signal images from the markdown output.\n- `markdown_include_media` — `boolean` — When true, `formats.links` and `formats.images` return `ScrapeScoredLink[]` / `ScrapeScoredImage[]` (rich objects) instead of `string[]`, and a top-level `tables` array is included. Only effective when `markdown` is in `formats`.\n- `markdown_include_warnings` — `boolean` — When true, the response includes markdown-pipeline and tag-filter warnings. `artifact_unavailable` may appear independently when a requested persisted format cannot be rehydrated.\n- `markdown_include_stats` — `boolean` — When true, the response includes a top-level `stats` object with `ScrapeStats` (chars, tokens, blocks). Only effective when `markdown` is in `formats`.\n- `token_budget` — `number` — Maximum token count for the markdown output. Truncates at the last paragraph → sentence → token boundary under the limit. Absent → no truncation.\n- `token_encoding` — `TokenEncoding` — Tokenizer encoding hint for `token_budget`. `cl100k_base` (default) matches GPT-4/4o; `o200k_base` matches GPT-4o-mini / o-series.\n- `mobile` — `boolean` — When true, emulate a mobile device (mobile UA + viewport). Default false (desktop). Part of the cache key, so mobile and desktop responses cache independently.\n- `remove_base64_images` — `boolean` — When true (default), base64-encoded `data:` image sources are stripped before markdown conversion and from `html` output. Set false to preserve them. Does not affect `raw_html`.\n- `include_tags` — `string[]` — HTML element names (not CSS selectors) to keep. When non-empty, only content within these elements is included in `html`/`markdown` output. Applied before `exclude_tags`. Does not affect `raw_html`.\n- `exclude_tags` — `string[]` — HTML element names (not CSS selectors) to strip from `html`/`markdown` output. Applied after `include_tags`. Does not affect `raw_html`.\n- `clean_markdown` — `boolean` — When true and `markdown` is in `formats`, the converted markdown is sent to Groq for cleaning before return. Graceful degradation on any Groq failure. Billing: 3× credits and bytes applied only when cleaning succeeds.\n- `cache_ttl` — `string | 0` — How long a freshly fetched URL may be served from cache. `'0'`/`0` skips the\ncache read (the result is still written), `'Nh'`/`'Nd'` set a TTL (capped at\n168h / 7d). Default `'48h'`. Honoured on both the synchronous and asynchronous\npaths; the async success envelope reports the outcome via the `cache` field.\n- `custom` — `Record<string, unknown>` — User-supplied JSON payload, echoed back on the success envelope so callers\ncan correlate the response to caller-side state (job IDs, batch metadata).\nCapped at 4096 UTF-8 bytes after JSON serialization. Does NOT affect\ncache-key inputs — two requests differing only in `custom` share the same\ncache slot."
|
|
456
456
|
},
|
|
457
457
|
"sdk/typescript/screenshots": {
|
|
458
458
|
"title": "Screenshots",
|
|
459
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: ScreenshotCreateRequest): Promise<ScreenshotCreateResponse>\n```\n\nPOST /v1/screenshots — capture a screenshot\n\n## get\n\n```ts\nclient.screenshots.get(id: ScreenshotId): Promise<ScreenshotGetResponse>\n```\n\nGET /v1/screenshots/\\{id\\} — poll a screenshot by ID.\n\nA terminal-`failed` screenshot returns the `Error` envelope on a 200\n(issue #2027), so narrow the result before reading `image_url`."
|
|
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: ScreenshotCreateRequest, params?: { async?: boolean }): Promise<ScreenshotCreateResponse>\n```\n\nPOST /v1/screenshots — capture a screenshot.\n\n`params.async` maps to the `?async=true` query param (queued 202 capture). It is a QUERY\nparam on `createScreenshot`, distinct from scrape where `async` is a body field. `params` is\noptional and `async` omitted-when-absent: `create(opts)` with no second argument posts to the\nbare `/v1/screenshots` URL unchanged — existing single-arg callers are unaffected.\n\n## get\n\n```ts\nclient.screenshots.get(id: ScreenshotId): Promise<ScreenshotGetResponse>\n```\n\nGET /v1/screenshots/\\{id\\} — poll a screenshot by ID.\n\nA terminal-`failed` screenshot returns the `Error` envelope on a 200\n(issue #2027), so narrow the result before reading `image_url`."
|
|
461
461
|
},
|
|
462
462
|
"sdk/typescript/search": {
|
|
463
463
|
"title": "Search",
|
|
@@ -467,6 +467,16 @@
|
|
|
467
467
|
"sdk/typescript/sitemap": {
|
|
468
468
|
"title": "Sitemap",
|
|
469
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:
|
|
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: SitemapCreateRequest): Promise<SitemapCreateResponse>\n```\n\nPOST /v1/sitemap — start a sitemap crawl\n\n## get\n\n```ts\nclient.sitemap.get(id: SitemapId): Promise<SitemapGetResponse>\n```\n\nGET /v1/sitemap/\\{id\\} — get a sitemap job by ID"
|
|
471
|
+
},
|
|
472
|
+
"sdk/typescript/usage": {
|
|
473
|
+
"title": "Usage",
|
|
474
|
+
"section": "SDK Reference",
|
|
475
|
+
"body": "# Usage\n\nBilling-period and daily usage breakdowns.\n\n# Usage\n\nBilling-period and daily usage breakdowns. Accessed via `client.usage`.\n\n## get\n\n```ts\nclient.usage.get(): Promise<GetUsageResponse>\n```\n\nGET /v1/usage — get current billing period usage.\n\n## daily\n\n```ts\nclient.usage.daily(params?: GetUsageDailyParams): Promise<GetUsageDailyResponse>\n```\n\nGET /v1/usage/daily — get daily usage breakdown.\nDefault range is the last 30 days; max range is 366 days.\n\n## byEndpoint\n\n```ts\nclient.usage.byEndpoint(params?: GetUsageByEndpointParams): Promise<GetUsageByEndpointResponse>\n```\n\nGET /v1/usage/by-endpoint — get per-endpoint bandwidth breakdown.\nDefault range is the last 30 days; max range is 366 days."
|
|
476
|
+
},
|
|
477
|
+
"sdk/typescript/webhooks": {
|
|
478
|
+
"title": "Webhooks",
|
|
479
|
+
"section": "SDK Reference",
|
|
480
|
+
"body": "# Webhooks\n\nList and retry webhook deliveries.\n\n# Webhooks\n\nList and retry webhook deliveries. Accessed via `client.webhooks`.\n\n## list\n\n```ts\nclient.webhooks.list(params?: ListWebhookDeliveriesParams): Promise<ListWebhookDeliveriesResponse>\n```\n\nGET /v1/webhook-deliveries — list webhook deliveries.\n\n## retry\n\n```ts\nclient.webhooks.retry(id: WebhookDeliveryId): Promise<RetryWebhookDeliveryResponse>\n```\n\nPOST /v1/webhook-deliveries/\\{id\\}/retry — requeue a failed or exhausted delivery."
|
|
471
481
|
}
|
|
472
482
|
}
|