Skip to main content

Personalization API (0.1.0)

API powering the Personalization feature of Algolia.

Authentication

appId

Security Scheme Type API Key
Header parameter name: X-Algolia-Application-Id

apiKey

Security Scheme Type API Key
Header parameter name: X-Algolia-API-Key

personalization

Personalization API reference

Send requests to the Algolia REST API.

This method allow you to send requests to the Algolia REST API.

Authorizations:
path Parameters
path
required
string
Example: /keys

The path of the API endpoint to target, anything after the /1 needs to be specified.

query Parameters
parameters
string
Example: parameters=?query=mySearchQuery&hitsPerPage=10

URL-encoded query string. Force some query parameters to be applied for each query made with this API key.

Responses

Response samples

Content type
application/json
{ }

Send requests to the Algolia REST API.

This method allow you to send requests to the Algolia REST API.

Authorizations:
path Parameters
path
required
string
Example: /keys

The path of the API endpoint to target, anything after the /1 needs to be specified.

query Parameters
parameters
string
Example: parameters=?query=mySearchQuery&hitsPerPage=10

URL-encoded query string. Force some query parameters to be applied for each query made with this API key.

Request Body schema: application/json

The parameters to send with the custom request.

object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{ }

Send requests to the Algolia REST API.

This method allow you to send requests to the Algolia REST API.

Authorizations:
path Parameters
path
required
string
Example: /keys

The path of the API endpoint to target, anything after the /1 needs to be specified.

query Parameters
parameters
string
Example: parameters=?query=mySearchQuery&hitsPerPage=10

URL-encoded query string. Force some query parameters to be applied for each query made with this API key.

Request Body schema: application/json

The parameters to send with the custom request.

object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{ }

Send requests to the Algolia REST API.

This method allow you to send requests to the Algolia REST API.

Authorizations:
path Parameters
path
required
string
Example: /keys

The path of the API endpoint to target, anything after the /1 needs to be specified.

query Parameters
parameters
string
Example: parameters=?query=mySearchQuery&hitsPerPage=10

URL-encoded query string. Force some query parameters to be applied for each query made with this API key.

Request Body schema: application/json

The parameters to send with the custom request.

object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{ }

Get the user profile built from Personalization strategy.

The profile is structured by facet name used in the strategy. Each facet value is mapped to its score. Each score represents the user affinity for a specific facet value given the userToken past events and the Personalization strategy defined. Scores are bounded to 20. The last processed event timestamp is provided using the ISO 8601 format for debugging purposes.

Authorizations:
path Parameters
userToken
required
string

userToken representing the user for which to fetch the Personalization profile.

Responses

Response samples

Content type
application/json
{
  • "userToken": "string",
  • "lastEventAt": "string",
  • "scores": { }
}

Delete the user profile and all its associated data.

Returns, as part of the response, a date until which the data can safely be considered as deleted for the given user. This means that if you send events for the given user before this date, they will be ignored. Any data received after the deletedUntil date will start building a new user profile. It might take a couple hours before for the deletion request to be fully processed.

Authorizations:
path Parameters
userToken
required
string

userToken representing the user for which to fetch the Personalization profile.

Responses

Response samples

Content type
application/json
{
  • "userToken": "string",
  • "deletedUntil": "string"
}

Set a new personalization strategy.

A strategy defines the events and facets that impact user profiles and personalized search results.

Authorizations:
Request Body schema: application/json
required
Array of objects (eventScoring) [ items ]

Scores associated with the events.

required
Array of objects (facetScoring) [ items ]

Scores associated with the facets.

personalizationImpact
required
integer

The impact that personalization has on search results: a number between 0 (personalization disabled) and 100 (personalization fully enabled).

Responses

Request samples

Content type
application/json
{
  • "eventScoring": [
    ],
  • "facetScoring": [
    ],
  • "personalizationImpact": 0
}

Response samples

Content type
application/json
{
  • "message": "string"
}

Get the current personalization strategy.

The strategy contains information on the events and facets that impact user profiles and personalized search results.

Authorizations:

Responses

Response samples

Content type
application/json
{
  • "eventScoring": [
    ],
  • "facetScoring": [
    ],
  • "personalizationImpact": 0
}