C# SDK
The IPWho C# SDK wraps the IP geolocation API in idiomatic .NET — typed POCO responses, async/await support, and a single NuGet reference. One call returns the full payload: geolocation, timezone, currency, connection (ASN/ISP), security flags, and more.
- Source: lavrox/SDK-IPWho-IP-Geolocation-CSharp
- NuGet id:
IPWho.Sdk(not on nuget.org yet — use the GitHub repo until it is) - API key: ipwho.org/free-plan
Targets .NET 8. Namespace: IPWho. Client: IpWhoClient.
Installation
Section titled “Installation”When NuGet is live:
dotnet add package IPWho.SdkUntil then, clone the GitHub repo and add a project reference to IPWho.Sdk.csproj.
Quick start
Section titled “Quick start”using IPWho;
var client = new IpWhoClient(Environment.GetEnvironmentVariable("IPWHO_API_KEY")!);
var resp = await client.LookupAsync("8.8.8.8"); // GET /ip/{ip}var me = await client.MeAsync(); // GET /mevar bulk = await client.BulkAsync(new List<string> { "8.8.8.8", "1.1.1.1" });Error handling
Section titled “Error handling”try{ var resp = await client.LookupAsync("8.8.8.8");}catch (InvalidIPException){ // malformed IP address (404)}catch (RateLimitException){ // plan limit reached (429)}catch (APIResponseException){ // unexpected response}Methods
Section titled “Methods”LookupAsync(string ip)—GET /ip/{ip}MeAsync()—GET /meBulkAsync(List<string> ips)—GET /bulk/{a,b,c}