> ## Documentation Index
> Fetch the complete documentation index at: https://docs.loqate.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Loqate .NET SDK [BETA]

> The Loqate .NET SDK provides a modern, strongly-typed interface for accessing Loqate's Capture, Verify, and Enrich services in .NET applications.

# Overview

The Loqate .NET SDK provides a modern, strongly-typed interface for Loqate’s Capture, Verify, and Enrich services.
It replaces direct HTTP calls and manual JSON handling with simple C# methods and models.

You can call the same services exposed by our API — just faster, safer, and with full .NET support.

<Note>🧩 The SDK maps 1-to-1 with Loqate’s REST APIs — so if you’ve used our API Reference, the concepts are identical, just easier to implement.</Note>

## Installation

The SDK is available as a [NuGet package](https://www.nuget.org/packages/Loqate.Core). You can install it using the .NET CLI or through the NuGet Package Manager in Visual Studio:

```bash theme={null}
dotnet add package Loqate.Core
```

## Initialization and configuration

You can initialize the Loqate client by importing `Loqate.Core` and providing your API key, as shown below:

```csharp theme={null}
using Loqate.Core;
using Loqate.Core.Models.Components;
using Loqate.Core.Models.Requests;

var sdk = new LoqateCore(apiKey: "<YOUR_API_KEY_HERE>");

CaptureInteractiveFindRequest req = new CaptureInteractiveFindRequest() {
    Key = "AA11-AA11-AA11-AA11",
    Text = "wr5 3da",
    Container = "GB|RM|ENG|3DA-WR5",
    Origin = "52.182,-2.222",
    Countries = "GB,US,CA",
    Limit = 10,
    Language = "",
    Bias = false,
    Filters = "",
    GeoFence = "",
};

var res = await sdk.Capture.FindAsync(req);
```

You can also configure additional options such as the server URL for the API.

<Tip>
  The `serverUrl` parameter allows you to override the default API endpoint. You might want to change this if:

  * You need to route requests through a proxy server for security or compliance reasons.
  * You are using a regional endpoint to reduce latency or comply with data residency requirements.
  * Your organization provides a custom endpoint for Loqate services.
    If you do not have any such requirements, you can leave this parameter at its default value.
</Tip>

```csharp theme={null}
var sdk = new LoqateCore(
    serverUrl: "https://api.addressy.com",
    apiKey: "<YOUR_API_KEY_HERE>"
);
```

Your API key can be set on the client instance, or passed in per-request:

```csharp theme={null}
CaptureInteractiveFindRequest req = new CaptureInteractiveFindRequest() {
    Key = "AA11-AA11-AA11-AA11",
    Text = "wr5 3da",
};
```

## Quick start examples

### Address Capture

Address capture provides two main methods: `FindAsync` and `RetrieveAsync`.

#### Address Capture - Find

The find request is used to search for addresses based on user input.

```csharp theme={null}
var response = await sdk.Capture.FindAsync(new CaptureInteractiveFindRequest()
{
    Text = "10 downing st, london"
});
```

You can also pass additional parameters to refine the search, such as `Container` to specify a container ID.

```csharp theme={null}
var response = await sdk.Capture.FindAsync(new CaptureInteractiveFindRequest()
{
    Text = "10 downing st, london",
    Container = "GB|RM|ENG|SW1A-2AA",
    Origin = "51.5034,-0.1276",
    Countries = "GB,US,CA",
    Limit = 5,
    Language = "",
    Bias = true,
    Filters = "",
    GeoFence = "",
});
```

#### Address Capture - Retrieve

The retrieve request is used to get the full address details for a specific address ID returned from a find request.

```csharp theme={null}
var details = await sdk.Capture.RetrieveAsync(new CaptureInteractiveRetrieveRequest()
{
    Id = res1.CaptureInteractiveFindResponseValue.Items[0].Id
});
```

For interactive address search or autocomplete, see the [Capture SDK guide](/our-services/address-capture/overview).

### Address Verify

Address verification provides a method to verify and standardize addresses.

```csharp theme={null}
var response = await sdk.Cleansing.BatchAsync(requestBody: new VerifyServiceRequest()
{
    Addresses =
    [
        new()
        {
            Id = "1",
            Address = "10 Downing St, Westminster, London SW1A 2AA, UK",
            Country = "GB"
        }
    ],
    Options = new()
    {
        ServerOptions = new()
        {
            FieldStatus = CleansingInternationalBatchTrueFalse.True
        },
        Process = CleansingInternationalBatchProcessOptions.Verify
    }
}
);
```

## Advanced usage

For more advanced usage and additional features, refer to the [NuGet listing](https://www.nuget.org/packages/Loqate.Core).
