algoliasearch-client-javascript is a free, open source api development & testing project written in TypeScript and released under MIT. It has 1,385 GitHub stars, 227 forks and 25 open issues, and was last pushed 4 hours ago. On this registry it ranks #84 of 103 tracked projects in API Development & Testing, with 5 head-to-head comparisons available.

What is algoliasearch-client-javascript?

What it is

algoliasearch-client-javascript is an open-source JavaScript API client for Algolia, built with TypeScript and distributed under the MIT license. It provides a thin and minimal low-level HTTP client for interacting with Algolia's API from both browser and Node.js environments. The project sits in the JavaScript and TypeScript package ecosystem, where it serves as a starting point for integrating Algolia into JavaScript projects.

The concrete problem it solves is giving JavaScript projects a ready-made client for Algolia's API. The README describes the package as a thin and minimal low-level HTTP client, so developers do not need to write their own transport code for browser and Node.js requests. It also addresses module compatibility by supporting UMD and ESM, and it addresses typing by being built with TypeScript and coming with type definitions.

Key capabilities

  • It provides a thin and minimal low-level HTTP client for Algolia's API.
  • It works in browser and Node.js environments.
  • It is compatible with UMD and ESM module loading.
  • It is built with TypeScript and comes with type definitions.
  • It offers both a full client and a lite client.
  • It is available through package managers such as yarn, npm, and pnpm.
  • It can be added directly to a website without a package manager.

Who uses it and how

  • JavaScript developers add algoliasearch to a project to call Algolia API methods.
  • Browser applications can import the client and initialize it with an Algolia application ID and API key.
  • Node.js applications can use the same package for server-side integration with Algolia.
  • Projects using different module loaders can use the UMD and ESM compatible client.
  • Developers needing a lite client can import liteClient from algoliasearch/lite.

Getting started

Install [email protected] with yarn, npm, or pnpm, then import algoliasearch or liteClient and create a client with an application ID and API key. For use without a package manager, add the provided JavaScript snippet to a website.

When to use it — and when not to

Use it when a JavaScript or TypeScript project needs direct access to Algolia's API. Do not use it when the project cannot provide an Algolia application ID and API key, because the README shows those values as required for initialization. It is an API client, not the Algolia API itself, so teams still need Algolia API access to perform search operations.

project readme (upstream, from github) — read inline

Algolia for JavaScript

The perfect starting point to integrate Algolia within your JavaScript project

NPM version NPM downloads jsDelivr Downloads License

DocumentationInstantSearchCommunity ForumStack OverflowReport a bugSupport

✨ Features

  • Thin & minimal low-level HTTP client to interact with Algolia's API
  • Works both on the browser and node.js
  • UMD and ESM compatible, you can use it with any module loader
  • Built with TypeScript

💡 Getting Started

To get started, you first need to install algoliasearch (or any other available API client package). All of our clients comes with type definition, and are available for both browser and node environments.

With a package manager

yarn add [email protected]
# or
npm install [email protected]
# or
pnpm add [email protected]

Without a package manager

Add the following JavaScript snippet to the of your website:

// for the full client
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/algoliasearch.umd.js"></script>

// for the lite client
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/lite/builds/browser.umd.js"></script>

Usage

You can now import the Algolia API client in your project and play with it.

import { algoliasearch } from 'algoliasearch';

const client = algoliasearch('YOUR_APP_ID', 'YOUR_API_KEY');

// or with the lite client
import { liteClient } from 'algoliasearch/lite';

const client = liteClient('YOUR_APP_ID', 'YOUR_API_KEY');

For full documentation, visit the Algolia JavaScript API Client.

❓ Troubleshooting

Encountering an issue? Before reaching out to support, we recommend heading to our FAQ where you will find answers for the most common issues and gotchas with the client. You can also open a GitHub issue

📄 License

The Algolia JavaScript API Client is an open-sourced software licensed under the MIT license.

Frequently asked questions

Is algoliasearch-client-javascript free to use?

algoliasearch-client-javascript is open source under the MIT licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does algoliasearch-client-javascript do?

⚡️ A fully-featured and blazing-fast JavaScript API client to interact with Algolia.

What is algoliasearch-client-javascript written in?

algoliasearch-client-javascript is primarily written in TypeScript. Its source is publicly available at https://github.com/algolia/algoliasearch-client-javascript, and it has 1,385 GitHub stars.