# SDKs (Node.js and Python)

Site-Shot ships two official SDKs so JavaScript/TypeScript and Python projects can capture screenshots without hand-rolling the HTTP call.

- npm package: `site-shot-sdk` — install with `npm install site-shot-sdk`
  - Source: https://github.com/site-shot/site-shot-sdk
  - Requires Node.js 18 or newer; zero runtime dependencies; ESM, CommonJS, and TypeScript types included
- PyPI package: `site-shot` — install with `pip install site-shot` (import name `site_shot`)
  - Source: https://github.com/site-shot/site-shot-python
  - Requires Python 3.9 or newer; zero dependencies (standard library only); fully typed (`py.typed`); synchronous only — there is no async client in v1

Both SDKs are thin clients over the existing screenshot API. They do not change the screenshot backend; they authenticate with the same screenshot API key. Node.js and Python are the only languages with an official SDK — in Go, Ruby, Java, C#, PHP and everywhere else you call the HTTP API directly.

## Quickstart

Node.js:

```js
import { SiteShot } from "site-shot-sdk";

const client = new SiteShot(process.env.SITESHOT_API_KEY);
const png = await client.capture({ url: "https://example.com/", full_size: true });
```

`capture()` returns a `Buffer` holding the image.

Python:

```python
from site_shot import SiteShot

client = SiteShot("YOUR_API_KEY")  # or set SITESHOT_API_KEY
png = client.capture("https://example.com/", full_size=True)
```

`capture()` returns `bytes`. The Python client also offers `capture_to_file()`, `capture_base64()`, `capture_json()`, and `build_url()`. The target URL is a positional argument; every capture option is a keyword argument.

## Parameters

Options mirror the screenshot API query parameters: `url` plus optional `width`, `height`, `full_size`, `max_height`, `format`, `delay_time`, `timeout`, `no_ads`, `no_cookie_popup`, `country`, `strict_country`, `language`, `time_zone`, and `geolocation`. `country` takes a two-letter ISO 3166-1 code (for example `country: "DE"` in Node, `country="DE"` in Python).

One subtlety in the Python client: the constructor's `timeout=` is the client-side deadline **in seconds** for the whole exchange, while the per-call `timeout=` capture option is the server-side render deadline **in milliseconds**, named verbatim after the HTTP parameter.

These map to the same query parameters documented in the [Screenshot API](/api/v1/agent/docs/screenshot-api.md) page. Get an API key from the [pricing page](/pricing/).
