Skip to content
API Reference Zilliz Cloud Milvus Attu

Milvus Node.js SDK Documentation

Build fast vector search applications in TypeScript with the official Milvus Node.js SDK. Connect to Milvus or Zilliz Cloud, manage schemas and indexes, and ship search workflows from one typed client.

Typed Node.js client

Full TypeScript definitions, async APIs, and coverage for collection, data, index, partition, user, and system operations.

Production search workflows

Build vector search, hybrid search, bulk import, iterators, retry logic, and serverless-friendly HTTP integrations.

Milvus is an open-source vector database built to power embedding similarity search and AI applications. It provides:

  • Scalability: Handle billions of vectors with ease
  • Performance: Optimized for fast similarity search
  • Flexibility: Support for multiple vector types and data types
  • Cloud-native: Built for modern cloud architectures

The Milvus Node.js SDK offers:

  • Full API Coverage: Complete access to all Milvus features
  • TypeScript Support: Full type definitions for better development experience
  • Connection Pooling: Efficient connection management
  • Error Handling: Comprehensive error handling and retry mechanisms
  • HTTP & gRPC Support: Choose the protocol that fits your needs
  • Production Ready: Battle-tested in production environments

The following table shows the recommended @zilliz/milvus2-sdk-node versions for different Milvus versions:

Milvus versionNode SDK versionInstallation
v3.0.0+v3.0.0+ / latestyarn add @zilliz/milvus2-sdk-node@latest
v2.6.0+v2.6.xyarn add @zilliz/milvus2-sdk-node@2.6.9
v2.5.0+v2.5.xyarn add @zilliz/milvus2-sdk-node@2.5.12
v2.4.0+v2.4.9yarn add @zilliz/milvus2-sdk-node@2.4.9
v2.3.0+v2.3.5yarn add @zilliz/milvus2-sdk-node@2.3.5
v2.2.0+v2.3.5yarn add @zilliz/milvus2-sdk-node@2.3.5

Features that require a Milvus 3.0 server are marked with the Milvus 3.0 tag throughout this documentation. The Node SDK 3.x docs now cover:

  • External collections: create collections over external data sources and refresh external collection jobs.
  • Collection snapshots: create, list, describe, restore, pin, unpin, and drop snapshots.
  • Partial array upsert: append to or remove from Array fields with field_ops.
  • Element-level result metadata: read offset values from query/search results and group_by_field_values from grouped search results.
  • Schema and function management: add fields/functions and manage collection functions from the SDK.

See Migration & Compatibility for the detailed coverage matrix, including Milvus 3.0 proto additions that are not exposed as public SDK methods.

  • Node.js: Version 18 or higher
  • Milvus: A running Milvus instance (standalone or cluster)
  • Package Manager: npm or yarn
import { MilvusClient } from '@zilliz/milvus2-sdk-node';
const client = new MilvusClient({
address: 'localhost:19530',
});
await client.connectPromise;
console.log('Connected to Milvus!');
  • API Reference: Complete method signatures, request types, response types, and enums