Search indexes
Base URL: https://api.amplience.net/v2/content
Authorization and status codes
For authorization and status codes see the API Reference overview.
Search indexesLink copied!
| Method | Endpoint | Summary |
|---|---|---|
GET | /algolia-search/{hubId}/indexes | List indexes |
POST | /algolia-search/{hubId}/indexes | Create an index |
GET | /algolia-search/{hubId}/indexes/{indexId} | Get an index |
PATCH | /algolia-search/{hubId}/indexes/{indexId} | Update an index |
DELETE | /algolia-search/{hubId}/indexes/{indexId} | Delete an index |
POST | /algolia-search/{hubId}/indexes/{indexId}/archive | Archive an Algolia search index |
GET | /algolia-search/{hubId}/indexes/{indexId}/assigned-content-types | List assigned content types |
POST | /algolia-search/{hubId}/indexes/{indexId}/assigned-content-types | Create an assigned content type |
GET | /algolia-search/{hubId}/indexes/{indexId}/assigned-content-types/{contentTypeId} | Get assigned content type |
DELETE | /algolia-search/{hubId}/indexes/{indexId}/assigned-content-types/{contentTypeId} | Delete an assigned content type |
POST | /algolia-search/{hubId}/indexes/{indexId}/assigned-content-types/{contentTypeId}/recreate-webhook | Recreate assigned content type webhook |
POST | /algolia-search/{hubId}/indexes/{indexId}/clear | Clear an index |
GET | /algolia-search/{hubId}/indexes/{indexId}/keys/{keyId} | Get an API key |
DELETE | /algolia-search/{hubId}/indexes/{indexId}/objects/{objectId} | Delete an index object |
GET | /algolia-search/{hubId}/indexes/{indexId}/settings | Get search index settings |
PATCH | /algolia-search/{hubId}/indexes/{indexId}/settings | Update search index settings |
GET | /algolia-search/{hubId}/indexes/{indexId}/stats | Get search index statistics |
POST | /algolia-search/{hubId}/indexes/{indexId}/unarchive | Unarchive an Algolia search index |
List indexesLink copied!
GET /algolia-search/{hubId}/indexes
https://api.amplience.net/v2/content/algolia-search/{hubId}/indexes
List Algolia search indexes for a given hub
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
hubId | path | string | ✓ | Hub ID Example: 00112233445566778899aabb |
parentId | query | string | Filter by the parentId. An empty string will return all primary indexes. Example: 20 | |
projection | query | string (withSettings) | Project addition values in list response withSettings - includes the settings for each index | |
size | query | integer | Set the number of results per page Example: 20 | |
page | query | integer | Page number Example: 0 | |
sort | query | string | Sort parameter Example: label,asc | |
status | query | string | Comma seperated list of statuses Example: ACTIVE,ARCHIVED |
Responses
| Status | Description |
|---|---|
| 200 | List of Algolia Search indexes for the given hub |
Response Example (200)
Create an indexLink copied!
POST /algolia-search/{hubId}/indexes
https://api.amplience.net/v2/content/algolia-search/{hubId}/indexes
Create a new Algolia search index
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
hubId | path | string | ✓ | Hub ID Example: 00112233445566778899aabb |
Request Body
Content-Type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
suffix | string | ✓ | Index suffix |
label | string | ✓ | User defined index label |
type | string (PRODUCTION, STAGING) | ✓ | Type of index |
assignedContentTypes | array | ✓ | Assigned Content Types |
Request example
Responses
| Status | Description |
|---|---|
| 201 | Algolia Search Index |
Response Example (201)
Get an indexLink copied!
GET /algolia-search/{hubId}/indexes/{indexId}
https://api.amplience.net/v2/content/algolia-search/{hubId}/indexes/{indexId}
Get an Algolia search index for a given hub
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
hubId | path | string | ✓ | Hub ID Example: 00112233445566778899aabb |
indexId | path | string | ✓ | Index ID Example: 00112233445566778899aabb |
Responses
| Status | Description |
|---|---|
| 200 | Get Algolia Search indexes for the given hub |
Response Example (200)
Update an indexLink copied!
PATCH /algolia-search/{hubId}/indexes/{indexId}
https://api.amplience.net/v2/content/algolia-search/{hubId}/indexes/{indexId}
Update an active Algolia search index.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
hubId | path | string | ✓ | Hub ID Example: 00112233445566778899aabb |
indexId | path | string | ✓ | Index ID Example: 00112233445566778899aabb |
Request Body
Content-Type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
label | string | User defined index label |
Request example
Responses
| Status | Description |
|---|---|
| 200 | Algolia Search Index Update Response |
Response Example (200)
Delete an indexLink copied!
DELETE /algolia-search/{hubId}/indexes/{indexId}
https://api.amplience.net/v2/content/algolia-search/{hubId}/indexes/{indexId}
Delete an Algolia search index for a given hub
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
hubId | path | string | ✓ | Hub ID Example: 00112233445566778899aabb |
indexId | path | string | ✓ | Index ID Example: 00112233445566778899aabb |
Responses
| Status | Description |
|---|---|
| 204 | Delete Algolia Search index for the given hub |
Archive an Algolia search indexLink copied!
POST /algolia-search/{hubId}/indexes/{indexId}/archive
https://api.amplience.net/v2/content/algolia-search/{hubId}/indexes/{indexId}/archive
Archive an Algolia Search Index
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
hubId | path | string | ✓ | Hub ID Example: 00112233445566778899aabb |
indexId | path | string | ✓ | Index ID Example: 00112233445566778899aabb |
Responses
| Status | Description |
|---|---|
| 200 | Archived Algolia Search Index |
Response Example (200)
List assigned content typesLink copied!
GET /algolia-search/{hubId}/indexes/{indexId}/assigned-content-types
https://api.amplience.net/v2/content/algolia-search/{hubId}/indexes/{indexId}/assigned-content-types
List all content types assigned to a search index. Each content type should have an associated webhook, which updates the index with content item data.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
hubId | path | string | ✓ | Hub ID Example: 00112233445566778899aabb |
indexId | path | string | ✓ | Index ID Example: 00112233445566778899aabb |
size | query | integer | Set the number of results per page Example: 20 | |
page | query | integer | Page number Example: 0 | |
sort | query | string | Sort parameter Example: createdDate,asc |
Responses
| Status | Description |
|---|---|
| 200 | Algolia Search Index |
Response Example (200)
Create an assigned content typeLink copied!
POST /algolia-search/{hubId}/indexes/{indexId}/assigned-content-types
https://api.amplience.net/v2/content/algolia-search/{hubId}/indexes/{indexId}/assigned-content-types
Assign content type to a search index. Assigning a content type will create an associated webhook, which updates the index with content item data.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
hubId | path | string | ✓ | Hub ID Example: 00112233445566778899aabb |
indexId | path | string | ✓ | Index ID Example: 00112233445566778899aabb |
Request Body
Content-Type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
contentTypeUri | string | ✓ | Registered Content Type Schema |
Request example
Responses
| Status | Description |
|---|---|
| 201 | Algolia Search Index |
Response Example (201)
Get assigned content typeLink copied!
GET /algolia-search/{hubId}/indexes/{indexId}/assigned-content-types/{contentTypeId}
https://api.amplience.net/v2/content/algolia-search/{hubId}/indexes/{indexId}/assigned-content-types/{contentTypeId}
Get an assigned content type for a search index. A content type should have an associated webhook, which updates the index with content item data.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
hubId | path | string | ✓ | Hub ID Example: 00112233445566778899aabb |
indexId | path | string | ✓ | Index ID Example: 00112233445566778899aabb |
contentTypeId | path | string | ✓ | Assigned Content Type ID Example: 00112233445566778899aabb |
Responses
| Status | Description |
|---|---|
| 200 | Algolia Search Index |
Response Example (200)
Delete an assigned content typeLink copied!
DELETE /algolia-search/{hubId}/indexes/{indexId}/assigned-content-types/{contentTypeId}
https://api.amplience.net/v2/content/algolia-search/{hubId}/indexes/{indexId}/assigned-content-types/{contentTypeId}
Delete an assigned content type for a search index.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
hubId | path | string | ✓ | Hub ID Example: 00112233445566778899aabb |
indexId | path | string | ✓ | Index ID Example: 00112233445566778899aabb |
contentTypeId | path | string | ✓ | Assigned Content Type ID Example: 00112233445566778899aabb |
Responses
| Status | Description |
|---|---|
| 204 | Successfully deleted an assigned content type for a search index. |
Recreate assigned content type webhookLink copied!
POST /algolia-search/{hubId}/indexes/{indexId}/assigned-content-types/{contentTypeId}/recreate-webhook
https://api.amplience.net/v2/content/algolia-search/{hubId}/indexes/{indexId}/assigned-content-types/{contentTypeId}/recreate-webhook
Recreate the webhook for this assigned content type
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
hubId | path | string | ✓ | Hub ID Example: 00112233445566778899aabb |
indexId | path | string | ✓ | Index ID Example: 00112233445566778899aabb |
contentTypeId | path | string | ✓ | Assigned Content Type ID Example: 00112233445566778899aabb |
type | query | string (active, archived) | ✓ | Type of webhook to create Example: 00112233445566778899aabb |
Request Body
Content-Type: application/json
Responses
| Status | Description |
|---|---|
| 204 | Successfully recreated the webhook |
Clear an indexLink copied!
POST /algolia-search/{hubId}/indexes/{indexId}/clear
https://api.amplience.net/v2/content/algolia-search/{hubId}/indexes/{indexId}/clear
Remove all objects from an Algolia search index
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
hubId | path | string | ✓ | Hub ID Example: 00112233445566778899aabb |
indexId | path | string | ✓ | Index ID Example: 00112233445566778899aabb |
Request Body
Content-Type: application/json
Responses
| Status | Description |
|---|---|
| 204 | Successfully cleared the Algolia search index |
Get an API keyLink copied!
GET /algolia-search/{hubId}/indexes/{indexId}/keys/{keyId}
https://api.amplience.net/v2/content/algolia-search/{hubId}/indexes/{indexId}/keys/{keyId}
Get Algolia search API key for a given index/hub
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
hubId | path | string | ✓ | Hub ID Example: 00112233445566778899aabb |
indexId | path | string | ✓ | Index ID Example: 00112233445566778899aabb |
keyId | path | string | ✓ | Key ID Example: 00112233445566778899aabb |
Responses
| Status | Description |
|---|---|
| 200 | Get search key by id |
Response Example (200)
Delete an index objectLink copied!
DELETE /algolia-search/{hubId}/indexes/{indexId}/objects/{objectId}
https://api.amplience.net/v2/content/algolia-search/{hubId}/indexes/{indexId}/objects/{objectId}
Delete an object from a search index
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
hubId | path | string | ✓ | Hub ID Example: 00112233445566778899aabb |
indexId | path | string | ✓ | Index ID Example: 00112233445566778899aabb |
objectId | path | string | ✓ | Object ID Example: 00112233445566778899aabb |
Responses
| Status | Description |
|---|---|
| 204 | Successfully deleted an object from a search index |
Get search index settingsLink copied!
GET /algolia-search/{hubId}/indexes/{indexId}/settings
https://api.amplience.net/v2/content/algolia-search/{hubId}/indexes/{indexId}/settings
Get Algolia search index settings
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
hubId | path | string | ✓ | Hub ID Example: 00112233445566778899aabb |
indexId | path | string | ✓ | Index ID Example: 00112233445566778899aabb |
Responses
| Status | Description |
|---|---|
| 200 | Algolia Search index settings for the given hub |
Response Example (200)
Update search index settingsLink copied!
PATCH /algolia-search/{hubId}/indexes/{indexId}/settings
https://api.amplience.net/v2/content/algolia-search/{hubId}/indexes/{indexId}/settings
Update settings on an active Algolia search index.
For a complete list of index settings visit the Algolia settings documentation.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
hubId | path | string | ✓ | Hub ID Example: 00112233445566778899aabb |
indexId | path | string | ✓ | Index ID Example: 00112233445566778899aabb |
forwardToReplicas | query | boolean | Forward to replicas Example: True |
Request Body
Content-Type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
replicas | array | Index replicas that are managed by Dynamic Content should follow the naming convention <hubName>.<replicaName> - e.g. anyafinn.womens-clothing-replica |
Request example
Responses
| Status | Description |
|---|---|
| 204 | Successfully updated Algolia search index settings |
Get search index statisticsLink copied!
GET /algolia-search/{hubId}/indexes/{indexId}/stats
https://api.amplience.net/v2/content/algolia-search/{hubId}/indexes/{indexId}/stats
Get Algolia search index statistics
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
hubId | path | string | ✓ | Hub ID Example: 00112233445566778899aabb |
indexId | path | string | ✓ | Index ID Example: 00112233445566778899aabb |
Responses
| Status | Description |
|---|---|
| 200 | Algolia Search index statistics for the given hub |
Response Example (200)
Unarchive an Algolia search indexLink copied!
POST /algolia-search/{hubId}/indexes/{indexId}/unarchive
https://api.amplience.net/v2/content/algolia-search/{hubId}/indexes/{indexId}/unarchive
Unarchive an Algolia Search Index
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
hubId | path | string | ✓ | Hub ID Example: 00112233445566778899aabb |
indexId | path | string | ✓ | Index ID Example: 00112233445566778899aabb |
Responses
| Status | Description |
|---|---|
| 200 | Unarchived Algolia Search Index |
Response Example (200)
Search indexes - AnalyticsLink copied!
| Method | Endpoint | Summary |
|---|---|---|
GET | /algolia-search/{hubId}/indexes/{indexId}/analytics/no-results-rate | Get rate of no results for an index |
GET | /algolia-search/{hubId}/indexes/{indexId}/analytics/searches-count | Get count of searches for an index |
GET | /algolia-search/{hubId}/indexes/{indexId}/analytics/searches-with-no-results | Get top searches with no results |
GET | /algolia-search/{hubId}/indexes/{indexId}/analytics/top-filters-no-result-search | Get top filters no result search |
GET | /algolia-search/{hubId}/indexes/{indexId}/analytics/top-hits | Get top hits for an index |
GET | /algolia-search/{hubId}/indexes/{indexId}/analytics/top-searches | Get top searches for an index |
GET | /algolia-search/{hubId}/indexes/{indexId}/analytics/user-count | Get count of users |
Get rate of no results for an indexLink copied!
GET /algolia-search/{hubId}/indexes/{indexId}/analytics/no-results-rate
https://api.amplience.net/v2/content/algolia-search/{hubId}/indexes/{indexId}/analytics/no-results-rate
Returns the rate at which searches did not return any results. A value is returned for the whole range. Values per days are also returned. Additionally, the search count and the count of searches without results, used to compute the rates, are returned as well.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
hubId | path | string | ✓ | Hub ID Example: 00112233445566778899aabb |
indexId | path | string | ✓ | Index ID Example: 00112233445566778899aabb |
startDate | query | string | The lower bound timestamp (a date, a string like “2006-01-02”) of the period to analyze. Defaults to 7 days ago, 00:00:00am, UTC Example: 2020-07-16 | |
endDate | query | string | The upper bound timestamp (a date, a string like “2006-01-02”) of the period to analyze. Defaults to Today, 23:59:59pm, UTC Example: 2020-07-23 | |
tags | query | string | Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded. E.g: “lang:fr OR lang:en”* “platform:ios AND lang:en” * “(lang:fr OR lang:en) AND platform:android” * “device:mobile%20phone” (note the URL encoded)Example: platform:ios | |
includeReplicas | query | boolean | Include replica data in the results (Can only be used in conjunction with primary indexes). Example: True |
Responses
| Status | Description |
|---|---|
| 200 | Rate of no results for a given index |
Response Example (200)
Get count of searches for an indexLink copied!
GET /algolia-search/{hubId}/indexes/{indexId}/analytics/searches-count
https://api.amplience.net/v2/content/algolia-search/{hubId}/indexes/{indexId}/analytics/searches-count
Returns the number of searches across the given time range. A value is returned for the whole range. Additionally, values for each day are returned.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
hubId | path | string | ✓ | Hub ID Example: 00112233445566778899aabb |
indexId | path | string | ✓ | Index ID Example: 00112233445566778899aabb |
startDate | query | string | The lower bound timestamp (a date, a string like “2006-01-02”) of the period to analyze. Defaults to 7 days ago, 00:00:00am, UTC Example: 2020-07-16 | |
endDate | query | string | The upper bound timestamp (a date, a string like “2006-01-02”) of the period to analyze. Defaults to Today, 23:59:59pm, UTC Example: 2020-07-23 | |
tags | query | string | Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded. E.g: “lang:fr OR lang:en”* “platform:ios AND lang:en” * “(lang:fr OR lang:en) AND platform:android” * “device:mobile%20phone” (note the URL encoded)Example: platform:ios | |
includeReplicas | query | boolean | Include replica data in the results (Can only be used in conjunction with primary indexes). Example: True |
Responses
| Status | Description |
|---|---|
| 200 | Count of searches for a given index |
Response Example (200)
Get top searches with no resultsLink copied!
GET /algolia-search/{hubId}/indexes/{indexId}/analytics/searches-with-no-results
https://api.amplience.net/v2/content/algolia-search/{hubId}/indexes/{indexId}/analytics/searches-with-no-results
Returns top searches that did not return any results. Limited to the 1000 most frequent.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
hubId | path | string | ✓ | Hub ID Example: 00112233445566778899aabb |
indexId | path | string | ✓ | Index ID Example: 00112233445566778899aabb |
startDate | query | string | The lower bound timestamp (a date, a string like “2006-01-02”) of the period to analyze. Defaults to 7 days ago, 00:00:00am, UTC Example: 2020-07-16 | |
endDate | query | string | The upper bound timestamp (a date, a string like “2006-01-02”) of the period to analyze. Defaults to Today, 23:59:59pm, UTC Example: 2020-07-23 | |
limit | query | number | How many items to fetch. Example: 10 | |
offset | query | number | From which position to start retrieving results. Example: 0 | |
tags | query | string | Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded. E.g: “lang:fr OR lang:en”* “platform:ios AND lang:en” * “(lang:fr OR lang:en) AND platform:android” * “device:mobile%20phone” (note the URL encoded)Example: platform:ios | |
includeReplicas | query | boolean | Include replica data in the results (Can only be used in conjunction with primary indexes). Example: True |
Responses
| Status | Description |
|---|---|
| 200 | Top searches that did not return any results |
Response Example (200)
Get top filters no result searchLink copied!
GET /algolia-search/{hubId}/indexes/{indexId}/analytics/top-filters-no-result-search
https://api.amplience.net/v2/content/algolia-search/{hubId}/indexes/{indexId}/analytics/top-filters-no-result-search
Returns top filters that did not return any results for given search. Limited to the top 1000.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
hubId | path | string | ✓ | Hub ID Example: 00112233445566778899aabb |
indexId | path | string | ✓ | Index ID Example: 00112233445566778899aabb |
search | query | string | ✓ | The query term. Must match the exact user input Example: q0 |
startDate | query | string | The lower bound timestamp (a date, a string like “2006-01-02”) of the period to analyze. Defaults to 7 days ago, 00:00:00am, UTC Example: 2020-07-16 | |
endDate | query | string | The upper bound timestamp (a date, a string like “2006-01-02”) of the period to analyze. Defaults to Today, 23:59:59pm, UTC Example: 2020-07-23 | |
limit | query | number | How many items to fetch. Example: 10 | |
offset | query | number | From which position to start retrieving results. Example: 0 | |
tags | query | string | Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded. E.g: “lang:fr OR lang:en”* “platform:ios AND lang:en” * “(lang:fr OR lang:en) AND platform:android” * “device:mobile%20phone” (note the URL encoded)Example: platform:ios | |
includeReplicas | query | boolean | Include replica data in the results (Can only be used in conjunction with primary indexes). Example: True |
Responses
| Status | Description |
|---|---|
| 200 | Top searches that did not return any results |
Response Example (200)
Get top hits for an indexLink copied!
GET /algolia-search/{hubId}/indexes/{indexId}/analytics/top-hits
https://api.amplience.net/v2/content/algolia-search/{hubId}/indexes/{indexId}/analytics/top-hits
If search is supplied, the top hits for the given search.
If search is omitted, the overall top hits will be returned for this index.
Limited to the 1000 most frequent ones.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
hubId | path | string | ✓ | Hub ID Example: 00112233445566778899aabb |
indexId | path | string | ✓ | Index ID Example: 00112233445566778899aabb |
search | query | string | Get top hits for a given search. Must match the exact user input. Example: term | |
startDate | query | string | The lower bound timestamp (a date, a string like “2006-01-02”) of the period to analyze. Defaults to 7 days ago, 00:00:00am, UTC Example: 2020-07-16 | |
endDate | query | string | The upper bound timestamp (a date, a string like “2006-01-02”) of the period to analyze. Defaults to Today, 23:59:59pm, UTC Example: 2020-07-23 | |
limit | query | number | How many items to fetch. Example: 10 | |
offset | query | number | From which position to start retrieving results. Example: 0 | |
tags | query | string | Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded. E.g: “lang:fr OR lang:en”* “platform:ios AND lang:en” * “(lang:fr OR lang:en) AND platform:android” * “device:mobile%20phone” (note the URL encoded)Example: platform:ios | |
includeReplicas | query | boolean | Include replica data in the results (Can only be used in conjunction with primary indexes). Example: True |
Responses
| Status | Description |
|---|---|
| 200 | Top hits for a given search term |
Response Example (200)
Get top searches for an indexLink copied!
GET /algolia-search/{hubId}/indexes/{indexId}/analytics/top-searches
https://api.amplience.net/v2/content/algolia-search/{hubId}/indexes/{indexId}/analytics/top-searches
Returns top searches. Limited to the 1000 most frequent ones. For each search, also returns the average number of hits returned.
If clickAnalytics=true, then for each search, also returns:
- the click through rate,
- the conversion rate,
- the average click position.
You can also order the results using orderBy and direction.
Distinguishing no data vs 0% CTR, 0% CR, no average
- You have click analytics enabled but no queries were received with clickAnalytics=true
- in that case CTR, CR and average will be
null.
- in that case CTR, CR and average will be
- You have click analytics enabled, we received queries with clickAnalytics=true
- CTR and CR are 0 until we receive click/conversion events
- average will stay null until we receive a click event
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
hubId | path | string | ✓ | Hub ID Example: 00112233445566778899aabb |
indexId | path | string | ✓ | Index ID Example: 00112233445566778899aabb |
clickAnalytics | query | boolean | If true, then for each search, also returns: the click through rate,* the conversion rate, * the average click position.Example: False | |
orderBy | query | string | You can reorder the results by passing one of the following: searchCount* clickThroughRate * conversionRate * averageClickPosition | |
direction | query | string (asc, desc) | Change the order of the results Example: desc | |
startDate | query | string | The lower bound timestamp (a date, a string like “2006-01-02”) of the period to analyze. Defaults to 7 days ago, 00:00:00am, UTC Example: 2020-07-16 | |
endDate | query | string | The upper bound timestamp (a date, a string like “2006-01-02”) of the period to analyze. Defaults to Today, 23:59:59pm, UTC Example: 2020-07-23 | |
limit | query | number | How many items to fetch. Example: 10 | |
offset | query | number | From which position to start retrieving results. Example: 0 | |
tags | query | string | Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded. E.g: “lang:fr OR lang:en”* “platform:ios AND lang:en” * “(lang:fr OR lang:en) AND platform:android” * “device:mobile%20phone” (note the URL encoded)Example: platform:ios | |
includeReplicas | query | boolean | Include replica data in the results (Can only be used in conjunction with primary indexes). Example: True |
Responses
| Status | Description |
|---|---|
| 200 | Top searches for a given index |
Response example (200): clickAnalyticsFalse
Response example (200): clickAnalyticsTrue
Get count of usersLink copied!
GET /algolia-search/{hubId}/indexes/{indexId}/analytics/user-count
https://api.amplience.net/v2/content/algolia-search/{hubId}/indexes/{indexId}/analytics/user-count
Returns count of distinct user across the given time range.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
hubId | path | string | ✓ | Hub ID Example: 00112233445566778899aabb |
indexId | path | string | ✓ | Index ID Example: 00112233445566778899aabb |
startDate | query | string | The lower bound timestamp (a date, a string like “2006-01-02”) of the period to analyze. Defaults to 7 days ago, 00:00:00am, UTC Example: 2020-07-16 | |
endDate | query | string | The upper bound timestamp (a date, a string like “2006-01-02”) of the period to analyze. Defaults to Today, 23:59:59pm, UTC Example: 2020-07-23 | |
includeReplicas | query | boolean | Include replica data in the results (Can only be used in conjunction with primary indexes). Example: True | |
tags | query | string | Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded. E.g: “lang:fr OR lang:en”* “platform:ios AND lang:en” * “(lang:fr OR lang:en) AND platform:android” * “device:mobile%20phone” (note the URL encoded)Example: platform:ios |
Responses
| Status | Description |
|---|---|
| 200 | Count of distinct user across the given time range |