Elasticsearch client
A strong pick. 2nd of 10 search libraries and clients.
This is the official Node.js client for Elasticsearch. Elastic maintains it, and its types are generated from the server's API spec. If you run Elasticsearch it is the right and almost the only choice, but it fits only when you need Elasticsearch itself: for plain search inside an app, the Meilisearch or Typesense clients, or an in-process library, are simpler to adopt.
Best for: Teams that already run, or truly need, Elasticsearch for large-scale search, analytics or logs from Node.js.
Scores
Overall7.5
How strongly do we recommend it for a new project today?
Claude Opus 5.5: 7.0, likely 6.0 to 8.0
It is clearly the best pick for its named case: talking to Elasticsearch from Node.js. It is well maintained, well typed and backed by Elastic. It is not the default pick for most new app-search work, because lighter engines and in-process libraries are easier, and its growth trails the category.
- elastic.co/docs/release-notes/elasticsearch/clients/javascript: Active, steady release line
- aicoolies.com/comparisons/elasticsearch-vs-meilisearch-vs-typesense: Lighter engines are recommended for app search features
- npm downloads ratio: About 2.3x growth against a median of 4.1
GPT-6.2 Sol: 8.0, likely 6.9 to 9.0
Choose it for a new Node.js backend when the project already uses Elasticsearch or needs its advanced relevance controls, hybrid search, or aggregations. Elastic’s maintenance and the breadth of its typed API outweigh slower relative adoption for that use case. Meilisearch or Typesense are simpler starting points for routine search-as-you-type, and Fuse.js fits small in-app indexes. The current ESM build issue and the effort of running Elasticsearch keep the recommendation conditional.
- elastic.co/docs/reference/elasticsearch/clients/javascript/api-reference: Broad API coverage for advanced Elasticsearch workloads.
- github.com/elastic/elasticsearch-js/issues/3419: Confirms a TypeScript build issue in the stable release.
- github commitsLastYear, releasesLastYear: Recent code and release activity supports a new-project recommendation.
- meilisearch.com/blog/elasticsearch-vs-typesense: A competing vendor describes server setup and operating tradeoffs.
- fusejs.io: Fuse.js offers lightweight fuzzy search within the app.
Needed by many4.2
How many developers need a tool for this job?
Claude Opus 5.5: 4.0, likely 3.0 to 5.0
Only teams that run an Elasticsearch server need this client. That group is mostly backend teams doing large-scale search, analytics or logs. Most app developers who want search pick a lighter engine or an in-process library.
- aicoolies.com/comparisons/elasticsearch-vs-meilisearch-vs-typesense: Elasticsearch fits platform-scale needs; Meilisearch and Typesense fit search features in apps
- project.note: It is a client for one server only
GPT-6.2 Sol: 4.4, likely 3.4 to 5.5
Search is common in web apps, but this package serves the subset with a Node.js backend and an Elasticsearch deployment. In the 2026 Stack Overflow survey, 14.8% of respondents to the database question reported using Elasticsearch. That figure spans languages and use cases, so it only loosely estimates the audience for this client.
- survey.stackoverflow.co/2026/technology/data: 14.8% of database-question respondents reported using Elasticsearch.
- elastic.co/docs/reference/elasticsearch/clients/javascript/installation: Official support targets Node.js and excludes browsers.
Helps a lot8.0
How well does it do the job for those who need it?
Claude Opus 5.5: 8.0, likely 7.0 to 9.0
The client covers the full Elasticsearch API, its types are generated from the spec, and it has solid helpers for bulk, msearch and ES|QL with Arrow. It also supports ESM and serverless mode. The score stays below the top because the 9.0 changes to body handling and timeouts tripped up users, and because the server needs much more setup than its peers.
- elastic.co/docs/release-notes/elasticsearch/clients/javascript: 9.x adds ESM, a bulk onFlush callback, maxRequestBytes and an Arrow helper; many fixes
- elastic.co/docs/release-notes/elasticsearch/clients/javascript/breaking-changes: 9.0 changes body typing, parameter routing and the default timeout
- npm hasTypes: Ships its own types
GPT-6.2 Sol: 8.0, likely 6.9 to 9.1
Stable 9.5.1 provides typed APIs for advanced search and aggregations, documented bulk and multisearch helpers, and configurable connection handling. The examples and request types give coding agents a solid starting point, but users confirmed a NodeNext declaration error in 9.5.1, and the fix is slated for 9.6. Comparative benchmarks measure server workloads, leaving client overhead and agent-generated code quality less certain.
- github.com/elastic/elasticsearch-js/releases/tag/v9.5.1: GitHub identifies 9.5.1 as the latest stable release.
- elastic.co/docs/reference/elasticsearch/clients/javascript/api-reference: Documents search, aggregations, vector queries, and administrative APIs.
- elastic.co/docs/reference/elasticsearch/clients/javascript/client-helpers: Documents batching, retries, and failure callbacks.
- github.com/elastic/elasticsearch-js/issues/3419: Users reproduced the 9.5.1 NodeNext build failure.
- amgix.io/blog/2026/05/16/amgix-now-benchmarks-1: A competing search vendor measured relevance and latency across four server workloads.
Holds up over time8.3
Will it still be a good choice in two years?
Claude Opus 5.5: 8.5, likely 7.5 to 9.0
Elastic pays the team that maintains it. It had 165 commits and 14 releases last year, and only 15 issues are open. The client tracks every server release. The risks are that breaking major versions follow the server's schedule, and that lighter engines are taking some new application-search work.
- github commitsLastYear / releasesLastYear: 165 commits, 14 releases
- github openIssues / closedIssues: 15 open against 1056 closed
- elastic.co/docs/release-notes/elasticsearch/clients/javascript: Steady minor and patch releases through 9.x
GPT-6.2 Sol: 8.0, likely 6.7 to 9.0
Elastic maintains its official client alongside the server, and the repository recorded 165 commits and 14 releases over the past year. The stable release is nearly three months old, and a fix for the reported ESM regression was merged in September but is still awaiting release. Changes to Node.js support and request behavior can raise upgrade costs, and release access and typical issue response times are unclear.
- github commitsLastYear, releasesLastYear, pushedAt, latestRelease: 165 commits, 14 releases, a November push, and an August stable release.
- github.com/elastic/elasticsearch-js: Elastic maintains the client and tracks server versions.
- github.com/elastic/elasticsearch-js/pull/3435: The Arrow declaration fix merged on September 8.
- elastic.co/docs/release-notes/elasticsearch/clients/javascript/breaking-changes: Documents changes to Node support, parameter handling, and timeout defaults.
Used widely5.2
How many use it, and is that growing?
Claude Opus 5.5: 6.0, likely 5.0 to 7.0
It had 12.7M downloads in the last 4 weeks and 3,418 dependent repos, the most of any server client in the category. Downloads grew only 2.3x in a year against a median of 4.1, so it is losing ground. The Meilisearch and Typesense clients are growing faster from a smaller base.
- npm downloadsLast4Weeks / downloadsSame4WeeksYearAgo: 12.75M against 5.6M a year ago, a ratio of about 2.3
- medianDownloadsRatio: The median ratio is 4.1
- dependents: 3,418 repos and 772 packages; Meilisearch has 802 repos, Typesense 318
GPT-6.2 Sol: 4.4, likely 3.2 to 5.7
Ecosyste.ms found 3,418 dependent repositories and 772 packages. That repository count leads the Meilisearch and Typesense clients in the bundle and trails Fuse.js by a wide margin. Four-week installs rose from 5.60 million to 12.75 million, but the 2.28× ratio was below the 4.1× catalog benchmark and both server-client peers. Partial repository coverage and automated or transitive installs leave the number of direct adopters uncertain.
- dependents repos, packages: 3,418 indexed repositories and 772 dependent packages.
- npm downloadsLast4Weeks, downloadsSame4WeeksYearAgo: 12.75 million versus 5.60 million installs, up 2.28×.
- medianDownloadsRatio: The catalog benchmark is 4.1×.
- peers dependentRepos, downloadsLast4Weeks, downloadsSame4WeeksYearAgo: Meilisearch grew 6.20× and Typesense 4.54× from smaller indexed bases.
- github.com/ether/etherpad/blob/develop/pnpm-lock.yaml: Etherpad also pulls in 9.5.1 through its database adapter.
Vouched for7.2
Who stands behind it being good?
Claude Opus 5.5: 7.0, likely 6.0 to 8.0
Elastic's own Kibana is built on this client, and many companies run Elasticsearch in production. Independent comparisons agree that Elasticsearch is the leader for large-scale search and analytics. I found no survey data specific to this client, and the comparisons I could find were mostly written by competing vendors.
- github.fontlos.workers.dev/elastic/kibana/pull/208776: Kibana upgraded to client 9.0 and depends on it
- aicoolies.com/comparisons/elasticsearch-vs-meilisearch-vs-typesense: Calls Elasticsearch the strongest option for very large-scale use
- hackerNews / bluesky: No stories or posts, so little visible community discussion
GPT-6.2 Sol: 7.3, likely 6.1 to 8.4
NestJS builds on the official client, Datadog supports tracing it, and Backstage uses the 8.x line in its search backend. The 2026 Stack Overflow survey shows substantial use of Elasticsearch, with 35.5% of existing users wanting to continue. The survey and comparative benchmarks evaluate the engine, so they provide limited evidence about satisfaction with the current JavaScript client.
- github.com/nestjs/elasticsearch/releases: NestJS maintains an integration that supports the 9.x client.
- docs.datadoghq.com/tracing/trace_collection/compatibility/nodejs: Datadog supports tracing requests from the official client.
- github.com/backstage/backstage/blob/master/plugins/search-backend-module-elasticsearch/package.json: Backstage lists the 8.19 client in its search backend.
- survey.stackoverflow.co/2026/technology/data: 35.5% of Elasticsearch database users wanted to keep using it.
- amgix.io/blog/2026/05/16/amgix-now-benchmarks-1: Elasticsearch scored well on keyword relevance, with latency varying by dataset.
Safe7.5
How safe is it to depend on?
Claude Opus 5.5: 7.5, likely 6.5 to 8.5
There are no known advisories, it has two direct dependencies, and the licence is Apache-2.0. The OpenSSF Scorecard is only 5.6, with weak results for token permissions, code review, SAST and fuzzing. Elastic publishes the releases, and the transport has recently tightened its TLS fingerprint checks.
- advisories total: 0 advisories
- scorecard score: 5.6; Token-Permissions 0, Code-Review 3, SAST 0
- npm dependencies: 2 direct dependencies
- elastic.co/docs/release-notes/elasticsearch/clients/javascript/breaking-changes: Stricter caFingerprint TLS checks in the transport
GPT-6.2 Sol: 7.4, likely 6.1 to 8.5
The client has a permissive Apache-2.0 license and two direct runtime dependencies. OSV lists zero client advisories, and ReversingLabs found no known vulnerabilities, malware, or tampering in its 9.5.1 scan. The OpenSSF score of 5.6 shows weak workflow token permissions, code review, and dependency pinning. GitHub verifies the release commit, while npm artifact provenance and the number of authorized publishers remain unclear.
- advisories total, last24Months: OSV returned zero advisories for the client package.
- scorecard score, checks: Overall 5.6, token permissions 0, code review 3, and dependency pinning 4.
- github.com/elastic/elasticsearch-js/blob/v9.5.1/package.json: Apache-2.0, two direct dependencies, and optional Apache Arrow support.
- github.com/elastic/elasticsearch-js/releases/tag/v9.5.1: The release points to a verified GitHub commit.
- secure.software/npm/packages/%40elastic/elasticsearch: The 9.5.1 scan found no known vulnerabilities, malware, or tampering.
Good
- Its TypeScript types are generated from the Elasticsearch spec, so they cover the whole API and keep up with each server release.
- It has useful helpers for bulk indexing, scroll, msearch and ES|QL, including Apache Arrow output.
- A paid Elastic team maintains it, with a new minor version for each server release and fast patch releases.
- It pulls in only two direct dependencies, has no known advisories, and uses the Apache-2.0 licence.
Bad
- It is useful only with an Elasticsearch cluster, and that server is far heavier to run and tune than Meilisearch or Typesense.
- The 9.0 upgrade changed how the body parameter works and removed the default 30-second request timeout. Code had to change, and a missing requestTimeout can leave requests hanging.
- Its download growth is below the median of the projects we rate, while the clients of lighter search servers grow much faster.
- The client must match the server's major version, and features such as the Arrow types keep moving between modules.
The numbers
- npm downloads, 4 weeks
- 13M ×2.3 in a year
- GitHub stars
- 5.3k
- Commits, 12 months
- 165
- npm version
- 9.5.1 Aug 2026
- Versions, 12 months
- 13
- Advisories, 24 months
- 0 of 0 ever
- OpenSSF Scorecard
- 5.6 out of 10, Nov 2026
- Licence
- Apache-2.0
The JavaScript client of the Elasticsearch server.
Read on 21 November 2026 from GitHub (elastic/elasticsearch-js), npm (@elastic/elasticsearch), OSV and the OpenSSF Scorecard.
Search libraries and clients
- 7.9Pagefind
- 7.5Elasticsearch client
- 7.5Meilisearch client
- 7.4Fuse.js
- 7.2Typesense client
- 6.6MiniSearch
- 6.4uFuzzy
- 6.1FlexSearch
- 5.1Orama
- 3.8Lunr