Search and manage Algolia indices
Integrate Algolia into your workflow. Search indices, manage records (add, update, delete, browse), configure index settings, and perform batch operations.
Search an Algolia index
| Paramètre | Type | Obligatoire | Description |
|---|
applicationId | string | Oui | Algolia Application ID |
apiKey | string | Oui | Algolia API Key |
indexName | string | Oui | Name of the Algolia index to search |
query | string | Oui | Search query text |
hitsPerPage | number | Non | Number of hits per page (default: 20) |
page | number | Non | Page number to retrieve (default: 0) |
filters | string | Non | Filter string (e.g., "category:electronics AND price < 100") |
attributesToRetrieve | string | Non | Comma-separated list of attributes to retrieve |
| Paramètre | Type | Description |
|---|
hits | array | Array of matching records |
↳ objectID | string | Unique identifier of the record |
↳ _highlightResult | object | Highlighted attributes matching the query. Each attribute has value, matchLevel (none, partial, full), and matchedWords |
↳ _snippetResult | object | Snippeted attributes matching the query. Each attribute has value and matchLevel |
↳ _rankingInfo | object | Ranking information for the hit. Only present when getRankingInfo is enabled |
↳ nbTypos | number | Number of typos in the query match |
↳ firstMatchedWord | number | Position of the first matched word |
↳ geoDistance | number | Distance in meters for geo-search results |
↳ nbExactWords | number | Number of exactly matched words |
↳ userScore | number | Custom ranking score |
↳ words | number | Number of matched words |
nbHits | number | Total number of matching hits |
page | number | Current page number (zero-based) |
nbPages | number | Total number of pages available |
hitsPerPage | number | Number of hits per page (1-1000, default 20) |
processingTimeMS | number | Server-side processing time in milliseconds |
query | string | The search query that was executed |
parsedQuery | string | The query string after normalization and stop word removal |
facets | object | Facet counts keyed by facet name, each containing value-count pairs |
facets_stats | object | Statistics (min, max, avg, sum) for numeric facets |
exhaustive | object | Exhaustiveness flags for facetsCount, facetValues, nbHits, rulesMatch, and typo |
Add or replace a record in an Algolia index
| Paramètre | Type | Obligatoire | Description |
|---|
applicationId | string | Oui | Algolia Application ID |
apiKey | string | Oui | Algolia Admin API Key |
indexName | string | Oui | Name of the Algolia index |
objectID | string | Non | Object ID for the record (auto-generated if not provided) |
record | json | Oui | JSON object representing the record to add |
| Paramètre | Type | Description |
|---|
taskID | number | Algolia task ID for tracking the indexing operation |
objectID | string | The object ID of the added or replaced record |
createdAt | string | Timestamp when the record was created (only present when objectID is auto-generated) |
updatedAt | string | Timestamp when the record was updated (only present when replacing an existing record) |
Get a record by objectID from an Algolia index
| Paramètre | Type | Obligatoire | Description |
|---|
applicationId | string | Oui | Algolia Application ID |
apiKey | string | Oui | Algolia API Key |
indexName | string | Oui | Name of the Algolia index |
objectID | string | Oui | The objectID of the record to retrieve |
attributesToRetrieve | string | Non | Comma-separated list of attributes to retrieve |
| Paramètre | Type | Description |
|---|
objectID | string | The objectID of the retrieved record |
record | object | The record data (all attributes) |
Retrieve multiple records by objectID from one or more Algolia indices
| Paramètre | Type | Obligatoire | Description |
|---|
applicationId | string | Oui | Algolia Application ID |
apiKey | string | Oui | Algolia API Key |
indexName | string | Oui | Default index name for all requests |
requests | json | Oui | Array of objects specifying records to retrieve. Each must have "objectID" and optionally "indexName" and "attributesToRetrieve". |
| Paramètre | Type | Description |
|---|
results | array | Array of retrieved records (null entries for records not found) |
↳ objectID | string | Unique identifier of the record |
Partially update a record in an Algolia index without replacing it entirely
| Paramètre | Type | Obligatoire | Description |
|---|
applicationId | string | Oui | Algolia Application ID |
apiKey | string | Oui | Algolia Admin API Key |
indexName | string | Oui | Name of the Algolia index |
objectID | string | Oui | The objectID of the record to update |
attributes | json | Oui | JSON object with attributes to update. Supports built-in operations like {"stock": {"_operation": "Decrement", "value": 1}} |
createIfNotExists | boolean | Non | Whether to create the record if it does not exist (default: true) |
| Paramètre | Type | Description |
|---|
taskID | number | Algolia task ID for tracking the update operation |
objectID | string | The objectID of the updated record |
updatedAt | string | Timestamp when the record was updated |
Delete a record by objectID from an Algolia index
| Paramètre | Type | Obligatoire | Description |
|---|
applicationId | string | Oui | Algolia Application ID |
apiKey | string | Oui | Algolia Admin API Key |
indexName | string | Oui | Name of the Algolia index |
objectID | string | Oui | The objectID of the record to delete |
| Paramètre | Type | Description |
|---|
taskID | number | Algolia task ID for tracking the deletion |
deletedAt | string | Timestamp when the record was deleted |
Browse and iterate over all records in an Algolia index using cursor pagination
| Paramètre | Type | Obligatoire | Description |
|---|
applicationId | string | Oui | Algolia Application ID |
apiKey | string | Oui | Algolia API Key (must have browse ACL) |
indexName | string | Oui | Name of the Algolia index to browse |
query | string | Non | Search query to filter browsed records |
filters | string | Non | Filter string to narrow down results |
attributesToRetrieve | string | Non | Comma-separated list of attributes to retrieve |
hitsPerPage | number | Non | Number of hits per page (default: 1000, max: 1000) |
cursor | string | Non | Cursor from a previous browse response for pagination |
| Paramètre | Type | Description |
|---|
hits | array | Array of records from the index (up to 1000 per request) |
↳ objectID | string | Unique identifier of the record |
cursor | string | Opaque cursor string for retrieving the next page of results. Absent when no more results exist. |
nbHits | number | Total number of records matching the browse criteria |
page | number | Current page number (zero-based) |
nbPages | number | Total number of pages available |
hitsPerPage | number | Number of hits per page (1-1000, default 1000 for browse) |
processingTimeMS | number | Server-side processing time in milliseconds |
Perform batch add, update, partial update, or delete operations on records in an Algolia index
| Paramètre | Type | Obligatoire | Description |
|---|
applicationId | string | Oui | Algolia Application ID |
apiKey | string | Oui | Algolia Admin API Key |
indexName | string | Oui | Name of the Algolia index |
requests | json | Oui | Array of batch operations. Each item has "action" (addObject, updateObject, partialUpdateObject, partialUpdateObjectNoCreate, deleteObject) and "body" (the record data, must include objectID for update/delete) |
| Paramètre | Type | Description |
|---|
taskID | number | Algolia task ID for tracking the batch operation |
objectIDs | array | Array of object IDs affected by the batch operation |
List all indices in an Algolia application
| Paramètre | Type | Obligatoire | Description |
|---|
applicationId | string | Oui | Algolia Application ID |
apiKey | string | Oui | Algolia API Key |
page | number | Non | Page number for paginating indices (default: not paginated) |
hitsPerPage | number | Non | Number of indices per page (default: 100) |
| Paramètre | Type | Description |
|---|
indices | array | List of indices in the application |
↳ name | string | Name of the index |
↳ entries | number | Number of records in the index |
↳ dataSize | number | Size of the index data in bytes |
↳ fileSize | number | Size of the index files in bytes |
↳ lastBuildTimeS | number | Last build duration in seconds |
↳ numberOfPendingTasks | number | Number of pending indexing tasks |
↳ pendingTask | boolean | Whether the index has pending tasks |
↳ createdAt | string | Timestamp when the index was created |
↳ updatedAt | string | Timestamp when the index was last updated |
↳ primary | string | Name of the primary index (if this is a replica) |
↳ replicas | array | List of replica index names |
↳ virtual | boolean | Whether the index is a virtual replica |
nbPages | number | Total number of pages of indices |
Retrieve the settings of an Algolia index
| Paramètre | Type | Obligatoire | Description |
|---|
applicationId | string | Oui | Algolia Application ID |
apiKey | string | Oui | Algolia API Key |
indexName | string | Oui | Name of the Algolia index |
| Paramètre | Type | Description |
|---|
searchableAttributes | array | List of searchable attributes |
attributesForFaceting | array | Attributes used for faceting |
ranking | array | Ranking criteria |
customRanking | array | Custom ranking criteria |
replicas | array | List of replica index names |
hitsPerPage | number | Default number of hits per page |
maxValuesPerFacet | number | Maximum number of facet values returned |
highlightPreTag | string | HTML tag inserted before highlighted parts |
highlightPostTag | string | HTML tag inserted after highlighted parts |
paginationLimitedTo | number | Maximum number of hits accessible via pagination |
Update the settings of an Algolia index
| Paramètre | Type | Obligatoire | Description |
|---|
applicationId | string | Oui | Algolia Application ID |
apiKey | string | Oui | Algolia Admin API Key (must have editSettings ACL) |
indexName | string | Oui | Name of the Algolia index |
settings | json | Oui | JSON object with settings to update (e.g., {"searchableAttributes": ["name", "description"], "customRanking": ["desc(popularity)"]}) |
forwardToReplicas | boolean | Non | Whether to apply changes to replica indices (default: false) |
| Paramètre | Type | Description |
|---|
taskID | number | Algolia task ID for tracking the settings update |
updatedAt | string | Timestamp when the settings were updated |
Delete an entire Algolia index and all its records
| Paramètre | Type | Obligatoire | Description |
|---|
applicationId | string | Oui | Algolia Application ID |
apiKey | string | Oui | Algolia Admin API Key (must have deleteIndex ACL) |
indexName | string | Oui | Name of the Algolia index to delete |
| Paramètre | Type | Description |
|---|
taskID | number | Algolia task ID for tracking the index deletion |
deletedAt | string | Timestamp when the index was deleted |
Copy or move an Algolia index to a new destination
| Paramètre | Type | Obligatoire | Description |
|---|
applicationId | string | Oui | Algolia Application ID |
apiKey | string | Oui | Algolia Admin API Key |
indexName | string | Oui | Name of the source index |
operation | string | Oui | Operation to perform: "copy" or "move" |
destination | string | Oui | Name of the destination index |
scope | json | Non | Array of scopes to copy (only for "copy" operation): ["settings", "synonyms", "rules"]. Omit to copy everything including records. |
| Paramètre | Type | Description |
|---|
taskID | number | Algolia task ID for tracking the copy/move operation |
updatedAt | string | Timestamp when the operation was performed |
Clear all records from an Algolia index while keeping settings, synonyms, and rules
| Paramètre | Type | Obligatoire | Description |
|---|
applicationId | string | Oui | Algolia Application ID |
apiKey | string | Oui | Algolia Admin API Key (must have deleteIndex ACL) |
indexName | string | Oui | Name of the Algolia index to clear |
| Paramètre | Type | Description |
|---|
taskID | number | Algolia task ID for tracking the clear operation |
updatedAt | string | Timestamp when the records were cleared |
Delete all records matching a filter from an Algolia index
| Paramètre | Type | Obligatoire | Description |
|---|
applicationId | string | Oui | Algolia Application ID |
apiKey | string | Oui | Algolia Admin API Key (must have deleteIndex ACL) |
indexName | string | Oui | Name of the Algolia index |
filters | string | Non | Filter expression to match records for deletion (e.g., "category:outdated") |
facetFilters | json | Non | Array of facet filters (e.g., ["brand:Acme"]) |
numericFilters | json | Non | Array of numeric filters (e.g., ["price > 100"]) |
tagFilters | json | Non | Array of tag filters using the _tags attribute (e.g., ["published"]) |
aroundLatLng | string | Non | Coordinates for geo-search filter (e.g., "40.71,-74.01") |
aroundRadius | number | Non | Maximum radius in meters for geo-search, or "all" for unlimited |
insideBoundingBox | json | Non | Bounding box coordinates as [[lat1, lng1, lat2, lng2]] for geo-search filter |
insidePolygon | json | Non | Polygon coordinates as [[lat1, lng1, lat2, lng2, lat3, lng3, ...]] for geo-search filter |
| Paramètre | Type | Description |
|---|
taskID | number | Algolia task ID for tracking the delete-by-filter operation |
updatedAt | string | Timestamp when the operation was performed |