New260+ blocks and 240+ tools are now fully documented
DocumentationReferenceTool IntegrationsSearch & Research
Tool

Algolia

Search, index, and manage records in Algolia search indices

Search, index, and manage records in Algolia — the hosted search and discovery API. Use this integration to run full-text queries against your indices, add or replace records, partially update existing records, fetch a single record by ID, and delete records — all from within a workflow.

Overview

PropertyValue
Typealgolia
CategoryTool — Search
AuthAPI Key (x-algolia-application-id + x-algolia-api-key headers)

Operations

OperationTool IDDescription
Searchalgolia_searchRun a full-text search against an Algolia index and return ranked hits with pagination metadata
Add Recordalgolia_index_documentAdd a new record to an index (POST) or add/replace a record at a specific objectID (PUT)
Update Recordalgolia_update_documentPartially update an existing record without replacing all its attributes
Delete Recordalgolia_delete_documentDelete a record from an index by its objectID
Get Recordalgolia_get_documentRetrieve a single record by its objectID, optionally limiting which attributes are returned

Configuration

SettingTypeRequiredDescription
applicationIdstringYesYour Algolia Application ID (visible in the Algolia dashboard under API Keys). Used as x-algolia-application-id. Store as {{ALGOLIA_APP_ID}}.
apiKeystringYesAlgolia API Key sent as x-algolia-api-key. Use a Search-Only API Key for algolia_search and algolia_get_document; use an Admin API Key for write operations (algolia_index_document, algolia_update_document, algolia_delete_document). Store as {{ALGOLIA_API_KEY}}.
indexNamestringYesName of the Algolia index to operate on (e.g. products, articles).
querystringYes (Search only)The search query text. An empty string matches all records.
hitsPerPagenumberNoNumber of hits to return per page. Defaults to 20.
pagenumberNoZero-based page number to retrieve. Defaults to 0.
filtersstringNoAlgolia filter expression applied before ranking, e.g. category:electronics AND price < 100.
attributesToRetrievestringNoComma-separated list of attributes to include in the response, e.g. name,price,sku. Applies to both Search and Get Record.
objectIDstringNo (Add Record) / Yes (Update, Delete, Get Record)The unique identifier of the record. For Add Record, omit to let Algolia auto-generate an ID (POST) or supply one to upsert at that ID (PUT).
recordjsonYes (Add Record only)Full JSON object to add or replace. Example: {"name": "Widget", "price": 9.99, "category": "tools"}.
attributesjsonYes (Update Record only)JSON object containing only the fields to update. Non-specified attributes are left unchanged.
createIfNotExistsbooleanNo (Update Record only)When false, the update fails if the record does not already exist. Defaults to true (upsert behaviour).

Outputs

FieldTypeDescription
hitsarrayArray of matching record objects, ordered by Algolia's relevance ranking
nbHitsnumberTotal number of records that matched the query
pagenumberZero-based index of the current page returned
nbPagesnumberTotal number of pages available for this query
hitsPerPagenumberNumber of hits returned per page
processingTimeMSnumberServer-side query processing time in milliseconds
querystringThe search query string that was executed
parsedQuerystringThe query string after Algolia's normalisation (optional)
facetsobjectFacet counts keyed by attribute name (optional, only when facets are requested)
facets_statsobjectMin/max/sum statistics for numeric facet attributes (optional)
exhaustiveobjectFlags indicating whether results are exhaustive (optional)

Add Record (algolia_index_document)

FieldTypeDescription
taskIDnumberAlgolia task ID for tracking the indexing operation asynchronously
objectIDstringThe objectID of the added or replaced record
createdAtstringISO timestamp when the record was created (optional)
updatedAtstringISO timestamp when the record was updated (optional)

Update Record (algolia_update_document)

FieldTypeDescription
taskIDnumberAlgolia task ID for tracking the partial-update operation
objectIDstringThe objectID of the updated record
updatedAtstringISO timestamp when the record was updated

Delete Record (algolia_delete_document)

FieldTypeDescription
taskIDnumberAlgolia task ID for tracking the deletion
deletedAtstringISO timestamp when the record was deleted

Get Record (algolia_get_document)

FieldTypeDescription
objectIDstringThe objectID of the retrieved record
recordobjectAll attribute data for the record (excludes the objectID field)

Example

[Starter] → [Algolia: Search] → [Agent: summarise results]

When a user submits a keyword through {{starter.input}}, the Search operation queries the products index using {{ALGOLIA_APP_ID}} and {{ALGOLIA_API_KEY}}, returning up to {{hitsPerPage}} ranked hits. The Agent block then receives {{algolia.hits}} and composes a natural-language summary of the top results. Pair a second branch with the Add Record operation to write any new product the Agent identifies back to the same index as a fresh record.

Tips

  • Use a Search-Only API Key for read operations. algolia_search and algolia_get_document only need read access. Reserve your Admin API Key for write operations (algolia_index_document, algolia_update_document, algolia_delete_document) and never expose it in client-facing workflows.
  • algolia_index_document vs algolia_update_document: Add Record with an objectID replaces the entire record (PUT); Update Record performs a partial update — only the fields you supply in attributes are changed.
  • Pagination: nbPages and page outputs let you loop through large result sets. Feed {{algolia.page + 1}} back into a subsequent Search block until page >= nbPages - 1.
  • Filter syntax follows Algolia's filter expression language: brand:Nike AND size:M, price < 50, or (category:shoes OR category:boots) AND inStock:true. Make sure the attributes used in filters are declared as attributesForFaceting in your Algolia index settings.