# Client Libraries

The official TypeScript and Python clients, and how to call ByteKit from Go.

ByteKit ships official SDKs for TypeScript and Python. Both are thin wrappers over the same
REST endpoints, so nothing they do is out of reach from a language without an SDK — the Go page
shows the plain standard-library equivalent. These pages cover installing and configuring each
client; the per-method reference is in the [SDK Reference](https://bytekit.com/docs/sdk).

Install `@hunt-labs/bytekit-sdk` (npm) / `bytekit-sdk` (PyPI).

TypeScript:

```bash
npm install @hunt-labs/bytekit-sdk
```

```ts
import { ByteKit } from '@hunt-labs/bytekit-sdk';

const client = new ByteKit({ apiKey: process.env.BYTEKIT_API_KEY! });
const result = await client.scrape.create({ url: 'https://example.com', formats: ['markdown'] });
if (result.status === 'success') {
  console.log(result.metadata.title);
  console.log(result.formats.markdown);
} else {
  console.log(result); // the queued receipt; a failed scrape throws ByteKitError instead
}
```

Python:

```bash
pip install bytekit-sdk
```

```python
import os

from bytekit import ByteKit
from bytekit.models import ScrapeSuccessEnvelope

client = ByteKit(api_key=os.environ["BYTEKIT_API_KEY"])
result = client.scrape.create(url="https://example.com", formats=["markdown"])
if isinstance(result, ScrapeSuccessEnvelope):
    print(result.metadata.title)
    print(result.formats.markdown)
else:
    print(result)  # the queued receipt; a non-2xx response or a failed scrape raises ByteKitError
```

- [TypeScript SDK](https://bytekit.com/docs/libraries/typescript) — Type-safe ByteKit client for Node.js and modern JavaScript runtimes.
- [Python SDK](https://bytekit.com/docs/libraries/python) — Official Python client for ByteKit, with sync and async support.
- [Go](https://bytekit.com/docs/libraries/go) — Call the ByteKit REST API from Go with the standard library.