Search API Client for C#.NET

C# .NET + Algolia

Build search experiences with libraries & UI components.

Sign up
What is Algolia

What is Algolia

Algolia empowers modern developers to build world class search and discovery experiences without any DevOps.
Libraries with every major language and framework make it easy to enrich your users' experiences. 

Algolia C# .NET Client

API-first search and discovery for your .NET applications

Algolia C# .NET client library handles things like network retry, record batching, and zero downtime reindexing. It's production-ready, Open source and maintained by Algolia.

Features

  • Gives API access to all Algolia functionality, settings, advanced features, and ML/AI products

  • Installation options: .NET CLI, Nuget Package Manager Console, Nuget.org

  • Every request and response are typed

  • POCOs

  • Background retry strategy to ensure uptime

  • Batching via iterators to optimize number of network calls

  • Zero downtime reindexing feature

  • Injectable HTTP client

  • Asynchronous and synchronous methods to interact with Algolia's API

Version

  • .NET Standard 1.3 to .NET Standard 2.1,

  • .NET Core 1.0 to .NET Core 3.0,

  • .NET Framework 4.5 to .NET Framework 4.7.1

  • .NET API for C# and F#

  • Supports ASP.NET, MVC, WebAPI

Related Integrations

Get started

  • Install (get a free account here)
    1
    dotnet add package Algolia.Search
  • Index
    1
    List<Contact> contacts = new List<Contact>
    2
    {
    3
        new Contact { ObjectID = "myID1", Firstname = "Jimmie", Lastname = "Barninger" },
    4
        new Contact { ObjectID = "myID2", Firstname = "Warren", Lastname = "Speach" }
    5
    };
    6
    7
    index.SaveObjects(contacts);
    8
    9
    // Asynchronous
    10
    await index.SaveObjectsAsync(contacts);
  • Search
    1
    SearchIndex index = client.SearchIndex("contacts");
    2
    3
    // Synchronous
    4
    var result = index.Search<Contact>(new Query("query string"));
    5
    6
    // Synchronous with settings
    7
    var result = index.Search<Contact>(new Query("query string")
    8
    {
    9
      AttributesToRetrieve = new List<string> { "firstname", "lastname" }
    10
      HitsPerPage = 50
    11
    });
    12
    13
    // Asynchronous
    14
    var result = await index.SearchAsync<Contact>(new Query("query string"));
    15
    16
    // Asynchronous with settings
    17
    var result = await index.SearchAsync<Contact>(new Query("query string")
    18
    {
    19
        AttributesToRetrieve = new List<string> { "firstname", "lastname" }
    20
        HitsPerPage = 50
    21
    });
Get started for free
Explore developer docs