The generated API clients are a work in progress, you can also find our stable clients on the Algolia documentation.

Skip to main content

Personalization API (1.0.0)

Download OpenAPI specification:Download

API powering the Personalization feature of Algolia.

Profiles

Manage users' profiles.

Get a user profile

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:
(appIdapiKey)
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 a user profile

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 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 for the deletion request to be fully processed.

Authorizations:
(appIdapiKey)
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"
}

Strategies

Manage personalization strategies.

Get the current strategy

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

Authorizations:
(appIdapiKey)

Responses

Response samples

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

Set a new strategy

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

Authorizations:
(appIdapiKey)
Request Body schema: application/json
required
Array of objects (eventScoring)

Scores associated with the events.

required
Array of objects (facetScoring)

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"
}