> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getlurk.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SDKs

> TypeScript and Python clients for the Lurk API. Optional: every call is also a plain HTTPS request.

An SDK is the API with the chores done for you: it makes idempotency keys, retries only where that is safe, reads errors into typed objects and checks webhook signatures. It is a convenience, not a requirement. If you prefer plain HTTP, [the quickstart](https://docs.getlurk.com/quickstart.md) shows `curl`, and the API reference lists every endpoint.

| | Install | Needs | Source |
| - | - | - | - |
| [TypeScript and JavaScript](https://docs.getlurk.com/sdks/typescript.md) | `npm install @getlurk/sdk` | Node 20 or newer, or a browser-like runtime: Cloudflare Workers, Bun, Deno | [getlurk/lurk-sdk-js](https://github.com/getlurk/lurk-sdk-js) |
| [Python](https://docs.getlurk.com/sdks/python.md) | `pip install getlurk` | Python 3.11 or newer | [getlurk/lurk-sdk-py](https://github.com/getlurk/lurk-sdk-py) |

Both have no runtime dependencies, ship their types, and are licensed Apache-2.0. Other languages: use the REST API, or generate a client from the [OpenAPI file](https://docs.getlurk.com/api-reference/openapi.json). Tell us which language you want next in an issue on either repository.

## What every SDK does

* **Idempotency keys.** A write that can carry one gets one, made once per call and sent again on every retry. Pass your own when you have something stable, like an order ID. [Details](https://docs.getlurk.com/guides/idempotency-and-retries.md).
* **Retries, only where they are safe.** A connection error, `408` and `5xx` are retried twice by default with a growing, jittered delay. A `429` waits for the `Retry-After` it gives. A call that makes a secret shown once (a new key, a new webhook endpoint) is not retried after a connection failure or server error.
* **Typed errors.** Every error has a status, a code, the field it is about, a request ID, a link to its docs and one sentence on what to do next. [All the codes](https://docs.getlurk.com/errors.md).
* **Pages.** One helper walks a paged list and asks for the next page only when you want it. [Pagination](https://docs.getlurk.com/guides/pagination.md).
* **Webhook checks.** One function verifies a delivery's signature and returns the event. [Webhooks](https://docs.getlurk.com/webhooks.md).
* **A way to test your own code** without the network. [Testing](https://docs.getlurk.com/sdks/testing.md).

## Your key

An SDK needs a **project key** (`lurk_sk_…`), from `LURK_KEY` or passed in. Agent keys (`lurk_ak_…`) are for [agents](https://docs.getlurk.com/build-with-an-agent.md), not for the SDKs.

> [!WARNING]
>
> Keep the key on your server. A key in a browser or a mobile app is a key anyone can take. If your app needs to act for a user, your server calls Lurk.

Start with a **Staging** project key. When you [go live](https://docs.getlurk.com/guides/going-live.md), use the Production project's key: nothing else changes, because the address is the same.

## What it sends about itself

Each request carries a header `x-lurk-sdk` with the SDK and its version, such as `typescript/0.2.1`. That is all: no names, no machine details, nothing from your data. We use it to see which versions are still in use before an API change is made (see [versioning](https://docs.getlurk.com/guides/versioning.md)). It is sent on every call and there is no separate switch, because it is how a deprecation can be done kindly. If you want to see it, run any call through a proxy, or read `SDK_VERSION`.

## Versions

SDK versions follow [semantic versioning](https://semver.org), and follow the API's: a new operation or field is a minor, a fix is a patch, and a breaking change of the API's version is a major. Only the latest major version gets fixes. The SDK and the API changes are in the [changelog](https://docs.getlurk.com/changelog.md).

The packages are built from the same repository as the API and released by a pipeline that checks them against what is live in production, so an SDK never has a method the API you talk to does not yet have. Each release is published with **provenance**: the registry can show where it was built.

```bash theme={null}
npm audit signatures        # JavaScript: verifies the registry signature and the attestation
```

## Help

Open an issue on the SDK's repository. Never include a key: the `request_id` of an error is enough for us to find the call. For a security problem, write to [security@getlurk.com](mailto:security@getlurk.com).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.