Before you begin
Ensure you have a query string builder utility, such as theqs library available in your project.
Fetch user profiles
The Advanced Personalization API exposes an endpoint to retrieve user profiles based on specified parameters. Here’s a function to communicate with this endpoint:JavaScript
appId: Your Algolia Application IDapiKey: Your Algolia API Key withsearch,browse, andrecommendationACLsregion: The Algolia region (for example,"us","eu")- Additional parameters for retrieving user profiles
Browse user profiles
To iterate through all user profiles and handle pagination automatically, use this function:JavaScript
Process batches of user profiles
Here’s an example of how to process batches of user profiles:JavaScript
category:camping affinity and implement targeted strategies for these users.
For example, send them an email about a discount on camping products.
Find the list of available parameters in the REST API documentation.