algolia / algoliasearch-client-javascript

⚡️ A fully-featured and blazing-fast JavaScript API client to interact with Algolia.
https://www.algolia.com/doc/api-client/javascript/getting-started/
MIT License
1.33k stars 221 forks source link
algolia api-client javascript search

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 bugFAQSupport

✨ Features

💡 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.

yarn add algoliasearch
# or
npm install algoliasearch

Without a package manager

Add the following JavaScript snippet to the of your website:

<script src="https://cdn.jsdelivr.net/npm/algoliasearch/dist/algoliasearch.umd.min.js"></script>

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.