👨‍🏫 The Mastering Nuxt 3 course is now completed!

Discover the course

Algolia Search Module for Nuxt 3



npm versionnpm downloadsGithub Actions CICodecovLicense

Algolia module for Nuxt


  • Easy integration with Algolia
  • Handy composables like useAlgoliaSearch, useAsyncAlgoliaSearch
  • Support for Vue Instantsearch components
  • Support for Algolia Recommend
  • Support for Docsearch
  • Support for Automatic Indexing
  • Support for caching the requests and responses
  • Support for SSR requests

📖  Read the documentation


Open in StackBlitz


yarn add @nuxtjs/algolia # yarn
npm i @nuxtjs/algolia # npm

Basic usage

Firstly, you need to add @nuxtjs/algolia to your Nuxt config.

export default defineNuxtConfig({
modules: ['@nuxtjs/algolia']

Furthermore, add ALGOLIA_API_KEY and ALGOLIA_APPLICATION_ID environment variables to .env file.

ALGOLIA_API_KEY="0fd1c4eba2d831788333e77c9d855f1d" ALGOLIA_APPLICATION_ID="AGN9HEEKF3"

Now you can start using @nuxtjs/algolia in your app!

Client side:

<script setup lang="ts">
const { result, search } = useAlgoliaSearch('test_index')
onMounted(async () => {
await search({ query: 'Samsung' })
<div>{{ result }}</div>


<script setup lang="ts">
const { data } = await useAsyncAlgoliaSearch({ indexName: 'test_index', query: 'Samsung' })
<div>{{ data }}</div>


  1. Clone this repository
  2. Install dependencies using yarn install or npm install
  3. Start development server using yarn dev or npm run dev


MIT License