qdrant-js

qdrantApache-2.0活跃维护

Qdrant 向量数据库的 JavaScript/TypeScript 官方 SDK,让 Node.js 和前端项目能方便地接入向量检索,用于构建 RAG 和相似度搜索应用。

JavaScript/Typescript SDK for Qdrant Vector Database

v1.20.0发布于 2026-10-22 09:00 UTC473star +1 / 7 天51fork同步于 2026-11-10 11:59 UTC

怎么上手

由 README 提炼,执行前请确认
pnpm i @qdrant/js-client-rest
# 或
npm install @qdrant/js-client-rest
硬件要求按 README 说明

README 未说明;SDK 本身是客户端库,需另行运行 Qdrant 服务,README 示例用 Docker 启动 qdrant/qdrant 并映射 6333 端口。

有 Docker 镜像
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

Qdrant 向量数据库的 JS/TS SDK,让 Node、Deno、浏览器直接调用向量检索

Qdrant 向量数据库的 JavaScript/TypeScript 官方 SDK,让 Node.js 和前端项目能方便地接入向量检索,用于构建 RAG 和相似度搜索应用。

核心能力

  • 提供主 SDK 包与轻量 REST、gRPC 两个客户端包
  • 用 facade 方法如 getCollections 发起请求
  • 同时提供 TypeScript 类型定义
  • 支持 Node.js ESM 与 CJS、Deno、浏览器 fetch
  • 可连本地 Qdrant 或带 apiKey 的 Qdrant Cloud

容易踩的坑

需先自行启动 Qdrant 服务(如 docker run -p 6333:6333 qdrant/qdrant),SDK 不含数据库本体;Node.js 需 >= 18.0.0;仓库开发用 pnpm,非 monorepo 场景才可用 npm。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v1.20.0
  1. v1.20.0最新正式版2026-10-22 · 2026-10-22 09:00 UTC

    Support for the Qdrant v1.20.0 API across @qdrant/qdrant-js, @qdrant/js-client-rest and @qdrant/js-client-grpc.

    New in both clients

    • BM25 ranking over text indexes: scoring on text index params, and a text query for query/queryBatch/queryGroups that ranks by the payload field named in using. Per-request IDF params now also apply to BM25.
    • substring match condition for keyword fields.
    • nested option on every payload index params type, to index each object of an array (e.g. offers[].price) as its own entry.
    • max, min and acosh formula expressions.
    • turbo8 and turbo16 vector datatypes, and the bits8 TurboQuant bit size.
    • Point id tracker params (id_tracker) on create/update collection. Collection info now reports created_at.
    • code tokenizer for text indexes (source-code identifier splitting).

    New in the REST client

    • createCollection and recreateCollection accept id_tracker.
    await client.createPayloadIndex('docs', {field_name: 'title', field_schema: {type: 'text', scoring: true}, wait: true});
    await client.query('docs', {query: {text: 'vector search'}, using: 'title'});
    await client.query('docs', {query: {text: {query: 'vector search', scoring: {bm25: {k: 2.0, b: 0.5}}}}, using: 'title'});
    

    New in the gRPC client

    • TextQuery, Bm25Params, TextScoringParams, Match.substring, MaxExpression/MinExpression/acosh, Datatype.Turbo8/Turbo16, TurboQuantBitSize.Bits8, IdTrackerParams, CollectionInfo.created_at and TokenizerType.Code.
    • A text index used for BM25 needs an explicit tokenizer, otherwise the server answers unknown tokenizer type.

    Maintenance

    • Dependencies updated and Dependabot alerts resolved. The one remaining is braces, which has no patched release.
    • npm publishing now runs from the release environment via trusted publishing (OIDC), with no NPM_TOKEN.

    What's Changed

    Full Changelog: https://github.com/qdrant/qdrant-js/compare/v1.19.0...v1.20.0

  2. v1.19.02026-08-04 · 2026-08-04 18:41 UTC
    查看更新说明

    Support for the Qdrant v1.19.0 API across @qdrant/qdrant-js, @qdrant/js-client-rest and @qdrant/js-client-grpc.

    ⚠️ Breaking changes

    The REST client dropped search, searchBatch, searchPointGroups, recommend, recommendBatch, recommend_batch, recommendPointGroups, discoverPoints and discoverBatchPoints, following Qdrant dropping the corresponding endpoints from its OpenAPI spec. Use query, queryBatch and queryGroups instead:

    RemovedReplacement
    searchquery
    searchBatchqueryBatch
    searchPointGroupsqueryGroups
    recommendquery with a recommend query
    recommendBatchqueryBatch with recommend queries
    recommendPointGroupsqueryGroups with a recommend query
    discoverPointsquery with a discover or context query
    discoverBatchPointsqueryBatch with discover or context queries

    Note that query and friends return {points: [...]} rather than a bare array.

    The request types that came with them are gone from Schemas as well: SearchRequest, SearchRequestBatch, SearchGroupsRequest, RecommendRequest, RecommendRequestBatch, RecommendGroupsRequest, DiscoverRequest, DiscoverRequestBatch, RecommendExample, ContextExamplePair, NamedVector, NamedSparseVector, NamedVectorStruct and UsingVector.

    The gRPC client still exposes the corresponding RPCs — Search, SearchBatch, SearchGroups, Recommend, RecommendBatch, RecommendGroups, Discover and DiscoverBatch are marked deprecated upstream but remain functional. Use Query, QueryBatch and QueryGroups instead.

    New in the REST client

    • Added getQuotas and updateQuotas for the cluster-wide quota API.
    • Added payload (payload storage params) and metadata parameters to createCollection and recreateCollection.
    • max_disk_usage_percent moved off strict_mode_config — it is now a cluster-wide setting on updateQuotas, alongside max_resident_memory_percent and release_margin_percent.

    New in the gRPC client

    • StrictModeConfig.max_disk_usage_percent is gone, superseded by the cluster-wide quota config, and max_resident_memory_percent is deprecated with removal planned for 1.21. The quota API itself is REST-only for now.

    What's Changed

    Full Changelog: https://github.com/qdrant/qdrant-js/compare/v1.18.0...v1.19.0

  3. v1.18.02026-05-11 · 2026-05-11 13:20 UTC
    查看更新说明

    What's Changed

    Full Changelog: https://github.com/qdrant/qdrant-js/compare/v1.17.0...v1.18.0

  4. v1.17.02026-02-19 · 2026-02-19 17:11 UTC
    查看更新说明
  5. v1.16.22025-12-01 · 2025-12-01 21:25 UTC
    查看更新说明

    Changelog

    Full Changelog: https://github.com/qdrant/qdrant-js/compare/v1.16.0...v1.16.1

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    JavaScript Qdrant SDK

    This repository contains packages of the JS SDK for the Qdrant vector search engine.

    There are published 3 packages:

    JS/TS Examples

    Installation

    pnpm i @qdrant/js-client-rest
    # or
    npm install @qdrant/js-client-rest
    # or
    yarn add @qdrant/js-client-rest
    

    Usage

    Run the Qdrant Docker container:

    docker run -p 6333:6333 qdrant/qdrant
    

    Instantiate a client

    import {QdrantClient} from '@qdrant/js-client-rest';
    
    // TO connect to Qdrant running locally
    const client = new QdrantClient({url: 'http://127.0.0.1:6333'});
    
    // or connect to Qdrant Cloud
    const client = new QdrantClient({
        url: 'https://xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.us-east-0-1.aws.cloud.qdrant.io',
        apiKey: '<your-api-key>',
    });
    

    Make requests

    Using one of the available facade methods:

    const result = await client.getCollections();
    console.log('List of collections:', result.collections);
    

    More examples can be found in the examples folder.

    Support

    TypeScript types are provided alongside JavaScript sources to be used in:

    • Node.js (ESM and CJS) - >= 18.0.0
    • Deno
    • Browser (fetch API)
    • Cloudflare Workers (OpenAPI only)

    Releases

    Major and minor versions align with Qdrant's engine releases, whilst patch are reserved for fixes regarding the current minor release. New releases are made from the master branch.

    Contributing

    In order to contribute there are a couple of things you may need to setup. We make use of pnpm instead of npm or yarn to manage and install packages in this monorepo, make sure it's installed on your local environment.

    After checking out the repository and desired branch, run pnpm install to install all package's dependencies and run the compilation steps. This will work for the monorepo.

    For anything outside the monorepo, e.g.: examples/node-js-basic feel free to use npm for installing packages and running scripts.