IpLocate 3.1.0
Package IpLocate is deprecated and longer maintained. Use IPLocateIO.Client instead.
dotnet add package IpLocate --version 3.1.0
NuGet\Install-Package IpLocate -Version 3.1.0
<PackageReference Include="IpLocate" Version="3.1.0" />
<PackageVersion Include="IpLocate" Version="3.1.0" />
<PackageReference Include="IpLocate" />
paket add IpLocate --version 3.1.0
#r "nuget: IpLocate, 3.1.0"
#:package IpLocate@3.1.0
#addin nuget:?package=IpLocate&version=3.1.0
#tool nuget:?package=IpLocate&version=3.1.0
IPLocate Geolocation Client for C#
A C# client for the IPLocate.io geolocation API. Look up detailed geolocation and threat intelligence data for any IP address:
- IP geolocation: IP to country, IP to city, IP to region/state, coordinates, timezone, postal code
- ASN information: Internet service provider, network details, routing information
- Privacy & threat detection: VPN, proxy, Tor, hosting provider detection
- Company information: Business details associated with IP addresses - company name, domain, type (ISP/hosting/education/government/business)
- Abuse contact: Network abuse reporting information
- Hosting detection: Cloud provider and hosting service detection using our proprietary hosting detection engine
See what information we can provide for your IP address.
Getting started
You can make 1,000 free requests per day with a free account. For higher plans, check out API pricing.
Installation
.NET CLI
dotnet add package IpLocate
Authentication
Get your free API key from IPLocate.io, and pass it to the IPLocateClient constructor:
IPLocateClient client = IpLocateClientFactory.Client("YOUR_API_KEY");
Quick start
using IpLocate;
var client = IpLocateClientFactory.Client("YOUR_API_KEY");
var result = await client.LookupCurrentIpAsync();
Console.WriteLine($"IP: {result.Ip}, Country: {result.Country}");
Dependency Injection
services.AddHttpClient<IPLocateClient>((sp, http) =>
{
var opts = sp.GetRequiredService<IOptions<MyApiOptions>>();
http.BaseAddress = new Uri(opts.Value.BaseUrl);
http.DefaultRequestHeaders.Add("X-Api-Key", opts.Value.ApiKey);
http.DefaultRequestHeaders.Add("Accept", "application/json");
http.DefaultRequestHeaders.Add("User-Agent", "IPLocateClient-OkHttp/1.0.0");
});
API reference
For complete API documentation, visit iplocate.io/docs.
License
This project is licensed under the MIT License - see the LICENSE file for details
Testing
To run tests for this C# library:
dotnet test
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- Newtonsoft.Json (>= 13.0.4)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.