Skip to main content
  • C#
  • Dart
  • Go
  • Java
  • JavaScript
  • Kotlin
  • PHP
  • Python
  • Ruby
  • Scala
  • Swift
The Insights API client is part of the Algolia.Search package. To install this package, run:
dotnet add package Algolia.Search
To use the Insights client, import these namespaces:
C#
using Algolia.Search.Clients;
using Algolia.Search.Http;
using Algolia.Search.Models.Insights;
To create an instance of the client:
C#
var client = new InsightsClient(
  new InsightsConfig("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY", "ALGOLIA_APPLICATION_REGION")
);

Analytics region

The Insights 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
  • de for Europe
You can check your analytics region in the Infrastructure > Analytics section of the Algolia dashboard.
I