The perfect starting point to integrate Algolia (https://algolia.com) within your JavaScript project

  Documentation (https://www.algolia.com/doc/api-client/getting-started/install/javascript/)  •
  InstantSearch (https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/js/)  •
  Community Forum (https://discourse.algolia.com)  •
  Stack Overflow (http://stackoverflow.com/questions/tagged/algolia)  •
  Report a bug (https://github.com/algolia/algoliasearch-client-javascript/issues)  •
  Support (https://www.algolia.com/support)

## ✨ 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](https://www.npmjs.com/get-npm) package manager:

```bash
npm install algoliasearch
```

Then, create objects on your index:

```js
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:

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

For full documentation, visit the **[online documentation](https://www.algolia.com/doc/api-client/getting-started/install/javascript/)**.

## 📄 License

Algolia JavaScript API Client is an open-sourced software licensed under the [MIT license](LICENSE.md).
