需先自行启动 Qdrant 服务(如 docker run -p 6333:6333 qdrant/qdrant),SDK 不含数据库本体;Node.js 需 >= 18.0.0;仓库开发用 pnpm,非 monorepo 场景才可用 npm。
qdrant-js
qdrantApache-2.0活跃维护Qdrant 向量数据库的 JavaScript/TypeScript 官方 SDK,让 Node.js 和前端项目能方便地接入向量检索,用于构建 RAG 和相似度搜索应用。
JavaScript/Typescript SDK for Qdrant Vector Database
pnpm i @qdrant/js-client-rest
# 或
npm install @qdrant/js-client-restREADME 未说明;SDK 本身是客户端库,需另行运行 Qdrant 服务,README 示例用 Docker 启动 qdrant/qdrant 并映射 6333 端口。
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
容易踩的坑
- 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-restand@qdrant/js-client-grpc.New in both clients
- BM25 ranking over text indexes:
scoringon text index params, and atextquery forquery/queryBatch/queryGroupsthat ranks by the payload field named inusing. Per-request IDF params now also apply to BM25. substringmatch condition for keyword fields.nestedoption on every payload index params type, to index each object of an array (e.g.offers[].price) as its own entry.max,minandacoshformula expressions.turbo8andturbo16vector datatypes, and thebits8TurboQuant bit size.- Point id tracker params (
id_tracker) on create/update collection. Collection info now reportscreated_at. codetokenizer for text indexes (source-code identifier splitting).
New in the REST client
createCollectionandrecreateCollectionacceptid_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_atandTokenizerType.Code.- A text index used for BM25 needs an explicit
tokenizer, otherwise the server answersunknown 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
releaseenvironment via trusted publishing (OIDC), with noNPM_TOKEN.
What's Changed
- ci: publish from release environment, drop unused NPM_TOKEN by @generall in https://github.com/qdrant/qdrant-js/pull/178
- v1.20 by @generall in https://github.com/qdrant/qdrant-js/pull/177
Full Changelog: https://github.com/qdrant/qdrant-js/compare/v1.19.0...v1.20.0
- BM25 ranking over text indexes:
- 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-restand@qdrant/js-client-grpc.⚠️ Breaking changes
The REST client dropped
search,searchBatch,searchPointGroups,recommend,recommendBatch,recommend_batch,recommendPointGroups,discoverPointsanddiscoverBatchPoints, following Qdrant dropping the corresponding endpoints from its OpenAPI spec. Usequery,queryBatchandqueryGroupsinstead:Removed Replacement searchquerysearchBatchqueryBatchsearchPointGroupsqueryGroupsrecommendquerywith arecommendqueryrecommendBatchqueryBatchwithrecommendqueriesrecommendPointGroupsqueryGroupswith arecommendquerydiscoverPointsquerywith adiscoverorcontextquerydiscoverBatchPointsqueryBatchwithdiscoverorcontextqueriesNote that
queryand friends return{points: [...]}rather than a bare array.The request types that came with them are gone from
Schemasas well:SearchRequest,SearchRequestBatch,SearchGroupsRequest,RecommendRequest,RecommendRequestBatch,RecommendGroupsRequest,DiscoverRequest,DiscoverRequestBatch,RecommendExample,ContextExamplePair,NamedVector,NamedSparseVector,NamedVectorStructandUsingVector.The gRPC client still exposes the corresponding RPCs —
Search,SearchBatch,SearchGroups,Recommend,RecommendBatch,RecommendGroups,DiscoverandDiscoverBatchare marked deprecated upstream but remain functional. UseQuery,QueryBatchandQueryGroupsinstead.New in the REST client
- Added
getQuotasandupdateQuotasfor the cluster-wide quota API. - Added
payload(payload storage params) andmetadataparameters tocreateCollectionandrecreateCollection. max_disk_usage_percentmoved offstrict_mode_config— it is now a cluster-wide setting onupdateQuotas, alongsidemax_resident_memory_percentandrelease_margin_percent.
New in the gRPC client
StrictModeConfig.max_disk_usage_percentis gone, superseded by the cluster-wide quota config, andmax_resident_memory_percentis deprecated with removal planned for 1.21. The quota API itself is REST-only for now.
What's Changed
- ci: update GitHub Actions to Node 24 before June 2 deadline by @estebany-qd in https://github.com/qdrant/qdrant-js/pull/135
- ci: update third-party actions to node 24 by @estebany-qd in https://github.com/qdrant/qdrant-js/pull/136
- chore: add Dependabot configuration by @andres-qd in https://github.com/qdrant/qdrant-js/pull/137
- chore: update dependencies and resolve security alerts by @Anush008 in https://github.com/qdrant/qdrant-js/pull/150
- Bump undici from 6.27.0 to 7.29.0 by @dependabot in https://github.com/qdrant/qdrant-js/pull/159
- v1.19 by @IvanPleshkov in https://github.com/qdrant/qdrant-js/pull/164
- Fix prepublish for Node 24 by @IvanPleshkov in https://github.com/qdrant/qdrant-js/pull/167
- Pass the npm token the way setup-node expects by @IvanPleshkov in https://github.com/qdrant/qdrant-js/pull/168
- ci: publish to npm via trusted publishing (OIDC) by @IvanPleshkov in https://github.com/qdrant/qdrant-js/pull/169
Full Changelog: https://github.com/qdrant/qdrant-js/compare/v1.18.0...v1.19.0
- Added
- v1.18.02026-05-11 · 2026-05-11 13:20 UTC
查看更新说明
What's Changed
- Upgrade to 1.18 by @IvanPleshkov in https://github.com/qdrant/qdrant-js/pull/133
- Add support for custom headers in gRPC by @Anush008 in https://github.com/qdrant/qdrant-js/pull/125
- Add helper to specify per request tracing by @Anush008 in https://github.com/qdrant/qdrant-js/pull/126
Full Changelog: https://github.com/qdrant/qdrant-js/compare/v1.17.0...v1.18.0
- v1.17.02026-02-19 · 2026-02-19 17:11 UTC
查看更新说明
What's Changed
- Upgrade to 1.17 by @generall in https://github.com/qdrant/qdrant-js/pull/122
Full Changelog: https://github.com/qdrant/qdrant-js/compare/v1.16.2...v1.17.0
- v1.16.22025-12-01 · 2025-12-01 21:25 UTC
查看更新说明
Changelog
- Publish package with provenance statement explicitly (https://github.com/qdrant/qdrant-js/pull/118)
Full Changelog: https://github.com/qdrant/qdrant-js/compare/v1.16.0...v1.16.1
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
JavaScript Qdrant SDK
This repository contains packages of the JS SDK for the Qdrant vector search engine.
There are published 3 packages:
@qdrant/qdrant-jsCode- the main package with the SDK itself.@qdrant/js-client-restCode - lightweight REST client for Qdrant.@qdrant/js-client-grpcCode - gRPC client for Qdrant.
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-basicfeel free to usenpmfor installing packages and running scripts.