> ## Documentation Index
> Fetch the complete documentation index at: https://nango.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Meilisearch

> Integrate your application with the Meilisearch API

## 🚀 Quickstart

Connect to Meilisearch with Nango and see data flow in 2 minutes. Meilisearch uses an API key generated in your Meilisearch Cloud project or self-hosted instance.

**1. Create the integration**

In Nango ([free signup](https://app.nango.dev)), go to [Integrations](https://app.nango.dev/dev/integrations) -> *Configure New Integration* -> *Meilisearch*.

**2. Connect your Meilisearch instance**

Go to [Connections](https://app.nango.dev/dev/connections) -> *Add Test Connection*. Enter your instance URL and API key, then save.

**3. Call the Meilisearch API**

Make your first request. Replace the placeholders with your [secret key](https://app.nango.dev/dev/environment-settings), [integration ID](https://app.nango.dev/dev/integrations), and [connection ID](https://app.nango.dev/dev/connections):

> [tab] cURL
>
> ```bash theme={null}
> curl "https://api.nango.dev/proxy/indexes" \
>   -H "Authorization: Bearer <NANGO-SECRET-KEY>" \
>   -H "Provider-Config-Key: <INTEGRATION-ID>" \
>   -H "Connection-Id: <CONNECTION-ID>"
> ```

> [tab] Node
>
> Install Nango's backend SDK with `npm i @nangohq/node`. Then run:
>
> ```typescript theme={null}
> import { Nango } from '@nangohq/node';
>
> const nango = new Nango({ secretKey: '<NANGO-SECRET-KEY>' });
>
> const res = await nango.get({
>     endpoint: '/indexes',
>     providerConfigKey: '<INTEGRATION-ID>',
>     connectionId: '<CONNECTION-ID>'
> });
>
> console.log(res.data);
> ```

Or fetch credentials with the [Node SDK](https://nango.dev/docs/reference/backend/backend-sdk/node.md#get-a-connection-with-credentials) or [API](https://nango.dev/docs/reference/backend/http-api/connections/get.md).

✅ You're connected! Check the [Logs](https://app.nango.dev/dev/logs) tab in Nango to inspect requests.

**4. Implement Nango in your app**

Follow our [Auth implementation guide](https://nango.dev/docs/guides/auth/auth-guide.md) to integrate Nango in your app.

To obtain an API key, follow the setup guide linked below.

## 📚 Meilisearch integration guides

Nango maintained guides for common use cases.

* [How to connect your Meilisearch instance](https://nango.dev/docs/api-integrations/meilisearch/connect)\
  Find your instance URL, create an API key, and connect it to Nango

Official docs: [Meilisearch API reference](https://www.meilisearch.com/docs/reference/api/overview)

## 🧩 Pre-built syncs & tools for Meilisearch

Explore Nango-provided tools in your dashboard. Extend and customize them to fit your needs.

### Others

| Function name | Description | Type |
| - | - | - |
| `add-documents` | Add or replace documents in a Meilisearch index (batch). Returns the enqueued task. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `delete-documents` | Delete documents from a Meilisearch index by ids or by filter (exactly one must be provided). Returns the enqueued task. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `generate-tenant-token` | Generate a Meilisearch tenant token: a scoped, signed search JWT carrying per-index ACL rules. Expires after 1 hour unless expiresAt or expiresInSeconds is set. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `get-documents` | Fetch documents from a Meilisearch index, optionally filtered or by ids. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `get-task` | Fetch the status of a Meilisearch async task by its uid. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `search-documents` | Search documents in a Meilisearch index. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `update-documents` | Add or partially update documents in a Meilisearch index (batch). Returns the enqueued task. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |

***

## Common gotchas

* Documents writes are asynchronous: the API returns an enqueued task (`taskUid`); poll `GET /tasks/{taskUid}` to confirm completion.
* Use an API key, not the master key. The master key cannot sign [tenant tokens](https://www.meilisearch.com/docs/learn/security/basic_security) and should never leave your infrastructure.
* The instance URL must include the scheme and have no trailing slash, e.g. `https://ms-xxxx.meilisearch.io`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.