Algolia Component
Algolia is an advanced AI search platform.
Component key: algoliaDescription
Algolia is a powerful and flexible search and discovery API, trusted by thousands of developers for delivering relevant search results in real-time.
Use the Algolia component to interact with your Algolia indexes, manage records, and perform search operations in your Algolia account.
API Documentation
This component was built using the Algolia API Reference.
A Note on Algolia Search Results Pagination
Algolia's Search API supports pagination.
This means that the API will return a certain number of hits for any search query. If additional results are available, the API response includes a nbPages
field that indicates the total number of pages.
{
"hits": [],
"nbHits": 100,
"page": 0,
"nbPages": 20
}
The page
parameter can be used in a subsequent query to fetch additional results.
See Algolia's Docs for information about Algolia's paginated search API, and this quickstart for information on looping over a paginated API in Prismatic.
Connections
Algolia API Key
API Keys are necessary for interacting with the Algolia API. API keys are unique to each application you create in Algolia.
To generate an API Key, you should log into Algolia and navigate to your application page. Within the application settings, you can find your API keys.
Algolia provides three types of API keys:
Admin API Key: This key has read and write rights on all indexing and configuration operations.
Search-Only API Key: This key has read-only rights on indexing operations and is recommended for use on the frontend.
Secured API Key: This key is generated from a search key and has additional rights defined at the time of generation.
For your integration, you will need both the Admin API Key and the Search-Only API Key.
For more information about API keys, refer to the Algolia Docs.
Actions
Browse Index
Retrieve all objects from an index. | key: browseIndex
Copy Index
Copy an index, including its records, Synonyms, Rules, and settings (except for enableReRanking). | key: copyIndex
Output Example Payload
{
"data": {
"updatedAt": "2013-08-21T13:20:18.960Z",
"taskID": 10210332
}
}
Copy Settings
Copy the settings of an index to another index on the same app. | key: copySettings
Output Example Payload
{
"data": {
"updatedAt": "2013-08-21T13:20:18.960Z",
"taskID": 10210332
}
}
Delete Index
Delete an index. | key: deleteIndex
Output Example Payload
{
"data": {
"deletedAt": "2013-01-18T15:33:13.556Z",
"taskID": 721
}
}
Get Index
Get index information | key: getIndex
Get Settings
Get the settings of an index. | key: getSettings
Output Example Payload
{
"data": {
"minWordSizefor1Typo": 4,
"minWordSizefor2Typos": 8,
"hitsPerPage": 20,
"searchableAttributes": null,
"attributesToRetrieve": null,
"attributesToSnippet": null,
"attributesToHighlight": null,
"ranking": [
"typo",
"geo",
"words",
"proximity",
"attribute",
"exact",
"custom"
],
"customRanking": null,
"separatorsToIndex": "",
"queryType": "prefixAll"
}
}
List Indices
Get a list of indices with their associated metadata. | key: listIndexes
Output Example Payload
{
"data": {
"items": [
{
"name": "contacts",
"createdAt": "2013-08-15T19:49:47.714Z",
"updatedAt": "2013-08-17T07:59:28.313Z",
"entries": 2436442,
"dataSize": 224152664,
"fileSize": 269450853,
"lastBuildTimeS": 0,
"numberOfPendingTask": 0,
"pendingTask": false
}
],
"nbPages": 1
}
}
Move Index
Move or rename an index. | key: moveIndex
Output Example Payload
{
"data": {
"updatedAt": "2013-08-21T13:20:18.960Z",
"taskID": 10210332
}
}
Raw Request
Send raw HTTP request to Algolia | key: rawRequest
Search Facet Values
Search for values of a given facet. | key: searchFacetValues
Search Multiple Indices
Send multiple search queries, potentially targeting multiple indices, in a single API call. | key: searchMultipleIndices
Set Settings
Change an index's settings. | key: setSettings
Output Example Payload
{
"data": {
"updatedAt": "2013-08-21T13:20:18.960Z",
"taskID": 10210332
}
}
Update Batch Indices
This method enables you to batch multiple different indexing operations in one API call, like add or delete objects, potentially targeting multiple indices. | key: updateBatchIndices
Output Example Payload
{
"data": {
"taskID": {
"contacts": 792,
"public_contacts": 793
},
"objectIDs": [
"6891",
"6892"
]
}
}