algoliasearch-client-javascript

The official multi-runtime JavaScript client for Algolia's Search, Recommend, Analytics, Insights, and Ingestion APIs.

SDK
npm
v5.57.0
1,386stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
86/100Excellent
Development Activity88
Maintenance92
Community76
Maturity60
Momentum28

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
66/100Good
Architecture85
Code Quality70
Innovation55
Learning Curve55

algoliasearch is Algolia’s officially maintained JavaScript/TypeScript API client, published as a single umbrella package that bundles dedicated sub-clients for Search, Recommend, Analytics, Insights, Personalization, Query Suggestions, A/B Testing, Ingestion, and Monitoring. It ships universal builds for Node.js, browsers, web workers, and React Native from one shared core, so the same client codebase can run on a server, in the browser, or at the edge.

Under the hood, every sub-client is generated from Algolia’s OpenAPI specifications and layered on top of a shared transporter that handles multi-host failover, timeout backoff, rate-limit-aware retries, and request/response caching. On top of the generated method surface, the package adds higher-level helpers such as saveObjectsWithTransformation and replaceAllObjectsWithTransformation, which orchestrate multi-step Ingestion + Search workflows (chunked pushes, temporary-index copy/move) for large record sets.

What You Get

  • A single algoliasearch(appId, apiKey) client exposing every Search API method plus initRecommend, initAnalytics, initInsights, initAbtesting, initIngestion, initPersonalization, initQuerySuggestions, and initMonitoring factories for the other Algolia products
  • Universal build targets (Node, browser UMD/ESM, web worker, React Native) generated from one shared client-common transporter core
  • Automatic multi-host failover with stateful host tracking (up/down/timed-out) and progressively increasing retry timeouts
  • Built-in request/response caching (in-memory or browser localStorage) with in-flight request de-duplication
  • Rate-limit-aware retries that read Retry-After and back off before re-sending
  • Helper methods (saveObjectsWithTransformation, replaceAllObjectsWithTransformation) that chain Ingestion Push-connector transformations with Search operations, including a zero-downtime copy/push/move reindex flow
  • Full TypeScript types for every request/response model across all bundled APIs

Common Use Cases

  • Adding instant, typo-tolerant search to a website or app by calling the Search sub-client directly from Node or the browser
  • Feeding product/content recommendations from the Recommend API alongside the same client used for search
  • Sending click/conversion events to the Insights API to power Algolia’s personalization and analytics
  • Bulk-importing or re-indexing large catalogs via replaceAllObjectsWithTransformation, with Ingestion Push-connector transformations applied before data lands in the index
  • Running the same client code in a Cloudflare Worker or other edge runtime, using the dedicated worker build target

Under The Hood

Architecture The monorepo is organized around one shared foundation, packages/client-common, whose createTransporter() (packages/client-common/src/transporter/createTransporter.ts) implements host failover, request/response caching with in-flight de-duplication, rate-limit-aware retries, and optional gzip compression as a dependency-injected core. Every product-specific client (search, recommend, analytics, insights, ingestion, personalization, query-suggestions, abtesting, monitoring) is generated from Algolia’s OpenAPI specs and built on top of that same transporter, so behavior stays consistent across products. The root algoliasearch package (packages/algoliasearch/builds/node.ts) composes the generated Search client with cross-product init* factories and helper methods like replaceAllObjectsWithTransformation, which orchestrates a multi-step copy-push-wait-move sequence across the Search and Ingestion clients to reindex large catalogs without downtime.

Tech Stack Written in TypeScript (5.9) as ESM-first packages, orchestrated as a Yarn workspaces monorepo with Lerna and Nx for task graphs and versioned publishing. Each package ships multiple build targets (Node, browser UMD/ESM, web worker, React Native) produced via tsup and Rollup. Tests run on Vitest, with jsdom for browser-shaped tests and @cloudflare/vitest-pool-workers for edge-runtime coverage; publint and Are The Types Wrong validate published package correctness, and bundlewatch enforces per-bundle size budgets in CI.

Code Quality Code across the generated clients carries “DO NOT EDIT” headers and is produced by Algolia’s separate api-clients-automation OpenAPI-codegen pipeline (this repository auto-closes any PR that edits generated files), so most correctness guarantees originate upstream rather than from hand-written tests in this repo. Hand-written unit tests exist for the shared transporter internals — caches, logger, SSE parsing, retry helpers — with explicit, typed error types (RetryError, ApiError) rather than swallowed exceptions. Test density directly in this repository is comparatively light relative to its size, consistent with most of the surface being generated rather than authored here.

What Makes It Unique The core differentiator is a single shared transporter powering a wide family of Algolia product clients across every JavaScript runtime target from one codebase, with stateful host health tracking, automatic rate-limit backoff, and layered request/response caching built in by default. On top of the raw generated API surface, the package adds opinionated orchestration helpers — chunked, transformation-aware bulk pushes and a copy/push/move zero-downtime reindexing flow — that would otherwise require hand-rolled coordination logic in application code.

Used by 8 apps in this directory

Java
73%
Other

ByteChef

Automation · AI Agents

1,000

Unified open-source platform for AI agent orchestration and workflow automation with 180+ connectors, MCP support, and durable execution.

View details
85
Repo Health
82
Technical
70
Dependency
Built with
Java73%
TypeScript26%
Updated yesterday
TypeScript
45%
Other

Convex Backend

Developer Tools · Databases

12,494

Open-source reactive database that lets developers build live-updating apps with pure TypeScript, strong consistency, and real-time subscriptions—no separate API layer required.

View details
87
Repo Health
82
Technical
68
Dependency
Built with
TypeScript45%
Rust43%
Updated 2 days ago
Ruby
63%
AGPL 3.0

Forem

Community · Blogging

22,775

Open source Ruby on Rails platform for building developer communities with articles, discussions, and social profiles—the same software that powers dev.to.

View details
83
Repo Health
79
Technical
67
Dependency
Built with
Ruby63%
JavaScript19%
HTML13%
Updated 2 days ago
TypeScript
86%
MIT

medusa

Ecommerce

36,163

The most flexible open-source commerce platform — build B2C, B2B, and marketplace applications with modular, composable commerce primitives.

View details
93
Repo Health
87
Technical
63
Dependency
Built with
TypeScript86%
JavaScript14%
Updated 2 days ago
JavaScript
63%
AGPL 3.0

overleaf

Collaboration · Productivity

18,090

Open-source, real-time collaborative LaTeX editor with sandboxed compilation and full TeXLive support for self-hosted academic and research teams.

View details
82
Repo Health
80
Technical
62
Dependency
Built with
JavaScript63%
TypeScript29%
Updated 1 months ago
TypeScript
99%
Other

Rowy

Low Code Platforms · Databases

6,840

Manage Firestore data in an Airtable-like spreadsheet UI and build Cloud Functions workflows directly in your browser—on your own GCP project.

View details
45
Repo Health
71
Technical
65
Dependency
Built with
TypeScript99%
Updated 1 years ago
TypeScript
99%
MIT

Sanity

CMS

6,312

Open-source headless CMS with a fully customizable React Studio, real-time collaborative editing, structured content modeling, and GROQ query language

View details
92
Repo Health
90
Technical
66
Dependency
Built with
TypeScript99%
Updated yesterday
Vue
47%
AGPL 3.0

Wiki.js

Knowledge Management · Collaboration

28,848

A modern, self-hosted wiki platform built on Node.js with a rich plugin ecosystem for authentication, search, storage, and rendering that adapts to any team's infrastructure.

View details
72
Repo Health
67
Technical
60
Dependency
Built with
Vue47%
JavaScript42%
Updated today

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search