# @yandex-cloud/nodejs-sdk

> Yandex.Cloud NodeJS SDK

Latest version **3.2.0** (published 2026-05-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @yandex-cloud/nodejs-sdk
pnpm add @yandex-cloud/nodejs-sdk
yarn add @yandex-cloud/nodejs-sdk
bun add @yandex-cloud/nodejs-sdk
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads; large bundle.

## Facts

| | |
|---|---|
| Version | 3.2.0 |
| Published | 2026-05-07 |
| First published | 2022-01-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=22.15.0 |
| Dependencies | 13 |
| Unpacked size | 42.7 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 73 |
| Author | Yandex LLC |
| Maintainers | yc-ui-bot, yandex-cloud-bot, monsterzz, amje, resure, seqvirioum, yariktri |
| Keywords | yandex-cloud, sdk, cloud |

## Links

- npm: https://www.npmjs.com/package/@yandex-cloud/nodejs-sdk
- Repository: https://github.com/yandex-cloud/nodejs-sdk
- Homepage: https://github.com/yandex-cloud/nodejs-sdk#readme
- Issues: https://github.com/yandex-cloud/nodejs-sdk/issues
- npm.io page: https://npm.io/package/@yandex-cloud/nodejs-sdk

## Dependencies (13)

- [long](https://npm.io/package/long.md) ^5.2.0
- [axios](https://npm.io/package/axios.md) ^1.8.2
- [luxon](https://npm.io/package/luxon.md) ^2.2.0
- [lodash](https://npm.io/package/lodash.md) ^4.17.21
- [log4js](https://npm.io/package/log4js.md) ^6.4.0
- [nice-grpc](https://npm.io/package/nice-grpc.md) ^1.2.2
- [protobufjs](https://npm.io/package/protobufjs.md) ^7.2.4
- [jsonwebtoken](https://npm.io/package/jsonwebtoken.md) ^9.0.0
- [@grpc/grpc-js](https://npm.io/package/@grpc/grpc-js.md) ^1.6.12
- [utility-types](https://npm.io/package/utility-types.md) ^3.10.0
- [abort-controller-x](https://npm.io/package/abort-controller-x.md) ^0.4.1
- [node-abort-controller](https://npm.io/package/node-abort-controller.md) ^3.1.1
- [nice-grpc-client-middleware-deadline](https://npm.io/package/nice-grpc-client-middleware-deadline.md) ^1.0.6

## Recent versions

- 3.2.0 (latest) — 2026-05-07
- 3.0.0-beta.5 (beta) — 2026-04-16
- 3.0.0-alpha.18 (alpha) — 2025-05-28
- 3.1.0 — 2026-04-17
- 3.0.0 — 2026-04-16
- 3.0.0-beta.4 — 2026-04-16
- 3.0.0-beta.3 — 2026-04-15
- 2.9.3 — 2026-04-15
- 3.0.0-beta.2 — 2026-04-15
- 2.9.2 — 2026-04-15
- 2.9.1 — 2026-03-05
- 3.0.0-beta.1 — 2025-05-28
- 2.9.0 — 2025-05-14
- 3.0.0-alpha.17 — 2025-04-22
- 3.0.0-alpha.16 — 2025-04-02
- … 56 more at https://npm.io/package/@yandex-cloud/nodejs-sdk/versions

## README

# Yandex.Cloud SDK (nodejs)

[![npm](https://img.shields.io/npm/v/@yandex-cloud/nodejs-sdk.svg)](https://www.npmjs.com/package/@yandex-cloud/nodejs-sdk)
[![License](https://img.shields.io/github/license/yandex-cloud/nodejs-sdk.svg)](https://github.com/yandex-cloud/nodejs-sdk/blob/master/LICENSE)

Need to automate your infrastructure or use services provided by Yandex.Cloud? We've got you covered.

## Requirements
- nodejs >= 22.15

## Installation
`npm install @yandex-cloud/nodejs-sdk`

## Getting started

There are three options for authorization your requests:
- [IAM token](https://cloud.yandex.com/en-ru/docs/iam/operations/iam-token/create)
- [Metadata Service](https://cloud.yandex.com/en-ru/docs/compute/concepts/vm-metadata) (if you're executing code inside VMs or Functions
running in Yandex.Cloud)


### Metadata Service

Don't forget to assign Service Account for your Instance or Function.

```typescript
import { Session} from '@yandex-cloud/nodejs-sdk';
import { cloudService } from '@yandex-cloud/nodejs-sdk/resourcemanager-v1';

// Initialize SDK with your token
const session = new Session();

// Create service client
const cloudServiceClient = session.client(cloudService.CloudServiceClient);

// Issue request (returns Promise)
const response = await cloudServiceClient.list(cloudService.ListCloudsRequest.fromPartial({
    pageSize: 100,
}));
```

### IAM Token

```typescript
import { Session } from '@yandex-cloud/nodejs-sdk';
import { cloudService } from '@yandex-cloud/nodejs-sdk/resourcemanager-v1';

// Initialize SDK with your token
const session = new Session({ iamToken: 'YOUR_TOKEN' });

// Create service client
const cloudServiceClient = session.client(cloudService.CloudServiceClient);

// Issue request (returns Promise)
const response = await cloudServiceClient.list(cloudService.ListCloudsRequest.fromPartial({
    pageSize: 100,
}));
```

### Tracing (OpenTelemetry)

The SDK can wrap every gRPC call in an OpenTelemetry span via [`nice-grpc-opentelemetry`](https://www.npmjs.com/package/nice-grpc-opentelemetry).
Install the peer packages and pass `tracing: true`:

```bash
npm install @opentelemetry/api nice-grpc-opentelemetry
```

```typescript
import { Session } from '@yandex-cloud/nodejs-sdk';

const session = new Session({ iamToken: 'YOUR_TOKEN', tracing: true });
```

A span is produced per RPC attempt (i.e. inside the SDK's retry loop), and trace context is propagated via gRPC metadata using the OpenTelemetry global propagator.
See [`examples/opentelemetry.ts`](./examples/opentelemetry.ts) for a runnable end-to-end setup.

Check [examples](./examples) directory for more examples.

To run example scripts, you should execute the following commands:
```bash
cd examples
npm i
YC_IAM_TOKEN=... YC_FOLDER_ID=... npm run start path/to/example.ts
```

P.S If you need generated client for other Yandex.Cloud services, just open an issue.

---
_Source: https://npm.io/package/@yandex-cloud/nodejs-sdk · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
