Skip to main content
Latest version: Install version 7 of the C#/.NET API clients by adding the Algolia.Search package from NuGet. For example, in a new console project:

Building ASP.NET apps?

Learn how to use dependency injection with the C# API client.
The C#/.NET API clients are open source and generated from OpenAPI specifications.

Test your installation

Run this short program to verify that your API client can connect to Algolia, add a record to a test index, and search it. To import and maintain a dataset after the test succeeds, see Send records with an API client.
1

Create account

If you haven’t already, create an Algolia account.
2

Copy code

Copy the following code into a new project or file. Replace ALGOLIA_APPLICATION_ID and ALGOLIA_API_KEY with values from your account. Make sure to use an API key with the addObject and search ACL.
In production, use environment variables for your credentials.
3

Run code

Run the code, depending on your development environment.
If the command is successful, you’ll see the API response as a native object in your programming language.
Last modified on December 2, 2026