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.
🧩 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.
Installation
The SDK is available as a NuGet package. You can install it using the .NET CLI or through the NuGet Package Manager in Visual Studio:
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:
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.
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.
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:
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.
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.
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.
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.
Address Verify
Address verification provides a method to verify and standardize addresses.
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.