- Index records using the Algolia API
- Run full-text search with typo tolerance and ranking
- Build faceted filtering, sorting, and category navigation on top of indexed data
- Use Algolia’s recommendation and AI features to surface related results
- Expose a restricted public search key so the frontend can query Algolia directly
Common use cases and example apps
How to connect Algolia
Workspace admins and owners can connect Algolia. You can create multiple Algolia connections using different application IDs and keys, which is useful for separating environments (for example, development and production), targeting different Algolia applications, or scoping keys to specific indexes. When the connection is created, Algolia becomes available across all projects in the workspace. Anyone building in a project can ask Lovable in chat to link their project to it.Prerequisites
Before connecting Algolia, make sure you have:- An Algolia account and application
- Your Algolia Application ID
- A backend API key with the ACLs your app needs (for example,
search,addObject,deleteObject,settings) - (Optional) A public API key restricted to the
searchACL, if you want the frontend to query Algolia directly - Lovable workspace owner or admin role
All search and indexing operations made through this connector count toward your Algolia plan limits. Billing and quotas are handled directly by Algolia, not Lovable.
Step 1: Get your Algolia application ID and API keys
Your Lovable app authenticates to Algolia with an Application ID and a backend API key. You can also provide an optional public API key that the frontend uses for search.1
Open your Algolia dashboard
Sign in to the Algolia dashboard and select the application you want to connect.
2
Open API keys
Go to Settings → API Keys. Your Application ID is shown at the top of this page.
3
Create a backend API key
Click New API key and create a key for backend use. Give it a descriptive name, for example
Lovable backend, restrict it to the indexes your app uses, and grant only the ACLs the app needs (typically search, addObject, deleteObject, and settings for an app that indexes and searches).Do not use your Algolia admin API key. Create a dedicated key with the minimum ACLs required, so the credential can be rotated or revoked without affecting other integrations.4
(Optional) Create a public search API key
If you want the frontend to call Algolia directly, create a second key with only the
search ACL, restricted to the indexes the frontend can query.Lovable validates this key on save and rejects it if it carries any ACL other than search. Restrict the key to specific indexes (and, if possible, domains) in Algolia for defense in depth.Step 2: Connect Algolia to Lovable
You can create multiple connections using different application IDs and keys.1
Open Algolia in Connectors
Go to Connectors and select Algolia.
2
Add a connection
Click Add connection.
3
Configure the connection
- Display name: name the connection, for example
Algolia Prod. This name is only used inside Lovable to identify the connection. - Application ID: paste your 10-character Algolia application ID. This value is publicly visible in your published app.
- Secret API key: paste your backend API key. This stays on the server and is proxied through the Lovable gateway.
- Public API key (optional): paste a public,
search-only API key if you want the frontend to query Algolia directly. This value is publicly visible in your published app.
4
Choose who can access this connection
Under Who can access this connection, decide who in your workspace can use the connection:
- Only you (default): only the person creating the connection can use it and its associated data.
- Invite specific people: only you and explicitly added workspace members can use the connection and its associated data.
- Invite entire workspace: click Invite entire workspace to make the connection available to everyone in your Lovable workspace.
5
Connect
Click Connect. Lovable verifies both keys against Algolia before saving the connection.
Public and secret API keys
The connector accepts two keys with different roles:- The secret backend API key is used for server-side calls (indexing, settings, search). It’s proxied through Lovable’s connector gateway, so the raw key never reaches the published app.
- The public API key is optional. When provided, it’s exposed to the frontend so the app can call Algolia’s search endpoint directly. Lovable enforces a strict
search-only ACL on this key, and rejects any key with broader permissions.
Limitations
The Algolia connector cannot:- Replace your primary database. Algolia is a search engine, so records must be indexed from your source of truth and kept in sync when they change.
- Automatically delete Algolia indexes when a Lovable project, workspace, or connection is removed. You must delete unused indexes in the Algolia dashboard.
- Refresh or rotate API keys for you. To rotate, create a new key in Algolia and update the Lovable connection.
- Support per-end-user Algolia authentication. Each connection represents a single Algolia application shared across all projects linked to it.
- Accept a public API key with any ACL other than
search. Keys with broader permissions are rejected on save.
Manage your connection
Connections are managed from Connectors: select , then open the connection.- Unlink projects to remove access from specific projects while keeping the connection available for others. See Unlink projects from a connection for the steps.
- Delete the connection to remove it from the workspace entirely. Deleting is permanent. It removes the credentials from all linked projects, and app features that use stop working until a new connection is added. See Delete a connection for the steps and who can delete.