algoliasearch-client-javascript

? Algolia Search API Client for JavaScript platforms

Github stars Tracking Chart

✨ Features

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

? Getting Started

First, install Algolia JavaScript API Client via the npm package manager:

npm install algoliasearch

Then, create objects on your index:

const algoliasearch = require("algoliasearch");

const client = algoliasearch("YourApplicationID", "YourAdminAPIKey");
const index = client.initIndex("your_index_name");

const objects = [
  {
    objectID: 1,
    name: "Foo"
  }
];

index
  .saveObjects(objects)
  .then(({ objectIDs }) => {
    console.log(objectIDs);
  })
  .catch(err => {
    console.log(err);
  });

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

index
  .search("Fo")
  .then(({ hits }) => {
    console.log(hits);
  })
  .catch(err => {
    console.log(err);
  });

For full documentation, visit the online documentation.

? License

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

Main metrics

Overview
Name With Owneralgolia/algoliasearch-client-javascript
Primary LanguageTypeScript
Program languageHTML (Language Count: 2)
Platform
License:MIT License
所有者活动
Created At2013-05-20 14:35:15
Pushed At2025-05-20 12:54:46
Last Commit At
Release Count425
Last Release Name5.25.0 (Posted on )
First Release Name2.0.0 (Posted on 2013-10-07 16:55:16)
用户参与
Stargazers Count1.4k
Watchers Count100
Fork Count223
Commits Count1.2k
Has Issues Enabled
Issues Count474
Issue Open Count16
Pull Requests Count476
Pull Requests Open Count4
Pull Requests Close Count605
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private