Skip to main content
RapidDev - Software Development Agency
flutterflow-integrationsFlutterFlow API Call

Algolia

Connect FlutterFlow to Algolia using a FlutterFlow API Call — Algolia is the one search service where putting the key directly in your FlutterFlow client is safe by design. Use the search-only API key (never the Admin key) in the API Group headers, POST your search query to /1/indexes/{index}/query, and parse the hits[] array into a Data Type. Instant search-as-you-type works out of the box with Algolia's speed.

What you'll learn

  • Why Algolia's search-only key is safe to use in a FlutterFlow API Call (unlike Elasticsearch)
  • How to create a FlutterFlow API Group with Algolia's Application ID and search-only key headers
  • How to POST a search query to /1/indexes/{index}/query and parse hits[] into a Data Type
  • How to wire a search TextField to an Algolia API Call with debounced search-as-you-type
  • How to keep the Algolia index in sync using server-side indexing via a Cloud Function
Book a free consultation
4.9Clutch rating
600+Happy partners
17+Countries served
190+Team members
Beginner15 min read30 minutesDatabase & BackendLast updated July 2026RapidDev Engineering Team
TL;DR

Connect FlutterFlow to Algolia using a FlutterFlow API Call — Algolia is the one search service where putting the key directly in your FlutterFlow client is safe by design. Use the search-only API key (never the Admin key) in the API Group headers, POST your search query to /1/indexes/{index}/query, and parse the hits[] array into a Data Type. Instant search-as-you-type works out of the box with Algolia's speed.

Quick facts about this guide
FactValue
ToolAlgolia
CategoryDatabase & Backend
MethodFlutterFlow API Call
DifficultyBeginner
Time required30 minutes
Last updatedJuly 2026

Algolia in FlutterFlow — the Rare Case Where the Key Is Safe Client-Side

Almost every API integration in FlutterFlow requires a backend proxy when the service uses secret credentials, because FlutterFlow compiles to a client app and any key in the project ships to end users. Algolia is the notable exception. Algolia's architecture separates a search-only API key (safe to distribute publicly, scoped strictly to read operations) from the Admin API key (server-only, grants write, delete, and configuration access). The search-only key cannot modify your index, cannot delete records, and cannot access billing or settings. This means you can safely place it in FlutterFlow's API Group headers and ship it in your app without a proxy — Algolia's security model is built around this use case.

Algolia delivers instant, typo-tolerant results that update as the user types. The managed infrastructure handles indexing, ranking, and spelling correction with no query language to learn and no cluster to configure. Search endpoints live at https://APP_ID-dsn.algolia.net (the read-optimized DSN endpoint), which also sends permissive CORS headers by default — so FlutterFlow's browser-based Run mode works without any proxy or CORS configuration.

The free Build tier offers approximately 10,000 search requests and 1 million records per month (check current limits at algolia.com/pricing). For a live search box on an active app, these quotas can be consumed faster than expected — a user who types a 5-character query generates 5 search requests if search fires on every keystroke. Debouncing input (waiting 200ms after the last keystroke) reduces this significantly while keeping the experience instant-feeling. Keep the Admin API key in a Firebase Cloud Function for indexing operations — pushing records from Firestore or Supabase to Algolia whenever your source data changes.

Integration method

FlutterFlow API Call

Algolia's search endpoint is called from FlutterFlow via a REST API Call — specifically, a POST to `/1/indexes/{index}/query` with two required headers: X-Algolia-Application-Id and X-Algolia-API-Key. Unlike most API integrations, the search-only API key is intentionally designed to be safe in the client app. FlutterFlow can call Algolia directly without a backend proxy. The Admin API key (for indexing) must never go in the client — use a Firebase Cloud Function for write operations. Algolia also sends permissive CORS headers, so web builds work without a proxy.

Prerequisites

  • An Algolia account (free Build tier is sufficient for development — algolia.com)
  • An Algolia index with data already loaded (at minimum a few test records to verify search works)
  • Your Algolia Application ID and search-only API key (from Algolia dashboard → API Keys)
  • A FlutterFlow project (any plan)
  • A custom Data Type defined in FlutterFlow matching the fields in your Algolia index records

Step-by-step guide

1

Find your Application ID and search-only API key in Algolia

Log in to your Algolia dashboard at dashboard.algolia.com. In the left sidebar, click 'API Keys.' You will see three types of keys: 'Admin API Key' (labeled with a warning — this has full write access and must never leave your server), 'Search-Only API Key' (explicitly safe for client-side use, labeled 'Can only be used to perform search operations'), and any custom keys you have created. Copy the Search-Only API Key and your Application ID (shown at the top of the API Keys page, a short alphanumeric string like 'YourAppId'). These two values are what go into FlutterFlow's API Group headers. If you want to restrict the search-only key further — for example, to a specific index or to include only certain response fields — click 'New API Key' and configure an index-restricted key. The restriction is optional but reduces scope if the key is ever exposed. Never copy the Admin API Key for FlutterFlow — that key can delete your entire index and must only ever exist inside a server-side environment like a Firebase Cloud Function.

Pro tip: Your Algolia Application ID is not a secret — it appears in every API call and in the browser network tab when your web app runs. The search-only key is also designed to be public. Only the Admin API key must be kept secret.

Expected result: You have copied your Application ID and Search-Only API Key from the Algolia dashboard. You have confirmed the key type is 'Search-Only API Key' and not the Admin key.

2

Create a FlutterFlow API Group for Algolia with the required headers

In your FlutterFlow project, click 'API Calls' in the left navigation toolbar. Click '+ Add' → 'Create API Group.' Name the group 'AlgoliaSearch.' In the 'Base URL' field, enter `https://{APP_ID}-dsn.algolia.net` — replace `{APP_ID}` with your actual Algolia Application ID. For example, if your Application ID is `ABCD1234`, the base URL is `https://ABCD1234-dsn.algolia.net`. Note the `-dsn` part — this is the read-optimized DSN routing endpoint that gives you the lowest latency globally. Do not use the plain `.algolia.net` base URL for search calls. Now click the 'Headers' tab inside the API Group. Click '+ Add Header' and add: Name = `X-Algolia-Application-Id`, Value = your Application ID (e.g., `ABCD1234`). Add a second header: Name = `X-Algolia-API-Key`, Value = your search-only API key. Add a third header: Name = `Content-Type`, Value = `application/json`. These three headers are sent with every API Call in this group. Click 'Save.' The group is now configured. Both Algolia headers are safe to store here because the search-only key is designed for client exposure — this is different from how you handle other API keys in FlutterFlow.

api_group_config.json
1{
2 "api_group_name": "AlgoliaSearch",
3 "base_url": "https://{YOUR_APP_ID}-dsn.algolia.net",
4 "headers": [
5 { "name": "X-Algolia-Application-Id", "value": "{YOUR_APP_ID}" },
6 { "name": "X-Algolia-API-Key", "value": "{YOUR_SEARCH_ONLY_KEY}" },
7 { "name": "Content-Type", "value": "application/json" }
8 ]
9}

Pro tip: The DSN routing domain (the `-dsn.algolia.net` part) automatically routes your search requests to the closest Algolia data center. Always use the DSN URL for search calls to get the lowest latency.

Expected result: The 'AlgoliaSearch' API Group appears in your API Calls panel with the base URL and three headers configured. You are ready to add individual search calls.

3

Add a search API Call and configure the query body and response parsing

Inside the 'AlgoliaSearch' API Group, click '+ Add' → 'Create API Call.' Name it 'SearchIndex.' Set the method to POST. In the 'Endpoint' field, enter `/1/indexes/{index}/query` — replace `{index}` with your actual Algolia index name (for example `/1/indexes/products/query`). Click 'Variables' and add a variable: name = `searchQuery`, type = String, required = true. This variable will be filled in at runtime from the user's search input. Click 'Body' and set body type to JSON. Enter the following body: `{ "query": "{{searchQuery}}" }`. You can also add optional parameters to the body to customize search behavior — for example, `"hitsPerPage": 10` to limit results and `"typoTolerance": true` (enabled by default). Click 'Response & Test.' In the test input field for `searchQuery`, type a word that should match records in your index. Click 'Test API Call.' A successful call returns a 200 status with a JSON body containing a `hits` array. Each item in `hits` has an `objectID` field (Algolia's internal ID) plus all the fields from your original records. Click 'Generate JSON Paths.' FlutterFlow creates path extractors for `$.hits` (the array) and `$.hits[0].{fieldName}` for each field in the first hit. In your FlutterFlow Data Types (App Settings → Custom Data Types), define a SearchResult type with fields matching your Algolia record schema (title, description, imageUrl, etc.).

search_api_call.json
1{
2 "api_call_name": "SearchIndex",
3 "method": "POST",
4 "endpoint": "/1/indexes/products/query",
5 "variables": [
6 { "name": "searchQuery", "type": "String", "required": true }
7 ],
8 "body": {
9 "query": "{{searchQuery}}",
10 "hitsPerPage": 10,
11 "attributesToRetrieve": ["title", "description", "imageUrl", "price"]
12 },
13 "response_json_paths": [
14 { "field": "hits", "path": "$.hits", "type": "List<SearchResult>" },
15 { "field": "nbHits", "path": "$.nbHits", "type": "Integer" }
16 ]
17}

Pro tip: Use `attributesToRetrieve` in the query body to limit which fields Algolia returns. Returning only the fields you display reduces response size and speeds up results on mobile connections.

Expected result: The test returns a 200 response with a hits array. FlutterFlow shows JSON Paths generated for the hits array and each field. You can see your Algolia index data in the response preview.

4

Wire a search TextField to the API Call and bind results to a ListView

Navigate to your search page in FlutterFlow. Add a TextField widget at the top of the page — give it a label like 'Search' and a search icon prefix. Below it, add a ListView. Click the ListView and open the Backend Query panel → '+ Add Query' → 'API Request' → select 'AlgoliaSearch → SearchIndex.' Map the `searchQuery` variable to the TextField's current value using the variable picker. This creates a backend query that automatically re-fires when the text field value changes. For the search-as-you-type debounce — to avoid firing a request on every single keystroke — create a page state variable (String, named `debouncedQuery`, default empty string). On the TextField's onChange action, add 'Wait' (200ms) then 'Update Page State' to set `debouncedQuery` to the TextField value. Point the ListView backend query to the `debouncedQuery` page variable instead of the TextField directly. This 200ms delay means search only fires after the user pauses typing. Inside the ListView, add a Card widget and inside it, add Text widgets bound to the result fields from 'Item from Repeating Widget' → your SearchResult Data Type fields (result.title, result.description, etc.). For image fields, use an Image widget bound to result.imageUrl.

Pro tip: Algolia is fast enough that per-keystroke search is usable (unlike Elasticsearch), but the debounce still saves quota on the free tier. At scale on a paid plan, per-keystroke is fine — Algolia's own search widget libraries do it by default.

Expected result: Typing into the search field shows results appearing after a short debounce delay. The ListView populates with cards showing your Algolia index data. Clearing the search field empties the list.

5

Keep your Algolia index in sync using server-side indexing

The search-only key in FlutterFlow lets users search but cannot add or update records. All indexing (pushing data into Algolia) must happen server-side using the Admin API key, which must never go in the FlutterFlow client. Set up indexing in a Firebase Cloud Function triggered by Firestore or Supabase writes. For Firestore: create a Cloud Function triggered by `onDocumentCreated` (and `onDocumentUpdated`, `onDocumentDeleted`) for your data collection. Inside the function, use the Algolia JavaScript client (`algoliasearch` package) with the Admin API key stored in the function's environment variables. On create/update, call `index.saveObject()` with the document data and the Firestore document ID as `objectID`. On delete, call `index.deleteObject()`. This keeps Algolia in sync automatically whenever your source data changes. Deploy the function to Firebase. The FlutterFlow app only ever reads from Algolia using the search-only key — writing always goes through the function. If you want help setting up the Firestore-to-Algolia sync pipeline, RapidDev's team works on FlutterFlow integrations like this regularly — free scoping call at rapidevelopers.com/contact.

index.js
1// Firebase Cloud Function: sync Firestore writes to Algolia
2// Add package: algoliasearch
3const functions = require('firebase-functions');
4const algoliasearch = require('algoliasearch');
5
6const client = algoliasearch(
7 process.env.ALGOLIA_APP_ID,
8 process.env.ALGOLIA_ADMIN_KEY // Admin key — server-side only
9);
10const index = client.initIndex('products');
11
12// Index new documents
13exports.onProductCreated = functions.firestore
14 .document('products/{productId}')
15 .onCreate(async (snapshot, context) => {
16 const data = snapshot.data();
17 await index.saveObject({ objectID: context.params.productId, ...data });
18 });
19
20// Update modified documents
21exports.onProductUpdated = functions.firestore
22 .document('products/{productId}')
23 .onUpdate(async (change, context) => {
24 const data = change.after.data();
25 await index.saveObject({ objectID: context.params.productId, ...data });
26 });
27
28// Remove deleted documents
29exports.onProductDeleted = functions.firestore
30 .document('products/{productId}')
31 .onDelete(async (snapshot, context) => {
32 await index.deleteObject(context.params.productId);
33 });

Pro tip: Set ALGOLIA_APP_ID and ALGOLIA_ADMIN_KEY as Firebase Function environment variables (Configuration → Environment variables), never hardcoded in the function code.

Expected result: After deploying the Cloud Functions, creating a product document in Firestore causes it to appear in Algolia search results within a few seconds. Deleting a Firestore document removes it from Algolia search.

Common use cases

Job board app with instant keyword search across listings

A FlutterFlow job board lets candidates search open positions by keyword, role title, or company name. Typing into the search field fires an Algolia query on every 200ms pause, returning matching jobs ranked by Algolia's relevance scoring. The search-only key sits in the API Group — no proxy needed.

FlutterFlow Prompt

Build a job search screen where candidates can type keywords and see matching job listings update instantly as they type. Show job title, company, location, and salary range on each result card.

Copy this prompt to try it in FlutterFlow

Recipe app with fuzzy ingredient and dish name search

A FlutterFlow cooking app lets users search by ingredient or dish name. Algolia's fuzziness handles typos like 'spageti' matching 'spaghetti.' Each hit includes the recipe title, thumbnail URL, and prep time. Results bind directly to a ListView of recipe cards from the hits[] JSON path.

FlutterFlow Prompt

Build a recipe search screen where users can type an ingredient or dish name and see matching recipes appear instantly, even if they misspell the search term. Show the recipe photo, title, and prep time on each card.

Copy this prompt to try it in FlutterFlow

E-commerce app with product search and optional category filter

A FlutterFlow shopping app adds a search screen backed by Algolia. Users type a product name and optionally select a category from a DropDown to narrow results. The Algolia API Call includes both the query and an optional filters parameter (e.g., `category:Electronics`). Results update as the user types.

FlutterFlow Prompt

Build a product search screen with a search field and a category dropdown. Results should show matching products, filtered by the selected category, and update as the user types.

Copy this prompt to try it in FlutterFlow

Troubleshooting

API Call test returns 403 Forbidden with 'Invalid Application-ID or API key'

Cause: Either the Application ID or the API key in the FlutterFlow API Group headers is incorrect, or you accidentally used the Admin API key which may have access restrictions, or there is a whitespace character in the copied key.

Solution: Go to the Algolia dashboard → API Keys and copy the values again carefully. Paste the Application ID into the X-Algolia-Application-Id header and the Search-Only API Key into X-Algolia-API-Key. Check for invisible trailing spaces in the pasted values. Confirm the API Group base URL uses the Application ID correctly: `https://{APP_ID}-dsn.algolia.net`.

Search returns zero hits even though the index has data

Cause: The query term does not match any records due to index configuration (searchable attributes not set), OR the index name in the endpoint path is wrong, OR the records were indexed with different field names than what you are searching against.

Solution: In the Algolia dashboard, go to your index → Configuration → Searchable Attributes and confirm the fields you want to search are listed there. If the list is empty, click '+' and add the field names (e.g., 'title', 'description'). Also verify the index name in your FlutterFlow endpoint path matches the exact name shown in the Algolia dashboard (case-sensitive). Test in Algolia's dashboard search bar to confirm records are findable before debugging the FlutterFlow call.

Free tier quota exhausted — Algolia returns 429 Too Many Requests

Cause: The search-as-you-type integration is firing requests on every keystroke, consuming the free Build tier's search request quota faster than expected.

Solution: Add debouncing (minimum 200ms wait after last keystroke) as described in Step 4. Also check if the ListView backend query is re-firing on every component rebuild rather than only when the search query changes — bind it to a page state variable with explicit update control rather than directly to the TextField value. Consider upgrading to a paid Algolia plan if you have a real user base.

ListView shows results from a previous search instead of the new query

Cause: The page state variable used for the debounced query is not being updated correctly, or the ListView's backend query is cached and not re-running when the variable changes.

Solution: In the Action Flow Editor, verify that the 'Update Page State' action for the debounced query variable is running after the Wait action, not before. Also confirm the ListView backend query is bound to the page state variable (not the TextField widget value directly). In FlutterFlow's test mode, use the debug panel to watch the page state variable update when you type.

Best practices

  • Only use the Search-Only API Key in FlutterFlow — never the Admin API key. The search-only key is specifically designed to be safe in client apps and cannot modify your index.
  • Always send indexing writes (saveObject, deleteObject) from a server-side Cloud Function holding the Admin key — never from the FlutterFlow client.
  • Debounce your search TextField (200ms minimum) to reduce unnecessary API requests on the free tier and improve performance on slow connections.
  • Use the DSN routing URL (`{APP_ID}-dsn.algolia.net`) as your API Group base URL — it routes to the closest Algolia data center for lowest latency globally.
  • Configure Searchable Attributes in the Algolia dashboard before testing — if this is not set, Algolia searches all string fields which may give unexpected ranking results.
  • Use `attributesToRetrieve` in your search query body to return only the fields your FlutterFlow widgets display — this reduces response payload size and speeds up rendering on mobile.
  • Monitor your free tier quota in the Algolia dashboard (Usage tab) before launching publicly — a live search box with real users can exhaust the free tier quickly.

Alternatives

Frequently asked questions

Is it really safe to put the Algolia search-only key in my FlutterFlow app?

Yes — this is explicitly supported and documented by Algolia. The search-only key is scoped to read operations only: it can search records but cannot create, update, or delete them, and cannot access index configuration or billing. Algolia's own client-side libraries (InstantSearch.js, etc.) use this key in browser code. Just make sure you are using the Search-Only API Key from the Algolia dashboard and not the Admin API Key.

How do I add data to my Algolia index — can I do it from FlutterFlow?

No — and you should not. Adding records to Algolia requires the Admin API key, which must stay server-side. The recommended pattern is a Firebase Cloud Function triggered by Firestore or Supabase writes that pushes data to Algolia using the Admin key stored in function environment variables. This way your source of truth is your main database, and Algolia is kept in sync automatically.

What does the Algolia free tier actually include, and when do I need to upgrade?

The Build free tier includes approximately 10,000 search requests per month and 1 million records (verify current limits at algolia.com/pricing as these can change). For an app in development or early beta with a small user base, this is usually sufficient. Under real traffic with search-as-you-type, each active user generates many requests per session. Check your actual usage in the Algolia dashboard's Usage tab and plan to upgrade when you approach the free tier limits.

How does Algolia handle typos and misspellings automatically?

Algolia's typo tolerance is on by default and uses its own distance algorithm to match queries like 'runninng shoes' to records with 'running shoes.' You can configure the number of allowed typos per word in the index configuration (Configure → Typo Tolerance). For very short words (under 4 characters), Algolia disables typo tolerance to avoid too many false matches. No Query DSL configuration is needed — it works out of the box.

Will Algolia's CORS headers let it work in FlutterFlow's browser-based Run mode?

Yes — unlike Elasticsearch, Algolia sends permissive CORS headers on all search endpoint responses. FlutterFlow's browser-based Run/Test mode can call the Algolia search endpoint directly without any proxy or special CORS configuration. This is one of the practical advantages of Algolia over Elasticsearch for FlutterFlow web builds.

RapidDev

Talk to an Expert

Our team has built 600+ apps. Get personalized help with your project.

Book a free consultation

Integrations are where projects stall

We wire FlutterFlow integrations like this one every week — auth, webhooks, edge cases included. Fixed-price builds from $13K, delivered in 6–10 weeks.

Talk to an integration engineer

We put the rapid in RapidDev

Need a dedicated strategic tech and growth partner? Discover what RapidDev can do for your business! Book a call with our team to schedule a free, no-obligation consultation. We'll discuss your project and provide a custom quote at no cost.