Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.lovable.dev/llms.txt

Use this file to discover all available pages before exploring further.

Algolia is a hosted search and indexing engine that lets your Lovable app add fast, typo-tolerant search across product catalogs, content libraries, marketplaces, and directories. It’s designed for apps where database queries aren’t enough and you need faceted filtering, ranking, recommendations, and search analytics. With Algolia, your app can:
  • 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
Algolia is a search engine, not a database. Use it alongside your primary data store, not as a replacement, and reindex when records change.
For simple search (filtering a small list, basic text matching), keep it in your database or frontend. Reach for the Algolia connector when you need typo tolerance, faceted filters, ranking, or search analytics across larger record sets.

Common use cases and example apps

Example appExample promptDescription
E-commerce product searchUse Algolia and build a product catalog with instant search and faceted filters for price, category, and availability.Power product discovery with instant search.
The app indexes products and renders a search experience with facets and ranking tuned for relevance.
Documentation site searchUse Algolia and add a search bar to my docs site with autocomplete and keyboard shortcuts.Add fast in-page search to a docs site.
The app indexes pages and headings so readers can find content with autocomplete and typo tolerance.
Marketplace listingsUse Algolia and build a marketplace where buyers filter listings by location, price, and condition.Run faceted search across marketplace listings.
The app indexes listings and exposes filters and sorting so users narrow results quickly.
Blog or editorial searchUse Algolia and add search to my blog with tag and author filters.Surface relevant articles through search and filtering.
The app indexes posts and metadata, then renders ranked results filtered by tag, author, or date.
Internal directoryUse Algolia and build an employee directory where people search by name, team, or skill.Find people fast across an internal directory.
The app indexes employee records and renders typo-tolerant search with team and skill filters.
Location finderUse Algolia and build a restaurant finder with geo search and cuisine filters.Search nearby places with geo and category filters.
The app uses Algolia’s geo search and filters to render a finder UI with map results.
Search analytics dashboardUse Algolia and build a dashboard that surfaces top searches, no-result queries, and click-through data.Monitor what users search for and where results fall short.
The app reads Algolia search analytics so the team can tune indexes and improve relevance.

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 search ACL, 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.
Your secret backend API key functions like a password. Keep it secure and never share it publicly. You’ll need it in the next step.
See Algolia documentation for details: API keys guide.

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 → App connectors and select Algolia.
2

Add a connection

Click Add connection.
3

Configure the connection

  1. Display name: name the connection, for example Algolia Prod. This name is only used inside Lovable to identify the connection.
  2. Application ID: paste your 10-character Algolia application ID. This value is publicly visible in your published app.
  3. Secret API key: paste your backend API key. This stays on the server and is proxied through the Lovable gateway.
  4. 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.
See Connection-level access for more information.
5

Connect

Click Connect. Lovable verifies both keys against Algolia before saving the connection.
When connected, anyone building in a project can ask Lovable in chat to link their project to Algolia (based on configured connection-level access). Your Lovable apps can then index records and run search through the connector.

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.
If you skip the public key, the frontend can still search by going through your backend (which calls Algolia through the gateway). Direct frontend search is faster and lighter on your backend, but requires a search-only public key.

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.
Editors and above can remove specific projects from a connection without deleting the connection entirely. The connection will remain available for other projects. To unlink projects:
1

Open Connectors

Open Connectors, then go to App connectors, and select .
2

Open the connection

Open the connection you want to manage.
3

Select projects

Under Linked projects, check the projects you want to unlink.
4

Confirm

Click Unlink projects and confirm.
When unlinked, those projects will no longer have access to through this connection. If a project needs again, you can link it to any available connection.

How to delete a connection

Workspace admins and owners can delete connections.
Deleting a connection is permanent and cannot be undone. It will remove the credentials from all linked projects, and any apps using this connection will stop working until a new connection is added.
Before deleting, review the Linked projects section to see which projects are currently using the connection. To delete a connection:
1

Open Connectors

Open Connectors, then go to App connectors, and select .
2

Open the connection

Open the connection you want to remove.
3

Review linked projects

Review the Linked projects section.
4

Delete

Under Delete this connection, click Delete and confirm.