New260+ blocks and 240+ tools are now fully documented
DocumentationReferenceCore BlocksSearch & Research
Block

Algolia Block

Search, index, and manage records in Algolia

The Algolia block integrates Algolia search into your workflows. Use it to run full-text searches, add or update index records, fetch or delete records, and manage your search indices directly from a workflow.

Overview

PropertyValue
Typealgolia
Categorytools
Color#003DFF

When to Use

  • Run full-text searches over an Algolia index and pass the hits into downstream blocks
  • Add new records to an index as part of an ingestion or data-sync workflow
  • Partially update an existing record by its object ID when data changes upstream
  • Fetch a single record by object ID to enrich or validate workflow data
  • Delete stale or removed records from an index to keep search results clean
  • Apply filters and pagination controls (e.g. category:electronics AND price < 100, results per page) on search queries

Configuration

Operation (required)

Dropdown selecting the action to perform. Choosing an operation shows or hides the relevant fields below.

LabelID
Searchalgolia_search
Add Recordalgolia_index_document
Update Recordalgolia_update_document
Delete Recordalgolia_delete_document
Get Recordalgolia_get_document

Application ID (required)

Your Algolia Application ID (e.g. XXXXXXXXXX). Required for all operations.

API Key (required)

Your Algolia API key, stored securely (password field). Use an Admin API Key for write operations (Add, Update, Delete). Required for all operations.

Index Name (required)

The name of the Algolia index to operate on (e.g. my_index). Required for all operations.

Search Query

Shown for: Search. The full-text search term to execute against the index.

Results Per Page

Shown for: Search. Number of hits to return per page (default: 20). Maps to hitsPerPage.

Filters

Shown for: Search. Algolia filter string to narrow results (e.g. category:electronics AND price < 100).

Object ID

Shown for: Update Record, Delete Record, Get Record. The objectID of the record to act on.

Record (JSON)

Shown for: Add Record, Update Record. A JSON object representing the record to add or the attributes to update (e.g. {"name": "Product", "price": 29.99}). For Update Record, only the provided attributes are changed — the rest of the record is preserved.

Inputs & Outputs

Inputs

IDTypeDescription
operationstringOperation to perform (algolia_search, algolia_index_document, algolia_update_document, algolia_delete_document, algolia_get_document)
appIdstringAlgolia Application ID
apiKeystringAlgolia API key
indexNamestringName of the Algolia index
querystringSearch query text (Search only)
hitsPerPagestringNumber of results per page (Search only)
filtersstringAlgolia filter string (Search only)
objectIdstringObject ID of the record (Update, Delete, Get)
recordjsonRecord data to add or attributes to update (Add, Update)

Outputs

The block exposes a shared output envelope; the fields populated depend on which operation ran.

Search (algolia_search):

FieldTypeDescription
hitsjsonArray of matching records
nbHitsnumberTotal number of matching hits
recordsjsonRecords (alias / additional result set)

Add Record (algolia_index_document):

FieldTypeDescription
recordsjsonContains taskID, objectID, createdAt, updatedAt

Update Record (algolia_update_document):

FieldTypeDescription
recordsjsonContains taskID, objectID, updatedAt

Delete Record (algolia_delete_document):

FieldTypeDescription
recordsjsonContains taskID, deletedAt

Get Record (algolia_get_document):

FieldTypeDescription
recordsjsonContains objectID and all record attributes

Tools

Each operation maps to a dedicated tool registered in the tool registry:

  • Algolia Search (algolia_search) — Executes a full-text search against an index using the Algolia multi-index search API. Returns hits, pagination metadata (page, nbPages, hitsPerPage, processingTimeMS), and optional facet data.
  • Algolia Add Record (algolia_index_document) — Adds or fully replaces a record in an index. If an objectID is provided it uses PUT (replace); otherwise POST (auto-ID). Returns taskID and the assigned objectID.
  • Algolia Update Record (algolia_update_document) — Partially updates an existing record using Algolia's partial-update API. Only the supplied attributes are changed. Requires objectID. Returns taskID and updatedAt.
  • Algolia Delete Record (algolia_delete_document) — Deletes a single record by objectID. Returns taskID and deletedAt.
  • Algolia Get Record (algolia_get_document) — Retrieves a single record by objectID. Returns objectID and all record attributes as record.

YAML Example

algolia_1:
  type: algolia
  name: "Algolia"
  inputs:
    operation: "algolia_search"
    appId: "{{ALGOLIA_APP_ID}}"
    apiKey: "{{ALGOLIA_API_KEY}}"
    indexName: "my_index"
    query: "{{start.input}}"
    hitsPerPage: "20"
    filters: "category:electronics"
  connections:
    outgoing:
      - target: next-block-id