Skip to main content
  • C#
  • Dart
  • Go
  • Java
  • JavaScript
  • Kotlin
  • PHP
  • Python
  • Ruby
  • Scala
  • Swift
The Personalization API client is part of the Algolia.Search package. To install this package, run:
dotnet add package Algolia.Search
To use the Personalization client, import these namespaces:
C#
using Algolia.Search.Clients;
using Algolia.Search.Http;
using Algolia.Search.Models.Personalization;
To create an instance of the client:
C#
var client = new PersonalizationClient(
  new PersonalizationConfig(
    "ALGOLIA_APPLICATION_ID",
    "ALGOLIA_API_KEY",
    "ALGOLIA_APPLICATION_REGION"
  )
);
Replace ALGOLIA_APPLICATION_REGION with your Algolia application’s analytics region: us for the United States or eu for Europe. You can check your analytics region in the Infrastructure > Analytics section of the Algolia dashboard.

Analytics region

The Personalization API client requires specifying your Algolia application’s analytics region to properly route requests to the correct data center. Replace ALGOLIA_APPLICATION_REGION with your application’s analytics region:
  • us for the United States
  • eu for Europe
You can check your analytics region in the Infrastructure > Analytics section of the Algolia dashboard.
I