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: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.
- 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
| Example app | Example prompt | Description |
|---|---|---|
| E-commerce product search | Use 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 search | Use 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 listings | Use 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 search | Use 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 directory | Use 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 finder | Use 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 dashboard | Use 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
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.Open your Algolia dashboard
Sign in to the Algolia dashboard and select the application you want to connect.
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.(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.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.
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.
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.
How to unlink projects from a connection
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:
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.