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

# Algolia

> Search, browse, and update records in Algolia search indices

## At a glance

* **Availability**: Experimental ([how to enable](/cloud/integrations)).
* **Auth**: API key.
* **Connection**: The key from `ALGOLIA_API_KEY` is sent as the `X-Algolia-API-Key` header.
* **Docs**: [https://www.algolia.com/doc/rest-api/search/](https://www.algolia.com/doc/rest-api/search/)

## Credentials

Set these per environment. See [Connect an integration](/cloud/integrations).

| Variable          | Required | Description                                                                                                                                                             |
| ----------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ALGOLIA_API_KEY` | Yes      | Algolia API key (use the Search API key for read-only access, or a scoped key with addObject for writes) [Docs](https://www.algolia.com/doc/guides/security/api-keys/). |
| `ALGOLIA_APP_ID`  | Yes      | Algolia application ID (10-character uppercase ID shown next to your API keys) [Docs](https://www.algolia.com/doc/guides/security/api-keys/).                           |

## Setup

1. **Create an Algolia application**: Sign up at [https://dashboard.algolia.com](https://dashboard.algolia.com) (the free Build plan works for testing) and create or select an application.
2. **Copy your credentials**: In Settings → API Keys ([https://dashboard.algolia.com/account/api-keys/all](https://dashboard.algolia.com/account/api-keys/all)), copy the Application ID into ALGOLIA\_APP\_ID and an API key into ALGOLIA\_API\_KEY. Use the Search API key for read-only use, or create a scoped key with search, browse, and addObject ACLs for writes - avoid the Admin API key.
3. **Note your host**: Tools take a 'host' parameter: pass "\<ALGOLIA\_APP\_ID>-dsn.algolia.net" (your application ID followed by -dsn.algolia.net).
4. **Verify access**: Run the List Indices tool. A 403 usually means the API key lacks the required ACL or the host does not match your application ID.

* Algolia authenticates with two headers: X-Algolia-API-Key and X-Algolia-Application-Id - both env vars are required
* Browse requires an API key with the 'browse' ACL; Save Objects requires 'addObject'
* The Search API key is safe to expose in frontends, but scoped/write keys must stay server-side

Provider API reference: [https://www.algolia.com/doc/rest-api/search/](https://www.algolia.com/doc/rest-api/search/)

## Tools

| Tool         | Access | Description                                                 |
| ------------ | ------ | ----------------------------------------------------------- |
| List Indices | Read   | List the indices in the Algolia application                 |
| Search Index | Read   | Run a search query against an index                         |
| Browse Index | Read   | Browse all records in an index with cursor-based pagination |
| Get Object   | Read   | Retrieve a single record from an index by objectID          |
| Save Objects | Write  | Add or update records in an index via a batch operation     |

## Example prompts

* Search my Algolia index for a query I provide and summarize the top hits.
* List my Algolia indices with their record counts and last update times.
