Swarmz
IntegrationsData and analytics

Algolia

Search and maintain Algolia indexes from a Swarmz project without exposing a backend key

Connect Algolia when a project needs hosted search, record indexing, or a browser search interface. Server operations use the backend key through the connector gateway. Browser code can receive a separate key only when its access control list contains exactly search.

Algolia uses one shared workspace connection. Published app users search and change the same indexes, subject to the authorization rules in the generated app.

Availability

A Swarmz administrator must show Algolia under Platform config > Integrations. Algolia does not require a Swarmz OAuth application.

Before you connect

Create two Algolia API keys when the app includes browser search:

  • A backend key with only the access control entries required by the server operations you plan to use.
  • A public key with exactly the search entry. Add index, filter, rate, and referrer restrictions in Algolia when they fit the app.

Do not use the Algolia Admin API key. Algolia documents API key permissions and restrictions.

Connect Algolia

  1. In Algolia, open Settings > Team and Access > API keys and copy the Application ID and the restricted keys.
  2. In the Swarmz project, open Settings > Integrations and select Algolia.
  3. Enter the Application ID and Backend API key.
  4. If the generated app searches from the browser, enter the Public search key.
  5. Select Save connection.

Swarmz tests the backend key with the configured Application ID. If a public key is present, setup fails unless its access list is exactly search.

Available operations

OperationWhat it doesLimit per minute
list_indexesLists up to 100 indexes30
searchSearches one index with bounded hits, pages, and filters60
save_recordsAdds or replaces up to 100 records10
delete_recordDeletes one record by objectID10
public_search_configReturns the Application ID and the verified search-only key10

Saving and deleting records require allow-once approval. A search runs immediately. The public configuration operation rechecks the public key before returning it; the backend key never reaches browser code.

Ask the AI to use Algolia

  • “Add product search backed by the products index, with 20 hits per page and a category filter.”
  • “Index these catalog records in Algolia, using our product IDs as objectID.”
  • “Build browser search using only the configured public search key.”
  • “Remove the discontinued record after showing me the exact index and object ID.”

The AI requests Algolia when the project first needs live search or indexing. It reads index names before proposing a write and uses the exact project connection returned by Swarmz.

Verify Algolia

  1. List indexes and confirm the intended index appears.
  2. Search for a record with a known value.
  3. Save one test record with a unique objectID, then search for it.
  4. Delete that record and confirm it no longer appears.
  5. If browser search is enabled, inspect the generated client request and confirm it contains the public key, not the backend key.

Troubleshoot and recover

If setup reports an invalid public key, remove every access entry except search. A restricted key can still fail later when it lacks the index or filter restrictions needed for an operation.

To rotate keys, create replacements in Algolia, edit the Swarmz connection, and rerun the read checks before deleting the old keys. To remove access, select Remove in Swarmz and revoke both Algolia keys.

On this page