Search API Client for Javascript
What is Algolia

What is Algolia

Algolia is a hosted, API-first platform used to build world-class search & discovery experiences. 

Start building quickly using libraries for every major language and framework. Scale your solution with a platform that serves over 85 billion queries for more than 13k customers every month.

Algolia UI componnets

Add instant-search to javascript applications

InstantSearch js library is 

  • Pre-built, customizable and flexible UI widgets to create your own search experiences -  explore the showcase
  • Has server side rendering and routing capabilities
  • Open source, production-ready and maintained by Algolia 


  • Gives API access to all Algolia functionality, settings, advanced features, and ML/AI products including Recommend
  • Works in node and all browsers (including IE11+)
  • Supports dynamic modules (load only what you need)
  • Built with Typescript
  • All major module formats (ESM, CJS, UMD)
  • Background retry strategy to ensure uptime
  • Thin & minimal low-level HTTP client to interact with Algolia's API
  • Batching via iterators to optimize number of network calls
  • Zero downtime reindexing feature


  • Works in node and all browsers (including IE11+)
  • Built with TypeScript" down from "Features" to match the Autocomplete libraries

Related Integrations

Key links

Get started

First, install Algolia JavaScript API Client via the npm package manager: (if needed, get a free account here)

1npm install algoliasearch

Then, create objects on your index:

1const algoliasearch = require("algoliasearch");
3const client = algoliasearch("YourApplicationID", "YourAdminAPIKey");
4const index = client.initIndex("your_index_name");
6const objects = [
7  {
8    objectID: 1,
9    name: "Foo"
10  }
14  .saveObjects(objects)
15  .then(({ objectIDs }) => {
16    console.log(objectIDs);
17  })
18  .catch(err => {
19    console.log(err);
20  });

Finally, let's actually search using the search method:

2  .search("Fo")
3  .then(({ hits }) => {
4    console.log(hits);
5  })
6  .catch(err => {
7    console.log(err);
8  });
Get started for freeExplore all developer docs

Built with JavaScript on Algolia

Sample Applications

Search with Salesforce Data

Learn how to import your existing data in Salesforce using Algolia API clients

  • javascript