# C# SDK Migration

## Overview[​](#overview "Direct link to Overview")

The [GetAddress .NET SDK](https://www.nuget.org/packages/getAddress.Sdk) can be used with Ideal Postcodes via our compatibility API. Update the base URL and API key to continue using your existing code.

## Quick Start[​](#quick-start "Direct link to Quick Start")

### 1. Get an API Key[​](#1-get-an-api-key "Direct link to 1. Get an API Key")

Create an API key at [account.ideal-postcodes.co.uk](https://account.ideal-postcodes.co.uk)

### 2. Update Configuration[​](#2-update-configuration "Direct link to 2. Update Configuration")

Point the SDK to the Ideal Postcodes compatibility endpoint and use your new API key.

**Direct HttpClient:**

```
using System.Net.Http;

using getAddress.Sdk;



var httpClient = new HttpClient

{

    BaseAddress = new Uri("https://ga.ideal-postcodes.co.uk/")

};



// Ideal Postcodes API Keys all begin `ak_` You can leave "admin-key" as is

var apiKeys = new ApiKeys("your-ideal-postcodes-api-key", "admin-key");



var api = new Api(apiKeys, httpClient);
```

**With Dependency Injection (ASP.NET Core):**

### 3. Use as Normal[​](#3-use-as-normal "Direct link to 3. Use as Normal")

The main methods provided by the SDK are supported.

```
// Autocomplete

var findResult = await api.Find("SW1A 2AA");



var autocompleteResult = await api.Autocomplete("10 downing street");
```

All SDK methods, request parameters, and response formats remain the same.

## SDK v1 (GetAddressApi)[​](#sdk-v1-getaddressapi "Direct link to SDK v1 (GetAddressApi)")

If you're using the older `GetAddressApi` class, set the `BaseAddress` property:

```
using getAddress.Sdk;



var api = new GetAddressApi(new ApiKey("your-ideal-postcodes-api-key"));

api.BaseAddress = new Uri("https://ga.ideal-postcodes.co.uk/");
```

## Need Help?[​](#need-help "Direct link to Need Help?")

Contact <support@ideal-postcodes.co.uk> for migration assistance.

## Next Steps[​](#next-steps "Direct link to Next Steps")

For full functionality and better performance, consider migrating to the native Ideal Postcodes API:

* [API Documentation](/docs/api.md)
* [Postcode Lookup Migration](/docs/migrate/getaddressio/postcode-lookup.md)
* [Autocomplete Migration](/docs/migrate/getaddressio/autocomplete.md)
