Skip to main content
GET
/
2
/
users
curl
curl --request GET \
  --url 'https://ai-personalization.eu.algolia.com/2/users?startDate=2024-06-27T08%3A27%3A26Z&endDate=2024-06-28T08%3A27%3A26Z&indices=products_EN&affinity=brand&limit=10&nextPageToken=lorem&previousPageToken=lorem' \
  --header 'accept: application/json' \
  --header 'x-algolia-api-key: ALGOLIA_API_KEY' \
  --header 'x-algolia-application-id: ALGOLIA_APPLICATION_ID'
{
  "users": [
    {
      "userID": "<string>",
      "affinities": [
        {
          "name": "<string>",
          "indices": [
            "<string>"
          ],
          "value": "<string>",
          "score": 10.5,
          "lastUpdatedAt": "<string>"
        }
      ],
      "lastUpdatedAt": "<string>"
    }
  ],
  "previousPageToken": "<string>",
  "nextPageToken": "<string>"
}
Required ACL: search, browse, recommendation

Authorizations

x-algolia-application-id
string
header
required

Your Algolia application ID.

x-algolia-api-key
string
header
required

Your Algolia API key with the necessary permissions to make the request. Permissions are controlled through access control lists (ACL) and access restrictions. The required ACL to make a request is listed in each endpoint's reference.

Query Parameters

startDate
string

Filter users by start date (in RFC3339 format). Only users that were updated after the passed date will be returned.

Example:

"2024-06-27T08:27:26Z"

endDate
string

Filter users by end date (in RFC3339 format). Only users that were updated before the passed date will be returned.

Example:

"2024-06-28T08:27:26Z"

indices
string[]

Filter users by matching indices. If multiple indices are passed, returned users will match all indices.

affinity
string[]

Filter users by affinity name and value. If multiple values are passed, returned users will match all values.

limit
integer
default:10

Limit the number of users in the response. The value of this parameter ranges from 1 to 1000.

Required range: 1 <= x <= 1000
nextPageToken
string

Reference for the next page, when navigating forward using pagination. Can't be used in the same request as previousPageToken.

previousPageToken
string

Reference for the previous page, when navigating backward using pagination. Can't be used in the same request as nextPageToken.

Response

OK

users
object[]
required
previousPageToken
string
nextPageToken
string
I