@hunt-labs/bytekit-mcp 0.3.14 → 0.3.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/dist/docs-bundle/docs-bundle.json +5 -5
- package/dist/docs-bundle/helpers.d.ts +16 -14
- package/dist/docs-bundle/helpers.js +23 -19
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,26 @@ today, see [README.md](./README.md), which remains the authoritative usage guide
|
|
|
10
10
|
|
|
11
11
|
## [Unreleased]
|
|
12
12
|
|
|
13
|
+
## [0.3.15] - 2026-09-30
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- The docs-bundle builder now reads the `llms.txt` index in its new `- [Title](url): description`
|
|
18
|
+
link shape and ignores URLs outside `/docs` (the new summary block's `api.bytekit.com` and
|
|
19
|
+
`app.bytekit.com`), so regenerating the bundled documentation snapshot after the docs
|
|
20
|
+
`llms.txt` reorder (#5007) still yields the same page set. No tool, schema or transport change.
|
|
21
|
+
|
|
22
|
+
### Changed
|
|
23
|
+
|
|
24
|
+
- The bundled documentation snapshot now carries the rewritten Introduction page, which states the
|
|
25
|
+
base URL, the `BYTEKIT_API_KEY` auth header, the install lines for both SDKs, one curl call and one
|
|
26
|
+
TypeScript SDK call, so an agent that reads only that page can integrate ByteKit (#5005). The
|
|
27
|
+
`get_doc` and `search_docs` tools serve the new text; no tool, schema or transport change.
|
|
28
|
+
- The bundled documentation snapshot now carries the SDK package names on the Client Libraries,
|
|
29
|
+
TypeScript SDK, Python SDK and Quickstart pages: install `@hunt-labs/bytekit-sdk` (npm) /
|
|
30
|
+
`bytekit-sdk` (PyPI), and the npm package named `bytekit` is not ByteKit's (#5004). The `get_doc`
|
|
31
|
+
and `search_docs` tools serve the new text; no tool, schema or transport change.
|
|
32
|
+
|
|
13
33
|
## [0.3.14] - 2026-09-29
|
|
14
34
|
|
|
15
35
|
### Changed
|
|
@@ -367,12 +367,12 @@
|
|
|
367
367
|
"introduction": {
|
|
368
368
|
"title": "Introduction",
|
|
369
369
|
"section": "General",
|
|
370
|
-
"body": "# Introduction\n\nA REST API for screenshots, scraping, and page-change monitoring — one key, one base URL, every output.\n\n## What ByteKit is\n\nByteKit is a REST API for capturing what a webpage looks like and what it says —\nscreenshots, raw HTML or clean markdown, and page-change monitoring.\nOne API key, one base URL, every output you'd otherwise stitch together from a headless-browser\nfarm and a scraping proxy.\n\n## What you can do with it\n\n- **Scrape** — Fetch a URL as raw HTML, clean markdown, or structured content.\n- **Screenshot** — Capture full-page or viewport PNG/JPEG.\n- **Monitor** — Watch a URL on a schedule and webhook you when the rendered output changes.\n- **Bulk** — Fan out thousands of URLs in parallel and receive a webhook as each finishes.\n- **Sitemap** — Discover URLs from a domain's sitemap or by light crawling.\n\nScrape calls accept an `\"async\": true` body field, in which case the API returns `202` with a `sc_…`\nID that you poll or receive via webhook. Screenshots are synchronous by default (the call holds up to\n28s and returns `200`); pass the `?async=true` query parameter to get back `202` with an `ss_…` ID\nimmediately.\n\n## Authentication and accounts\n\nEvery request carries a Bearer API key, prefixed `sk_live_`. Manage keys from the dashboard —\nup to 50 active keys per account, with per-key billing attribution so you can split usage\ncleanly across services.\n\nFull details in the [Authentication guide](https://bytekit.com/docs/guides/authentication).\n\n## Where to go next\n\n- [Quickstart](https://bytekit.com/docs/quickstart) — first call in under five minutes, no SDK required.\n- [Client Libraries](https://bytekit.com/docs/libraries/typescript) — official TypeScript and Python SDKs.\n- [Scraping](https://bytekit.com/docs/guides/scraping) — formats, options, async polling.\n- [Rate Limits](https://bytekit.com/docs/guides/rate-limits) — quota model, concurrency slots, response headers.\n- [Monitors](https://bytekit.com/docs/guides/monitors) — schedule-based change detection with webhooks.\n- [API Reference](https://bytekit.com/docs/api) — every endpoint, request, and response."
|
|
370
|
+
"body": "# Introduction\n\nA REST API for screenshots, scraping, and page-change monitoring — one key, one base URL, every output.\n\n## What ByteKit is\n\nByteKit is a REST API for capturing what a webpage looks like and what it says —\nscreenshots, raw HTML or clean markdown, and page-change monitoring.\nOne API key, one base URL, every output you'd otherwise stitch together from a headless-browser\nfarm and a scraping proxy.\n\n## Integrate in 60 seconds\n\n- **Base URL:** `https://api.bytekit.com`\n- **Auth:** send `Authorization: Bearer $BYTEKIT_API_KEY` on every request. Create a key in the\n [ByteKit dashboard](https://app.bytekit.com) and export it as `BYTEKIT_API_KEY`.\n- **Install:** `npm install @hunt-labs/bytekit-sdk` for TypeScript, or `pip install bytekit-sdk`\n for Python (import name `bytekit`).\n\nThe npm package is `@hunt-labs/bytekit-sdk` — not `bytekit`, which is an unrelated package.\n\nOne call with curl:\n\n```bash\ncurl -X POST https://api.bytekit.com/v1/scrape \\\n -H \"Authorization: Bearer $BYTEKIT_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"url\":\"https://example.com\"}'\n```\n\nThe same call with the TypeScript SDK:\n\n```ts\nimport { ByteKit } from '@hunt-labs/bytekit-sdk';\n\nconst client = new ByteKit({ apiKey: process.env.BYTEKIT_API_KEY! });\nconst result = await client.scrape.create({ url: 'https://example.com' });\nconsole.log(result);\n```\n\nFull SDK guides: [TypeScript](https://bytekit.com/docs/libraries/typescript) and [Python](https://bytekit.com/docs/libraries/python).\n\n## What you can do with it\n\n- **Scrape** — Fetch a URL as raw HTML, clean markdown, or structured content.\n- **Screenshot** — Capture full-page or viewport PNG/JPEG.\n- **Monitor** — Watch a URL on a schedule and webhook you when the rendered output changes.\n- **Bulk** — Fan out thousands of URLs in parallel and receive a webhook as each finishes.\n- **Sitemap** — Discover URLs from a domain's sitemap or by light crawling.\n\nScrape calls accept an `\"async\": true` body field, in which case the API returns `202` with a `sc_…`\nID that you poll or receive via webhook. Screenshots are synchronous by default (the call holds up to\n28s and returns `200`); pass the `?async=true` query parameter to get back `202` with an `ss_…` ID\nimmediately.\n\n## Authentication and accounts\n\nEvery request carries a Bearer API key, prefixed `sk_live_`. Manage keys from the [dashboard](https://app.bytekit.com) —\nup to 50 active keys per account, with per-key billing attribution so you can split usage\ncleanly across services.\n\nFull details in the [Authentication guide](https://bytekit.com/docs/guides/authentication).\n\n## Where to go next\n\n- [Quickstart](https://bytekit.com/docs/quickstart) — first call in under five minutes, no SDK required.\n- [Client Libraries](https://bytekit.com/docs/libraries/typescript) — official TypeScript and Python SDKs.\n- [Scraping](https://bytekit.com/docs/guides/scraping) — formats, options, async polling.\n- [Rate Limits](https://bytekit.com/docs/guides/rate-limits) — quota model, concurrency slots, response headers.\n- [Monitors](https://bytekit.com/docs/guides/monitors) — schedule-based change detection with webhooks.\n- [API Reference](https://bytekit.com/docs/api) — every endpoint, request, and response."
|
|
371
371
|
},
|
|
372
372
|
"libraries": {
|
|
373
373
|
"title": "Client Libraries",
|
|
374
374
|
"section": "Libraries",
|
|
375
|
-
"body": "# Client Libraries\n\nThe official TypeScript and Python clients, and how to call ByteKit from Go.\n\nByteKit ships official SDKs for TypeScript and Python. Both are thin wrappers over the same\nREST endpoints, so nothing they do is out of reach from a language without an SDK — the Go page\nshows the plain standard-library equivalent. These pages cover installing and configuring each\nclient; the per-method reference is in the [SDK Reference](https://bytekit.com/docs/sdk).\n\n- [TypeScript SDK](https://bytekit.com/docs/libraries/typescript) — Type-safe ByteKit client for Node.js and modern JavaScript runtimes.\n- [Python SDK](https://bytekit.com/docs/libraries/python) — Official Python client for ByteKit, with sync and async support.\n- [Go](https://bytekit.com/docs/libraries/go) — Call the ByteKit REST API from Go with the standard library."
|
|
375
|
+
"body": "# Client Libraries\n\nThe official TypeScript and Python clients, and how to call ByteKit from Go.\n\nByteKit ships official SDKs for TypeScript and Python. Both are thin wrappers over the same\nREST endpoints, so nothing they do is out of reach from a language without an SDK — the Go page\nshows the plain standard-library equivalent. These pages cover installing and configuring each\nclient; the per-method reference is in the [SDK Reference](https://bytekit.com/docs/sdk).\n\nInstall `@hunt-labs/bytekit-sdk` (npm) / `bytekit-sdk` (PyPI). The npm package named `bytekit` is not ours.\n\n- [TypeScript SDK](https://bytekit.com/docs/libraries/typescript) — Type-safe ByteKit client for Node.js and modern JavaScript runtimes.\n- [Python SDK](https://bytekit.com/docs/libraries/python) — Official Python client for ByteKit, with sync and async support.\n- [Go](https://bytekit.com/docs/libraries/go) — Call the ByteKit REST API from Go with the standard library."
|
|
376
376
|
},
|
|
377
377
|
"libraries/go": {
|
|
378
378
|
"title": "Go",
|
|
@@ -382,12 +382,12 @@
|
|
|
382
382
|
"libraries/python": {
|
|
383
383
|
"title": "Python SDK",
|
|
384
384
|
"section": "Libraries",
|
|
385
|
-
"body": "# Python SDK\n\nOfficial Python client for ByteKit, with sync and async support.\n\nThe official Python SDK is generated from the ByteKit OpenAPI spec, so its models and\nmethods always match the API. Every operation ships in both synchronous and asynchronous form.\n\n## Install\n\n```bash\npip install bytekit-sdk\n```\n\nThe PyPI distribution is `bytekit-sdk`; the import name is `bytekit
|
|
385
|
+
"body": "# Python SDK\n\nOfficial Python client for ByteKit, with sync and async support.\n\nThe official Python SDK is generated from the ByteKit OpenAPI spec, so its models and\nmethods always match the API. Every operation ships in both synchronous and asynchronous form.\n\n## Install\n\n```bash\npip install bytekit-sdk\n```\n\nThe PyPI distribution is `bytekit-sdk`; the import name is `bytekit`. Install `@hunt-labs/bytekit-sdk` (npm) / `bytekit-sdk` (PyPI). The npm package named `bytekit` is not ours.\n\n## Your first scrape\n\n```python\nfrom bytekit import AuthenticatedClient\nfrom bytekit.api.scrape import create_scrape\nfrom bytekit.models.scrape_request import ScrapeRequest\nfrom bytekit.models.scrape_request_formats_item import ScrapeRequestFormatsItem\nfrom bytekit.models.scrape_success_envelope import ScrapeSuccessEnvelope\n\nclient = AuthenticatedClient(\n base_url=\"https://api.bytekit.com\",\n token=\"sk_live_your_api_key_here\",\n)\n\n# Request the markdown format explicitly — otherwise response.formats.markdown is UNSET.\nbody = ScrapeRequest(\n url=\"https://example.com\",\n formats=[ScrapeRequestFormatsItem.MARKDOWN],\n)\nresponse = create_scrape.sync(client=client, body=body)\n\n# .sync() returns None on a transport error, and a queued/error envelope on the\n# async or failure paths. Only a ScrapeSuccessEnvelope carries populated formats.\nif response is None:\n print(\"Request failed — no response returned.\")\nelif isinstance(response, ScrapeSuccessEnvelope) and isinstance(response.formats.markdown, str):\n print(response.formats.markdown)\nelse:\n # Queued (ScrapeQueuedEnvelope) or error (ScrapeErrorEnvelope) — inspect `response`.\n print(f\"Scrape not complete: {response}\")\n```\n\nEach operation exposes four call styles:\n\n- `create_scrape.sync(...)` — returns the parsed model (or `None`).\n- `create_scrape.sync_detailed(...)` — returns the full `Response` (status code, headers, body).\n- `create_scrape.asyncio(...)` — awaitable form of `sync`.\n- `create_scrape.asyncio_detailed(...)` — awaitable form of `sync_detailed`.\n\n## Async usage\n\n```python\nimport asyncio\nfrom bytekit import AuthenticatedClient\nfrom bytekit.api.screenshots import create_screenshot\nfrom bytekit.models.screenshot_request import ScreenshotRequest\n\nasync def main():\n client = AuthenticatedClient(\n base_url=\"https://api.bytekit.com\",\n token=\"sk_live_your_api_key_here\",\n )\n body = ScreenshotRequest(url=\"https://example.com\")\n response = await create_screenshot.asyncio(client=client, body=body)\n print(response)\n\nasyncio.run(main())\n```\n\n## What's available\n\nOperations are grouped by capability under `bytekit.api.*`: `scrape`, `scrape_bulk`,\n`screenshots`, `bulk`, `fetch`, `fetch_bulk`, `monitors`, `sitemap`, and\n`account`.\n\nSee the [Python SDK Reference](https://bytekit.com/docs/sdk/python/client) for every module, function, and model.\n\n## Next steps\n\n- [TypeScript SDK](https://bytekit.com/docs/libraries/typescript) — the same API surface in TypeScript.\n- [API Reference](https://bytekit.com/docs/api) — the underlying REST endpoints.\n- [Errors](https://bytekit.com/docs/guides/errors) — error codes and retry guidance."
|
|
386
386
|
},
|
|
387
387
|
"libraries/typescript": {
|
|
388
388
|
"title": "TypeScript SDK",
|
|
389
389
|
"section": "Libraries",
|
|
390
|
-
"body": "# TypeScript SDK\n\nType-safe ByteKit client for Node.js and modern JavaScript runtimes.\n\nThe official TypeScript SDK is a thin, type-safe wrapper over the ByteKit REST API. It works\nin Node.js and any runtime with a global `fetch` (Bun, Deno, Cloudflare Workers, modern\nbrowsers).\n\n## Install\n\n```bash\nnpm install @hunt-labs/bytekit-sdk\n```\n\n## Initialize\n\n```ts\nimport { ByteKit } from '@hunt-labs/bytekit-sdk';\n\nconst client = new ByteKit({\n apiKey: process.env.BYTEKIT_API_KEY!, // your sk_live_… key\n});\n```\n\n## Your first scrape\n\n```ts\nconst result = await client.scrape.create({\n url: 'https://example.com',\n formats: ['markdown'],\n});\n\nconsole.log(result);\n```\n\n## Capture a screenshot\n\n```ts\nconst shot = await client.screenshots.create({\n url: 'https://example.com',\n full_page: true,\n});\n\nconsole.log(shot);\n```\n\n## Handle errors\n\nAny 4xx/5xx response throws a `ByteKitError` carrying the HTTP `status` and the API\n`error.code`:\n\n```ts\nimport { ByteKit, ByteKitError } from '@hunt-labs/bytekit-sdk';\n\ntry {\n await client.scrape.create({ url: 'https://example.com' });\n} catch (err) {\n if (err instanceof ByteKitError) {\n console.error(`${err.status} ${err.code}: ${err.message}`);\n } else {\n throw err;\n }\n}\n```\n\n## Async scrapes\n\nPass `async: true` to enqueue the job and poll by ID:\n\n```ts\nconst queued = await client.scrape.create({ url: 'https://example.com', async: true });\n// later — poll with the returned sc_… id\nconst final = await client.scrape.get('sc_...');\n```\n\n## What's available\n\nThe client exposes one resource per capability: `scrape`, `screenshots`, `bulk`,\n`fetch`, `monitors`, `sitemap`, `search`, `account`, `usage`, and `webhooks` (each with\n`create` / `get` / `list` methods as applicable, plus nested resources like `scrape.bulk`\nand `monitors.captures`).\n\nSee the [TypeScript SDK Reference](https://bytekit.com/docs/sdk/typescript/client) for every method and option.\n\n## Next steps\n\n- [Python SDK](https://bytekit.com/docs/libraries/python) — the same API surface in Python.\n- [API Reference](https://bytekit.com/docs/api) — the underlying REST endpoints.\n- [Errors](https://bytekit.com/docs/guides/errors) — error codes and retry guidance."
|
|
390
|
+
"body": "# TypeScript SDK\n\nType-safe ByteKit client for Node.js and modern JavaScript runtimes.\n\nThe official TypeScript SDK is a thin, type-safe wrapper over the ByteKit REST API. It works\nin Node.js and any runtime with a global `fetch` (Bun, Deno, Cloudflare Workers, modern\nbrowsers).\n\n## Install\n\n```bash\nnpm install @hunt-labs/bytekit-sdk\n```\n\nInstall `@hunt-labs/bytekit-sdk` (npm) / `bytekit-sdk` (PyPI). The npm package named `bytekit` is not ours.\n\n## Initialize\n\n```ts\nimport { ByteKit } from '@hunt-labs/bytekit-sdk';\n\nconst client = new ByteKit({\n apiKey: process.env.BYTEKIT_API_KEY!, // your sk_live_… key\n});\n```\n\n## Your first scrape\n\n```ts\nconst result = await client.scrape.create({\n url: 'https://example.com',\n formats: ['markdown'],\n});\n\nconsole.log(result);\n```\n\n## Capture a screenshot\n\n```ts\nconst shot = await client.screenshots.create({\n url: 'https://example.com',\n full_page: true,\n});\n\nconsole.log(shot);\n```\n\n## Handle errors\n\nAny 4xx/5xx response throws a `ByteKitError` carrying the HTTP `status` and the API\n`error.code`:\n\n```ts\nimport { ByteKit, ByteKitError } from '@hunt-labs/bytekit-sdk';\n\ntry {\n await client.scrape.create({ url: 'https://example.com' });\n} catch (err) {\n if (err instanceof ByteKitError) {\n console.error(`${err.status} ${err.code}: ${err.message}`);\n } else {\n throw err;\n }\n}\n```\n\n## Async scrapes\n\nPass `async: true` to enqueue the job and poll by ID:\n\n```ts\nconst queued = await client.scrape.create({ url: 'https://example.com', async: true });\n// later — poll with the returned sc_… id\nconst final = await client.scrape.get('sc_...');\n```\n\n## What's available\n\nThe client exposes one resource per capability: `scrape`, `screenshots`, `bulk`,\n`fetch`, `monitors`, `sitemap`, `search`, `account`, `usage`, and `webhooks` (each with\n`create` / `get` / `list` methods as applicable, plus nested resources like `scrape.bulk`\nand `monitors.captures`).\n\nSee the [TypeScript SDK Reference](https://bytekit.com/docs/sdk/typescript/client) for every method and option.\n\n## Next steps\n\n- [Python SDK](https://bytekit.com/docs/libraries/python) — the same API surface in Python.\n- [API Reference](https://bytekit.com/docs/api) — the underlying REST endpoints.\n- [Errors](https://bytekit.com/docs/guides/errors) — error codes and retry guidance."
|
|
391
391
|
},
|
|
392
392
|
"mcp": {
|
|
393
393
|
"title": "MCP Server",
|
|
@@ -397,7 +397,7 @@
|
|
|
397
397
|
"quickstart": {
|
|
398
398
|
"title": "Quickstart",
|
|
399
399
|
"section": "General",
|
|
400
|
-
"body": "# Quickstart\n\nMake your first ByteKit API call in under 5 minutes — no SDK required.\n\nNothing to install. You only need `curl` and an API key.\n\n## Get an API key\n\nSign up at [app.bytekit.com](https://app.bytekit.com) and create an API key from the\ndashboard. Keys are prefixed `sk_live_`.\n\nSee [Authentication](https://bytekit.com/docs/guides/authentication) for details on key formats and management.\n\n## Make your first scrape\n\nSet your API key and run this — no file to save, no `chmod`:\n\n```bash\ncurl -X POST https://api.bytekit.com/v1/scrape \\\n -H \"Authorization: Bearer $BYTEKIT_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"url\":\"https://example.com\"}'\n```\n\nWant a full-featured script with error handling and `jq` formatting? Use this instead:\n\n```bash\n#!/usr/bin/env bash\n# POST /v1/scrape — scrape a URL and return its content as markdown.\n# Usage: BYTEKIT_API_KEY=sk_... bash examples/curl/scrape.sh\n\nset -euo pipefail\n\n: \"${BYTEKIT_API_KEY:?BYTEKIT_API_KEY is required}\"\nBASE_URL=\"${BYTEKIT_BASE_URL:-https://api.bytekit.com}\"\n\ncurl -sf -X POST \"$BASE_URL/v1/scrape\" \\\n -H \"Authorization: Bearer $BYTEKIT_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"url\": \"https://example.com\", \"formats\": [\"markdown\"]}' \\\n | jq .\n```\n\nA successful response looks like this — every envelope field is `snake_case`:\n\n```json\n{\n \"schema_version\": 1,\n \"status\": \"success\",\n \"id\": \"sc_84c14b1058184045b97ae360ad74888b\",\n \"url\": \"https://example.com\",\n \"final_url\": \"https://example.com\",\n \"content_type\": \"text/html\",\n \"content_length\": 318,\n \"status_code\": 200,\n \"retrieved_at\": \"2026-08-27T12:16:01.872Z\",\n \"formats\": {\n \"raw\": \"<!doctype html><html lang=\\\"en\\\"><head><title>Example Domain</title>…</html>\\n\"\n },\n \"metadata\": {\n \"title\": \"Example Domain\",\n \"description\": null,\n \"language\": \"en\",\n \"canonicalUrl\": null,\n \"ogTitle\": null,\n \"ogDescription\": null,\n \"ogImage\": null,\n \"ogUrl\": null,\n \"ogSiteName\": null,\n \"robots\": null,\n \"byline\": null,\n \"publishedAt\": null\n },\n \"cache\": \"miss\",\n \"billing\": {\n \"raw_bytes\": 318,\n \"factors\": [{ \"name\": \"endpoint\", \"value\": 1, \"reason\": \"scrape\" }],\n \"multiplier\": 1,\n \"billed_bytes\": 318\n }\n}\n```\n\n`content_length` is the compressed wire size in bytes (used for bandwidth billing), and\n`billing` breaks down what the request actually cost. `cache` is `\"miss\"` or `\"hit\"`, and a\nhit adds a `cache_age_s` field. The `id` field uses the `sc_` prefix — you can poll\n`GET /v1/scrape/{id}` if the scrape was queued asynchronously.\n\nThe keys inside `metadata` stay `camelCase` (`canonicalUrl`, `ogTitle`, …): they are the\npage's own metadata, not envelope fields.\n\n## Ask for markdown\n\nThe default format is `raw` — that is why the response above carries no\n`formats.markdown`. Request markdown explicitly:\n\n```bash\ncurl -X POST https://api.bytekit.com/v1/scrape \\\n -H \"Authorization: Bearer $BYTEKIT_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"url\":\"https://example.com\",\"formats\":[\"markdown\"]}'\n```\n\nMarkdown output is billed at **1.5×** the request's upstream wire bytes — the `endpoint`\nfactor in the `billing` node below is the rate your balance is charged, not a display\nweighting. See [Bandwidth billing](https://bytekit.com/docs/billing/bandwidth) for how the factors compose.\n\nThe response's `formats` object is keyed by what you asked for:\n\n```json\n{\n \"schema_version\": 1,\n \"status\": \"success\",\n \"id\": \"sc_f659fa67dfb244159767132c2aa50917\",\n \"url\": \"https://example.com\",\n \"final_url\": \"https://example.com\",\n \"content_type\": \"text/html\",\n \"content_length\": 318,\n \"status_code\": 200,\n \"retrieved_at\": \"2026-08-27T12:16:11.337Z\",\n \"formats\": {\n \"markdown\": \"---\\ntitle: \\\"Example Domain\\\"\\nurl: \\\"https://example.com\\\"\\ncaptured_at: \\\"2026-08-27T12:16:11.416Z\\\"\\n---\\nThis domain is for use in documentation examples without needing permission. Avoid use in operations.\\n\\n[Learn more](https://iana.org/domains/example)\"\n },\n \"metadata\": {\n \"title\": \"Example Domain\",\n \"description\": null,\n \"language\": \"en\",\n \"canonicalUrl\": null,\n \"ogTitle\": null,\n \"ogDescription\": null,\n \"ogImage\": null,\n \"ogUrl\": null,\n \"ogSiteName\": null,\n \"robots\": null,\n \"byline\": null,\n \"publishedAt\": null\n },\n \"cache\": \"hit\",\n \"cache_age_s\": 8,\n \"billing\": {\n \"raw_bytes\": 318,\n \"factors\": [\n { \"name\": \"endpoint\", \"value\": 1.5, \"reason\": \"scrape_md\" },\n { \"name\": \"cache_hit\", \"value\": 0.5, \"reason\": \"hit, age 8s\" }\n ],\n \"multiplier\": 0.75,\n \"billed_bytes\": 239\n }\n}\n```\n\nSee [Scraping](https://bytekit.com/docs/guides/scraping) for the other formats (`markdown`, `links`, `images`).\n\n## Prefer an SDK?\n\nSkip the raw HTTP and use an official client:\n\n- [TypeScript SDK](https://bytekit.com/docs/libraries/typescript) — `npm install @hunt-labs/bytekit-sdk`\n- [Python SDK](https://bytekit.com/docs/libraries/python) — `pip install bytekit-sdk`\n\n## Next steps\n\n- [Authentication](https://bytekit.com/docs/guides/authentication) — key formats, Bearer header, self-serve key management\n- [Scraping](https://bytekit.com/docs/guides/scraping) — formats, options, latency, and async polling\n- [Errors](https://bytekit.com/docs/guides/errors) — error shape, common codes, retry guidance\n- [Rate Limits](https://bytekit.com/docs/guides/rate-limits) — quota model, concurrency slots, rate limit headers\n- [Monitors](https://bytekit.com/docs/guides/monitors) — page-change detection (screenshot or scrape) with webhook notifications\n- [API Reference](https://bytekit.com/docs/api) — full endpoint documentation"
|
|
400
|
+
"body": "# Quickstart\n\nMake your first ByteKit API call in under 5 minutes — no SDK required.\n\nNothing to install. You only need `curl` and an API key.\n\n## Get an API key\n\nSign up at [app.bytekit.com](https://app.bytekit.com) and create an API key from the\ndashboard. Keys are prefixed `sk_live_`.\n\nSee [Authentication](https://bytekit.com/docs/guides/authentication) for details on key formats and management.\n\n## Make your first scrape\n\nSet your API key and run this — no file to save, no `chmod`:\n\n```bash\ncurl -X POST https://api.bytekit.com/v1/scrape \\\n -H \"Authorization: Bearer $BYTEKIT_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"url\":\"https://example.com\"}'\n```\n\nWant a full-featured script with error handling and `jq` formatting? Use this instead:\n\n```bash\n#!/usr/bin/env bash\n# POST /v1/scrape — scrape a URL and return its content as markdown.\n# Usage: BYTEKIT_API_KEY=sk_... bash examples/curl/scrape.sh\n\nset -euo pipefail\n\n: \"${BYTEKIT_API_KEY:?BYTEKIT_API_KEY is required}\"\nBASE_URL=\"${BYTEKIT_BASE_URL:-https://api.bytekit.com}\"\n\ncurl -sf -X POST \"$BASE_URL/v1/scrape\" \\\n -H \"Authorization: Bearer $BYTEKIT_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"url\": \"https://example.com\", \"formats\": [\"markdown\"]}' \\\n | jq .\n```\n\nA successful response looks like this — every envelope field is `snake_case`:\n\n```json\n{\n \"schema_version\": 1,\n \"status\": \"success\",\n \"id\": \"sc_84c14b1058184045b97ae360ad74888b\",\n \"url\": \"https://example.com\",\n \"final_url\": \"https://example.com\",\n \"content_type\": \"text/html\",\n \"content_length\": 318,\n \"status_code\": 200,\n \"retrieved_at\": \"2026-08-27T12:16:01.872Z\",\n \"formats\": {\n \"raw\": \"<!doctype html><html lang=\\\"en\\\"><head><title>Example Domain</title>…</html>\\n\"\n },\n \"metadata\": {\n \"title\": \"Example Domain\",\n \"description\": null,\n \"language\": \"en\",\n \"canonicalUrl\": null,\n \"ogTitle\": null,\n \"ogDescription\": null,\n \"ogImage\": null,\n \"ogUrl\": null,\n \"ogSiteName\": null,\n \"robots\": null,\n \"byline\": null,\n \"publishedAt\": null\n },\n \"cache\": \"miss\",\n \"billing\": {\n \"raw_bytes\": 318,\n \"factors\": [{ \"name\": \"endpoint\", \"value\": 1, \"reason\": \"scrape\" }],\n \"multiplier\": 1,\n \"billed_bytes\": 318\n }\n}\n```\n\n`content_length` is the compressed wire size in bytes (used for bandwidth billing), and\n`billing` breaks down what the request actually cost. `cache` is `\"miss\"` or `\"hit\"`, and a\nhit adds a `cache_age_s` field. The `id` field uses the `sc_` prefix — you can poll\n`GET /v1/scrape/{id}` if the scrape was queued asynchronously.\n\nThe keys inside `metadata` stay `camelCase` (`canonicalUrl`, `ogTitle`, …): they are the\npage's own metadata, not envelope fields.\n\n## Ask for markdown\n\nThe default format is `raw` — that is why the response above carries no\n`formats.markdown`. Request markdown explicitly:\n\n```bash\ncurl -X POST https://api.bytekit.com/v1/scrape \\\n -H \"Authorization: Bearer $BYTEKIT_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"url\":\"https://example.com\",\"formats\":[\"markdown\"]}'\n```\n\nMarkdown output is billed at **1.5×** the request's upstream wire bytes — the `endpoint`\nfactor in the `billing` node below is the rate your balance is charged, not a display\nweighting. See [Bandwidth billing](https://bytekit.com/docs/billing/bandwidth) for how the factors compose.\n\nThe response's `formats` object is keyed by what you asked for:\n\n```json\n{\n \"schema_version\": 1,\n \"status\": \"success\",\n \"id\": \"sc_f659fa67dfb244159767132c2aa50917\",\n \"url\": \"https://example.com\",\n \"final_url\": \"https://example.com\",\n \"content_type\": \"text/html\",\n \"content_length\": 318,\n \"status_code\": 200,\n \"retrieved_at\": \"2026-08-27T12:16:11.337Z\",\n \"formats\": {\n \"markdown\": \"---\\ntitle: \\\"Example Domain\\\"\\nurl: \\\"https://example.com\\\"\\ncaptured_at: \\\"2026-08-27T12:16:11.416Z\\\"\\n---\\nThis domain is for use in documentation examples without needing permission. Avoid use in operations.\\n\\n[Learn more](https://iana.org/domains/example)\"\n },\n \"metadata\": {\n \"title\": \"Example Domain\",\n \"description\": null,\n \"language\": \"en\",\n \"canonicalUrl\": null,\n \"ogTitle\": null,\n \"ogDescription\": null,\n \"ogImage\": null,\n \"ogUrl\": null,\n \"ogSiteName\": null,\n \"robots\": null,\n \"byline\": null,\n \"publishedAt\": null\n },\n \"cache\": \"hit\",\n \"cache_age_s\": 8,\n \"billing\": {\n \"raw_bytes\": 318,\n \"factors\": [\n { \"name\": \"endpoint\", \"value\": 1.5, \"reason\": \"scrape_md\" },\n { \"name\": \"cache_hit\", \"value\": 0.5, \"reason\": \"hit, age 8s\" }\n ],\n \"multiplier\": 0.75,\n \"billed_bytes\": 239\n }\n}\n```\n\nSee [Scraping](https://bytekit.com/docs/guides/scraping) for the other formats (`markdown`, `links`, `images`).\n\n## Prefer an SDK?\n\nSkip the raw HTTP and use an official client:\n\n- [TypeScript SDK](https://bytekit.com/docs/libraries/typescript) — `npm install @hunt-labs/bytekit-sdk`\n- [Python SDK](https://bytekit.com/docs/libraries/python) — `pip install bytekit-sdk`\n\nInstall `@hunt-labs/bytekit-sdk` (npm) / `bytekit-sdk` (PyPI). The npm package named `bytekit` is not ours.\n\n## Next steps\n\n- [Authentication](https://bytekit.com/docs/guides/authentication) — key formats, Bearer header, self-serve key management\n- [Scraping](https://bytekit.com/docs/guides/scraping) — formats, options, latency, and async polling\n- [Errors](https://bytekit.com/docs/guides/errors) — error shape, common codes, retry guidance\n- [Rate Limits](https://bytekit.com/docs/guides/rate-limits) — quota model, concurrency slots, rate limit headers\n- [Monitors](https://bytekit.com/docs/guides/monitors) — page-change detection (screenshot or scrape) with webhook notifications\n- [API Reference](https://bytekit.com/docs/api) — full endpoint documentation"
|
|
401
401
|
},
|
|
402
402
|
"sdk": {
|
|
403
403
|
"title": "SDK Reference",
|
|
@@ -60,27 +60,29 @@ export declare function slugToUrlPath(slug: string[]): string;
|
|
|
60
60
|
/**
|
|
61
61
|
* Parses the llms.txt response to extract page slugs.
|
|
62
62
|
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
* The link targets the HTML page (/docs/<slug>) with no description.
|
|
63
|
+
* Each entry line has the llms.txt link-convention shape (issues #2059, #5007):
|
|
64
|
+
* "- [<title>](https://bytekit.com/docs/api/md/<slug>): <description>"
|
|
65
|
+
* The link targets the raw-markdown route (/docs/api/md/<slug>); the
|
|
66
|
+
* ": <description>" suffix is omitted when the page has none. The docs index
|
|
67
|
+
* keeps its HTML URL ("- [<title>](https://bytekit.com/docs/)").
|
|
69
68
|
*
|
|
70
|
-
* The URL is
|
|
71
|
-
*
|
|
72
|
-
* which contain an http token). The slug
|
|
73
|
-
* route prefix (/docs/api/md/) when
|
|
69
|
+
* The URL is the FIRST http(s) token on the line, ended by whitespace or the
|
|
70
|
+
* ")" that closes the link (robust to colons and parentheses in the title and
|
|
71
|
+
* to a trailing description, neither of which contain an http token). The slug
|
|
72
|
+
* is derived by stripping the raw-markdown route prefix (/docs/api/md/) when
|
|
73
|
+
* present, else the /docs/ prefix.
|
|
74
74
|
*
|
|
75
|
-
* Lines without an http URL,
|
|
76
|
-
*
|
|
75
|
+
* Lines without an http URL, URLs outside /docs (the summary block's
|
|
76
|
+
* api.bytekit.com and app.bytekit.com), and the docs index (empty slug) are
|
|
77
|
+
* ignored.
|
|
77
78
|
*/
|
|
78
79
|
export declare function parseLlmsTxt(text: string): Array<string[]>;
|
|
79
80
|
/**
|
|
80
81
|
* Returns a new bundle object whose keys are sorted lexicographically.
|
|
81
82
|
*
|
|
82
|
-
* Page-slug discovery order comes from `/docs/llms.txt`, which
|
|
83
|
-
* fumadocs-mdx's file-discovery
|
|
83
|
+
* Page-slug discovery order comes from `/docs/llms.txt`, which follows the docs
|
|
84
|
+
* navigation tree (issue #5007); pages the tree leaves to fumadocs-mdx's file-discovery
|
|
85
|
+
* order in the generated `.source/index.ts` manifest are not pinned.
|
|
84
86
|
* That order is NOT guaranteed stable across independent `next build` invocations —
|
|
85
87
|
* two regenerations from byte-identical docs content can (and empirically do, issue
|
|
86
88
|
* #2590 DoD-2) produce a differently-ORDERED but content-identical bundle, because
|
|
@@ -84,20 +84,21 @@ export function slugToUrlPath(slug) {
|
|
|
84
84
|
/**
|
|
85
85
|
* Parses the llms.txt response to extract page slugs.
|
|
86
86
|
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
* The link targets the HTML page (/docs/<slug>) with no description.
|
|
87
|
+
* Each entry line has the llms.txt link-convention shape (issues #2059, #5007):
|
|
88
|
+
* "- [<title>](https://bytekit.com/docs/api/md/<slug>): <description>"
|
|
89
|
+
* The link targets the raw-markdown route (/docs/api/md/<slug>); the
|
|
90
|
+
* ": <description>" suffix is omitted when the page has none. The docs index
|
|
91
|
+
* keeps its HTML URL ("- [<title>](https://bytekit.com/docs/)").
|
|
93
92
|
*
|
|
94
|
-
* The URL is
|
|
95
|
-
*
|
|
96
|
-
* which contain an http token). The slug
|
|
97
|
-
* route prefix (/docs/api/md/) when
|
|
93
|
+
* The URL is the FIRST http(s) token on the line, ended by whitespace or the
|
|
94
|
+
* ")" that closes the link (robust to colons and parentheses in the title and
|
|
95
|
+
* to a trailing description, neither of which contain an http token). The slug
|
|
96
|
+
* is derived by stripping the raw-markdown route prefix (/docs/api/md/) when
|
|
97
|
+
* present, else the /docs/ prefix.
|
|
98
98
|
*
|
|
99
|
-
* Lines without an http URL,
|
|
100
|
-
*
|
|
99
|
+
* Lines without an http URL, URLs outside /docs (the summary block's
|
|
100
|
+
* api.bytekit.com and app.bytekit.com), and the docs index (empty slug) are
|
|
101
|
+
* ignored.
|
|
101
102
|
*/
|
|
102
103
|
export function parseLlmsTxt(text) {
|
|
103
104
|
const slugs = [];
|
|
@@ -105,18 +106,20 @@ export function parseLlmsTxt(text) {
|
|
|
105
106
|
const trimmed = line.trim();
|
|
106
107
|
if (!trimmed.startsWith('- '))
|
|
107
108
|
continue;
|
|
108
|
-
// Extract URL — the first
|
|
109
|
-
//
|
|
110
|
-
|
|
111
|
-
const urlMatch = trimmed.match(/https?:\/\/\S+/);
|
|
109
|
+
// Extract URL — the first http(s) token on the line, up to whitespace or the
|
|
110
|
+
// ")" closing the markdown link.
|
|
111
|
+
const urlMatch = trimmed.match(/https?:\/\/[^\s)]+/);
|
|
112
112
|
if (!urlMatch)
|
|
113
113
|
continue;
|
|
114
114
|
const url = urlMatch[0];
|
|
115
115
|
try {
|
|
116
116
|
const pathname = new URL(url).pathname; // e.g. /docs/api/md/guides/authentication
|
|
117
|
+
// Summary-block URLs (api.bytekit.com, app.bytekit.com) are not doc pages.
|
|
118
|
+
if (pathname !== '/docs' && !pathname.startsWith('/docs/'))
|
|
119
|
+
continue;
|
|
117
120
|
// Prefer the raw-markdown route prefix (/docs/api/md/) so the derived slug
|
|
118
121
|
// is the page slug, not the md-route path. Fall back to the /docs/ prefix
|
|
119
|
-
// for the
|
|
122
|
+
// for the docs-index line, which keeps its HTML URL.
|
|
120
123
|
const mdMatch = pathname.match(/^\/docs\/api\/md\/(.+)$/);
|
|
121
124
|
const afterDocs = mdMatch ? mdMatch[1] : pathname.replace(/^\/docs\/?/, '');
|
|
122
125
|
if (!afterDocs)
|
|
@@ -133,8 +136,9 @@ export function parseLlmsTxt(text) {
|
|
|
133
136
|
/**
|
|
134
137
|
* Returns a new bundle object whose keys are sorted lexicographically.
|
|
135
138
|
*
|
|
136
|
-
* Page-slug discovery order comes from `/docs/llms.txt`, which
|
|
137
|
-
* fumadocs-mdx's file-discovery
|
|
139
|
+
* Page-slug discovery order comes from `/docs/llms.txt`, which follows the docs
|
|
140
|
+
* navigation tree (issue #5007); pages the tree leaves to fumadocs-mdx's file-discovery
|
|
141
|
+
* order in the generated `.source/index.ts` manifest are not pinned.
|
|
138
142
|
* That order is NOT guaranteed stable across independent `next build` invocations —
|
|
139
143
|
* two regenerations from byte-identical docs content can (and empirically do, issue
|
|
140
144
|
* #2590 DoD-2) produce a differently-ORDERED but content-identical bundle, because
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hunt-labs/bytekit-mcp",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.15",
|
|
4
4
|
"description": "ByteKit MCP server — exposes ByteKit web-data tools (scrape, screenshot, search, docs) to AI agents over the Model Context Protocol, hosted or as a local stdio server.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|